lone-format 0.10.0 → 0.11.1

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,67 +1,65 @@
1
- (function(We,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(We=typeof globalThis<"u"?globalThis:We||self,o(We.LoneFormat={},We.Vue))})(this,function(We,o){"use strict";class ir{add(t,r,a){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(i){this[i]=this[i]||[],r&&this[i][a?"unshift":"push"](r)},this)}run(t,r){this[t]=this[t]||[],this[t].forEach(function(a){a.call(r&&r.context?r.context:r,r)})}}class ar{constructor(t){this.jsep=t,this.registered={}}register(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];r.forEach(i=>{if(typeof i!="object"||!i.name||!i.init)throw new Error("Invalid JSEP plugin format");this.registered[i.name]||(i.init(this.jsep),this.registered[i.name]=i)})}}class M{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+M.version}static addUnaryOp(t){return M.max_unop_len=Math.max(t.length,M.max_unop_len),M.unary_ops[t]=1,M}static addBinaryOp(t,r,a){return M.max_binop_len=Math.max(t.length,M.max_binop_len),M.binary_ops[t]=r,a?M.right_associative.add(t):M.right_associative.delete(t),M}static addIdentifierChar(t){return M.additional_identifier_chars.add(t),M}static addLiteral(t,r){return M.literals[t]=r,M}static removeUnaryOp(t){return delete M.unary_ops[t],t.length===M.max_unop_len&&(M.max_unop_len=M.getMaxKeyLen(M.unary_ops)),M}static removeAllUnaryOps(){return M.unary_ops={},M.max_unop_len=0,M}static removeIdentifierChar(t){return M.additional_identifier_chars.delete(t),M}static removeBinaryOp(t){return delete M.binary_ops[t],t.length===M.max_binop_len&&(M.max_binop_len=M.getMaxKeyLen(M.binary_ops)),M.right_associative.delete(t),M}static removeAllBinaryOps(){return M.binary_ops={},M.max_binop_len=0,M}static removeLiteral(t){return delete M.literals[t],M}static removeAllLiterals(){return M.literals={},M}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new M(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(r=>r.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return M.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!M.binary_ops[String.fromCharCode(t)]||M.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return M.isIdentifierStart(t)||M.isDecimalDigit(t)}throwError(t){const r=new Error(t+" at character "+this.index);throw r.index=this.index,r.description=t,r}runHook(t,r){if(M.hooks[t]){const a={context:this,node:r};return M.hooks.run(t,a),a.node}return r}searchHook(t){if(M.hooks[t]){const r={context:this};return M.hooks[t].find(function(a){return a.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let t=this.code;for(;t===M.SPACE_CODE||t===M.TAB_CODE||t===M.LF_CODE||t===M.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),r=t.length===1?t[0]:{type:M.COMPOUND,body:t};return this.runHook("after-all",r)}gobbleExpressions(t){let r=[],a,i;for(;this.index<this.expr.length;)if(a=this.code,a===M.SEMCOL_CODE||a===M.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())r.push(i);else if(this.index<this.expr.length){if(a===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,M.max_binop_len),r=t.length;for(;r>0;){if(M.binary_ops.hasOwnProperty(t)&&(!M.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!M.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=r,t;t=t.substr(0,--r)}return!1}gobbleBinaryExpression(){let t,r,a,i,u,f,x,p,m;if(f=this.gobbleToken(),!f||(r=this.gobbleBinaryOp(),!r))return f;for(u={value:r,prec:M.binaryPrecedence(r),right_a:M.right_associative.has(r)},x=this.gobbleToken(),x||this.throwError("Expected expression after "+r),i=[f,u,x];r=this.gobbleBinaryOp();){if(a=M.binaryPrecedence(r),a===0){this.index-=r.length;break}u={value:r,prec:a,right_a:M.right_associative.has(r)},m=r;const S=v=>u.right_a&&v.right_a?a>v.prec:a<=v.prec;for(;i.length>2&&S(i[i.length-2]);)x=i.pop(),r=i.pop().value,f=i.pop(),t={type:M.BINARY_EXP,operator:r,left:f,right:x},i.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+m),i.push(u,t)}for(p=i.length-1,t=i[p];p>1;)t={type:M.BINARY_EXP,operator:i[p-1].value,left:i[p-2],right:t},p-=2;return t}gobbleToken(){let t,r,a,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(t=this.code,M.isDecimalDigit(t)||t===M.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===M.SQUOTE_CODE||t===M.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===M.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,M.max_unop_len),a=r.length;a>0;){if(M.unary_ops.hasOwnProperty(r)&&(!M.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!M.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=a;const u=this.gobbleToken();return u||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:M.UNARY_EXP,operator:r,argument:u,prefix:!0})}r=r.substr(0,--a)}M.isIdentifierStart(t)?(i=this.gobbleIdentifier(),M.literals.hasOwnProperty(i.name)?i={type:M.LITERAL,value:M.literals[i.name],raw:i.name}:i.name===M.this_str&&(i={type:M.THIS_EXP})):t===M.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let r=this.code;for(;r===M.PERIOD_CODE||r===M.OBRACK_CODE||r===M.OPAREN_CODE||r===M.QUMARK_CODE;){let a;if(r===M.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==M.PERIOD_CODE)break;a=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===M.OBRACK_CODE?(t={type:M.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==M.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===M.OPAREN_CODE?t={type:M.CALL_EXP,arguments:this.gobbleArguments(M.CPAREN_CODE),callee:t}:(r===M.PERIOD_CODE||a)&&(a&&this.index--,this.gobbleSpaces(),t={type:M.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),a&&(t.optional=!0),this.gobbleSpaces(),r=this.code}return t}gobbleNumericLiteral(){let t="",r,a;for(;M.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===M.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);M.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(t+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(t+=this.expr.charAt(this.index++));M.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);M.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return a=this.code,M.isIdentifierStart(a)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(a===M.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===M.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:M.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="";const r=this.index,a=this.expr.charAt(this.index++);let i=!1;for(;this.index<this.expr.length;){let u=this.expr.charAt(this.index++);if(u===a){i=!0;break}else if(u==="\\")switch(u=this.expr.charAt(this.index++),u){case"n":t+=`
2
- `;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=u}else t+=u}return i||this.throwError('Unclosed quote after "'+t+'"'),{type:M.LITERAL,value:t,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let t=this.code,r=this.index;for(M.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,M.isIdentifierPart(t));)this.index++;return{type:M.IDENTIFIER,name:this.expr.slice(r,this.index)}}gobbleArguments(t){const r=[];let a=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let u=this.code;if(u===t){a=!0,this.index++,t===M.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(u===M.COMMA_CODE){if(this.index++,i++,i!==r.length){if(t===M.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===M.CBRACK_CODE)for(let f=r.length;f<i;f++)r.push(null)}}else if(r.length!==i&&i!==0)this.throwError("Expected comma");else{const f=this.gobbleExpression();(!f||f.type===M.COMPOUND)&&this.throwError("Expected comma"),r.push(f)}}return a||this.throwError("Expected "+String.fromCharCode(t)),r}gobbleGroup(){this.index++;let t=this.gobbleExpressions(M.CPAREN_CODE);if(this.code===M.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:M.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:M.ARRAY_EXP,elements:this.gobbleArguments(M.CBRACK_CODE)}}}const ur=new ir;Object.assign(M,{hooks:ur,plugins:new ar(M),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"}),M.max_unop_len=M.getMaxKeyLen(M.unary_ops),M.max_binop_len=M.getMaxKeyLen(M.binary_ops);const Ze=n=>new M(n).parse(),lr=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(M).filter(n=>!lr.includes(n)&&Ze[n]===void 0).forEach(n=>{Ze[n]=M[n]}),Ze.Jsep=M;const cr="ConditionalExpression";var fr={name:"ternary",init(n){n.hooks.add("after-expression",function(r){if(r.node&&this.code===n.QUMARK_CODE){this.index++;const a=r.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===n.COLON_CODE){this.index++;const u=this.gobbleExpression();if(u||this.throwError("Expected expression"),r.node={type:cr,test:a,consequent:i,alternate:u},a.operator&&n.binary_ops[a.operator]<=.9){let f=a;for(;f.right.operator&&n.binary_ops[f.right.operator]<=.9;)f=f.right;r.node.test=f.right,f.right=r.node,r.node=a}}else this.throwError("Expected :")}})}};Ze.plugins.register(fr);const Rt=47,dr=92;var pr={name:"regex",init(n){n.hooks.add("gobble-token",function(r){if(this.code===Rt){const a=++this.index;let i=!1;for(;this.index<this.expr.length;){if(this.code===Rt&&!i){const u=this.expr.slice(a,this.index);let f="";for(;++this.index<this.expr.length;){const p=this.code;if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57)f+=this.char;else break}let x;try{x=new RegExp(u,f)}catch(p){this.throwError(p.message)}return r.node={type:n.LITERAL,value:x,raw:this.expr.slice(a-1,this.index)},r.node=this.gobbleTokenProperty(r.node),r.node}this.code===n.OBRACK_CODE?i=!0:i&&this.code===n.CBRACK_CODE&&(i=!1),this.index+=this.code===dr?2:1}this.throwError("Unclosed Regex")}})}};const Ct=43,ct={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Ct,45],assignmentPrecedence:.9,init(n){const t=[n.IDENTIFIER,n.MEMBER_EXP];ct.assignmentOperators.forEach(a=>n.addBinaryOp(a,ct.assignmentPrecedence,!0)),n.hooks.add("gobble-token",function(i){const u=this.code;ct.updateOperators.some(f=>f===u&&f===this.expr.charCodeAt(this.index+1))&&(this.index+=2,i.node={type:"UpdateExpression",operator:u===Ct?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!i.node.argument||!t.includes(i.node.argument.type))&&this.throwError(`Unexpected ${i.node.operator}`))}),n.hooks.add("after-token",function(i){if(i.node){const u=this.code;ct.updateOperators.some(f=>f===u&&f===this.expr.charCodeAt(this.index+1))&&(t.includes(i.node.type)||this.throwError(`Unexpected ${i.node.operator}`),this.index+=2,i.node={type:"UpdateExpression",operator:u===Ct?"++":"--",argument:i.node,prefix:!1})}}),n.hooks.add("after-expression",function(i){i.node&&r(i.node)});function r(a){ct.assignmentOperators.has(a.operator)?(a.type="AssignmentExpression",r(a.left),r(a.right)):a.operator||Object.values(a).forEach(i=>{i&&typeof i=="object"&&r(i)})}}};Ze.plugins.register(pr,ct),Ze.addUnaryOp("typeof"),Ze.addLiteral("null",null),Ze.addLiteral("undefined",void 0);const hr=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),_e={evalAst(n,t){switch(n.type){case"BinaryExpression":case"LogicalExpression":return _e.evalBinaryExpression(n,t);case"Compound":return _e.evalCompound(n,t);case"ConditionalExpression":return _e.evalConditionalExpression(n,t);case"Identifier":return _e.evalIdentifier(n,t);case"Literal":return _e.evalLiteral(n,t);case"MemberExpression":return _e.evalMemberExpression(n,t);case"UnaryExpression":return _e.evalUnaryExpression(n,t);case"ArrayExpression":return _e.evalArrayExpression(n,t);case"CallExpression":return _e.evalCallExpression(n,t);case"AssignmentExpression":return _e.evalAssignmentExpression(n,t);default:throw SyntaxError("Unexpected expression",n)}},evalBinaryExpression(n,t){return{"||":(a,i)=>a||i(),"&&":(a,i)=>a&&i(),"|":(a,i)=>a|i(),"^":(a,i)=>a^i(),"&":(a,i)=>a&i(),"==":(a,i)=>a==i(),"!=":(a,i)=>a!=i(),"===":(a,i)=>a===i(),"!==":(a,i)=>a!==i(),"<":(a,i)=>a<i(),">":(a,i)=>a>i(),"<=":(a,i)=>a<=i(),">=":(a,i)=>a>=i(),"<<":(a,i)=>a<<i(),">>":(a,i)=>a>>i(),">>>":(a,i)=>a>>>i(),"+":(a,i)=>a+i(),"-":(a,i)=>a-i(),"*":(a,i)=>a*i(),"/":(a,i)=>a/i(),"%":(a,i)=>a%i()}[n.operator](_e.evalAst(n.left,t),()=>_e.evalAst(n.right,t))},evalCompound(n,t){let r;for(let a=0;a<n.body.length;a++){n.body[a].type==="Identifier"&&["var","let","const"].includes(n.body[a].name)&&n.body[a+1]&&n.body[a+1].type==="AssignmentExpression"&&(a+=1);const i=n.body[a];r=_e.evalAst(i,t)}return r},evalConditionalExpression(n,t){return _e.evalAst(n.test,t)?_e.evalAst(n.consequent,t):_e.evalAst(n.alternate,t)},evalIdentifier(n,t){if(Object.hasOwn(t,n.name))return t[n.name];throw ReferenceError(`${n.name} is not defined`)},evalLiteral(n){return n.value},evalMemberExpression(n,t){const r=String(n.computed?_e.evalAst(n.property):n.property.name),a=_e.evalAst(n.object,t);if(a==null)throw TypeError(`Cannot read properties of ${a} (reading '${r}')`);if(!Object.hasOwn(a,r)&&hr.has(r))throw TypeError(`Cannot read properties of ${a} (reading '${r}')`);const i=a[r];return typeof i=="function"?i.bind(a):i},evalUnaryExpression(n,t){return{"-":a=>-_e.evalAst(a,t),"!":a=>!_e.evalAst(a,t),"~":a=>~_e.evalAst(a,t),"+":a=>+_e.evalAst(a,t),typeof:a=>typeof _e.evalAst(a,t)}[n.operator](n.argument)},evalArrayExpression(n,t){return n.elements.map(r=>_e.evalAst(r,t))},evalCallExpression(n,t){const r=n.arguments.map(i=>_e.evalAst(i,t));return _e.evalAst(n.callee,t)(...r)},evalAssignmentExpression(n,t){if(n.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");const r=n.left.name,a=_e.evalAst(n.right,t);return t[r]=a,t[r]}};class mr{constructor(t){this.code=t,this.ast=Ze(this.code)}runInNewContext(t){const r=Object.assign(Object.create(null),t);return _e.evalAst(this.ast,r)}}function rt(n,t){return n=n.slice(),n.push(t),n}function Dt(n,t){return t=t.slice(),t.unshift(n),t}class gr extends Error{constructor(t){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=t,this.name="NewError"}}function we(n,t,r,a,i){if(!(this instanceof we))try{return new we(n,t,r,a,i)}catch(f){if(!f.avoidNew)throw f;return f.value}typeof n=="string"&&(i=a,a=r,r=t,t=n,n=null);const u=n&&typeof n=="object";if(n=n||{},this.json=n.json||r,this.path=n.path||t,this.resultType=n.resultType||"value",this.flatten=n.flatten||!1,this.wrap=Object.hasOwn(n,"wrap")?n.wrap:!0,this.sandbox=n.sandbox||{},this.eval=n.eval===void 0?"safe":n.eval,this.ignoreEvalErrors=typeof n.ignoreEvalErrors>"u"?!1:n.ignoreEvalErrors,this.parent=n.parent||null,this.parentProperty=n.parentProperty||null,this.callback=n.callback||a||null,this.otherTypeCallback=n.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},n.autostart!==!1){const f={path:u?n.path:t};u?"json"in n&&(f.json=n.json):f.json=r;const x=this.evaluate(f);if(!x||typeof x!="object")throw new gr(x);return x}}we.prototype.evaluate=function(n,t,r,a){let i=this.parent,u=this.parentProperty,{flatten:f,wrap:x}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=a||this.otherTypeCallback,t=t||this.json,n=n||this.path,n&&typeof n=="object"&&!Array.isArray(n)){if(!n.path&&n.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(n,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:t}=n),f=Object.hasOwn(n,"flatten")?n.flatten:f,this.currResultType=Object.hasOwn(n,"resultType")?n.resultType:this.currResultType,this.currSandbox=Object.hasOwn(n,"sandbox")?n.sandbox:this.currSandbox,x=Object.hasOwn(n,"wrap")?n.wrap:x,this.currEval=Object.hasOwn(n,"eval")?n.eval:this.currEval,r=Object.hasOwn(n,"callback")?n.callback:r,this.currOtherTypeCallback=Object.hasOwn(n,"otherTypeCallback")?n.otherTypeCallback:this.currOtherTypeCallback,i=Object.hasOwn(n,"parent")?n.parent:i,u=Object.hasOwn(n,"parentProperty")?n.parentProperty:u,n=n.path}if(i=i||null,u=u||null,Array.isArray(n)&&(n=we.toPathString(n)),!n&&n!==""||!t)return;const p=we.toPathArray(n);p[0]==="$"&&p.length>1&&p.shift(),this._hasParentSelector=null;const m=this._trace(p,t,["$"],i,u,r).filter(function(S){return S&&!S.isParentSelector});return m.length?!x&&m.length===1&&!m[0].hasArrExpr?this._getPreferredOutput(m[0]):m.reduce((S,v)=>{const U=this._getPreferredOutput(v);return f&&Array.isArray(U)?S=S.concat(U):S.push(U),S},[]):x?[]:void 0},we.prototype._getPreferredOutput=function(n){const t=this.currResultType;switch(t){case"all":{const r=Array.isArray(n.path)?n.path:we.toPathArray(n.path);return n.pointer=we.toPointer(r),n.path=typeof n.path=="string"?n.path:we.toPathString(n.path),n}case"value":case"parent":case"parentProperty":return n[t];case"path":return we.toPathString(n[t]);case"pointer":return we.toPointer(n.path);default:throw new TypeError("Unknown result type")}},we.prototype._handleCallback=function(n,t,r){if(t){const a=this._getPreferredOutput(n);n.path=typeof n.path=="string"?n.path:we.toPathString(n.path),t(a,r,n)}},we.prototype._trace=function(n,t,r,a,i,u,f,x){let p;if(!n.length)return p={path:r,value:t,parent:a,parentProperty:i,hasArrExpr:f},this._handleCallback(p,u,"value"),p;const m=n[0],S=n.slice(1),v=[];function U(K){Array.isArray(K)?K.forEach(Y=>{v.push(Y)}):v.push(K)}if((typeof m!="string"||x)&&t&&Object.hasOwn(t,m))U(this._trace(S,t[m],rt(r,m),t,m,u,f));else if(m==="*")this._walk(t,K=>{U(this._trace(S,t[K],rt(r,K),t,K,u,!0,!0))});else if(m==="..")U(this._trace(S,t,r,a,i,u,f)),this._walk(t,K=>{typeof t[K]=="object"&&U(this._trace(n.slice(),t[K],rt(r,K),t,K,u,!0))});else{if(m==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:S,isParentSelector:!0};if(m==="~")return p={path:rt(r,m),value:i,parent:a,parentProperty:null},this._handleCallback(p,u,"property"),p;if(m==="$")U(this._trace(S,t,r,null,null,u,f));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(m))U(this._slice(m,S,t,r,a,i,u));else if(m.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const K=m.replace(/^\?\((.*?)\)$/u,"$1"),Y=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(K);Y?this._walk(t,ae=>{const H=[Y[2]],de=Y[1]?t[ae][Y[1]]:t[ae];this._trace(H,de,r,a,i,u,!0).length>0&&U(this._trace(S,t[ae],rt(r,ae),t,ae,u,!0))}):this._walk(t,ae=>{this._eval(K,t[ae],ae,r,a,i)&&U(this._trace(S,t[ae],rt(r,ae),t,ae,u,!0))})}else if(m[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");U(this._trace(Dt(this._eval(m,t,r.at(-1),r.slice(0,-1),a,i),S),t,r,a,i,u,f))}else if(m[0]==="@"){let K=!1;const Y=m.slice(1,-2);switch(Y){case"scalar":(!t||!["object","function"].includes(typeof t))&&(K=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===Y&&(K=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(K=!0);break;case"number":Number.isFinite(t)&&(K=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(K=!0);break;case"object":t&&typeof t===Y&&(K=!0);break;case"array":Array.isArray(t)&&(K=!0);break;case"other":K=this.currOtherTypeCallback(t,r,a,i);break;case"null":t===null&&(K=!0);break;default:throw new TypeError("Unknown value type "+Y)}if(K)return p={path:r,value:t,parent:a,parentProperty:i},this._handleCallback(p,u,"value"),p}else if(m[0]==="`"&&t&&Object.hasOwn(t,m.slice(1))){const K=m.slice(1);U(this._trace(S,t[K],rt(r,K),t,K,u,f,!0))}else if(m.includes(",")){const K=m.split(",");for(const Y of K)U(this._trace(Dt(Y,S),t,r,a,i,u,!0))}else!x&&t&&Object.hasOwn(t,m)&&U(this._trace(S,t[m],rt(r,m),t,m,u,f,!0))}if(this._hasParentSelector)for(let K=0;K<v.length;K++){const Y=v[K];if(Y&&Y.isParentSelector){const ae=this._trace(Y.expr,t,Y.path,a,i,u,f);if(Array.isArray(ae)){v[K]=ae[0];const H=ae.length;for(let de=1;de<H;de++)K++,v.splice(K,0,ae[de])}else v[K]=ae}}return v},we.prototype._walk=function(n,t){if(Array.isArray(n)){const r=n.length;for(let a=0;a<r;a++)t(a)}else n&&typeof n=="object"&&Object.keys(n).forEach(r=>{t(r)})},we.prototype._slice=function(n,t,r,a,i,u,f){if(!Array.isArray(r))return;const x=r.length,p=n.split(":"),m=p[2]&&Number.parseInt(p[2])||1;let S=p[0]&&Number.parseInt(p[0])||0,v=p[1]&&Number.parseInt(p[1])||x;S=S<0?Math.max(0,S+x):Math.min(x,S),v=v<0?Math.max(0,v+x):Math.min(x,v);const U=[];for(let K=S;K<v;K+=m)this._trace(Dt(K,t),r,a,i,u,f,!0).forEach(ae=>{U.push(ae)});return U},we.prototype._eval=function(n,t,r,a,i,u){this.currSandbox._$_parentProperty=u,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;const f=n.includes("@path");f&&(this.currSandbox._$_path=we.toPathString(a.concat([r])));const x=this.currEval+"Script:"+n;if(!we.cache[x]){let p=n.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(f&&(p=p.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)we.cache[x]=new this.safeVm.Script(p);else if(this.currEval==="native")we.cache[x]=new this.vm.Script(p);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const m=this.currEval;we.cache[x]=new m(p)}else if(typeof this.currEval=="function")we.cache[x]={runInNewContext:m=>this.currEval(p,m)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return we.cache[x].runInNewContext(this.currSandbox)}catch(p){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+p.message+": "+n)}},we.cache={},we.toPathString=function(n){const t=n,r=t.length;let a="$";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(a+=/^[0-9*]+$/u.test(t[i])?"["+t[i]+"]":"['"+t[i]+"']");return a},we.toPointer=function(n){const t=n,r=t.length;let a="";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(a+="/"+t[i].toString().replaceAll("~","~0").replaceAll("/","~1"));return a},we.toPathArray=function(n){const{cache:t}=we;if(t[n])return t[n].concat();const r=[],i=n.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(u,f){return"[#"+(r.push(f)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(u,f){return"['"+f.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(u,f){return";"+f.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(u){const f=u.match(/#(\d+)/u);return!f||!f[1]?u:r[f[1]]});return t[n]=i,t[n].concat()},we.prototype.safeVm={Script:mr};const Er=function(n,t,r){const a=n.length;for(let i=0;i<a;i++){const u=n[i];r(u)&&t.push(n.splice(i--,1)[0])}};class yr{constructor(t){this.code=t}runInNewContext(t){let r=this.code;const a=Object.keys(t),i=[];Er(a,i,m=>typeof t[m]=="function");const u=a.map(m=>t[m]);r=i.reduce((m,S)=>{let v=t[S].toString();return/function/u.test(v)||(v="function "+v),"var "+S+"="+v+";"+m},"")+r,!/(['"])use strict\1/u.test(r)&&!a.includes("arguments")&&(r="var arguments = undefined;"+r),r=r.replace(/;\s*$/u,"");const x=r.lastIndexOf(";"),p=x!==-1?r.slice(0,x+1)+" return "+r.slice(x+1):" return "+r;return new Function(...a,p)(...u)}}we.prototype.vm={Script:yr};const br={class:"json-node"},Ar={key:0,class:"json-node__container"},xr={class:"json-node__line"},Nr=["contenteditable","onKeydown"],Cr={key:1,class:"json-node__colon"},Dr=["title"],vr=["title"],wr={key:4,class:"json-node__comma"},Tr={key:0,class:"json-node__children"},_r={class:"json-node__children-content"},Br={class:"json-node__line json-node__closing-bracket"},Sr={class:"json-node__bracket"},Or={key:0,class:"json-node__comma"},kr={key:1,class:"json-node__primitive"},Rr=["contenteditable","onKeydown"],Ir={key:1,class:"json-node__colon"},Fr=["title"],Pr=["contenteditable","onKeydown"],Lr={key:0,class:"json-node__comma"},Vr=o.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(n,{emit:t}){o.useCssVars(g=>({"2a18b018":g.level,"58a14b93":g.theme.colors.syntaxKey,"46fe1b3e":g.theme.colors.hoverBackground,fbe2c048:g.theme.colors.syntaxBracket,"4bd524bb":g.theme.colors.collapsedText,"3308d23c":g.theme.colors.collapsedBackground,"36380c60":g.theme.colors.collapsedBackgroundHover,"0892365d":g.theme.colors.syntaxString,"0015b195":g.theme.colors.syntaxNumber,"7db95f5c":g.theme.colors.syntaxBoolean,"88ec825a":g.theme.colors.syntaxNull,"537157f7":g.theme.colors.background,"3cee3331":g.theme.colors.selectionBackground,"81323cee":g.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(!1),f=o.ref(""),x=o.ref(""),p=o.ref("string"),m=o.ref(null),S=o.ref(null),v=g=>g!==null&&typeof g=="object"&&!Array.isArray(g)&&"__protected_number__"in g&&Object.keys(g).length===1,U=g=>v(g)?g.__protected_number__:"",K=o.computed(()=>v(r.value)?!1:r.value!==null&&typeof r.value=="object"),Y=o.computed(()=>Array.isArray(r.value)),ae=o.computed(()=>r.path?r.path:r.keyName?r.keyName:"root"),H=o.computed(()=>r.expanded.has(ae.value)),de=o.computed(()=>r.keyName),re=o.computed(()=>Y.value?"[":"{"),z=o.computed(()=>Y.value?"]":"}"),me=o.computed(()=>{if(!r.value)return"";const C=Object.keys(r.value).length;return Y.value?C>0?` ${C} items `:" ":C>0?` ${C} keys `:" "}),be=o.computed(()=>{const g=typeof r.value;return r.value===null?"json-node__value--null":g==="boolean"?"json-node__value--boolean":g==="number"||v(r.value)?"json-node__value--number":g==="string"?"json-node__value--string":""}),J=o.computed(()=>r.value===null?"null":typeof r.value=="boolean"||typeof r.value=="number"?String(r.value):v(r.value)?U(r.value):typeof r.value=="string"?`"${r.value}"`:String(r.value)),N=o.computed(()=>"Double-click to edit"),le=g=>r.level===0?g:ae.value?`${ae.value}.${g}`:g,w=g=>{const C=Object.keys(r.value);return C.indexOf(g)===C.length-1},y=()=>{a("toggle-expand",ae.value)},B=()=>{r.level!==0&&(i.value=!0,f.value=r.keyName,o.nextTick(()=>{if(m.value){m.value.focus();const g=document.createRange();g.selectNodeContents(m.value);const C=window.getSelection();C?.removeAllRanges(),C?.addRange(g)}}))},_=()=>{K.value||(u.value=!0,r.value===null?p.value="null":v(r.value)?p.value="protected-number":typeof r.value=="string"?p.value="string":typeof r.value=="number"?p.value="number":typeof r.value=="boolean"&&(p.value="boolean"),v(r.value)?x.value=U(r.value):typeof r.value=="string"?x.value=r.value:x.value=String(r.value),o.nextTick(()=>{if(S.value){S.value.focus();const g=document.createRange();g.selectNodeContents(S.value);const C=window.getSelection();C?.removeAllRanges(),C?.addRange(g)}}))},L=()=>{if(r.level===0||!i.value)return;const g=m.value?.innerText.trim()||"";if(!g){Z();return}if(g===r.keyName){i.value=!1;return}i.value=!1,a("update:key",ae.value,g)},$=()=>{if(u.value)try{let g;const C=S.value?.innerText.trim()||"";if(p.value==="string")C==="null"?g=null:C==="true"||C==="false"?g=C==="true":g=C;else if(p.value==="protected-number")g={__protected_number__:C};else if(C==="null")g=null;else if(C==="true"||C==="false")g=C==="true";else if(!isNaN(Number(C))&&C!==""){const V=Number(C);!Number.isSafeInteger(V)||C.length>15?g={__protected_number__:C}:g=V}else g=C;a("update:value",ae.value,g),u.value=!1}catch(g){console.error("Failed to parse value:",g),u.value=!1}},Z=()=>{i.value=!1,f.value=r.keyName},te=()=>{u.value=!1,v(r.value)?x.value=U(r.value):typeof r.value=="string"?x.value=r.value:x.value=String(r.value)};return(g,C)=>{const V=o.resolveComponent("JsonNode",!0);return o.openBlock(),o.createElementBlock("div",br,[K.value?(o.openBlock(),o.createElementBlock("div",Ar,[o.createElementVNode("div",xr,[g.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:B,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(Z,["escape"])],onBlur:L,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?f.value:`"${de.value}"`),41,Nr)):o.createCommentVNode("",!0),g.keyName?(o.openBlock(),o.createElementBlock("span",Cr,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:"json-node__bracket json-node__bracket--clickable",onClick:y,title:H.value?"Click to collapse":"Click to expand"},o.toDisplayString(re.value),9,Dr),H.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:2,class:"json-node__collapsed-info",onClick:y,title:`Click to expand ${me.value.trim()}`},o.toDisplayString(me.value),9,vr)),H.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:3,class:"json-node__bracket json-node__bracket--clickable",onClick:y,title:"Click to expand"},o.toDisplayString(z.value),1)),!H.value&&!g.isLast?(o.openBlock(),o.createElementBlock("span",wr,",")):o.createCommentVNode("",!0)]),H.value?(o.openBlock(),o.createElementBlock("div",Tr,[o.createElementVNode("div",_r,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,(j,R)=>(o.openBlock(),o.createElementBlock("div",{key:R,class:"json-node__child"},[o.createVNode(V,{value:j,"key-name":Y.value?"":String(R),level:g.level+1,path:le(String(R)),expanded:g.expanded,theme:g.theme,"onUpdate:value":C[0]||(C[0]=(ee,D)=>g.$emit("update:value",ee,D)),onToggleExpand:C[1]||(C[1]=ee=>g.$emit("toggle-expand",ee)),onCopy:C[2]||(C[2]=ee=>g.$emit("copy",ee)),"onUpdate:key":C[3]||(C[3]=(ee,D)=>g.$emit("update:key",ee,D)),"is-last":w(String(R))},null,8,["value","key-name","level","path","expanded","theme","is-last"])]))),128))]),o.createElementVNode("div",Br,[o.createElementVNode("span",Sr,o.toDisplayString(z.value),1),g.isLast?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Or,","))])])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",kr,[g.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:B,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(Z,["escape"])],onBlur:L,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?f.value:`"${de.value}"`),41,Rr)):o.createCommentVNode("",!0),g.keyName?(o.openBlock(),o.createElementBlock("span",Ir,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:o.normalizeClass(["json-node__value-wrapper",be.value]),onDblclick:_,title:N.value},[o.createElementVNode("span",{class:"json-node__value",contenteditable:u.value,onKeydown:[o.withKeys(o.withModifiers($,["prevent"]),["enter"]),o.withKeys(te,["escape"])],onBlur:$,ref_key:"valueRef",ref:S},o.toDisplayString(u.value?x.value:J.value),41,Pr),g.isLast?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Lr,","))],42,Fr)]))])}}}),ft=(n,t)=>{const r=n.__vccOpts||n;for(const[a,i]of t)r[a]=i;return r},$r=ft(Vr,[["__scopeId","data-v-1472a8af"]]),It={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",hoverBackground:"#f6f8fa",selectionBackground:"rgba(9, 105, 218, 0.2)",collapsedBackground:"#ddf4ff",collapsedBackgroundHover:"#b6e3ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},Mr={"github-light":It,"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",hoverBackground:"#161b22",selectionBackground:"rgba(121, 192, 255, 0.2)",collapsedBackground:"#1c2128",collapsedBackgroundHover:"#2d333b",collapsedText:"#79c0ff",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",hoverBackground:"#f9f9f9",selectionBackground:"rgba(59, 130, 246, 0.2)",collapsedBackground:"#e0f2fe",collapsedBackgroundHover:"#bae6fd",collapsedText:"#0284c7",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",hoverBackground:"#f8f2eb",selectionBackground:"rgba(255, 107, 53, 0.2)",collapsedBackground:"#ffe8d6",collapsedBackgroundHover:"#ffd4b0",collapsedText:"#d73502",indentLine:"#e8d5b7"}}};function qr(n="github-light"){return Mr[n]||It}const Ur={key:0,class:"json-format__toolbar"},Hr={class:"json-format__actions"},jr=["disabled"],Kr=["disabled"],Gr=["disabled"],Xr=["disabled"],Wr={class:"json-format__info"},zr={key:0,class:"json-format__status json-format__status--success"},Yr={key:1,class:"json-format__status json-format__status--error"},Qr={class:"json-format__content"},Zr={key:0,class:"json-format__error"},Jr={key:1,class:"json-format__error"},en={key:2,class:"json-format__viewer"},Ft=ft(o.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(n,{expose:t,emit:r}){o.useCssVars(D=>({"4782cf12":U.value.colors.border,"35b95bf9":U.value.colors.background,cda9ff90:U.value.colors.text,"41368ee0":U.value.colors.surfaceBackground,"47674bee":U.value.colors.buttonBorder,"0f08048b":U.value.colors.buttonBackground,cb00036c:U.value.colors.buttonText,"4a92191e":U.value.colors.buttonBackgroundHover,d30c3876:U.value.colors.buttonPrimary,"3d918877":U.value.colors.buttonPrimaryHover,"4f985866":U.value.colors.successBackground,"3847a518":U.value.colors.success,"28f0996b":U.value.colors.errorBackground,e9310f46:U.value.colors.error}));const a=n,i=r,u=o.ref(null),f=o.ref(""),x=o.ref(new Set),p=o.ref(null),m=o.ref(""),S=o.ref(!1),v=o.computed(()=>f.value===""),U=o.computed(()=>qr(a.theme)),K=D=>{if(D==null)return D;if(Array.isArray(D))return D.map(O=>K(O));if(typeof D=="object"){const O={},F=Object.keys(D).sort();for(const G of F)O[G]=K(D[G]);return O}return D},Y=o.computed(()=>{const D=p.value!==null?p.value:u.value;return!D||!S.value?D:K(D)}),ae=o.computed(()=>m.value?null:Y.value),H=D=>{if(!D.trim()){u.value=null,f.value="",p.value=null,m.value="";return}try{let O=D;const F=/(:\s*|,\s*|\[\s*)-?\d{16,}/.test(O),G=/(:\s*|,\s*|\[\s*)-?\d+\.\d*0+\s*[,}\]\s]*/.test(O);if(!F&&!G)try{u.value=JSON.parse(O),f.value="",p.value=null,m.value="",o.nextTick(()=>{ae.value!==null&&_()});return}catch{}O=(P=>{let Q="",pe=!1,Ee=!1,Te=0;for(;Te<P.length;){const ke=P[Te];if(pe)Ee?Ee=!1:ke==="\\"?Ee=!0:ke==='"'&&(pe=!1),Q+=ke,Te++;else if(ke==='"')pe=!0,Q+=ke,Te++;else{const De=P.slice(Te);let W=De.match(/^([:,\[\s]*)(-?\d{16,})(\s*[,\}\]\s]|$)/);if(W){Q+=W[1]+'{"__protected_number__":"'+W[2]+'"}'+W[3],Te+=W[0].length;continue}if(W=De.match(/^([:,\[\s]*)(-?\d+\.\d*0+)(\s*[,\}\]\s]|$)/),W){Q+=W[1]+'{"__protected_number__":"'+W[2]+'"}'+W[3],Te+=W[0].length;continue}Q+=ke,Te++}}return Q})(O),u.value=JSON.parse(O),f.value="",p.value=null,m.value="",o.nextTick(()=>{ae.value!==null&&_()})}catch(O){f.value=O instanceof Error?O.message:"Unknown parsing error",u.value=null,p.value=null,m.value=""}},de=D=>{if(!D||!D.expression.trim()){be();return}if(!u.value){m.value="No valid JSON data to filter";return}try{let O;if(D.type==="jsonpath")O=we({path:D.expression,json:u.value}),O.length===1&&D.expression.includes("$[")===!1&&!D.expression.endsWith("[*]")?p.value=O[0]:p.value=O;else if(D.type==="js"){const{proxyData:F,indexMap:G}=re(u.value),P=new Function("$",`
1
+ (function(We,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(We=typeof globalThis<"u"?globalThis:We||self,o(We.LoneFormat={},We.Vue))})(this,function(We,o){"use strict";class ir{add(t,r,a){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(i){this[i]=this[i]||[],r&&this[i][a?"unshift":"push"](r)},this)}run(t,r){this[t]=this[t]||[],this[t].forEach(function(a){a.call(r&&r.context?r.context:r,r)})}}class ar{constructor(t){this.jsep=t,this.registered={}}register(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];r.forEach(i=>{if(typeof i!="object"||!i.name||!i.init)throw new Error("Invalid JSEP plugin format");this.registered[i.name]||(i.init(this.jsep),this.registered[i.name]=i)})}}class M{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+M.version}static addUnaryOp(t){return M.max_unop_len=Math.max(t.length,M.max_unop_len),M.unary_ops[t]=1,M}static addBinaryOp(t,r,a){return M.max_binop_len=Math.max(t.length,M.max_binop_len),M.binary_ops[t]=r,a?M.right_associative.add(t):M.right_associative.delete(t),M}static addIdentifierChar(t){return M.additional_identifier_chars.add(t),M}static addLiteral(t,r){return M.literals[t]=r,M}static removeUnaryOp(t){return delete M.unary_ops[t],t.length===M.max_unop_len&&(M.max_unop_len=M.getMaxKeyLen(M.unary_ops)),M}static removeAllUnaryOps(){return M.unary_ops={},M.max_unop_len=0,M}static removeIdentifierChar(t){return M.additional_identifier_chars.delete(t),M}static removeBinaryOp(t){return delete M.binary_ops[t],t.length===M.max_binop_len&&(M.max_binop_len=M.getMaxKeyLen(M.binary_ops)),M.right_associative.delete(t),M}static removeAllBinaryOps(){return M.binary_ops={},M.max_binop_len=0,M}static removeLiteral(t){return delete M.literals[t],M}static removeAllLiterals(){return M.literals={},M}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new M(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(r=>r.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return M.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!M.binary_ops[String.fromCharCode(t)]||M.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return M.isIdentifierStart(t)||M.isDecimalDigit(t)}throwError(t){const r=new Error(t+" at character "+this.index);throw r.index=this.index,r.description=t,r}runHook(t,r){if(M.hooks[t]){const a={context:this,node:r};return M.hooks.run(t,a),a.node}return r}searchHook(t){if(M.hooks[t]){const r={context:this};return M.hooks[t].find(function(a){return a.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let t=this.code;for(;t===M.SPACE_CODE||t===M.TAB_CODE||t===M.LF_CODE||t===M.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),r=t.length===1?t[0]:{type:M.COMPOUND,body:t};return this.runHook("after-all",r)}gobbleExpressions(t){let r=[],a,i;for(;this.index<this.expr.length;)if(a=this.code,a===M.SEMCOL_CODE||a===M.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())r.push(i);else if(this.index<this.expr.length){if(a===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,M.max_binop_len),r=t.length;for(;r>0;){if(M.binary_ops.hasOwnProperty(t)&&(!M.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!M.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=r,t;t=t.substr(0,--r)}return!1}gobbleBinaryExpression(){let t,r,a,i,u,c,A,p,m;if(c=this.gobbleToken(),!c||(r=this.gobbleBinaryOp(),!r))return c;for(u={value:r,prec:M.binaryPrecedence(r),right_a:M.right_associative.has(r)},A=this.gobbleToken(),A||this.throwError("Expected expression after "+r),i=[c,u,A];r=this.gobbleBinaryOp();){if(a=M.binaryPrecedence(r),a===0){this.index-=r.length;break}u={value:r,prec:a,right_a:M.right_associative.has(r)},m=r;const T=x=>u.right_a&&x.right_a?a>x.prec:a<=x.prec;for(;i.length>2&&T(i[i.length-2]);)A=i.pop(),r=i.pop().value,c=i.pop(),t={type:M.BINARY_EXP,operator:r,left:c,right:A},i.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+m),i.push(u,t)}for(p=i.length-1,t=i[p];p>1;)t={type:M.BINARY_EXP,operator:i[p-1].value,left:i[p-2],right:t},p-=2;return t}gobbleToken(){let t,r,a,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(t=this.code,M.isDecimalDigit(t)||t===M.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===M.SQUOTE_CODE||t===M.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===M.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,M.max_unop_len),a=r.length;a>0;){if(M.unary_ops.hasOwnProperty(r)&&(!M.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!M.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=a;const u=this.gobbleToken();return u||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:M.UNARY_EXP,operator:r,argument:u,prefix:!0})}r=r.substr(0,--a)}M.isIdentifierStart(t)?(i=this.gobbleIdentifier(),M.literals.hasOwnProperty(i.name)?i={type:M.LITERAL,value:M.literals[i.name],raw:i.name}:i.name===M.this_str&&(i={type:M.THIS_EXP})):t===M.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let r=this.code;for(;r===M.PERIOD_CODE||r===M.OBRACK_CODE||r===M.OPAREN_CODE||r===M.QUMARK_CODE;){let a;if(r===M.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==M.PERIOD_CODE)break;a=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===M.OBRACK_CODE?(t={type:M.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==M.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===M.OPAREN_CODE?t={type:M.CALL_EXP,arguments:this.gobbleArguments(M.CPAREN_CODE),callee:t}:(r===M.PERIOD_CODE||a)&&(a&&this.index--,this.gobbleSpaces(),t={type:M.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),a&&(t.optional=!0),this.gobbleSpaces(),r=this.code}return t}gobbleNumericLiteral(){let t="",r,a;for(;M.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===M.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);M.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(t+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(t+=this.expr.charAt(this.index++));M.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);M.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return a=this.code,M.isIdentifierStart(a)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(a===M.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===M.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:M.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="";const r=this.index,a=this.expr.charAt(this.index++);let i=!1;for(;this.index<this.expr.length;){let u=this.expr.charAt(this.index++);if(u===a){i=!0;break}else if(u==="\\")switch(u=this.expr.charAt(this.index++),u){case"n":t+=`
2
+ `;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=u}else t+=u}return i||this.throwError('Unclosed quote after "'+t+'"'),{type:M.LITERAL,value:t,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let t=this.code,r=this.index;for(M.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,M.isIdentifierPart(t));)this.index++;return{type:M.IDENTIFIER,name:this.expr.slice(r,this.index)}}gobbleArguments(t){const r=[];let a=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let u=this.code;if(u===t){a=!0,this.index++,t===M.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(u===M.COMMA_CODE){if(this.index++,i++,i!==r.length){if(t===M.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===M.CBRACK_CODE)for(let c=r.length;c<i;c++)r.push(null)}}else if(r.length!==i&&i!==0)this.throwError("Expected comma");else{const c=this.gobbleExpression();(!c||c.type===M.COMPOUND)&&this.throwError("Expected comma"),r.push(c)}}return a||this.throwError("Expected "+String.fromCharCode(t)),r}gobbleGroup(){this.index++;let t=this.gobbleExpressions(M.CPAREN_CODE);if(this.code===M.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:M.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:M.ARRAY_EXP,elements:this.gobbleArguments(M.CBRACK_CODE)}}}const ur=new ir;Object.assign(M,{hooks:ur,plugins:new ar(M),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"}),M.max_unop_len=M.getMaxKeyLen(M.unary_ops),M.max_binop_len=M.getMaxKeyLen(M.binary_ops);const Ze=n=>new M(n).parse(),lr=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(M).filter(n=>!lr.includes(n)&&Ze[n]===void 0).forEach(n=>{Ze[n]=M[n]}),Ze.Jsep=M;const cr="ConditionalExpression";var fr={name:"ternary",init(n){n.hooks.add("after-expression",function(r){if(r.node&&this.code===n.QUMARK_CODE){this.index++;const a=r.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===n.COLON_CODE){this.index++;const u=this.gobbleExpression();if(u||this.throwError("Expected expression"),r.node={type:cr,test:a,consequent:i,alternate:u},a.operator&&n.binary_ops[a.operator]<=.9){let c=a;for(;c.right.operator&&n.binary_ops[c.right.operator]<=.9;)c=c.right;r.node.test=c.right,c.right=r.node,r.node=a}}else this.throwError("Expected :")}})}};Ze.plugins.register(fr);const Rt=47,dr=92;var pr={name:"regex",init(n){n.hooks.add("gobble-token",function(r){if(this.code===Rt){const a=++this.index;let i=!1;for(;this.index<this.expr.length;){if(this.code===Rt&&!i){const u=this.expr.slice(a,this.index);let c="";for(;++this.index<this.expr.length;){const p=this.code;if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57)c+=this.char;else break}let A;try{A=new RegExp(u,c)}catch(p){this.throwError(p.message)}return r.node={type:n.LITERAL,value:A,raw:this.expr.slice(a-1,this.index)},r.node=this.gobbleTokenProperty(r.node),r.node}this.code===n.OBRACK_CODE?i=!0:i&&this.code===n.CBRACK_CODE&&(i=!1),this.index+=this.code===dr?2:1}this.throwError("Unclosed Regex")}})}};const Ct=43,ct={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Ct,45],assignmentPrecedence:.9,init(n){const t=[n.IDENTIFIER,n.MEMBER_EXP];ct.assignmentOperators.forEach(a=>n.addBinaryOp(a,ct.assignmentPrecedence,!0)),n.hooks.add("gobble-token",function(i){const u=this.code;ct.updateOperators.some(c=>c===u&&c===this.expr.charCodeAt(this.index+1))&&(this.index+=2,i.node={type:"UpdateExpression",operator:u===Ct?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!i.node.argument||!t.includes(i.node.argument.type))&&this.throwError(`Unexpected ${i.node.operator}`))}),n.hooks.add("after-token",function(i){if(i.node){const u=this.code;ct.updateOperators.some(c=>c===u&&c===this.expr.charCodeAt(this.index+1))&&(t.includes(i.node.type)||this.throwError(`Unexpected ${i.node.operator}`),this.index+=2,i.node={type:"UpdateExpression",operator:u===Ct?"++":"--",argument:i.node,prefix:!1})}}),n.hooks.add("after-expression",function(i){i.node&&r(i.node)});function r(a){ct.assignmentOperators.has(a.operator)?(a.type="AssignmentExpression",r(a.left),r(a.right)):a.operator||Object.values(a).forEach(i=>{i&&typeof i=="object"&&r(i)})}}};Ze.plugins.register(pr,ct),Ze.addUnaryOp("typeof"),Ze.addLiteral("null",null),Ze.addLiteral("undefined",void 0);const hr=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),_e={evalAst(n,t){switch(n.type){case"BinaryExpression":case"LogicalExpression":return _e.evalBinaryExpression(n,t);case"Compound":return _e.evalCompound(n,t);case"ConditionalExpression":return _e.evalConditionalExpression(n,t);case"Identifier":return _e.evalIdentifier(n,t);case"Literal":return _e.evalLiteral(n,t);case"MemberExpression":return _e.evalMemberExpression(n,t);case"UnaryExpression":return _e.evalUnaryExpression(n,t);case"ArrayExpression":return _e.evalArrayExpression(n,t);case"CallExpression":return _e.evalCallExpression(n,t);case"AssignmentExpression":return _e.evalAssignmentExpression(n,t);default:throw SyntaxError("Unexpected expression",n)}},evalBinaryExpression(n,t){return{"||":(a,i)=>a||i(),"&&":(a,i)=>a&&i(),"|":(a,i)=>a|i(),"^":(a,i)=>a^i(),"&":(a,i)=>a&i(),"==":(a,i)=>a==i(),"!=":(a,i)=>a!=i(),"===":(a,i)=>a===i(),"!==":(a,i)=>a!==i(),"<":(a,i)=>a<i(),">":(a,i)=>a>i(),"<=":(a,i)=>a<=i(),">=":(a,i)=>a>=i(),"<<":(a,i)=>a<<i(),">>":(a,i)=>a>>i(),">>>":(a,i)=>a>>>i(),"+":(a,i)=>a+i(),"-":(a,i)=>a-i(),"*":(a,i)=>a*i(),"/":(a,i)=>a/i(),"%":(a,i)=>a%i()}[n.operator](_e.evalAst(n.left,t),()=>_e.evalAst(n.right,t))},evalCompound(n,t){let r;for(let a=0;a<n.body.length;a++){n.body[a].type==="Identifier"&&["var","let","const"].includes(n.body[a].name)&&n.body[a+1]&&n.body[a+1].type==="AssignmentExpression"&&(a+=1);const i=n.body[a];r=_e.evalAst(i,t)}return r},evalConditionalExpression(n,t){return _e.evalAst(n.test,t)?_e.evalAst(n.consequent,t):_e.evalAst(n.alternate,t)},evalIdentifier(n,t){if(Object.hasOwn(t,n.name))return t[n.name];throw ReferenceError(`${n.name} is not defined`)},evalLiteral(n){return n.value},evalMemberExpression(n,t){const r=String(n.computed?_e.evalAst(n.property):n.property.name),a=_e.evalAst(n.object,t);if(a==null)throw TypeError(`Cannot read properties of ${a} (reading '${r}')`);if(!Object.hasOwn(a,r)&&hr.has(r))throw TypeError(`Cannot read properties of ${a} (reading '${r}')`);const i=a[r];return typeof i=="function"?i.bind(a):i},evalUnaryExpression(n,t){return{"-":a=>-_e.evalAst(a,t),"!":a=>!_e.evalAst(a,t),"~":a=>~_e.evalAst(a,t),"+":a=>+_e.evalAst(a,t),typeof:a=>typeof _e.evalAst(a,t)}[n.operator](n.argument)},evalArrayExpression(n,t){return n.elements.map(r=>_e.evalAst(r,t))},evalCallExpression(n,t){const r=n.arguments.map(i=>_e.evalAst(i,t));return _e.evalAst(n.callee,t)(...r)},evalAssignmentExpression(n,t){if(n.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");const r=n.left.name,a=_e.evalAst(n.right,t);return t[r]=a,t[r]}};class mr{constructor(t){this.code=t,this.ast=Ze(this.code)}runInNewContext(t){const r=Object.assign(Object.create(null),t);return _e.evalAst(this.ast,r)}}function rt(n,t){return n=n.slice(),n.push(t),n}function vt(n,t){return t=t.slice(),t.unshift(n),t}class gr extends Error{constructor(t){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=t,this.name="NewError"}}function Te(n,t,r,a,i){if(!(this instanceof Te))try{return new Te(n,t,r,a,i)}catch(c){if(!c.avoidNew)throw c;return c.value}typeof n=="string"&&(i=a,a=r,r=t,t=n,n=null);const u=n&&typeof n=="object";if(n=n||{},this.json=n.json||r,this.path=n.path||t,this.resultType=n.resultType||"value",this.flatten=n.flatten||!1,this.wrap=Object.hasOwn(n,"wrap")?n.wrap:!0,this.sandbox=n.sandbox||{},this.eval=n.eval===void 0?"safe":n.eval,this.ignoreEvalErrors=typeof n.ignoreEvalErrors>"u"?!1:n.ignoreEvalErrors,this.parent=n.parent||null,this.parentProperty=n.parentProperty||null,this.callback=n.callback||a||null,this.otherTypeCallback=n.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},n.autostart!==!1){const c={path:u?n.path:t};u?"json"in n&&(c.json=n.json):c.json=r;const A=this.evaluate(c);if(!A||typeof A!="object")throw new gr(A);return A}}Te.prototype.evaluate=function(n,t,r,a){let i=this.parent,u=this.parentProperty,{flatten:c,wrap:A}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=a||this.otherTypeCallback,t=t||this.json,n=n||this.path,n&&typeof n=="object"&&!Array.isArray(n)){if(!n.path&&n.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(n,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:t}=n),c=Object.hasOwn(n,"flatten")?n.flatten:c,this.currResultType=Object.hasOwn(n,"resultType")?n.resultType:this.currResultType,this.currSandbox=Object.hasOwn(n,"sandbox")?n.sandbox:this.currSandbox,A=Object.hasOwn(n,"wrap")?n.wrap:A,this.currEval=Object.hasOwn(n,"eval")?n.eval:this.currEval,r=Object.hasOwn(n,"callback")?n.callback:r,this.currOtherTypeCallback=Object.hasOwn(n,"otherTypeCallback")?n.otherTypeCallback:this.currOtherTypeCallback,i=Object.hasOwn(n,"parent")?n.parent:i,u=Object.hasOwn(n,"parentProperty")?n.parentProperty:u,n=n.path}if(i=i||null,u=u||null,Array.isArray(n)&&(n=Te.toPathString(n)),!n&&n!==""||!t)return;const p=Te.toPathArray(n);p[0]==="$"&&p.length>1&&p.shift(),this._hasParentSelector=null;const m=this._trace(p,t,["$"],i,u,r).filter(function(T){return T&&!T.isParentSelector});return m.length?!A&&m.length===1&&!m[0].hasArrExpr?this._getPreferredOutput(m[0]):m.reduce((T,x)=>{const L=this._getPreferredOutput(x);return c&&Array.isArray(L)?T=T.concat(L):T.push(L),T},[]):A?[]:void 0},Te.prototype._getPreferredOutput=function(n){const t=this.currResultType;switch(t){case"all":{const r=Array.isArray(n.path)?n.path:Te.toPathArray(n.path);return n.pointer=Te.toPointer(r),n.path=typeof n.path=="string"?n.path:Te.toPathString(n.path),n}case"value":case"parent":case"parentProperty":return n[t];case"path":return Te.toPathString(n[t]);case"pointer":return Te.toPointer(n.path);default:throw new TypeError("Unknown result type")}},Te.prototype._handleCallback=function(n,t,r){if(t){const a=this._getPreferredOutput(n);n.path=typeof n.path=="string"?n.path:Te.toPathString(n.path),t(a,r,n)}},Te.prototype._trace=function(n,t,r,a,i,u,c,A){let p;if(!n.length)return p={path:r,value:t,parent:a,parentProperty:i,hasArrExpr:c},this._handleCallback(p,u,"value"),p;const m=n[0],T=n.slice(1),x=[];function L(F){Array.isArray(F)?F.forEach(Q=>{x.push(Q)}):x.push(F)}if((typeof m!="string"||A)&&t&&Object.hasOwn(t,m))L(this._trace(T,t[m],rt(r,m),t,m,u,c));else if(m==="*")this._walk(t,F=>{L(this._trace(T,t[F],rt(r,F),t,F,u,!0,!0))});else if(m==="..")L(this._trace(T,t,r,a,i,u,c)),this._walk(t,F=>{typeof t[F]=="object"&&L(this._trace(n.slice(),t[F],rt(r,F),t,F,u,!0))});else{if(m==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:T,isParentSelector:!0};if(m==="~")return p={path:rt(r,m),value:i,parent:a,parentProperty:null},this._handleCallback(p,u,"property"),p;if(m==="$")L(this._trace(T,t,r,null,null,u,c));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(m))L(this._slice(m,T,t,r,a,i,u));else if(m.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const F=m.replace(/^\?\((.*?)\)$/u,"$1"),Q=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(F);Q?this._walk(t,ie=>{const j=[Q[2]],ce=Q[1]?t[ie][Q[1]]:t[ie];this._trace(j,ce,r,a,i,u,!0).length>0&&L(this._trace(T,t[ie],rt(r,ie),t,ie,u,!0))}):this._walk(t,ie=>{this._eval(F,t[ie],ie,r,a,i)&&L(this._trace(T,t[ie],rt(r,ie),t,ie,u,!0))})}else if(m[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");L(this._trace(vt(this._eval(m,t,r.at(-1),r.slice(0,-1),a,i),T),t,r,a,i,u,c))}else if(m[0]==="@"){let F=!1;const Q=m.slice(1,-2);switch(Q){case"scalar":(!t||!["object","function"].includes(typeof t))&&(F=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===Q&&(F=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(F=!0);break;case"number":Number.isFinite(t)&&(F=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(F=!0);break;case"object":t&&typeof t===Q&&(F=!0);break;case"array":Array.isArray(t)&&(F=!0);break;case"other":F=this.currOtherTypeCallback(t,r,a,i);break;case"null":t===null&&(F=!0);break;default:throw new TypeError("Unknown value type "+Q)}if(F)return p={path:r,value:t,parent:a,parentProperty:i},this._handleCallback(p,u,"value"),p}else if(m[0]==="`"&&t&&Object.hasOwn(t,m.slice(1))){const F=m.slice(1);L(this._trace(T,t[F],rt(r,F),t,F,u,c,!0))}else if(m.includes(",")){const F=m.split(",");for(const Q of F)L(this._trace(vt(Q,T),t,r,a,i,u,!0))}else!A&&t&&Object.hasOwn(t,m)&&L(this._trace(T,t[m],rt(r,m),t,m,u,c,!0))}if(this._hasParentSelector)for(let F=0;F<x.length;F++){const Q=x[F];if(Q&&Q.isParentSelector){const ie=this._trace(Q.expr,t,Q.path,a,i,u,c);if(Array.isArray(ie)){x[F]=ie[0];const j=ie.length;for(let ce=1;ce<j;ce++)F++,x.splice(F,0,ie[ce])}else x[F]=ie}}return x},Te.prototype._walk=function(n,t){if(Array.isArray(n)){const r=n.length;for(let a=0;a<r;a++)t(a)}else n&&typeof n=="object"&&Object.keys(n).forEach(r=>{t(r)})},Te.prototype._slice=function(n,t,r,a,i,u,c){if(!Array.isArray(r))return;const A=r.length,p=n.split(":"),m=p[2]&&Number.parseInt(p[2])||1;let T=p[0]&&Number.parseInt(p[0])||0,x=p[1]&&Number.parseInt(p[1])||A;T=T<0?Math.max(0,T+A):Math.min(A,T),x=x<0?Math.max(0,x+A):Math.min(A,x);const L=[];for(let F=T;F<x;F+=m)this._trace(vt(F,t),r,a,i,u,c,!0).forEach(ie=>{L.push(ie)});return L},Te.prototype._eval=function(n,t,r,a,i,u){this.currSandbox._$_parentProperty=u,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;const c=n.includes("@path");c&&(this.currSandbox._$_path=Te.toPathString(a.concat([r])));const A=this.currEval+"Script:"+n;if(!Te.cache[A]){let p=n.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(c&&(p=p.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)Te.cache[A]=new this.safeVm.Script(p);else if(this.currEval==="native")Te.cache[A]=new this.vm.Script(p);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const m=this.currEval;Te.cache[A]=new m(p)}else if(typeof this.currEval=="function")Te.cache[A]={runInNewContext:m=>this.currEval(p,m)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return Te.cache[A].runInNewContext(this.currSandbox)}catch(p){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+p.message+": "+n)}},Te.cache={},Te.toPathString=function(n){const t=n,r=t.length;let a="$";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(a+=/^[0-9*]+$/u.test(t[i])?"["+t[i]+"]":"['"+t[i]+"']");return a},Te.toPointer=function(n){const t=n,r=t.length;let a="";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(a+="/"+t[i].toString().replaceAll("~","~0").replaceAll("/","~1"));return a},Te.toPathArray=function(n){const{cache:t}=Te;if(t[n])return t[n].concat();const r=[],i=n.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(u,c){return"[#"+(r.push(c)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(u,c){return"['"+c.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(u,c){return";"+c.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(u){const c=u.match(/#(\d+)/u);return!c||!c[1]?u:r[c[1]]});return t[n]=i,t[n].concat()},Te.prototype.safeVm={Script:mr};const Er=function(n,t,r){const a=n.length;for(let i=0;i<a;i++){const u=n[i];r(u)&&t.push(n.splice(i--,1)[0])}};class yr{constructor(t){this.code=t}runInNewContext(t){let r=this.code;const a=Object.keys(t),i=[];Er(a,i,m=>typeof t[m]=="function");const u=a.map(m=>t[m]);r=i.reduce((m,T)=>{let x=t[T].toString();return/function/u.test(x)||(x="function "+x),"var "+T+"="+x+";"+m},"")+r,!/(['"])use strict\1/u.test(r)&&!a.includes("arguments")&&(r="var arguments = undefined;"+r),r=r.replace(/;\s*$/u,"");const A=r.lastIndexOf(";"),p=A!==-1?r.slice(0,A+1)+" return "+r.slice(A+1):" return "+r;return new Function(...a,p)(...u)}}Te.prototype.vm={Script:yr};const br={class:"json-node"},Ar={key:0,class:"json-node__container"},Nr={class:"json-node__line"},xr=["contenteditable","onKeydown"],Cr={key:1,class:"json-node__colon"},vr=["title"],Dr=["title"],Tr={key:4,class:"json-node__comma"},wr={key:0,class:"json-node__children"},_r={class:"json-node__children-content"},Sr={class:"json-node__line json-node__closing-bracket"},Br={class:"json-node__bracket"},Or={key:0,class:"json-node__comma"},kr={key:1,class:"json-node__primitive"},Rr=["contenteditable","onKeydown"],Ir={key:1,class:"json-node__colon"},Fr=["title"],Pr=["contenteditable","onKeydown"],Lr={key:0,class:"json-node__comma"},Vr=o.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(n,{emit:t}){o.useCssVars(N=>({"2a18b018":N.level,"58a14b93":N.theme.colors.syntaxKey,"46fe1b3e":N.theme.colors.hoverBackground,fbe2c048:N.theme.colors.syntaxBracket,"4bd524bb":N.theme.colors.collapsedText,"3308d23c":N.theme.colors.collapsedBackground,"36380c60":N.theme.colors.collapsedBackgroundHover,"0892365d":N.theme.colors.syntaxString,"0015b195":N.theme.colors.syntaxNumber,"7db95f5c":N.theme.colors.syntaxBoolean,"88ec825a":N.theme.colors.syntaxNull,"537157f7":N.theme.colors.background,"3cee3331":N.theme.colors.selectionBackground,"81323cee":N.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(!1),c=o.ref(""),A=o.ref(""),p=o.ref("string"),m=o.ref(null),T=o.ref(null),x=N=>N!==null&&typeof N=="object"&&!Array.isArray(N)&&"__protected_number__"in N&&Object.keys(N).length===1,L=N=>x(N)?N.__protected_number__:"",F=o.computed(()=>x(r.value)?!1:r.value!==null&&typeof r.value=="object"),Q=o.computed(()=>Array.isArray(r.value)),ie=o.computed(()=>r.path?r.path:r.keyName?r.keyName:"root"),j=o.computed(()=>r.expanded.has(ie.value)),ce=o.computed(()=>r.keyName),he=o.computed(()=>Q.value?"[":"{"),S=o.computed(()=>Q.value?"]":"}"),q=o.computed(()=>{if(!r.value)return"";const _=Object.keys(r.value).length;return Q.value?_>0?` ${_} items `:" ":_>0?` ${_} keys `:" "}),G=o.computed(()=>{const N=typeof r.value;return r.value===null?"json-node__value--null":N==="boolean"?"json-node__value--boolean":N==="number"||x(r.value)?"json-node__value--number":N==="string"?"json-node__value--string":""}),V=o.computed(()=>r.value===null?"null":typeof r.value=="boolean"||typeof r.value=="number"?String(r.value):x(r.value)?L(r.value):typeof r.value=="string"?`"${r.value}"`:String(r.value)),g=o.computed(()=>"Double-click to edit"),X=N=>r.level===0?N:ie.value?`${ie.value}.${N}`:N,w=N=>{const _=Object.keys(r.value);return _.indexOf(N)===_.length-1},v=()=>{a("toggle-expand",ie.value)},$=()=>{r.level!==0&&(i.value=!0,c.value=r.keyName,o.nextTick(()=>{if(m.value){m.value.focus();const N=document.createRange();N.selectNodeContents(m.value);const _=window.getSelection();_?.removeAllRanges(),_?.addRange(N)}}))},R=()=>{F.value||(u.value=!0,r.value===null?p.value="null":x(r.value)?p.value="protected-number":typeof r.value=="string"?p.value="string":typeof r.value=="number"?p.value="number":typeof r.value=="boolean"&&(p.value="boolean"),x(r.value)?A.value=L(r.value):typeof r.value=="string"?A.value=r.value:A.value=String(r.value),o.nextTick(()=>{if(T.value){T.value.focus();const N=document.createRange();N.selectNodeContents(T.value);const _=window.getSelection();_?.removeAllRanges(),_?.addRange(N)}}))},P=()=>{if(r.level===0||!i.value)return;const N=m.value?.innerText.trim()||"";if(!N){ue();return}if(N===r.keyName){i.value=!1;return}i.value=!1,a("update:key",ie.value,N)},ee=()=>{if(u.value)try{let N;const _=T.value?.innerText.trim()||"";if(p.value==="string")_==="null"?N=null:_==="true"||_==="false"?N=_==="true":N=_;else if(p.value==="protected-number")N={__protected_number__:_};else if(_==="null")N=null;else if(_==="true"||_==="false")N=_==="true";else if(!isNaN(Number(_))&&_!==""){const W=Number(_);!Number.isSafeInteger(W)||_.length>15?N={__protected_number__:_}:N=W}else N=_;a("update:value",ie.value,N),u.value=!1}catch(N){console.error("Failed to parse value:",N),u.value=!1}},ue=()=>{i.value=!1,c.value=r.keyName},me=()=>{u.value=!1,x(r.value)?A.value=L(r.value):typeof r.value=="string"?A.value=r.value:A.value=String(r.value)};return(N,_)=>{const W=o.resolveComponent("JsonNode",!0);return o.openBlock(),o.createElementBlock("div",br,[F.value?(o.openBlock(),o.createElementBlock("div",Ar,[o.createElementVNode("div",Nr,[N.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:$,onKeydown:[o.withKeys(o.withModifiers(P,["prevent"]),["enter"]),o.withKeys(ue,["escape"])],onBlur:P,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?c.value:`"${ce.value}"`),41,xr)):o.createCommentVNode("",!0),N.keyName?(o.openBlock(),o.createElementBlock("span",Cr,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:"json-node__bracket json-node__bracket--clickable",onClick:v,title:j.value?"Click to collapse":"Click to expand"},o.toDisplayString(he.value),9,vr),j.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:2,class:"json-node__collapsed-info",onClick:v,title:`Click to expand ${q.value.trim()}`},o.toDisplayString(q.value),9,Dr)),j.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:3,class:"json-node__bracket json-node__bracket--clickable",onClick:v,title:"Click to expand"},o.toDisplayString(S.value),1)),!j.value&&!N.isLast?(o.openBlock(),o.createElementBlock("span",Tr,",")):o.createCommentVNode("",!0)]),j.value?(o.openBlock(),o.createElementBlock("div",wr,[o.createElementVNode("div",_r,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(J,U)=>(o.openBlock(),o.createElementBlock("div",{key:U,class:"json-node__child"},[o.createVNode(W,{value:J,"key-name":Q.value?"":String(U),level:N.level+1,path:X(String(U)),expanded:N.expanded,theme:N.theme,"onUpdate:value":_[0]||(_[0]=(le,D)=>N.$emit("update:value",le,D)),onToggleExpand:_[1]||(_[1]=le=>N.$emit("toggle-expand",le)),onCopy:_[2]||(_[2]=le=>N.$emit("copy",le)),"onUpdate:key":_[3]||(_[3]=(le,D)=>N.$emit("update:key",le,D)),"is-last":w(String(U))},null,8,["value","key-name","level","path","expanded","theme","is-last"])]))),128))]),o.createElementVNode("div",Sr,[o.createElementVNode("span",Br,o.toDisplayString(S.value),1),N.isLast?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Or,","))])])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",kr,[N.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:$,onKeydown:[o.withKeys(o.withModifiers(P,["prevent"]),["enter"]),o.withKeys(ue,["escape"])],onBlur:P,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?c.value:`"${ce.value}"`),41,Rr)):o.createCommentVNode("",!0),N.keyName?(o.openBlock(),o.createElementBlock("span",Ir,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:o.normalizeClass(["json-node__value-wrapper",G.value]),onDblclick:R,title:g.value},[o.createElementVNode("span",{class:"json-node__value",contenteditable:u.value,onKeydown:[o.withKeys(o.withModifiers(ee,["prevent"]),["enter"]),o.withKeys(me,["escape"])],onBlur:ee,ref_key:"valueRef",ref:T},o.toDisplayString(u.value?A.value:V.value),41,Pr),N.isLast?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Lr,","))],42,Fr)]))])}}}),ft=(n,t)=>{const r=n.__vccOpts||n;for(const[a,i]of t)r[a]=i;return r},$r=ft(Vr,[["__scopeId","data-v-1472a8af"]]),It={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",hoverBackground:"#f6f8fa",selectionBackground:"rgba(9, 105, 218, 0.2)",collapsedBackground:"#ddf4ff",collapsedBackgroundHover:"#b6e3ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},Mr={"github-light":It,"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",hoverBackground:"#161b22",selectionBackground:"rgba(121, 192, 255, 0.2)",collapsedBackground:"#1c2128",collapsedBackgroundHover:"#2d333b",collapsedText:"#79c0ff",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",hoverBackground:"#f9f9f9",selectionBackground:"rgba(59, 130, 246, 0.2)",collapsedBackground:"#e0f2fe",collapsedBackgroundHover:"#bae6fd",collapsedText:"#0284c7",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",hoverBackground:"#f8f2eb",selectionBackground:"rgba(255, 107, 53, 0.2)",collapsedBackground:"#ffe8d6",collapsedBackgroundHover:"#ffd4b0",collapsedText:"#d73502",indentLine:"#e8d5b7"}}};function Ur(n="github-light"){return Mr[n]||It}const qr={key:0,class:"json-format__toolbar"},Hr={class:"json-format__actions"},jr=["disabled"],Kr=["disabled"],Gr=["disabled"],Xr=["disabled"],Wr={class:"json-format__info"},zr={key:0,class:"json-format__status json-format__status--success"},Yr={key:1,class:"json-format__status json-format__status--error"},Qr={class:"json-format__content"},Zr={key:0,class:"json-format__error"},Jr={key:1,class:"json-format__error"},en={key:2,class:"json-format__viewer"},Ft=ft(o.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(n,{expose:t,emit:r}){o.useCssVars(D=>({"4782cf12":L.value.colors.border,"35b95bf9":L.value.colors.background,cda9ff90:L.value.colors.text,"41368ee0":L.value.colors.surfaceBackground,"47674bee":L.value.colors.buttonBorder,"0f08048b":L.value.colors.buttonBackground,cb00036c:L.value.colors.buttonText,"4a92191e":L.value.colors.buttonBackgroundHover,d30c3876:L.value.colors.buttonPrimary,"3d918877":L.value.colors.buttonPrimaryHover,"4f985866":L.value.colors.successBackground,"3847a518":L.value.colors.success,"28f0996b":L.value.colors.errorBackground,e9310f46:L.value.colors.error}));const a=n,i=r,u=o.ref(null),c=o.ref(""),A=o.ref(new Set),p=o.ref(null),m=o.ref(""),T=o.ref(!1),x=o.computed(()=>c.value===""),L=o.computed(()=>Ur(a.theme)),F=D=>{if(D==null)return D;if(Array.isArray(D))return D.map(k=>F(k));if(typeof D=="object"){const k={},K=Object.keys(D).sort();for(const z of K)k[z]=F(D[z]);return k}return D},Q=o.computed(()=>{const D=p.value!==null?p.value:u.value;return!D||!T.value?D:F(D)}),ie=o.computed(()=>m.value?null:Q.value),j=D=>{if(!D.trim()){u.value=null,c.value="",p.value=null,m.value="";return}try{let k=D;const K=/(:\s*|,\s*|\[\s*)-?\d{16,}/.test(k),z=/(:\s*|,\s*|\[\s*)-?\d+\.\d*0+\s*[,}\]\s]*/.test(k);if(!K&&!z)try{u.value=JSON.parse(k),c.value="",p.value=null,m.value="",o.nextTick(()=>{ie.value!==null&&R()});return}catch{}k=(I=>{let te="",Ee=!1,ye=!1,we=0;for(;we<I.length;){const ke=I[we];if(Ee)ye?ye=!1:ke==="\\"?ye=!0:ke==='"'&&(Ee=!1),te+=ke,we++;else if(ke==='"')Ee=!0,te+=ke,we++;else{const ve=I.slice(we);let Y=ve.match(/^([:,\[\s]*)(-?\d{16,})(\s*[,\}\]\s]|$)/);if(Y){te+=Y[1]+'{"__protected_number__":"'+Y[2]+'"}'+Y[3],we+=Y[0].length;continue}if(Y=ve.match(/^([:,\[\s]*)(-?\d+\.\d*0+)(\s*[,\}\]\s]|$)/),Y){te+=Y[1]+'{"__protected_number__":"'+Y[2]+'"}'+Y[3],we+=Y[0].length;continue}te+=ke,we++}}return te})(k),u.value=JSON.parse(k),c.value="",p.value=null,m.value="",o.nextTick(()=>{ie.value!==null&&R()})}catch(k){c.value=k instanceof Error?k.message:"Unknown parsing error",u.value=null,p.value=null,m.value=""}},ce=D=>{if(!D||!D.expression.trim()){G();return}if(!u.value){m.value="No valid JSON data to filter";return}try{let k;if(D.type==="jsonpath")k=Te({path:D.expression,json:u.value}),k.length===1&&D.expression.includes("$[")===!1&&!D.expression.endsWith("[*]")?p.value=k[0]:p.value=k;else if(D.type==="js"){const{proxyData:K,indexMap:z}=he(u.value),I=new Function("$",`
3
3
  try {
4
4
  return ${D.expression};
5
5
  } catch (error) {
6
6
  throw new Error('JavaScript expression error: ' + error.message);
7
7
  }
8
- `)(F);O=z(u.value,P,G),p.value=O}else throw new Error(`Unsupported filter type: ${D.type}`);m.value="",o.nextTick(()=>{_()})}catch(O){m.value=O instanceof Error?O.message:"Filter execution error",p.value=null}},re=(D,O="root")=>{const F=new Map,G=(P,Q)=>{if(P==null)return P;if(typeof P=="object"&&P.__protected_number__!==void 0){const pe=parseFloat(P.__protected_number__);return F.set(pe,Q),pe}if(Array.isArray(P)){const pe=P.map((Ee,Te)=>{const ke=`${Q}[${Te}]`,De=G(Ee,ke);return F.set(De,ke),De});return F.set(pe,Q),pe}if(typeof P=="object"){const pe={};for(const Ee in P)if(Object.prototype.hasOwnProperty.call(P,Ee)){const Te=Q==="root"?Ee:`${Q}.${Ee}`;pe[Ee]=G(P[Ee],Te)}return F.set(pe,Q),pe}return P};return{proxyData:G(D,O),indexMap:F}},z=(D,O,F)=>{if(O===null||typeof O!="object")return O;if(Array.isArray(O))return O.map(P=>{const Q=F.get(P);if(Q){const pe=me(D,Q);if(pe!==void 0)return pe}return z(D,P,F)});const G=F.get(O);if(G){const P=me(D,G);if(P!==void 0)return P}const X={};for(const P in O)Object.prototype.hasOwnProperty.call(O,P)&&(X[P]=z(D,O[P],F));return X},me=(D,O)=>{if(O==="root")return D;const F=[];let G=O.replace(/^root\.?/,"");const X=/([^\[\].]+)|\[(\d+)\]/g;let P;for(;(P=X.exec(G))!==null;)P[1]?F.push(P[1]):P[2]!==void 0&&F.push(parseInt(P[2]));let Q=D;for(const pe of F){if(Q==null)return;Q=Q[pe]}return Q},be=()=>{p.value=null,m.value=""},J=()=>{S.value=!0},N=()=>{S.value=!1};o.watch(()=>a.modelValue,D=>{H(D)},{immediate:!0});const le=(D,O,F)=>{const G=Q=>{if(Q===null||typeof Q!="object")return Q;if(!Array.isArray(Q)&&"__protected_number__"in Q&&Object.keys(Q).length===1)return`__PROTECTED_NUMBER_${Q.__protected_number__}_PROTECTED_NUMBER__`;if(Array.isArray(Q))return Q.map(Ee=>G(Ee));const pe={};for(const[Ee,Te]of Object.entries(Q))pe[Ee]=G(Te);return pe},X=G(D);return JSON.stringify(X,O,F).replace(/"__PROTECTED_NUMBER_(.+?)_PROTECTED_NUMBER__"/g,"$1")},w=(D,O)=>{if(!a.readonly)try{const F=y(u.value,D,O),G=le(F,null,2);i("update:modelValue",G)}catch(F){console.error("Failed to update JSON:",F)}},y=(D,O,F)=>{if(!O||O==="root")return F;const G=O.split("."),X=V(D,G.slice(0,-1));let P=X;for(let pe=0;pe<G.length-1;pe++){const Ee=G[pe];Ee!=="root"&&(Array.isArray(P)?P=P[parseInt(Ee)]:P=P[Ee])}const Q=G[G.length-1];return Q==="root"?F:(Array.isArray(P)?P[parseInt(Q)]=F:P[Q]=F,X)},B=D=>{x.value.has(D)?x.value.delete(D):x.value.add(D)},_=()=>{const D=new Set,O=(F,G="")=>{F!==null&&typeof F=="object"&&(D.add(G||"root"),Array.isArray(F)?F.forEach((X,P)=>{const Q=G?`${G}.${P}`:`${P}`;O(X,Q)}):Object.keys(F).forEach(X=>{const P=G?`${G}.${X}`:X;O(F[X],P)}))};O(ae.value),x.value=D,i("expand-all")},L=()=>{x.value=new Set(["root"]),i("collapse-all")},$=async()=>{if(v.value)try{const D=ae.value,O=le(D,null,2);await navigator.clipboard.writeText(O),i("copy-success",O)}catch(D){console.error("Failed to copy JSON:",D),i("copy-error",D instanceof Error?D:new Error("Failed to copy JSON"))}},Z=()=>{if(v.value)try{const D=ae.value,O=le(D);i("update:modelValue",O),i("compress",O)}catch(D){console.error("Failed to compress JSON:",D)}},te=async D=>{try{let O;typeof D=="object"&&D!==null&&!Array.isArray(D)&&"__protected_number__"in D&&Object.keys(D).length===1?O=D.__protected_number__:typeof D=="string"?O=`"${D}"`:O=JSON.stringify(D),await navigator.clipboard.writeText(O)}catch(O){console.error("Failed to copy value:",O)}},g=(D,O)=>{if(!a.readonly)try{const F=C(u.value,D,O),G=le(F,null,2);i("update:modelValue",G),ee(D,O)}catch(F){console.error("Failed to rename key:",F)}},C=(D,O,F)=>{if(!O||O==="root")return D;const G=O.split("."),X=V(D,G.slice(0,-1));if(G.length===1){const pe=G[0];return X&&typeof X=="object"&&!Array.isArray(X)?j(X,pe,F):X}let P=X;for(let pe=0;pe<G.length-1;pe++){const Ee=G[pe];Array.isArray(P)?P=P[parseInt(Ee)]:P=P[Ee]}const Q=G[G.length-1];if(!Array.isArray(P)&&P&&typeof P=="object"){const pe=j(P,Q,F),Ee=G.slice(0,-1);Ee.length>0&&R(X,Ee,pe)}return X},V=(D,O)=>{if(O.length===0)return D;if(Array.isArray(D)){const F=[...D],G=O[0],X=parseInt(G);return O.length===1||(F[X]=V(D[X],O.slice(1))),F}else if(D&&typeof D=="object"){const F={...D},G=O[0];return O.length===1||(F[G]=V(D[G],O.slice(1))),F}return D},j=(D,O,F)=>{if(!D||typeof D!="object"||Array.isArray(D))return D;const G=Object.keys(D),X={};for(const P of G)P===O?X[F]=D[P]:X[P]=D[P];return X},R=(D,O,F)=>{let G=D;for(let P=0;P<O.length-1;P++){const Q=O[P];Array.isArray(G)?G=G[parseInt(Q)]:G=G[Q]}const X=O[O.length-1];Array.isArray(G)?G[parseInt(X)]=F:G[X]=F},ee=(D,O)=>{const F=new Set;x.value.forEach(G=>{if(G===D){const X=D.split(".");X[X.length-1]=O,F.add(X.join("."))}else if(G.startsWith(D+".")){const X=D.split(".");X[X.length-1]=O;const P=X.join("."),Q=G.substring(D.length);F.add(P+Q)}else F.add(G)}),x.value=F};return t({copyJson:$,compressSource:Z,expandAll:_,collapseAll:L,toggleExpand:B,updateValue:w,updateKey:g,filter:de,clearFilter:be,sortKeys:J,clearSortKeys:N,isSorted:()=>S.value,isValidJson:()=>v.value,getParsedJson:()=>u.value,getFilteredJson:()=>p.value,getExpandedNodes:()=>x.value,getParseError:()=>f.value,getFilterError:()=>m.value,parseJson:D=>H(D),copyValue:D=>te(D)}),(D,O)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["json-format",`json-format--${U.value.name}`])},[D.showToolbar?(o.openBlock(),o.createElementBlock("div",Ur,[o.createElementVNode("div",Hr,[o.createElementVNode("button",{class:"json-format__btn json-format__btn--primary",onClick:$,disabled:!v.value,title:"Copy JSON"}," 📋 Copy ",8,jr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:_,disabled:!v.value,title:"Expand All"}," ⬇️ Expand All ",8,Kr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:L,disabled:!v.value,title:"Collapse All"}," ➡️ Collapse All ",8,Gr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:Z,disabled:!v.value,title:"Compress JSON"}," 📦 Compress ",8,Xr)]),o.createElementVNode("div",Wr,[v.value?(o.openBlock(),o.createElementBlock("span",zr," ✅ Valid JSON ")):(o.openBlock(),o.createElementBlock("span",Yr," ❌ Invalid JSON "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",Qr,[v.value?m.value?(o.openBlock(),o.createElementBlock("div",Jr,[O[1]||(O[1]=o.createElementVNode("h4",null,"Filter Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(m.value),1)])):(o.openBlock(),o.createElementBlock("div",en,[o.createVNode($r,{value:ae.value,"key-name":"",level:0,expanded:x.value,"is-last":!0,theme:U.value,"onUpdate:value":w,onToggleExpand:B,onCopy:te,"onUpdate:key":g},null,8,["value","expanded","theme"])])):(o.openBlock(),o.createElementBlock("div",Zr,[O[0]||(O[0]=o.createElementVNode("h4",null,"JSON Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(f.value),1)]))])],2))}}),[["__scopeId","data-v-030f8e3b"]]);function tn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var vt={},Pt;function rn(){return Pt||(Pt=1,function(n){var t=n;(function(r){var a="__namespace",i=function(e){return e==null},u=function(e){return e===a||Number.isInteger(e)&&e>=1&&e<=11},f=function(e){return e&&u(e.nodeType)&&typeof e.nodeName=="string"};function x(e){var s=Array.prototype.slice,d=e.length,b=function(T,se){return function(){return se.apply(this,T.concat(s.call(arguments)))}},h=function(){var T=s.call(arguments);return T.length<d?b(T,h):e.apply(this,s.apply(arguments,[0,d]))};return h}var p=function(e,s){for(var d=0;d<s.length;d+=1)e(s[d],d,s)},m=function(e,s,d){var b=s;return p(function(h,T){b=e(b,h,T)},d),b},S=function(e,s){var d=new Array(s.length);return p(function(b,h){d[h]=e(b)},s),d},v=function(e,s){var d=[];return p(function(b,h){e(b,h)&&d.push(b)},s),d},U=function(e,s){for(var d=0;d<e.length;d+=1)if(e[d]===s)return!0;return!1};function K(e){return function(){return e}}function Y(e){return e.toString()}var ae=function(e,s){return s.join(e)},H=function(e,s,d){return e+d+s},de=Array.prototype.concat,re=function(e,s){var d=new ue;d.addArray(e);var b=d.toArray();return s?b.reverse():b},z=32767;function me(e){for(var s=[],d=0;d<e.length;d+=z){var b=e.slice(d,d+z);s=de.apply(s,b)}return s}function be(e,s){for(var d=Object(e),b=1;b<arguments.length;b++){var h=arguments[b];if(h!=null)for(var T in h)Object.prototype.hasOwnProperty.call(h,T)&&(d[T]=h[T])}return d}var J={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NAMESPACE_NODE:a};N.prototype=new Object,N.prototype.constructor=N,N.superclass=Object.prototype;function N(){this.init()}N.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(e){return new $(e[0],e[2])},this.reduceActions[5]=function(e){return new Z(e[0],e[2])},this.reduceActions[7]=function(e){return new te(e[0],e[2])},this.reduceActions[8]=function(e){return new g(e[0],e[2])},this.reduceActions[10]=function(e){return new C(e[0],e[2])},this.reduceActions[11]=function(e){return new V(e[0],e[2])},this.reduceActions[12]=function(e){return new j(e[0],e[2])},this.reduceActions[13]=function(e){return new R(e[0],e[2])},this.reduceActions[15]=function(e){return new ee(e[0],e[2])},this.reduceActions[16]=function(e){return new D(e[0],e[2])},this.reduceActions[18]=function(e){return new O(e[0],e[2])},this.reduceActions[19]=function(e){return new F(e[0],e[2])},this.reduceActions[20]=function(e){return new G(e[0],e[2])},this.reduceActions[22]=function(e){return new _(e[1])},this.reduceActions[24]=function(e){return new X(e[0],e[2])},this.reduceActions[25]=function(e){return new P(void 0,void 0,e[0])},this.reduceActions[27]=function(e){return e[0].locationPath=e[2],e[0]},this.reduceActions[28]=function(e){return e[0].locationPath=e[2],e[0].locationPath.steps.unshift(new W(W.DESCENDANTORSELF,A.nodeTest,[])),e[0]},this.reduceActions[29]=function(e){return new P(e[0],[],void 0)},this.reduceActions[30]=function(e){return fe.instance_of(e[0],P)?(e[0].filterPredicates==null&&(e[0].filterPredicates=[]),e[0].filterPredicates.push(e[1]),e[0]):new P(e[0],[e[1]],void 0)},this.reduceActions[32]=function(e){return e[1]},this.reduceActions[33]=function(e){return new I(e[0])},this.reduceActions[34]=function(e){return new q(e[0])},this.reduceActions[36]=function(e){return new Ce(e[0],[])},this.reduceActions[37]=function(e){return new Ce(e[0],e[2])},this.reduceActions[38]=function(e){return[e[0]]},this.reduceActions[39]=function(e){return e[2].unshift(e[0]),e[2]},this.reduceActions[43]=function(e){return new De(!0,[])},this.reduceActions[44]=function(e){return e[1].absolute=!0,e[1]},this.reduceActions[46]=function(e){return new De(!1,[e[0]])},this.reduceActions[47]=function(e){return e[0].steps.push(e[2]),e[0]},this.reduceActions[49]=function(e){return new W(e[0],e[1],[])},this.reduceActions[50]=function(e){return new W(W.CHILD,e[0],[])},this.reduceActions[51]=function(e){return new W(e[0],e[1],e[2])},this.reduceActions[52]=function(e){return new W(W.CHILD,e[0],e[1])},this.reduceActions[54]=function(e){return[e[0]]},this.reduceActions[55]=function(e){return e[1].unshift(e[0]),e[1]},this.reduceActions[56]=function(e){return e[0]=="ancestor"?W.ANCESTOR:e[0]=="ancestor-or-self"?W.ANCESTORORSELF:e[0]=="attribute"?W.ATTRIBUTE:e[0]=="child"?W.CHILD:e[0]=="descendant"?W.DESCENDANT:e[0]=="descendant-or-self"?W.DESCENDANTORSELF:e[0]=="following"?W.FOLLOWING:e[0]=="following-sibling"?W.FOLLOWINGSIBLING:e[0]=="namespace"?W.NAMESPACE:e[0]=="parent"?W.PARENT:e[0]=="preceding"?W.PRECEDING:e[0]=="preceding-sibling"?W.PRECEDINGSIBLING:e[0]=="self"?W.SELF:-1},this.reduceActions[57]=function(e){return W.ATTRIBUTE},this.reduceActions[59]=function(e){return e[0]=="comment"?A.commentTest:e[0]=="text"?A.textTest:e[0]=="processing-instruction"?A.anyPiTest:e[0]=="node"?A.nodeTest:new A(-1,void 0)},this.reduceActions[60]=function(e){return new A.PITest(e[2])},this.reduceActions[61]=function(e){return e[1]},this.reduceActions[63]=function(e){return e[1].absolute=!0,e[1].steps.unshift(new W(W.DESCENDANTORSELF,A.nodeTest,[])),e[1]},this.reduceActions[64]=function(e){return e[0].steps.push(new W(W.DESCENDANTORSELF,A.nodeTest,[])),e[0].steps.push(e[2]),e[0]},this.reduceActions[65]=function(e){return new W(W.SELF,A.nodeTest,[])},this.reduceActions[66]=function(e){return new W(W.PARENT,A.nodeTest,[])},this.reduceActions[67]=function(e){return new oe(e[1])},this.reduceActions[68]=function(e){return A.nameTestAny},this.reduceActions[69]=function(e){return new A.NameTestPrefixAny(e[0].split(":")[0])},this.reduceActions[70]=function(e){return new A.NameTestQName(e[0])}},N.actionTable=[" s s sssssssss s ss s ss"," s ","r rrrrrrrrr rrrrrrr rr r "," rrrrr "," s s sssssssss s ss s ss","rs rrrrrrrr s sssssrrrrrr rrs rs "," s s sssssssss s ss s ss"," s "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s "," s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr r ","a ","r s rr r ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrs rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r srrrrrrrr rrrrrrs rr sr ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r "," sssss ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrr rrrrr rr r "," s "," s "," rrrrr "," s s sssssssss s sss s ss","r srrrrrrrr rrrrrrs rr r "," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss ss s ss"," s s sssssssss s ss s ss"," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr rr "," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," rr "," s "," rs ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrr rr r "," r "," s ","r srrrrrrrr rrrrrrs rr r ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s s sssssssss s ss s ss","r rrrrrrrrr rrrrrrr rr rr "," r "],N.actionTableNumber=[` 1 0 /.-,+*)(' & %$ # "!`," J ","a aaaaaaaaa aaaaaaa aa a "," YYYYY ",` 1 0 /.-,+*)(' & %$ # "!`,`K1 KKKKKKKK . +*)('KKKKKK KK# K" `,` 1 0 /.-,+*)(' & %$ # "!`," N "," O ","e eeeeeeeee eeeeeee ee ee ","f fffffffff fffffff ff ff ","d ddddddddd ddddddd dd dd ","B BBBBBBBBB BBBBBBB BB BB ","A AAAAAAAAA AAAAAAA AA AA "," P "," Q ",` 1 . +*)(' # " `,"b bbbbbbbbb bbbbbbb bb b "," ","! S !! ! ",'" T" "" " ',"$ V $$ U $$ $ ","& &ZY&& &XW && & ",") ))))) )))\\[ )) ) ",". ....._^] ..... .. . ","1 11111111 11111 11 1 ","5 55555555 55555` 55 5 ","7 77777777 777777 77 7 ","9 99999999 999999 99 9 ",": c:::::::: ::::::b :: a: ","I fIIIIIIII IIIIIIe II I ","= ========= ======= == == ","? ????????? ??????? ?? ?? ","C CCCCCCCCC CCCCCCC CC CC ","J JJJJJJJJ JJJJJJ JJ J ","M MMMMMMMM MMMMMM MM M ","N NNNNNNNNN NNNNNNN NN N ","P PPPPPPPPP PPPPPPP PP P "," +*)(' ","R RRRRRRRRR RRRRRRR RR aR ","U UUUUUUUUU UUUUUUU UU U ","Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ","c ccccccccc ccccccc cc cc "," j ","L fLLLLLLLL LLLLLLe LL L ","6 66666666 66666 66 6 "," k "," l "," XXXXX ",` 1 0 /.-,+*)(' & %$m # "!`,"_ f________ ______e __ _ ",` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 . +*)(' # " `,` 1 . +*)(' # " `,"> >>>>>>>>> >>>>>>> >> >> ",` 1 . +*)(' # " `,` 1 . +*)(' # " `,"Q QQQQQQQQQ QQQQQQQ QQ aQ ","V VVVVVVVVV VVVVVVV VV aV ","T TTTTTTTTT TTTTTTT TT T ","@ @@@@@@@@@ @@@@@@@ @@ @@ "," ‡ ","[ [[[[[[[[[ [[[[[[[ [[ [[ ","D DDDDDDDDD DDDDDDD DD DD "," HH "," ˆ "," F‰ ","# T# ## # ","% V %% U %% % ","' 'ZY'' 'XW '' ' ","( (ZY(( (XW (( ( ","+ +++++ +++\\[ ++ + ","* ***** ***\\[ ** * ","- ----- ---\\[ -- - ",", ,,,,, ,,,\\[ ,, , ","0 00000_^] 00000 00 0 ","/ /////_^] ///// // / ","2 22222222 22222 22 2 ","3 33333333 33333 33 3 ","4 44444444 44444 44 4 ","8 88888888 888888 88 8 "," ^ "," Š ","; f;;;;;;;; ;;;;;;e ;; ; ","< f<<<<<<<< <<<<<<e << < ","O OOOOOOOOO OOOOOOO OO O ","` ````````` ``````` `` ` ","S SSSSSSSSS SSSSSSS SS S ","W WWWWWWWWW WWWWWWW WW W ","\\ \\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\ \\\\ \\\\ ","E EEEEEEEEE EEEEEEE EE EE ",` 1 0 /.-,+*)(' & %$ # "!`,"] ]]]]]]]]] ]]]]]]] ]] ]] "," G "],N.gotoTable=["3456789:;<=>?@ AB CDEFGH IJ "," "," "," ","L456789:;<=>?@ AB CDEFGH IJ "," M EFGH IJ "," N;<=>?@ AB CDEFGH IJ "," "," "," "," "," "," "," "," "," "," S EFGH IJ "," "," "," "," "," "," "," "," "," "," "," "," "," e "," "," "," "," "," "," "," "," "," h J "," i j "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABpqCDEFGH IJ "," "," r6789:;<=>?@ AB CDEFGH IJ "," s789:;<=>?@ AB CDEFGH IJ "," t89:;<=>?@ AB CDEFGH IJ "," u89:;<=>?@ AB CDEFGH IJ "," v9:;<=>?@ AB CDEFGH IJ "," w9:;<=>?@ AB CDEFGH IJ "," x9:;<=>?@ AB CDEFGH IJ "," y9:;<=>?@ AB CDEFGH IJ "," z:;<=>?@ AB CDEFGH IJ "," {:;<=>?@ AB CDEFGH IJ "," |;<=>?@ AB CDEFGH IJ "," };<=>?@ AB CDEFGH IJ "," ~;<=>?@ AB CDEFGH IJ "," =>?@ AB CDEFGH IJ ","€456789:;<=>?@ AB CDEFGH IJ"," ‚ EFGH IJ "," ƒ EFGH IJ "," "," „ GH IJ "," … GH IJ "," i † "," i ‡ "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABŒqCDEFGH IJ "," "," "],N.productions=[[1,1,2],[2,1,3],[3,1,4],[3,3,3,-9,4],[4,1,5],[4,3,4,-8,5],[5,1,6],[5,3,5,-22,6],[5,3,5,-5,6],[6,1,7],[6,3,6,-23,7],[6,3,6,-24,7],[6,3,6,-6,7],[6,3,6,-7,7],[7,1,8],[7,3,7,-25,8],[7,3,7,-26,8],[8,1,9],[8,3,8,-12,9],[8,3,8,-11,9],[8,3,8,-10,9],[9,1,10],[9,2,-26,9],[10,1,11],[10,3,10,-27,11],[11,1,12],[11,1,13],[11,3,13,-28,14],[11,3,13,-4,14],[13,1,15],[13,2,13,16],[15,1,17],[15,3,-29,2,-30],[15,1,-15],[15,1,-16],[15,1,18],[18,3,-13,-29,-30],[18,4,-13,-29,19,-30],[19,1,20],[19,3,20,-31,19],[20,1,2],[12,1,14],[12,1,21],[21,1,-28],[21,2,-28,14],[21,1,22],[14,1,23],[14,3,14,-28,23],[14,1,24],[23,2,25,26],[23,1,26],[23,3,25,26,27],[23,2,26,27],[23,1,28],[27,1,16],[27,2,16,27],[25,2,-14,-3],[25,1,-32],[26,1,29],[26,3,-20,-29,-30],[26,4,-21,-29,-15,-30],[16,3,-33,30,-34],[30,1,2],[22,2,-4,14],[24,3,14,-4,23],[28,1,-35],[28,1,-2],[17,2,-36,-18],[29,1,-17],[29,1,-19],[29,1,-18]],N.DOUBLEDOT=2,N.DOUBLECOLON=3,N.DOUBLESLASH=4,N.NOTEQUAL=5,N.LESSTHANOREQUAL=6,N.GREATERTHANOREQUAL=7,N.AND=8,N.OR=9,N.MOD=10,N.DIV=11,N.MULTIPLYOPERATOR=12,N.FUNCTIONNAME=13,N.AXISNAME=14,N.LITERAL=15,N.NUMBER=16,N.ASTERISKNAMETEST=17,N.QNAME=18,N.NCNAMECOLONASTERISK=19,N.NODETYPE=20,N.PROCESSINGINSTRUCTIONWITHLITERAL=21,N.EQUALS=22,N.LESSTHAN=23,N.GREATERTHAN=24,N.PLUS=25,N.MINUS=26,N.BAR=27,N.SLASH=28,N.LEFTPARENTHESIS=29,N.RIGHTPARENTHESIS=30,N.COMMA=31,N.AT=32,N.LEFTBRACKET=33,N.RIGHTBRACKET=34,N.DOT=35,N.DOLLAR=36,N.prototype.tokenize=function(e){for(var s=[],d=[],b=e+"\0",h=0,T=b.charAt(h++);;){for(;T==" "||T==" "||T=="\r"||T==`
9
- `;)T=b.charAt(h++);if(T=="\0"||h>=b.length)break;if(T=="("){s.push(N.LEFTPARENTHESIS),d.push(T),T=b.charAt(h++);continue}if(T==")"){s.push(N.RIGHTPARENTHESIS),d.push(T),T=b.charAt(h++);continue}if(T=="["){s.push(N.LEFTBRACKET),d.push(T),T=b.charAt(h++);continue}if(T=="]"){s.push(N.RIGHTBRACKET),d.push(T),T=b.charAt(h++);continue}if(T=="@"){s.push(N.AT),d.push(T),T=b.charAt(h++);continue}if(T==","){s.push(N.COMMA),d.push(T),T=b.charAt(h++);continue}if(T=="|"){s.push(N.BAR),d.push(T),T=b.charAt(h++);continue}if(T=="+"){s.push(N.PLUS),d.push(T),T=b.charAt(h++);continue}if(T=="-"){s.push(N.MINUS),d.push(T),T=b.charAt(h++);continue}if(T=="="){s.push(N.EQUALS),d.push(T),T=b.charAt(h++);continue}if(T=="$"){s.push(N.DOLLAR),d.push(T),T=b.charAt(h++);continue}if(T=="."){if(T=b.charAt(h++),T=="."){s.push(N.DOUBLEDOT),d.push(".."),T=b.charAt(h++);continue}if(T>="0"&&T<="9"){var se="."+T;for(T=b.charAt(h++);T>="0"&&T<="9";)se+=T,T=b.charAt(h++);s.push(N.NUMBER),d.push(se);continue}s.push(N.DOT),d.push(".");continue}if(T=="'"||T=='"'){for(var xe=T,Ne="";h<b.length&&(T=b.charAt(h))!==xe;)Ne+=T,h+=1;if(T!==xe)throw Me.fromMessage("Unterminated string literal: "+xe+Ne);h+=1,s.push(N.LITERAL),d.push(Ne),T=b.charAt(h++);continue}if(T>="0"&&T<="9"){var se=T;for(T=b.charAt(h++);T>="0"&&T<="9";)se+=T,T=b.charAt(h++);if(T=="."&&b.charAt(h)>="0"&&b.charAt(h)<="9")for(se+=T,se+=b.charAt(h++),T=b.charAt(h++);T>="0"&&T<="9";)se+=T,T=b.charAt(h++);s.push(N.NUMBER),d.push(se);continue}if(T=="*"){if(s.length>0){var ie=s[s.length-1];if(ie!=N.AT&&ie!=N.DOUBLECOLON&&ie!=N.LEFTPARENTHESIS&&ie!=N.LEFTBRACKET&&ie!=N.AND&&ie!=N.OR&&ie!=N.MOD&&ie!=N.DIV&&ie!=N.MULTIPLYOPERATOR&&ie!=N.SLASH&&ie!=N.DOUBLESLASH&&ie!=N.BAR&&ie!=N.PLUS&&ie!=N.MINUS&&ie!=N.EQUALS&&ie!=N.NOTEQUAL&&ie!=N.LESSTHAN&&ie!=N.LESSTHANOREQUAL&&ie!=N.GREATERTHAN&&ie!=N.GREATERTHANOREQUAL){s.push(N.MULTIPLYOPERATOR),d.push(T),T=b.charAt(h++);continue}}s.push(N.ASTERISKNAMETEST),d.push(T),T=b.charAt(h++);continue}if(T==":"&&b.charAt(h)==":"){s.push(N.DOUBLECOLON),d.push("::"),h++,T=b.charAt(h++);continue}if(T=="/"){if(T=b.charAt(h++),T=="/"){s.push(N.DOUBLESLASH),d.push("//"),T=b.charAt(h++);continue}s.push(N.SLASH),d.push("/");continue}if(T=="!"&&b.charAt(h)=="="){s.push(N.NOTEQUAL),d.push("!="),h++,T=b.charAt(h++);continue}if(T=="<"){if(b.charAt(h)=="="){s.push(N.LESSTHANOREQUAL),d.push("<="),h++,T=b.charAt(h++);continue}s.push(N.LESSTHAN),d.push("<"),T=b.charAt(h++);continue}if(T==">"){if(b.charAt(h)=="="){s.push(N.GREATERTHANOREQUAL),d.push(">="),h++,T=b.charAt(h++);continue}s.push(N.GREATERTHAN),d.push(">"),T=b.charAt(h++);continue}if(T=="_"||fe.isLetter(T.charCodeAt(0))){var ce=T;for(T=b.charAt(h++);fe.isNCNameChar(T.charCodeAt(0));)ce+=T,T=b.charAt(h++);if(s.length>0){var ie=s[s.length-1];if(ie!=N.AT&&ie!=N.DOUBLECOLON&&ie!=N.LEFTPARENTHESIS&&ie!=N.LEFTBRACKET&&ie!=N.AND&&ie!=N.OR&&ie!=N.MOD&&ie!=N.DIV&&ie!=N.MULTIPLYOPERATOR&&ie!=N.SLASH&&ie!=N.DOUBLESLASH&&ie!=N.BAR&&ie!=N.PLUS&&ie!=N.MINUS&&ie!=N.EQUALS&&ie!=N.NOTEQUAL&&ie!=N.LESSTHAN&&ie!=N.LESSTHANOREQUAL&&ie!=N.GREATERTHAN&&ie!=N.GREATERTHANOREQUAL){if(ce=="and"){s.push(N.AND),d.push(ce);continue}if(ce=="or"){s.push(N.OR),d.push(ce);continue}if(ce=="mod"){s.push(N.MOD),d.push(ce);continue}if(ce=="div"){s.push(N.DIV),d.push(ce);continue}}}if(T==":"){if(b.charAt(h)=="*"){s.push(N.NCNAMECOLONASTERISK),d.push(ce+":*"),h++,T=b.charAt(h++);continue}if(b.charAt(h)=="_"||fe.isLetter(b.charCodeAt(h))){for(ce+=":",T=b.charAt(h++);fe.isNCNameChar(T.charCodeAt(0));)ce+=T,T=b.charAt(h++);if(T=="("){s.push(N.FUNCTIONNAME),d.push(ce);continue}s.push(N.QNAME),d.push(ce);continue}if(b.charAt(h)==":"){s.push(N.AXISNAME),d.push(ce);continue}}if(T=="("){if(ce=="comment"||ce=="text"||ce=="node"){s.push(N.NODETYPE),d.push(ce);continue}if(ce=="processing-instruction"){b.charAt(h)==")"?s.push(N.NODETYPE):s.push(N.PROCESSINGINSTRUCTIONWITHLITERAL),d.push(ce);continue}s.push(N.FUNCTIONNAME),d.push(ce);continue}s.push(N.QNAME),d.push(ce);continue}throw new Error("Unexpected character "+T)}return s.push(1),d.push("[EOF]"),[s,d]},N.SHIFT="s",N.REDUCE="r",N.ACCEPT="a",N.prototype.parse=function(Ne){if(!Ne)throw new Error("XPath expression unspecified.");if(typeof Ne!="string")throw new Error("XPath expression must be a string.");var s,d,b=this.tokenize(Ne);if(b!=null){s=b[0],d=b[1];var h=0,T=[],se=[],xe=[],Ne,ie,ce;for(T.push(0),se.push(1),xe.push("_S"),ie=s[h],ce=d[h++];;)switch(Ne=T[T.length-1],N.actionTable[Ne].charAt(ie-1)){case N.SHIFT:se.push(-ie),xe.push(ce),T.push(N.actionTableNumber[Ne].charCodeAt(ie-1)-32),ie=s[h],ce=d[h++];break;case N.REDUCE:for(var Le=N.productions[N.actionTableNumber[Ne].charCodeAt(ie-1)-32][1],Ke=[],Se=0;Se<Le;Se++)se.pop(),Ke.unshift(xe.pop()),T.pop();var Qe=T[T.length-1];se.push(N.productions[N.actionTableNumber[Ne].charCodeAt(ie-1)-32][0]),this.reduceActions[N.actionTableNumber[Ne].charCodeAt(ie-1)-32]==null?xe.push(Ke[0]):xe.push(this.reduceActions[N.actionTableNumber[Ne].charCodeAt(ie-1)-32](Ke)),T.push(N.gotoTable[Qe].charCodeAt(N.productions[N.actionTableNumber[Ne].charCodeAt(ie-1)-32][0]-2)-33);break;case N.ACCEPT:return new le(xe.pop());default:throw new Error("XPath parse error")}}},le.prototype=new Object,le.prototype.constructor=le,le.superclass=Object.prototype;function le(e){this.expression=e}le.prototype.toString=function(){return this.expression.toString()};function w(e,s,d){s in e||(e[s]=d)}le.prototype.evaluate=function(e){var s=e.expressionContextNode;if(!(i(s)||f(s)))throw new Error("Context node does not appear to be a valid DOM node.");return e.contextNode=e.expressionContextNode,e.contextSize=1,e.contextPosition=1,e.isHtml&&(w(e,"caseInsensitive",!0),w(e,"allowAnyNamespaceForNoPrefix",!0)),w(e,"caseInsensitive",!1),this.expression.evaluate(e)},le.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",le.XMLNS_NAMESPACE_URI="http://www.w3.org/2000/xmlns/",y.prototype=new Object,y.prototype.constructor=y,y.superclass=Object.prototype;function y(){}y.prototype.init=function(){},y.prototype.toString=function(){return"<Expression>"},y.prototype.evaluate=function(e){throw new Error("Could not evaluate expression.")},B.prototype=new y,B.prototype.constructor=B,B.superclass=y.prototype;function B(e){arguments.length>0&&this.init(e)}B.prototype.init=function(e){this.rhs=e},_.prototype=new B,_.prototype.constructor=_,_.superclass=B.prototype;function _(e){arguments.length>0&&this.init(e)}_.prototype.init=function(e){_.superclass.init.call(this,e)},_.prototype.evaluate=function(e){return this.rhs.evaluate(e).number().negate()},_.prototype.toString=function(){return"-"+this.rhs.toString()},L.prototype=new y,L.prototype.constructor=L,L.superclass=y.prototype;function L(e,s){arguments.length>0&&this.init(e,s)}L.prototype.init=function(e,s){this.lhs=e,this.rhs=s},$.prototype=new L,$.prototype.constructor=$,$.superclass=L.prototype;function $(e,s){arguments.length>0&&this.init(e,s)}$.prototype.init=function(e,s){$.superclass.init.call(this,e,s)},$.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},$.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?s:this.rhs.evaluate(e).bool()},Z.prototype=new L,Z.prototype.constructor=Z,Z.superclass=L.prototype;function Z(e,s){arguments.length>0&&this.init(e,s)}Z.prototype.init=function(e,s){Z.superclass.init.call(this,e,s)},Z.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},Z.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?this.rhs.evaluate(e).bool():s},te.prototype=new L,te.prototype.constructor=te,te.superclass=L.prototype;function te(e,s){arguments.length>0&&this.init(e,s)}te.prototype.init=function(e,s){te.superclass.init.call(this,e,s)},te.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},te.prototype.evaluate=function(e){return this.lhs.evaluate(e).equals(this.rhs.evaluate(e))},g.prototype=new L,g.prototype.constructor=g,g.superclass=L.prototype;function g(e,s){arguments.length>0&&this.init(e,s)}g.prototype.init=function(e,s){g.superclass.init.call(this,e,s)},g.prototype.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},g.prototype.evaluate=function(e){return this.lhs.evaluate(e).notequal(this.rhs.evaluate(e))},C.prototype=new L,C.prototype.constructor=C,C.superclass=L.prototype;function C(e,s){arguments.length>0&&this.init(e,s)}C.prototype.init=function(e,s){C.superclass.init.call(this,e,s)},C.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthan(this.rhs.evaluate(e))},C.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},V.prototype=new L,V.prototype.constructor=V,V.superclass=L.prototype;function V(e,s){arguments.length>0&&this.init(e,s)}V.prototype.init=function(e,s){V.superclass.init.call(this,e,s)},V.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthan(this.rhs.evaluate(e))},V.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},j.prototype=new L,j.prototype.constructor=j,j.superclass=L.prototype;function j(e,s){arguments.length>0&&this.init(e,s)}j.prototype.init=function(e,s){j.superclass.init.call(this,e,s)},j.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthanorequal(this.rhs.evaluate(e))},j.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},R.prototype=new L,R.prototype.constructor=R,R.superclass=L.prototype;function R(e,s){arguments.length>0&&this.init(e,s)}R.prototype.init=function(e,s){R.superclass.init.call(this,e,s)},R.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthanorequal(this.rhs.evaluate(e))},R.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},ee.prototype=new L,ee.prototype.constructor=ee,ee.superclass=L.prototype;function ee(e,s){arguments.length>0&&this.init(e,s)}ee.prototype.init=function(e,s){ee.superclass.init.call(this,e,s)},ee.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().plus(this.rhs.evaluate(e).number())},ee.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},D.prototype=new L,D.prototype.constructor=D,D.superclass=L.prototype;function D(e,s){arguments.length>0&&this.init(e,s)}D.prototype.init=function(e,s){D.superclass.init.call(this,e,s)},D.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().minus(this.rhs.evaluate(e).number())},D.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},O.prototype=new L,O.prototype.constructor=O,O.superclass=L.prototype;function O(e,s){arguments.length>0&&this.init(e,s)}O.prototype.init=function(e,s){O.superclass.init.call(this,e,s)},O.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().multiply(this.rhs.evaluate(e).number())},O.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},F.prototype=new L,F.prototype.constructor=F,F.superclass=L.prototype;function F(e,s){arguments.length>0&&this.init(e,s)}F.prototype.init=function(e,s){F.superclass.init.call(this,e,s)},F.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().div(this.rhs.evaluate(e).number())},F.prototype.toString=function(){return"("+this.lhs.toString()+" div "+this.rhs.toString()+")"},G.prototype=new L,G.prototype.constructor=G,G.superclass=L.prototype;function G(e,s){arguments.length>0&&this.init(e,s)}G.prototype.init=function(e,s){G.superclass.init.call(this,e,s)},G.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().mod(this.rhs.evaluate(e).number())},G.prototype.toString=function(){return"("+this.lhs.toString()+" mod "+this.rhs.toString()+")"},X.prototype=new L,X.prototype.constructor=X,X.superclass=L.prototype;function X(e,s){arguments.length>0&&this.init(e,s)}X.prototype.init=function(e,s){X.superclass.init.call(this,e,s)},X.prototype.evaluate=function(e){return this.lhs.evaluate(e).nodeset().union(this.rhs.evaluate(e).nodeset())},X.prototype.toString=function(){return S(Y,[this.lhs,this.rhs]).join(" | ")},P.prototype=new y,P.prototype.constructor=P,P.superclass=y.prototype;function P(e,s,d){arguments.length>0&&this.init(e,s,d)}P.prototype.init=function(e,s,d){P.superclass.init.call(this),this.filter=e,this.filterPredicates=s,this.locationPath=d};function Q(e){for(;e&&e.parentNode;)e=e.parentNode;return e}var pe=function(e,s,d,b){if(e.length===0)return d;var h=s.extend({});return m(function(T,se){return h.contextSize=T.length,v(function(xe,Ne){return h.contextNode=xe,h.contextPosition=Ne+1,P.predicateMatches(se,h)},T)},re(d,b),e)};P.getRoot=function(e,s){var d=s[0];if(d&&d.nodeType===J.DOCUMENT_NODE)return d;if(e.virtualRoot)return e.virtualRoot;if(!d)throw new Error("Context node not found when determining document root.");var b=d.ownerDocument;if(b)return b;for(var h=d;h.parentNode!=null;)h=h.parentNode;return h};var Ee=function(e){var s=String(e.name);return s==="xmlns"?"":s.substring(0,6)==="xmlns:"?s.substring(6,s.length):null};P.applyStep=function(e,s,d){if(!d)throw new Error("Context node not found when evaluating XPath step: "+e);var b=[];switch(s.contextNode=d,e.axis){case W.ANCESTOR:if(s.contextNode===s.virtualRoot)break;var h;for(s.contextNode.nodeType==J.ATTRIBUTE_NODE?h=P.getOwnerElement(s.contextNode):h=s.contextNode.parentNode;h!=null&&(e.nodeTest.matches(h,s)&&b.push(h),h!==s.virtualRoot);)h=h.parentNode;break;case W.ANCESTORORSELF:for(var h=s.contextNode;h!=null&&(e.nodeTest.matches(h,s)&&b.push(h),h!==s.virtualRoot);h=h.nodeType==J.ATTRIBUTE_NODE?P.getOwnerElement(h):h.parentNode);break;case W.ATTRIBUTE:var T=s.contextNode.attributes;if(T!=null)for(var se=0;se<T.length;se++){var h=T.item(se);e.nodeTest.matches(h,s)&&b.push(h)}break;case W.CHILD:for(var h=s.contextNode.firstChild;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&b.push(h);break;case W.DESCENDANT:for(var ce=[s.contextNode.firstChild];ce.length>0;)for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&b.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case W.DESCENDANTORSELF:e.nodeTest.matches(s.contextNode,s)&&b.push(s.contextNode);for(var ce=[s.contextNode.firstChild];ce.length>0;)for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&b.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case W.FOLLOWING:if(s.contextNode===s.virtualRoot)break;var ce=[];s.contextNode.firstChild!=null?ce.unshift(s.contextNode.firstChild):ce.unshift(s.contextNode.nextSibling);for(var h=s.contextNode.parentNode;h!=null&&h.nodeType!=J.DOCUMENT_NODE&&h!==s.virtualRoot;h=h.parentNode)ce.unshift(h.nextSibling);do for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&b.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;while(ce.length>0);break;case W.FOLLOWINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.nextSibling;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&b.push(h);break;case W.NAMESPACE:var xe={};if(s.contextNode.nodeType==J.ELEMENT_NODE){xe.xml=new ze("xml",null,le.XML_NAMESPACE_URI,s.contextNode);for(var h=s.contextNode;h!=null&&h.nodeType==J.ELEMENT_NODE;h=h.parentNode)for(var se=0;se<h.attributes.length;se++){var Ne=h.attributes.item(se),ie=Ee(Ne);ie!=null&&xe[ie]==null&&(xe[ie]=new ze(ie,Ne,Ne.value,s.contextNode))}for(var ie in xe){var d=xe[ie];e.nodeTest.matches(d,s)&&b.push(d)}}break;case W.PARENT:h=null,s.contextNode!==s.virtualRoot&&(s.contextNode.nodeType==J.ATTRIBUTE_NODE?h=P.getOwnerElement(s.contextNode):h=s.contextNode.parentNode),h!=null&&e.nodeTest.matches(h,s)&&b.push(h);break;case W.PRECEDING:var ce;s.virtualRoot!=null?ce=[s.virtualRoot]:ce=[Q(s.contextNode)];e:for(;ce.length>0;)for(var h=ce.pop();h!=null;){if(h==s.contextNode)break e;e.nodeTest.matches(h,s)&&b.unshift(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling}break;case W.PRECEDINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.previousSibling;h!=null;h=h.previousSibling)e.nodeTest.matches(h,s)&&b.push(h);break;case W.SELF:e.nodeTest.matches(s.contextNode,s)&&b.push(s.contextNode);break}return b};function Te(e,s,d){return pe(e.predicates,s,P.applyStep(e,s,d),U(Be,e.axis))}function ke(e,s,d){return me(S(Te.bind(null,d,e),s))}P.applySteps=function(e,s,d){return m(ke.bind(null,s),d,e)},P.prototype.applyFilter=function(e,s){if(!this.filter)return{nodes:[e.contextNode]};var d=this.filter.evaluate(e);if(!fe.instance_of(d,ue)){if(this.filterPredicates!=null&&this.filterPredicates.length>0||this.locationPath!=null)throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used");return{nonNodes:d}}return{nodes:pe(this.filterPredicates||[],s,d.toUnsortedArray(),!1)}},P.applyLocationPath=function(e,s,d){if(!e)return d;var b=e.absolute?[P.getRoot(s,d)]:d;return P.applySteps(e.steps,s,b)},P.prototype.evaluate=function(e){var s=be(new He,e),d=this.applyFilter(e,s);if("nonNodes"in d)return d.nonNodes;var b=new ue;return b.addArray(P.applyLocationPath(this.locationPath,s,d.nodes)),b},P.predicateMatches=function(e,s){var d=e.evaluate(s);return fe.instance_of(d,q)?s.contextPosition===d.numberValue():d.booleanValue()},P.predicateString=function(e){return H("[","]",e.toString())},P.predicatesString=function(e){return ae("",S(P.predicateString,e))},P.prototype.toString=function(){if(this.filter!=null){var e=Y(this.filter);return fe.instance_of(this.filter,I)?H("'","'",e):this.filterPredicates!=null&&this.filterPredicates.length?H("(",")",e)+P.predicatesString(this.filterPredicates):this.locationPath!=null?e+(this.locationPath.absolute?"":"/")+Y(this.locationPath):e}return Y(this.locationPath)},P.getOwnerElement=function(e){if(e.ownerElement)return e.ownerElement;try{if(e.selectSingleNode)return e.selectSingleNode("..")}catch{}for(var s=e.nodeType==J.DOCUMENT_NODE?e:e.ownerDocument,d=s.getElementsByTagName("*"),b=0;b<d.length;b++)for(var h=d.item(b),T=h.attributes,se=0;se<T.length;se++){var xe=T.item(se);if(xe===e)return h}return null},De.prototype=new Object,De.prototype.constructor=De,De.superclass=Object.prototype;function De(e,s){arguments.length>0&&this.init(e,s)}De.prototype.init=function(e,s){this.absolute=e,this.steps=s},De.prototype.toString=function(){return(this.absolute?"/":"")+S(Y,this.steps).join("/")},W.prototype=new Object,W.prototype.constructor=W,W.superclass=Object.prototype;function W(e,s,d){arguments.length>0&&this.init(e,s,d)}W.prototype.init=function(e,s,d){this.axis=e,this.nodeTest=s,this.predicates=d},W.prototype.toString=function(){return W.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+P.predicatesString(this.predicates)},W.ANCESTOR=0,W.ANCESTORORSELF=1,W.ATTRIBUTE=2,W.CHILD=3,W.DESCENDANT=4,W.DESCENDANTORSELF=5,W.FOLLOWING=6,W.FOLLOWINGSIBLING=7,W.NAMESPACE=8,W.PARENT=9,W.PRECEDING=10,W.PRECEDINGSIBLING=11,W.SELF=12,W.STEPNAMES=m(function(e,s){return e[s[0]]=s[1],e},{},[[W.ANCESTOR,"ancestor"],[W.ANCESTORORSELF,"ancestor-or-self"],[W.ATTRIBUTE,"attribute"],[W.CHILD,"child"],[W.DESCENDANT,"descendant"],[W.DESCENDANTORSELF,"descendant-or-self"],[W.FOLLOWING,"following"],[W.FOLLOWINGSIBLING,"following-sibling"],[W.NAMESPACE,"namespace"],[W.PARENT,"parent"],[W.PRECEDING,"preceding"],[W.PRECEDINGSIBLING,"preceding-sibling"],[W.SELF,"self"]]);var Be=[W.ANCESTOR,W.ANCESTORORSELF,W.PARENT,W.PRECEDING,W.PRECEDINGSIBLING];A.prototype=new Object,A.prototype.constructor=A,A.superclass=Object.prototype;function A(e,s){arguments.length>0&&this.init(e,s)}A.prototype.init=function(e,s){this.type=e,this.value=s},A.prototype.toString=function(){return"<unknown nodetest type>"},A.prototype.matches=function(e,s){console.warn("unknown node test type")},A.NAMETESTANY=0,A.NAMETESTPREFIXANY=1,A.NAMETESTQNAME=2,A.COMMENT=3,A.TEXT=4,A.PI=5,A.NODE=6,A.isNodeType=function(e){return function(s){return U(e,s.nodeType)}},A.makeNodeTestType=function(e,s,d){var b=d||function(){};return b.prototype=new A(e),b.prototype.constructor=b,be(b.prototype,s),b},A.makeNodeTypeTest=function(e,s,d){return new(A.makeNodeTestType(e,{matches:A.isNodeType(s),toString:K(d)}))},A.hasPrefix=function(e){return e.prefix||(e.nodeName||e.tagName).indexOf(":")!==-1},A.isElementOrAttribute=A.isNodeType([1,2]),A.nameSpaceMatches=function(e,s,d){var b=d.namespaceURI||"";if(!e)return!b||s.allowAnyNamespaceForNoPrefix&&!A.hasPrefix(d);var h=s.namespaceResolver.getNamespace(e,s.expressionContextNode);if(h==null)throw new Error("Cannot resolve QName "+e);return h===b},A.localNameMatches=function(e,s,d){var b=d.localName||d.nodeName;return s.caseInsensitive?e.toLowerCase()===b.toLowerCase():e===b},A.NameTestPrefixAny=A.makeNodeTestType(A.NAMETESTPREFIXANY,{matches:function(e,s){return A.isElementOrAttribute(e)&&A.nameSpaceMatches(this.prefix,s,e)},toString:function(){return this.prefix+":*"}},function(s){this.prefix=s}),A.NameTestQName=A.makeNodeTestType(A.NAMETESTQNAME,{matches:function(e,s){return A.isNodeType([J.ELEMENT_NODE,J.ATTRIBUTE_NODE,J.NAMESPACE_NODE])(e)&&A.nameSpaceMatches(this.prefix,s,e)&&A.localNameMatches(this.localName,s,e)},toString:function(){return this.name}},function(s){var d=s.split(":");this.name=s,this.prefix=d.length>1?d[0]:null,this.localName=d[d.length>1?1:0]}),A.PITest=A.makeNodeTestType(A.PI,{matches:function(e,s){return A.isNodeType([J.PROCESSING_INSTRUCTION_NODE])(e)&&(e.target||e.nodeName)===this.name},toString:function(){return H('processing-instruction("','")',this.name)}},function(e){this.name=e}),A.nameTestAny=A.makeNodeTypeTest(A.NAMETESTANY,[J.ELEMENT_NODE,J.ATTRIBUTE_NODE,J.NAMESPACE_NODE],"*"),A.textTest=A.makeNodeTypeTest(A.TEXT,[J.TEXT_NODE,J.CDATA_SECTION_NODE],"text()"),A.commentTest=A.makeNodeTypeTest(A.COMMENT,[J.COMMENT_NODE],"comment()"),A.nodeTest=A.makeNodeTypeTest(A.NODE,[J.ELEMENT_NODE,J.ATTRIBUTE_NODE,J.TEXT_NODE,J.CDATA_SECTION_NODE,J.PROCESSING_INSTRUCTION_NODE,J.COMMENT_NODE,J.DOCUMENT_NODE],"node()"),A.anyPiTest=A.makeNodeTypeTest(A.PI,[J.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),oe.prototype=new y,oe.prototype.constructor=oe,oe.superclass=y.prototype;function oe(e){arguments.length>0&&this.init(e)}oe.prototype.init=function(e){this.variable=e},oe.prototype.toString=function(){return"$"+this.variable},oe.prototype.evaluate=function(e){var s=fe.resolveQName(this.variable,e.namespaceResolver,e.contextNode,!1);if(s[0]==null)throw new Error("Cannot resolve QName "+fn);var d=e.variableResolver.getVariable(s[1],s[0]);if(!d)throw Me.fromMessage("Undeclared variable: "+this.toString());return d},Ce.prototype=new y,Ce.prototype.constructor=Ce,Ce.superclass=y.prototype;function Ce(e,s){arguments.length>0&&this.init(e,s)}Ce.prototype.init=function(e,s){this.functionName=e,this.arguments=s},Ce.prototype.toString=function(){for(var e=this.functionName+"(",s=0;s<this.arguments.length;s++)s>0&&(e+=", "),e+=this.arguments[s].toString();return e+")"},Ce.prototype.evaluate=function(e){var s=Pe.getFunctionFromContext(this.functionName,e);if(!s)throw new Error("Unknown function "+this.functionName);var d=[e].concat(this.arguments);return s.apply(e.functionResolver.thisArg,d)};var ye=new Object;ye.equals=function(e,s){return e.equals(s)},ye.notequal=function(e,s){return e.notequal(s)},ye.lessthan=function(e,s){return e.lessthan(s)},ye.greaterthan=function(e,s){return e.greaterthan(s)},ye.lessthanorequal=function(e,s){return e.lessthanorequal(s)},ye.greaterthanorequal=function(e,s){return e.greaterthanorequal(s)},I.prototype=new y,I.prototype.constructor=I,I.superclass=y.prototype;function I(e){arguments.length>0&&this.init(e)}I.prototype.init=function(e){this.str=String(e)},I.prototype.toString=function(){return this.str},I.prototype.evaluate=function(e){return this},I.prototype.string=function(){return this},I.prototype.number=function(){return new q(this.str)},I.prototype.bool=function(){return new he(this.str)},I.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},I.prototype.stringValue=function(){return this.str},I.prototype.numberValue=function(){return this.number().numberValue()},I.prototype.booleanValue=function(){return this.bool().booleanValue()},I.prototype.equals=function(e){return fe.instance_of(e,he)?this.bool().equals(e):fe.instance_of(e,q)?this.number().equals(e):fe.instance_of(e,ue)?e.compareWithString(this,ye.equals):new he(this.str==e.str)},I.prototype.notequal=function(e){return fe.instance_of(e,he)?this.bool().notequal(e):fe.instance_of(e,q)?this.number().notequal(e):fe.instance_of(e,ue)?e.compareWithString(this,ye.notequal):new he(this.str!=e.str)},I.prototype.lessthan=function(e){return this.number().lessthan(e)},I.prototype.greaterthan=function(e){return this.number().greaterthan(e)},I.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},I.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},q.prototype=new y,q.prototype.constructor=q,q.superclass=y.prototype;function q(e){arguments.length>0&&this.init(e)}q.prototype.init=function(e){this.num=typeof e=="string"?this.parse(e):Number(e)},q.prototype.numberFormat=/^\s*-?[0-9]*\.?[0-9]+\s*$/,q.prototype.parse=function(e){return this.numberFormat.test(e)?parseFloat(e):Number.NaN};function Re(e){for(var s=e.split("e-"),d=s[0].replace(".",""),b=Number(s[1]),h=0;h<b-1;h+=1)d="0"+d;return"0."+d}function Ue(e){for(var s=e.split("e"),d=s[0].replace(".",""),b=Number(s[1]),h=b+1-d.length,T=0;T<h;T+=1)d+="0";return d}q.prototype.toString=function(){var e=this.num.toString();return e.indexOf("e-")!==-1?Re(e):e.indexOf("e")!==-1?Ue(e):e},q.prototype.evaluate=function(e){return this},q.prototype.string=function(){return new I(this.toString())},q.prototype.number=function(){return this},q.prototype.bool=function(){return new he(this.num)},q.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},q.prototype.stringValue=function(){return this.string().stringValue()},q.prototype.numberValue=function(){return this.num},q.prototype.booleanValue=function(){return this.bool().booleanValue()},q.prototype.negate=function(){return new q(-this.num)},q.prototype.equals=function(e){return fe.instance_of(e,he)?this.bool().equals(e):fe.instance_of(e,I)?this.equals(e.number()):fe.instance_of(e,ue)?e.compareWithNumber(this,ye.equals):new he(this.num==e.num)},q.prototype.notequal=function(e){return fe.instance_of(e,he)?this.bool().notequal(e):fe.instance_of(e,I)?this.notequal(e.number()):fe.instance_of(e,ue)?e.compareWithNumber(this,ye.notequal):new he(this.num!=e.num)},q.prototype.lessthan=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,ye.greaterthan):fe.instance_of(e,he)||fe.instance_of(e,I)?this.lessthan(e.number()):new he(this.num<e.num)},q.prototype.greaterthan=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,ye.lessthan):fe.instance_of(e,he)||fe.instance_of(e,I)?this.greaterthan(e.number()):new he(this.num>e.num)},q.prototype.lessthanorequal=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,ye.greaterthanorequal):fe.instance_of(e,he)||fe.instance_of(e,I)?this.lessthanorequal(e.number()):new he(this.num<=e.num)},q.prototype.greaterthanorequal=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,ye.lessthanorequal):fe.instance_of(e,he)||fe.instance_of(e,I)?this.greaterthanorequal(e.number()):new he(this.num>=e.num)},q.prototype.plus=function(e){return new q(this.num+e.num)},q.prototype.minus=function(e){return new q(this.num-e.num)},q.prototype.multiply=function(e){return new q(this.num*e.num)},q.prototype.div=function(e){return new q(this.num/e.num)},q.prototype.mod=function(e){return new q(this.num%e.num)},he.prototype=new y,he.prototype.constructor=he,he.superclass=y.prototype;function he(e){arguments.length>0&&this.init(e)}he.prototype.init=function(e){this.b=!!e},he.prototype.toString=function(){return this.b.toString()},he.prototype.evaluate=function(e){return this},he.prototype.string=function(){return new I(this.b)},he.prototype.number=function(){return new q(this.b)},he.prototype.bool=function(){return this},he.prototype.nodeset=function(){throw new Error("Cannot convert boolean to nodeset")},he.prototype.stringValue=function(){return this.string().stringValue()},he.prototype.numberValue=function(){return this.number().numberValue()},he.prototype.booleanValue=function(){return this.b},he.prototype.not=function(){return new he(!this.b)},he.prototype.equals=function(e){return fe.instance_of(e,I)||fe.instance_of(e,q)?this.equals(e.bool()):fe.instance_of(e,ue)?e.compareWithBoolean(this,ye.equals):new he(this.b==e.b)},he.prototype.notequal=function(e){return fe.instance_of(e,I)||fe.instance_of(e,q)?this.notequal(e.bool()):fe.instance_of(e,ue)?e.compareWithBoolean(this,ye.notequal):new he(this.b!=e.b)},he.prototype.lessthan=function(e){return this.number().lessthan(e)},he.prototype.greaterthan=function(e){return this.number().greaterthan(e)},he.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},he.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},he.true_=new he(!0),he.false_=new he(!1),Ie.prototype=new Object,Ie.prototype.constructor=Ie,Ie.superclass=Object.prototype;function Ie(e){this.init(e)}Ie.prototype.init=function(e){this.left=null,this.right=null,this.node=e,this.depth=1},Ie.prototype.balance=function(){var e=this.left==null?0:this.left.depth,s=this.right==null?0:this.right.depth;if(e>s+1){var d=this.left.left==null?0:this.left.left.depth,b=this.left.right==null?0:this.left.right.depth;d<b&&this.left.rotateRR(),this.rotateLL()}else if(e+1<s){var h=this.right.right==null?0:this.right.right.depth,T=this.right.left==null?0:this.right.left.depth;T>h&&this.right.rotateLL(),this.rotateRR()}},Ie.prototype.rotateLL=function(){var e=this.node,s=this.right;this.node=this.left.node,this.right=this.left,this.left=this.left.left,this.right.left=this.right.right,this.right.right=s,this.right.node=e,this.right.updateInNewLocation(),this.updateInNewLocation()},Ie.prototype.rotateRR=function(){var e=this.node,s=this.left;this.node=this.right.node,this.left=this.right,this.right=this.right.right,this.left.right=this.left.left,this.left.left=s,this.left.node=e,this.left.updateInNewLocation(),this.updateInNewLocation()},Ie.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},Ie.prototype.getDepthFromChildren=function(){this.depth=this.node==null?0:1,this.left!=null&&(this.depth=this.left.depth+1),this.right!=null&&this.depth<=this.right.depth&&(this.depth=this.right.depth+1)};function gt(e,s){if(e===s)return 0;if(e.compareDocumentPosition){var d=e.compareDocumentPosition(s);return d&1||d&10?1:d&20?-1:0}for(var b=0,h=0,T=e;T!=null;T=T.parentNode||T.ownerElement)b++;for(var se=s;se!=null;se=se.parentNode||se.ownerElement)h++;if(b>h){for(;b>h;)e=e.parentNode||e.ownerElement,b--;if(e===s)return 1}else if(h>b){for(;h>b;)s=s.parentNode||s.ownerElement,h--;if(e===s)return-1}for(var xe=e.parentNode||e.ownerElement,Ne=s.parentNode||s.ownerElement;xe!==Ne;)e=xe,s=Ne,xe=e.parentNode||e.ownerElement,Ne=s.parentNode||s.ownerElement;var ie=Et(e),ce=Et(s);if(ie&&!ce)return-1;if(!ie&&ce)return 1;if(e.isXPathNamespace){if(e.nodeValue===le.XML_NAMESPACE_URI||!s.isXPathNamespace)return-1;if(s.nodeValue===le.XML_NAMESPACE_URI)return 1}else if(s.isXPathNamespace)return 1;if(xe)for(var Le=ie?xe.attributes:xe.childNodes,Ke=Le.length,Se=e.baseNode||e,Qe=s.baseNode||s,Xe=0;Xe<Ke;Xe+=1){var ot=Le[Xe];if(ot===Se)return-1;if(ot===Qe)return 1}throw new Error("Unexpected: could not determine node order")}Ie.prototype.add=function(e){if(e===this.node)return!1;var s=gt(e,this.node),d=!1;return s==-1?this.left==null?(this.left=new Ie(e),d=!0):(d=this.left.add(e),d&&this.balance()):s==1&&(this.right==null?(this.right=new Ie(e),d=!0):(d=this.right.add(e),d&&this.balance())),d&&this.getDepthFromChildren(),d},ue.prototype=new y,ue.prototype.constructor=ue,ue.superclass=y.prototype;function ue(){this.init()}ue.prototype.init=function(){this.tree=null,this.nodes=[],this.size=0},ue.prototype.toString=function(){var e=this.first();return e==null?"":this.stringForNode(e)},ue.prototype.evaluate=function(e){return this},ue.prototype.string=function(){return new I(this.toString())},ue.prototype.stringValue=function(){return this.toString()},ue.prototype.number=function(){return new q(this.string())},ue.prototype.numberValue=function(){return Number(this.string())},ue.prototype.bool=function(){return new he(this.booleanValue())},ue.prototype.booleanValue=function(){return!!this.size},ue.prototype.nodeset=function(){return this},ue.prototype.stringForNode=function(e){return e.nodeType==J.DOCUMENT_NODE||e.nodeType==J.ELEMENT_NODE||e.nodeType===J.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(e):e.nodeType===J.ATTRIBUTE_NODE?e.value||e.nodeValue:e.isNamespaceNode?e.namespace:e.nodeValue},ue.prototype.stringForContainerNode=function(e){for(var s="",d=e.firstChild;d!=null;d=d.nextSibling){var b=d.nodeType;(b===1||b===3||b===4||b===9||b===11)&&(s+=this.stringForNode(d))}return s},ue.prototype.buildTree=function(){if(!this.tree&&this.nodes.length){this.tree=new Ie(this.nodes[0]);for(var e=1;e<this.nodes.length;e+=1)this.tree.add(this.nodes[e])}return this.tree},ue.prototype.first=function(){var e=this.buildTree();if(e==null)return null;for(;e.left!=null;)e=e.left;return e.node},ue.prototype.add=function(e){for(var s=0;s<this.nodes.length;s+=1)if(e===this.nodes[s])return;this.tree=null,this.nodes.push(e),this.size+=1},ue.prototype.addArray=function(e){var s=this;p(function(d){s.add(d)},e)},ue.prototype.toArray=function(){var e=[];return this.toArrayRec(this.buildTree(),e),e},ue.prototype.toArrayRec=function(e,s){e!=null&&(this.toArrayRec(e.left,s),s.push(e.node),this.toArrayRec(e.right,s))},ue.prototype.toUnsortedArray=function(){return this.nodes.slice()},ue.prototype.compareWithString=function(e,s){for(var d=this.toUnsortedArray(),b=0;b<d.length;b++){var h=d[b],T=new I(this.stringForNode(h)),se=s(T,e);if(se.booleanValue())return se}return new he(!1)},ue.prototype.compareWithNumber=function(e,s){for(var d=this.toUnsortedArray(),b=0;b<d.length;b++){var h=d[b],T=new q(this.stringForNode(h)),se=s(T,e);if(se.booleanValue())return se}return new he(!1)},ue.prototype.compareWithBoolean=function(e,s){return s(this.bool(),e)},ue.prototype.compareWithNodeSet=function(e,s){for(var d=this.toUnsortedArray(),b=function(xe,Ne){return s(Ne,xe)},h=0;h<d.length;h++){var T=new I(this.stringForNode(d[h])),se=e.compareWithString(T,b);if(se.booleanValue())return se}return new he(!1)},ue.compareWith=x(function(e,s){return fe.instance_of(s,I)?this.compareWithString(s,e):fe.instance_of(s,q)?this.compareWithNumber(s,e):fe.instance_of(s,he)?this.compareWithBoolean(s,e):this.compareWithNodeSet(s,e)}),ue.prototype.equals=ue.compareWith(ye.equals),ue.prototype.notequal=ue.compareWith(ye.notequal),ue.prototype.lessthan=ue.compareWith(ye.lessthan),ue.prototype.greaterthan=ue.compareWith(ye.greaterthan),ue.prototype.lessthanorequal=ue.compareWith(ye.lessthanorequal),ue.prototype.greaterthanorequal=ue.compareWith(ye.greaterthanorequal),ue.prototype.union=function(e){var s=new ue;return s.addArray(this.toUnsortedArray()),s.addArray(e.toUnsortedArray()),s},ze.prototype=new Object,ze.prototype.constructor=ze,ze.superclass=Object.prototype;function ze(e,s,d,b){this.isXPathNamespace=!0,this.baseNode=s,this.ownerDocument=b.ownerDocument,this.nodeName=e,this.prefix=e,this.localName=e,this.namespaceURI=null,this.nodeValue=d,this.ownerElement=b,this.nodeType=J.NAMESPACE_NODE}ze.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},He.prototype=new Object,He.prototype.constructor=He,He.superclass=Object.prototype;function He(e,s,d){this.variableResolver=e??new Ge,this.namespaceResolver=s??new je,this.functionResolver=d??new Pe}He.prototype.extend=function(e){return be(new He,this,e)},Ge.prototype=new Object,Ge.prototype.constructor=Ge,Ge.superclass=Object.prototype;function Ge(){}Ge.prototype.getVariable=function(e,s){return null},Pe.prototype=new Object,Pe.prototype.constructor=Pe,Pe.superclass=Object.prototype;function Pe(e){this.thisArg=e??ge,this.functions=new Object,this.addStandardFunctions()}Pe.prototype.addStandardFunctions=function(){this.functions["{}last"]=ge.last,this.functions["{}position"]=ge.position,this.functions["{}count"]=ge.count,this.functions["{}id"]=ge.id,this.functions["{}local-name"]=ge.localName,this.functions["{}namespace-uri"]=ge.namespaceURI,this.functions["{}name"]=ge.name,this.functions["{}string"]=ge.string,this.functions["{}concat"]=ge.concat,this.functions["{}starts-with"]=ge.startsWith,this.functions["{}contains"]=ge.contains,this.functions["{}substring-before"]=ge.substringBefore,this.functions["{}substring-after"]=ge.substringAfter,this.functions["{}substring"]=ge.substring,this.functions["{}string-length"]=ge.stringLength,this.functions["{}normalize-space"]=ge.normalizeSpace,this.functions["{}translate"]=ge.translate,this.functions["{}boolean"]=ge.boolean_,this.functions["{}not"]=ge.not,this.functions["{}true"]=ge.true_,this.functions["{}false"]=ge.false_,this.functions["{}lang"]=ge.lang,this.functions["{}number"]=ge.number,this.functions["{}sum"]=ge.sum,this.functions["{}floor"]=ge.floor,this.functions["{}ceiling"]=ge.ceiling,this.functions["{}round"]=ge.round},Pe.prototype.addFunction=function(e,s,d){this.functions["{"+e+"}"+s]=d},Pe.getFunctionFromContext=function(e,s){var d=fe.resolveQName(e,s.namespaceResolver,s.contextNode,!1);if(d[0]===null)throw new Error("Cannot resolve QName "+name);return s.functionResolver.getFunction(d[1],d[0])},Pe.prototype.getFunction=function(e,s){return this.functions["{"+s+"}"+e]},je.prototype=new Object,je.prototype.constructor=je,je.superclass=Object.prototype;function je(){}je.prototype.getNamespace=function(e,s){if(e=="xml")return le.XML_NAMESPACE_URI;if(e=="xmlns")return le.XMLNS_NAMESPACE_URI;for(s.nodeType==J.DOCUMENT_NODE?s=s.documentElement:s.nodeType==J.ATTRIBUTE_NODE?s=P.getOwnerElement(s):s.nodeType!=J.ELEMENT_NODE&&(s=s.parentNode);s!=null&&s.nodeType==J.ELEMENT_NODE;){for(var d=s.attributes,b=0;b<d.length;b++){var h=d.item(b),T=h.name||h.nodeName;if(T==="xmlns"&&e===""||T==="xmlns:"+e)return String(h.value||h.nodeValue)}s=s.parentNode}return null};var ge=new Object;ge.last=function(e){if(arguments.length!=1)throw new Error("Function last expects ()");return new q(e.contextSize)},ge.position=function(e){if(arguments.length!=1)throw new Error("Function position expects ()");return new q(e.contextPosition)},ge.count=function(){var e=arguments[0],s;if(arguments.length!=2||!fe.instance_of(s=arguments[1].evaluate(e),ue))throw new Error("Function count expects (node-set)");return new q(s.size)},ge.id=function(){var e=arguments[0],s;if(arguments.length!=2)throw new Error("Function id expects (object)");s=arguments[1].evaluate(e),fe.instance_of(s,ue)?s=s.toArray().join(" "):s=s.stringValue();for(var d=s.split(/[\x0d\x0a\x09\x20]+/),b=new ue,h=e.contextNode.nodeType==J.DOCUMENT_NODE?e.contextNode:e.contextNode.ownerDocument,T=0;T<d.length;T++){var se;h.getElementById?se=h.getElementById(d[T]):se=fe.getElementById(h,d[T]),se!=null&&b.add(se)}return b},ge.localName=function(e,s){var d;if(arguments.length==1)d=e.contextNode;else if(arguments.length==2)d=s.evaluate(e).first();else throw new Error("Function local-name expects (node-set?)");return d==null?new I(""):new I(d.localName||d.baseName||d.target||d.nodeName||"")},ge.namespaceURI=function(){var e=arguments[0],s;if(arguments.length==1)s=e.contextNode;else if(arguments.length==2)s=arguments[1].evaluate(e).first();else throw new Error("Function namespace-uri expects (node-set?)");return s==null?new I(""):new I(s.namespaceURI||"")},ge.name=function(){var e=arguments[0],s;if(arguments.length==1)s=e.contextNode;else if(arguments.length==2)s=arguments[1].evaluate(e).first();else throw new Error("Function name expects (node-set?)");return s==null?new I(""):s.nodeType==J.ELEMENT_NODE?new I(s.nodeName):s.nodeType==J.ATTRIBUTE_NODE?new I(s.name||s.nodeName):s.nodeType===J.PROCESSING_INSTRUCTION_NODE?new I(s.target||s.nodeName):s.localName==null?new I(""):new I(s.localName)},ge.string=function(){var e=arguments[0];if(arguments.length==1)return new I(ue.prototype.stringForNode(e.contextNode));if(arguments.length==2)return arguments[1].evaluate(e).string();throw new Error("Function string expects (object?)")},ge.concat=function(e){if(arguments.length<3)throw new Error("Function concat expects (string, string[, string]*)");for(var s="",d=1;d<arguments.length;d++)s+=arguments[d].evaluate(e).stringValue();return new I(s)},ge.startsWith=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function startsWith expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new he(s.substring(0,d.length)==d)},ge.contains=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function contains expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new he(s.indexOf(d)!==-1)},ge.substringBefore=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-before expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new I(s.substring(0,s.indexOf(d)))},ge.substringAfter=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-after expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();if(d.length==0)return new I(s);var b=s.indexOf(d);return b==-1?new I(""):new I(s.substring(b+d.length))},ge.substring=function(){var e=arguments[0];if(!(arguments.length==3||arguments.length==4))throw new Error("Function substring expects (string, number, number?)");var s=arguments[1].evaluate(e).stringValue(),d=Math.round(arguments[2].evaluate(e).numberValue())-1,b=arguments.length==4?d+Math.round(arguments[3].evaluate(e).numberValue()):void 0;return new I(s.substring(d,b))},ge.stringLength=function(){var e=arguments[0],s;if(arguments.length==1)s=ue.prototype.stringForNode(e.contextNode);else if(arguments.length==2)s=arguments[1].evaluate(e).stringValue();else throw new Error("Function string-length expects (string?)");return new q(s.length)},ge.normalizeSpace=function(){var e=arguments[0],s;if(arguments.length==1)s=ue.prototype.stringForNode(e.contextNode);else if(arguments.length==2)s=arguments[1].evaluate(e).stringValue();else throw new Error("Function normalize-space expects (string?)");for(var d=0,b=s.length-1;fe.isSpace(s.charCodeAt(b));)b--;for(var h="";d<=b&&fe.isSpace(s.charCodeAt(d));)d++;for(;d<=b;)if(fe.isSpace(s.charCodeAt(d)))for(h+=" ";d<=b&&fe.isSpace(s.charCodeAt(d));)d++;else h+=s.charAt(d),d++;return new I(h)},ge.translate=function(e,s,d,b){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var h=s.evaluate(e).stringValue(),T=d.evaluate(e).stringValue(),se=b.evaluate(e).stringValue(),xe=m(function(ie,ce,Le){return ce in ie||(ie[ce]=Le>se.length?"":se[Le]),ie},{},T),Ne=ae("",S(function(ie){return ie in xe?xe[ie]:ie},h));return new I(Ne)},ge.boolean_=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function boolean expects (object)");return arguments[1].evaluate(e).bool()},ge.not=function(e,s){if(arguments.length!=2)throw new Error("Function not expects (object)");return s.evaluate(e).bool().not()},ge.true_=function(){if(arguments.length!=1)throw new Error("Function true expects ()");return he.true_},ge.false_=function(){if(arguments.length!=1)throw new Error("Function false expects ()");return he.false_},ge.lang=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function lang expects (string)");for(var s,d=e.contextNode;d!=null&&d.nodeType!=J.DOCUMENT_NODE;d=d.parentNode){var b=d.getAttributeNS(le.XML_NAMESPACE_URI,"lang");if(b!=null){s=String(b);break}}if(s==null)return he.false_;var h=arguments[1].evaluate(e).stringValue();return new he(s.substring(0,h.length)==h&&(s.length==h.length||s.charAt(h.length)=="-"))},ge.number=function(){var e=arguments[0];if(!(arguments.length==1||arguments.length==2))throw new Error("Function number expects (object?)");return arguments.length==1?new q(ue.prototype.stringForNode(e.contextNode)):arguments[1].evaluate(e).number()},ge.sum=function(){var e=arguments[0],s;if(arguments.length!=2||!fe.instance_of(s=arguments[1].evaluate(e),ue))throw new Error("Function sum expects (node-set)");s=s.toUnsortedArray();for(var d=0,b=0;b<s.length;b++)d+=new q(ue.prototype.stringForNode(s[b])).numberValue();return new q(d)},ge.floor=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new q(Math.floor(arguments[1].evaluate(e).numberValue()))},ge.ceiling=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function ceiling expects (number)");return new q(Math.ceil(arguments[1].evaluate(e).numberValue()))},ge.round=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function round expects (number)");return new q(Math.round(arguments[1].evaluate(e).numberValue()))};var fe=new Object,Et=function(e){return e&&(e.nodeType===J.ATTRIBUTE_NODE||e.ownerElement||e.isXPathNamespace)};fe.splitQName=function(e){var s=e.indexOf(":");return s==-1?[null,e]:[e.substring(0,s),e.substring(s+1)]},fe.resolveQName=function(e,s,d,b){var h=fe.splitQName(e);return h[0]!=null?h[0]=s.getNamespace(h[0],d):b?(h[0]=s.getNamespace("",d),h[0]==null&&(h[0]="")):h[0]="",h},fe.isSpace=function(e){return e==9||e==13||e==10||e==32},fe.isLetter=function(e){return e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=255||e>=256&&e<=305||e>=308&&e<=318||e>=321&&e<=328||e>=330&&e<=382||e>=384&&e<=451||e>=461&&e<=496||e>=500&&e<=501||e>=506&&e<=535||e>=592&&e<=680||e>=699&&e<=705||e==902||e>=904&&e<=906||e==908||e>=910&&e<=929||e>=931&&e<=974||e>=976&&e<=982||e==986||e==988||e==990||e==992||e>=994&&e<=1011||e>=1025&&e<=1036||e>=1038&&e<=1103||e>=1105&&e<=1116||e>=1118&&e<=1153||e>=1168&&e<=1220||e>=1223&&e<=1224||e>=1227&&e<=1228||e>=1232&&e<=1259||e>=1262&&e<=1269||e>=1272&&e<=1273||e>=1329&&e<=1366||e==1369||e>=1377&&e<=1414||e>=1488&&e<=1514||e>=1520&&e<=1522||e>=1569&&e<=1594||e>=1601&&e<=1610||e>=1649&&e<=1719||e>=1722&&e<=1726||e>=1728&&e<=1742||e>=1744&&e<=1747||e==1749||e>=1765&&e<=1766||e>=2309&&e<=2361||e==2365||e>=2392&&e<=2401||e>=2437&&e<=2444||e>=2447&&e<=2448||e>=2451&&e<=2472||e>=2474&&e<=2480||e==2482||e>=2486&&e<=2489||e>=2524&&e<=2525||e>=2527&&e<=2529||e>=2544&&e<=2545||e>=2565&&e<=2570||e>=2575&&e<=2576||e>=2579&&e<=2600||e>=2602&&e<=2608||e>=2610&&e<=2611||e>=2613&&e<=2614||e>=2616&&e<=2617||e>=2649&&e<=2652||e==2654||e>=2674&&e<=2676||e>=2693&&e<=2699||e==2701||e>=2703&&e<=2705||e>=2707&&e<=2728||e>=2730&&e<=2736||e>=2738&&e<=2739||e>=2741&&e<=2745||e==2749||e==2784||e>=2821&&e<=2828||e>=2831&&e<=2832||e>=2835&&e<=2856||e>=2858&&e<=2864||e>=2866&&e<=2867||e>=2870&&e<=2873||e==2877||e>=2908&&e<=2909||e>=2911&&e<=2913||e>=2949&&e<=2954||e>=2958&&e<=2960||e>=2962&&e<=2965||e>=2969&&e<=2970||e==2972||e>=2974&&e<=2975||e>=2979&&e<=2980||e>=2984&&e<=2986||e>=2990&&e<=2997||e>=2999&&e<=3001||e>=3077&&e<=3084||e>=3086&&e<=3088||e>=3090&&e<=3112||e>=3114&&e<=3123||e>=3125&&e<=3129||e>=3168&&e<=3169||e>=3205&&e<=3212||e>=3214&&e<=3216||e>=3218&&e<=3240||e>=3242&&e<=3251||e>=3253&&e<=3257||e==3294||e>=3296&&e<=3297||e>=3333&&e<=3340||e>=3342&&e<=3344||e>=3346&&e<=3368||e>=3370&&e<=3385||e>=3424&&e<=3425||e>=3585&&e<=3630||e==3632||e>=3634&&e<=3635||e>=3648&&e<=3653||e>=3713&&e<=3714||e==3716||e>=3719&&e<=3720||e==3722||e==3725||e>=3732&&e<=3735||e>=3737&&e<=3743||e>=3745&&e<=3747||e==3749||e==3751||e>=3754&&e<=3755||e>=3757&&e<=3758||e==3760||e>=3762&&e<=3763||e==3773||e>=3776&&e<=3780||e>=3904&&e<=3911||e>=3913&&e<=3945||e>=4256&&e<=4293||e>=4304&&e<=4342||e==4352||e>=4354&&e<=4355||e>=4357&&e<=4359||e==4361||e>=4363&&e<=4364||e>=4366&&e<=4370||e==4412||e==4414||e==4416||e==4428||e==4430||e==4432||e>=4436&&e<=4437||e==4441||e>=4447&&e<=4449||e==4451||e==4453||e==4455||e==4457||e>=4461&&e<=4462||e>=4466&&e<=4467||e==4469||e==4510||e==4520||e==4523||e>=4526&&e<=4527||e>=4535&&e<=4536||e==4538||e>=4540&&e<=4546||e==4587||e==4592||e==4601||e>=7680&&e<=7835||e>=7840&&e<=7929||e>=7936&&e<=7957||e>=7960&&e<=7965||e>=7968&&e<=8005||e>=8008&&e<=8013||e>=8016&&e<=8023||e==8025||e==8027||e==8029||e>=8031&&e<=8061||e>=8064&&e<=8116||e>=8118&&e<=8124||e==8126||e>=8130&&e<=8132||e>=8134&&e<=8140||e>=8144&&e<=8147||e>=8150&&e<=8155||e>=8160&&e<=8172||e>=8178&&e<=8180||e>=8182&&e<=8188||e==8486||e>=8490&&e<=8491||e==8494||e>=8576&&e<=8578||e>=12353&&e<=12436||e>=12449&&e<=12538||e>=12549&&e<=12588||e>=44032&&e<=55203||e>=19968&&e<=40869||e==12295||e>=12321&&e<=12329},fe.isNCNameChar=function(e){return e>=48&&e<=57||e>=1632&&e<=1641||e>=1776&&e<=1785||e>=2406&&e<=2415||e>=2534&&e<=2543||e>=2662&&e<=2671||e>=2790&&e<=2799||e>=2918&&e<=2927||e>=3047&&e<=3055||e>=3174&&e<=3183||e>=3302&&e<=3311||e>=3430&&e<=3439||e>=3664&&e<=3673||e>=3792&&e<=3801||e>=3872&&e<=3881||e==46||e==45||e==95||fe.isLetter(e)||e>=768&&e<=837||e>=864&&e<=865||e>=1155&&e<=1158||e>=1425&&e<=1441||e>=1443&&e<=1465||e>=1467&&e<=1469||e==1471||e>=1473&&e<=1474||e==1476||e>=1611&&e<=1618||e==1648||e>=1750&&e<=1756||e>=1757&&e<=1759||e>=1760&&e<=1764||e>=1767&&e<=1768||e>=1770&&e<=1773||e>=2305&&e<=2307||e==2364||e>=2366&&e<=2380||e==2381||e>=2385&&e<=2388||e>=2402&&e<=2403||e>=2433&&e<=2435||e==2492||e==2494||e==2495||e>=2496&&e<=2500||e>=2503&&e<=2504||e>=2507&&e<=2509||e==2519||e>=2530&&e<=2531||e==2562||e==2620||e==2622||e==2623||e>=2624&&e<=2626||e>=2631&&e<=2632||e>=2635&&e<=2637||e>=2672&&e<=2673||e>=2689&&e<=2691||e==2748||e>=2750&&e<=2757||e>=2759&&e<=2761||e>=2763&&e<=2765||e>=2817&&e<=2819||e==2876||e>=2878&&e<=2883||e>=2887&&e<=2888||e>=2891&&e<=2893||e>=2902&&e<=2903||e>=2946&&e<=2947||e>=3006&&e<=3010||e>=3014&&e<=3016||e>=3018&&e<=3021||e==3031||e>=3073&&e<=3075||e>=3134&&e<=3140||e>=3142&&e<=3144||e>=3146&&e<=3149||e>=3157&&e<=3158||e>=3202&&e<=3203||e>=3262&&e<=3268||e>=3270&&e<=3272||e>=3274&&e<=3277||e>=3285&&e<=3286||e>=3330&&e<=3331||e>=3390&&e<=3395||e>=3398&&e<=3400||e>=3402&&e<=3405||e==3415||e==3633||e>=3636&&e<=3642||e>=3655&&e<=3662||e==3761||e>=3764&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=3864&&e<=3865||e==3893||e==3895||e==3897||e==3902||e==3903||e>=3953&&e<=3972||e>=3974&&e<=3979||e>=3984&&e<=3989||e==3991||e>=3993&&e<=4013||e>=4017&&e<=4023||e==4025||e>=8400&&e<=8412||e==8417||e>=12330&&e<=12335||e==12441||e==12442||e==183||e==720||e==721||e==903||e==1600||e==3654||e==3782||e==12293||e>=12337&&e<=12341||e>=12445&&e<=12446||e>=12540&&e<=12542},fe.coalesceText=function(e){for(var s=e.firstChild;s!=null;s=s.nextSibling)if(s.nodeType==J.TEXT_NODE||s.nodeType==J.CDATA_SECTION_NODE){var d=s.nodeValue,b=s;for(s=s.nextSibling;s!=null&&(s.nodeType==J.TEXT_NODE||s.nodeType==J.CDATA_SECTION_NODE);){d+=s.nodeValue;var h=s;s=s.nextSibling,h.parentNode.removeChild(h)}if(b.nodeType==J.CDATA_SECTION_NODE){var T=b.parentNode;if(b.nextSibling==null)T.removeChild(b),T.appendChild(T.ownerDocument.createTextNode(d));else{var se=b.nextSibling;T.removeChild(b),T.insertBefore(T.ownerDocument.createTextNode(d),se)}}else b.nodeValue=d;if(s==null)break}else s.nodeType==J.ELEMENT_NODE&&fe.coalesceText(s)},fe.instance_of=function(e,s){for(;e!=null;){if(e.constructor===s)return!0;if(e===Object)return!1;e=e.constructor.superclass}return!1},fe.getElementById=function(e,s){if(e.nodeType==J.ELEMENT_NODE&&(e.getAttribute("id")==s||e.getAttributeNS(null,"id")==s))return e;for(var d=e.firstChild;d!=null;d=d.nextSibling){var b=fe.getElementById(d,s);if(b!=null)return b}return null};var Me=function(){function e(d,b){var h=b?": "+b.toString():"";switch(d){case s.INVALID_EXPRESSION_ERR:return"Invalid expression"+h;case s.TYPE_ERR:return"Type error"+h}return null}function s(d,b,h){var T=Error.call(this,e(d,b)||h);return T.code=d,T.exception=b,T}return s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.superclass=Error,s.prototype.toString=function(){return this.message},s.fromMessage=function(d,b){return new s(null,b,d)},s.INVALID_EXPRESSION_ERR=51,s.TYPE_ERR=52,s}();Fe.prototype={},Fe.prototype.constructor=Fe,Fe.superclass=Object.prototype;function Fe(e,s,d){this.xpath=d.parse(e),this.context=new He,this.context.namespaceResolver=new tt(s)}Fe.getOwnerDocument=function(e){return e.nodeType===J.DOCUMENT_NODE?e:e.ownerDocument},Fe.detectHtmlDom=function(e){if(!e)return!1;var s=Fe.getOwnerDocument(e);try{return s.implementation.hasFeature("HTML","2.0")}catch{return!0}},Fe.prototype.evaluate=function(e,s,d){this.context.expressionContextNode=e,this.context.caseInsensitive=Fe.detectHtmlDom(e);var b=this.xpath.evaluate(this.context);return new Ae(b,s)},tt.prototype={},tt.prototype.constructor=tt,tt.superclass=Object.prototype;function tt(e){this.xpathNSResolver=e}tt.prototype.getNamespace=function(e,s){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(e)},Ye.prototype={},Ye.prototype.constructor=Ye,Ye.superclass=Object.prototype;function Ye(e){this.node=e,this.namespaceResolver=new je}Ye.prototype.lookupNamespaceURI=function(e){return this.namespaceResolver.getNamespace(e,this.node)},Ae.prototype={},Ae.prototype.constructor=Ae,Ae.superclass=Object.prototype;function Ae(e,s){switch(s==Ae.ANY_TYPE&&(e.constructor===I?s=Ae.STRING_TYPE:e.constructor===q?s=Ae.NUMBER_TYPE:e.constructor===he?s=Ae.BOOLEAN_TYPE:e.constructor===ue&&(s=Ae.UNORDERED_NODE_ITERATOR_TYPE)),this.resultType=s,s){case Ae.NUMBER_TYPE:this.numberValue=e.numberValue();return;case Ae.STRING_TYPE:this.stringValue=e.stringValue();return;case Ae.BOOLEAN_TYPE:this.booleanValue=e.booleanValue();return;case Ae.ANY_UNORDERED_NODE_TYPE:case Ae.FIRST_ORDERED_NODE_TYPE:if(e.constructor===ue){this.singleNodeValue=e.first();return}break;case Ae.UNORDERED_NODE_ITERATOR_TYPE:case Ae.ORDERED_NODE_ITERATOR_TYPE:if(e.constructor===ue){this.invalidIteratorState=!1,this.nodes=e.toArray(),this.iteratorIndex=0;return}break;case Ae.UNORDERED_NODE_SNAPSHOT_TYPE:case Ae.ORDERED_NODE_SNAPSHOT_TYPE:if(e.constructor===ue){this.nodes=e.toArray(),this.snapshotLength=this.nodes.length;return}break}throw new Me(Me.TYPE_ERR)}Ae.prototype.iterateNext=function(){if(this.resultType!=Ae.UNORDERED_NODE_ITERATOR_TYPE&&this.resultType!=Ae.ORDERED_NODE_ITERATOR_TYPE)throw new Me(Me.TYPE_ERR);return this.nodes[this.iteratorIndex++]},Ae.prototype.snapshotItem=function(e){if(this.resultType!=Ae.UNORDERED_NODE_SNAPSHOT_TYPE&&this.resultType!=Ae.ORDERED_NODE_SNAPSHOT_TYPE)throw new Me(Me.TYPE_ERR);return this.nodes[e]},Ae.ANY_TYPE=0,Ae.NUMBER_TYPE=1,Ae.STRING_TYPE=2,Ae.BOOLEAN_TYPE=3,Ae.UNORDERED_NODE_ITERATOR_TYPE=4,Ae.ORDERED_NODE_ITERATOR_TYPE=5,Ae.UNORDERED_NODE_SNAPSHOT_TYPE=6,Ae.ORDERED_NODE_SNAPSHOT_TYPE=7,Ae.ANY_UNORDERED_NODE_TYPE=8,Ae.FIRST_ORDERED_NODE_TYPE=9;function l(e,s){e.createExpression=function(d,b){try{return new Fe(d,b,s)}catch(h){throw new Me(Me.INVALID_EXPRESSION_ERR,h)}},e.createNSResolver=function(d){return new Ye(d)},e.evaluate=function(d,b,h,T,se){if(T<0||T>9)throw{code:0,toString:function(){return"Request type not supported"}};return e.createExpression(d,h,s).evaluate(b,T,se)}}try{var c=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(c=!1)}catch{}c&&l(document,new N)}catch{}l(r,new N),function(){var e=new N,s=new je,d=new Pe,b=new Ge;function h(ne){return{getNamespace:function(ve,qe){var st=ne(ve,qe);return st||s.getNamespace(ve,qe)}}}function T(ne){return h(ne.getNamespace.bind(ne))}function se(ne){return h(function(ve){return ne[ve]})}function xe(ne){return ne&&typeof ne.getNamespace=="function"?T(ne):typeof ne=="function"?h(ne):typeof ne=="object"?se(ne):s}function Ne(ne){if(ne===null||typeof ne>"u"||ne instanceof I||ne instanceof he||ne instanceof q||ne instanceof ue)return ne;switch(typeof ne){case"string":return new I(ne);case"boolean":return new he(ne);case"number":return new q(ne)}var ve=new ue;return ve.addArray([].concat(ne)),ve}function ie(ne){return function(ve){var qe=Array.prototype.slice.call(arguments,1).map(function(ti){return ti.evaluate(ve)}),st=ne.apply(this,[].concat(ve,qe));return Ne(st)}}function ce(ne){return{getFunction:function(ve,qe){var st=ne(ve,qe);return st?ie(st):d.getFunction(ve,qe)}}}function Le(ne){return ce(ne.getFunction.bind(ne))}function Ke(ne){return ce(function(ve){return ne[ve]})}function Se(ne){return ne&&typeof ne.getFunction=="function"?Le(ne):typeof ne=="function"?ce(ne):typeof ne=="object"?Ke(ne):d}function Qe(ne){return{getVariable:function(ve,qe){var st=ne(ve,qe);return Ne(st)}}}function Xe(ne){if(ne){if(typeof ne.getVariable=="function")return Qe(ne.getVariable.bind(ne));if(typeof ne=="function")return Qe(ne);if(typeof ne=="object")return Qe(function(ve){return ne[ve]})}return b}function ot(ne,ve,qe){ne in qe&&(ve[ne]=qe[ne])}function Qs(ne){var ve=new He;return ne?(ve.namespaceResolver=xe(ne.namespaces),ve.functionResolver=Se(ne.functions),ve.variableResolver=Xe(ne.variables),ve.expressionContextNode=ne.node,ot("allowAnyNamespaceForNoPrefix",ve,ne),ot("isHtml",ve,ne)):ve.namespaceResolver=s,ve}function Zs(ne,ve){var qe=Qs(ve);return ne.evaluate(qe)}var Js={evaluate:function(ne){return Zs(this.expression,ne)},evaluateNumber:function(ne){return this.evaluate(ne).numberValue()},evaluateString:function(ne){return this.evaluate(ne).stringValue()},evaluateBoolean:function(ne){return this.evaluate(ne).booleanValue()},evaluateNodeSet:function(ne){return this.evaluate(ne).nodeset()},select:function(ne){return this.evaluateNodeSet(ne).toArray()},select1:function(ne){return this.select(ne)[0]}};function ei(ne){var ve=e.parse(ne);return Object.create(Js,{expression:{value:ve}})}r.parse=ei}(),be(r,{XPath:le,XPathParser:N,XPathResult:Ae,Step:W,PathExpr:P,NodeTest:A,LocationPath:De,OrOperation:$,AndOperation:Z,BarOperation:X,EqualsOperation:te,NotEqualOperation:g,LessThanOperation:C,GreaterThanOperation:V,LessThanOrEqualOperation:j,GreaterThanOrEqualOperation:R,PlusOperation:ee,MinusOperation:D,MultiplyOperation:O,DivOperation:F,ModOperation:G,UnaryMinusOperation:_,FunctionCall:Ce,VariableReference:oe,XPathContext:He,XNodeSet:ue,XBoolean:he,XString:I,XNumber:q,NamespaceResolver:je,FunctionResolver:Pe,VariableResolver:Ge,Utilities:fe}),r.select=function(e,s,d){return r.selectWithResolver(e,s,null,d)},r.useNamespaces=function(e){var s={mappings:e||{},lookupNamespaceURI:function(d){return this.mappings[d]}};return function(d,b,h){return r.selectWithResolver(d,b,s,h)}},r.selectWithResolver=function(e,s,d,b){var h=new Fe(e,d,new N),T=Ae.ANY_TYPE,se=h.evaluate(s,T,null);return se.resultType==Ae.STRING_TYPE?se=se.stringValue:se.resultType==Ae.NUMBER_TYPE?se=se.numberValue:se.resultType==Ae.BOOLEAN_TYPE?se=se.booleanValue:(se=se.nodes,b&&(se=se[0])),se},r.select1=function(e,s){return r.select(e,s,!0)};var E=function(e){return Array.isArray(e)&&e.every(f)},k=function(e){return function(s){return f(s)&&s.nodeType===e}};be(r,{isNodeLike:f,isArrayOfNodes:E,isElement:k(J.ELEMENT_NODE),isAttribute:k(J.ATTRIBUTE_NODE),isTextNode:k(J.TEXT_NODE),isCDATASection:k(J.CDATA_SECTION_NODE),isProcessingInstruction:k(J.PROCESSING_INSTRUCTION_NODE),isComment:k(J.COMMENT_NODE),isDocumentNode:k(J.DOCUMENT_NODE),isDocumentTypeNode:k(J.DOCUMENT_TYPE_NODE),isDocumentFragment:k(J.DOCUMENT_FRAGMENT_NODE)})})(t)}(vt)),vt}var nn=rn();const on=tn(nn);var dt={},Je={},it={},Lt;function yt(){if(Lt)return it;Lt=1;function n(u,f,x){if(x===void 0&&(x=Array.prototype),u&&typeof x.find=="function")return x.find.call(u,f);for(var p=0;p<u.length;p++)if(Object.prototype.hasOwnProperty.call(u,p)){var m=u[p];if(f.call(void 0,m,p,u))return m}}function t(u,f){return f===void 0&&(f=Object),f&&typeof f.freeze=="function"?f.freeze(u):u}function r(u,f){if(u===null||typeof u!="object")throw new TypeError("target is not an object");for(var x in f)Object.prototype.hasOwnProperty.call(f,x)&&(u[x]=f[x]);return u}var a=t({HTML:"text/html",isHTML:function(u){return u===a.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=t({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(u){return u===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return it.assign=r,it.find=n,it.freeze=t,it.MIME_TYPE=a,it.NAMESPACE=i,it}var Vt;function $t(){if(Vt)return Je;Vt=1;var n=yt(),t=n.find,r=n.NAMESPACE;function a(l){return l!==""}function i(l){return l?l.split(/[\t\n\f\r ]+/).filter(a):[]}function u(l,c){return l.hasOwnProperty(c)||(l[c]=!0),l}function f(l){if(!l)return[];var c=i(l);return Object.keys(c.reduce(u,{}))}function x(l){return function(c){return l&&l.indexOf(c)!==-1}}function p(l,c){for(var E in l)Object.prototype.hasOwnProperty.call(l,E)&&(c[E]=l[E])}function m(l,c){var E=l.prototype;if(!(E instanceof c)){let k=function(){};k.prototype=c.prototype,k=new k,p(E,k),l.prototype=E=k}E.constructor!=l&&(typeof l!="function"&&console.error("unknown Class:"+l),E.constructor=l)}var S={},v=S.ELEMENT_NODE=1,U=S.ATTRIBUTE_NODE=2,K=S.TEXT_NODE=3,Y=S.CDATA_SECTION_NODE=4,ae=S.ENTITY_REFERENCE_NODE=5,H=S.ENTITY_NODE=6,de=S.PROCESSING_INSTRUCTION_NODE=7,re=S.COMMENT_NODE=8,z=S.DOCUMENT_NODE=9,me=S.DOCUMENT_TYPE_NODE=10,be=S.DOCUMENT_FRAGMENT_NODE=11,J=S.NOTATION_NODE=12,N={},le={};N.INDEX_SIZE_ERR=(le[1]="Index size error",1),N.DOMSTRING_SIZE_ERR=(le[2]="DOMString size error",2);var w=N.HIERARCHY_REQUEST_ERR=(le[3]="Hierarchy request error",3);N.WRONG_DOCUMENT_ERR=(le[4]="Wrong document",4),N.INVALID_CHARACTER_ERR=(le[5]="Invalid character",5),N.NO_DATA_ALLOWED_ERR=(le[6]="No data allowed",6),N.NO_MODIFICATION_ALLOWED_ERR=(le[7]="No modification allowed",7);var y=N.NOT_FOUND_ERR=(le[8]="Not found",8);N.NOT_SUPPORTED_ERR=(le[9]="Not supported",9);var B=N.INUSE_ATTRIBUTE_ERR=(le[10]="Attribute in use",10);N.INVALID_STATE_ERR=(le[11]="Invalid state",11),N.SYNTAX_ERR=(le[12]="Syntax error",12),N.INVALID_MODIFICATION_ERR=(le[13]="Invalid modification",13),N.NAMESPACE_ERR=(le[14]="Invalid namespace",14),N.INVALID_ACCESS_ERR=(le[15]="Invalid access",15);function _(l,c){if(c instanceof Error)var E=c;else E=this,Error.call(this,le[l]),this.message=le[l],Error.captureStackTrace&&Error.captureStackTrace(this,_);return E.code=l,c&&(this.message=this.message+": "+c),E}_.prototype=Error.prototype,p(N,_);function L(){}L.prototype={length:0,item:function(l){return l>=0&&l<this.length?this[l]:null},toString:function(l,c){for(var E=[],k=0;k<this.length;k++)Fe(this[k],E,l,c);return E.join("")},filter:function(l){return Array.prototype.filter.call(this,l)},indexOf:function(l){return Array.prototype.indexOf.call(this,l)}};function $(l,c){this._node=l,this._refresh=c,Z(this)}function Z(l){var c=l._node._inc||l._node.ownerDocument._inc;if(l._inc!==c){var E=l._refresh(l._node);if(Ae(l,"length",E.length),!l.$$length||E.length<l.$$length)for(var k=E.length;k in l;k++)Object.prototype.hasOwnProperty.call(l,k)&&delete l[k];p(E,l),l._inc=c}}$.prototype.item=function(l){return Z(this),this[l]||null},m($,L);function te(){}function g(l,c){for(var E=l.length;E--;)if(l[E]===c)return E}function C(l,c,E,k){if(k?c[g(c,k)]=E:c[c.length++]=E,l){E.ownerElement=l;var e=l.ownerDocument;e&&(k&&G(e,l,k),F(e,l,E))}}function V(l,c,E){var k=g(c,E);if(k>=0){for(var e=c.length-1;k<e;)c[k]=c[++k];if(c.length=e,l){var s=l.ownerDocument;s&&(G(s,l,E),E.ownerElement=null)}}else throw new _(y,new Error(l.tagName+"@"+E))}te.prototype={length:0,item:L.prototype.item,getNamedItem:function(l){for(var c=this.length;c--;){var E=this[c];if(E.nodeName==l)return E}},setNamedItem:function(l){var c=l.ownerElement;if(c&&c!=this._ownerElement)throw new _(B);var E=this.getNamedItem(l.nodeName);return C(this._ownerElement,this,l,E),E},setNamedItemNS:function(l){var c=l.ownerElement,E;if(c&&c!=this._ownerElement)throw new _(B);return E=this.getNamedItemNS(l.namespaceURI,l.localName),C(this._ownerElement,this,l,E),E},removeNamedItem:function(l){var c=this.getNamedItem(l);return V(this._ownerElement,this,c),c},removeNamedItemNS:function(l,c){var E=this.getNamedItemNS(l,c);return V(this._ownerElement,this,E),E},getNamedItemNS:function(l,c){for(var E=this.length;E--;){var k=this[E];if(k.localName==c&&k.namespaceURI==l)return k}return null}};function j(){}j.prototype={hasFeature:function(l,c){return!0},createDocument:function(l,c,E){var k=new O;if(k.implementation=this,k.childNodes=new L,k.doctype=E||null,E&&k.appendChild(E),c){var e=k.createElementNS(l,c);k.appendChild(e)}return k},createDocumentType:function(l,c,E){var k=new ue;return k.name=l,k.nodeName=l,k.publicId=c||"",k.systemId=E||"",k}};function R(){}R.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(l,c){return Ce(this,l,c)},replaceChild:function(l,c){Ce(this,l,c,oe),c&&this.removeChild(c)},removeChild:function(l){return P(this,l)},appendChild:function(l){return this.insertBefore(l,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(l){return Ye(this.ownerDocument||this,this,l)},normalize:function(){for(var l=this.firstChild;l;){var c=l.nextSibling;c&&c.nodeType==K&&l.nodeType==K?(this.removeChild(c),l.appendData(c.data)):(l.normalize(),l=c)}},isSupported:function(l,c){return this.ownerDocument.implementation.hasFeature(l,c)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(l){for(var c=this;c;){var E=c._nsMap;if(E){for(var k in E)if(Object.prototype.hasOwnProperty.call(E,k)&&E[k]===l)return k}c=c.nodeType==U?c.ownerDocument:c.parentNode}return null},lookupNamespaceURI:function(l){for(var c=this;c;){var E=c._nsMap;if(E&&Object.prototype.hasOwnProperty.call(E,l))return E[l];c=c.nodeType==U?c.ownerDocument:c.parentNode}return null},isDefaultNamespace:function(l){var c=this.lookupPrefix(l);return c==null}};function ee(l){return l=="<"&&"&lt;"||l==">"&&"&gt;"||l=="&"&&"&amp;"||l=='"'&&"&quot;"||"&#"+l.charCodeAt()+";"}p(S,R),p(S,R.prototype);function D(l,c){if(c(l))return!0;if(l=l.firstChild)do if(D(l,c))return!0;while(l=l.nextSibling)}function O(){this.ownerDocument=this}function F(l,c,E){l&&l._inc++;var k=E.namespaceURI;k===r.XMLNS&&(c._nsMap[E.prefix?E.localName:""]=E.value)}function G(l,c,E,k){l&&l._inc++;var e=E.namespaceURI;e===r.XMLNS&&delete c._nsMap[E.prefix?E.localName:""]}function X(l,c,E){if(l&&l._inc){l._inc++;var k=c.childNodes;if(E)k[k.length++]=E;else{for(var e=c.firstChild,s=0;e;)k[s++]=e,e=e.nextSibling;k.length=s,delete k[k.length]}}}function P(l,c){var E=c.previousSibling,k=c.nextSibling;return E?E.nextSibling=k:l.firstChild=k,k?k.previousSibling=E:l.lastChild=E,c.parentNode=null,c.previousSibling=null,c.nextSibling=null,X(l.ownerDocument,l),c}function Q(l){return l&&(l.nodeType===R.DOCUMENT_NODE||l.nodeType===R.DOCUMENT_FRAGMENT_NODE||l.nodeType===R.ELEMENT_NODE)}function pe(l){return l&&(Te(l)||ke(l)||Ee(l)||l.nodeType===R.DOCUMENT_FRAGMENT_NODE||l.nodeType===R.COMMENT_NODE||l.nodeType===R.PROCESSING_INSTRUCTION_NODE)}function Ee(l){return l&&l.nodeType===R.DOCUMENT_TYPE_NODE}function Te(l){return l&&l.nodeType===R.ELEMENT_NODE}function ke(l){return l&&l.nodeType===R.TEXT_NODE}function De(l,c){var E=l.childNodes||[];if(t(E,Te)||Ee(c))return!1;var k=t(E,Ee);return!(c&&k&&E.indexOf(k)>E.indexOf(c))}function W(l,c){var E=l.childNodes||[];function k(s){return Te(s)&&s!==c}if(t(E,k))return!1;var e=t(E,Ee);return!(c&&e&&E.indexOf(e)>E.indexOf(c))}function Be(l,c,E){if(!Q(l))throw new _(w,"Unexpected parent node type "+l.nodeType);if(E&&E.parentNode!==l)throw new _(y,"child not in parent");if(!pe(c)||Ee(c)&&l.nodeType!==R.DOCUMENT_NODE)throw new _(w,"Unexpected node type "+c.nodeType+" for parent node type "+l.nodeType)}function A(l,c,E){var k=l.childNodes||[],e=c.childNodes||[];if(c.nodeType===R.DOCUMENT_FRAGMENT_NODE){var s=e.filter(Te);if(s.length>1||t(e,ke))throw new _(w,"More than one element or text in fragment");if(s.length===1&&!De(l,E))throw new _(w,"Element in fragment can not be inserted before doctype")}if(Te(c)&&!De(l,E))throw new _(w,"Only one element can be added and only after doctype");if(Ee(c)){if(t(k,Ee))throw new _(w,"Only one doctype is allowed");var d=t(k,Te);if(E&&k.indexOf(d)<k.indexOf(E))throw new _(w,"Doctype can only be inserted before an element");if(!E&&d)throw new _(w,"Doctype can not be appended since element is present")}}function oe(l,c,E){var k=l.childNodes||[],e=c.childNodes||[];if(c.nodeType===R.DOCUMENT_FRAGMENT_NODE){var s=e.filter(Te);if(s.length>1||t(e,ke))throw new _(w,"More than one element or text in fragment");if(s.length===1&&!W(l,E))throw new _(w,"Element in fragment can not be inserted before doctype")}if(Te(c)&&!W(l,E))throw new _(w,"Only one element can be added and only after doctype");if(Ee(c)){if(t(k,function(h){return Ee(h)&&h!==E}))throw new _(w,"Only one doctype is allowed");var d=t(k,Te);if(E&&k.indexOf(d)<k.indexOf(E))throw new _(w,"Doctype can only be inserted before an element")}}function Ce(l,c,E,k){Be(l,c,E),l.nodeType===R.DOCUMENT_NODE&&(k||A)(l,c,E);var e=c.parentNode;if(e&&e.removeChild(c),c.nodeType===be){var s=c.firstChild;if(s==null)return c;var d=c.lastChild}else s=d=c;var b=E?E.previousSibling:l.lastChild;s.previousSibling=b,d.nextSibling=E,b?b.nextSibling=s:l.firstChild=s,E==null?l.lastChild=d:E.previousSibling=d;do{s.parentNode=l;var h=l.ownerDocument||l;ye(s,h)}while(s!==d&&(s=s.nextSibling));return X(l.ownerDocument||l,l),c.nodeType==be&&(c.firstChild=c.lastChild=null),c}function ye(l,c){if(l.ownerDocument!==c){if(l.ownerDocument=c,l.nodeType===v&&l.attributes)for(var E=0;E<l.attributes.length;E++){var k=l.attributes.item(E);k&&(k.ownerDocument=c)}for(var e=l.firstChild;e;)ye(e,c),e=e.nextSibling}}function I(l,c){c.parentNode&&c.parentNode.removeChild(c),c.parentNode=l,c.previousSibling=l.lastChild,c.nextSibling=null,c.previousSibling?c.previousSibling.nextSibling=c:l.firstChild=c,l.lastChild=c,X(l.ownerDocument,l,c);var E=l.ownerDocument||l;return ye(c,E),c}O.prototype={nodeName:"#document",nodeType:z,doctype:null,documentElement:null,_inc:1,insertBefore:function(l,c){if(l.nodeType==be){for(var E=l.firstChild;E;){var k=E.nextSibling;this.insertBefore(E,c),E=k}return l}return Ce(this,l,c),ye(l,this),this.documentElement===null&&l.nodeType===v&&(this.documentElement=l),l},removeChild:function(l){return this.documentElement==l&&(this.documentElement=null),P(this,l)},replaceChild:function(l,c){Ce(this,l,c,oe),ye(l,this),c&&this.removeChild(c),Te(l)&&(this.documentElement=l)},importNode:function(l,c){return tt(this,l,c)},getElementById:function(l){var c=null;return D(this.documentElement,function(E){if(E.nodeType==v&&E.getAttribute("id")==l)return c=E,!0}),c},getElementsByClassName:function(l){var c=f(l);return new $(this,function(E){var k=[];return c.length>0&&D(E.documentElement,function(e){if(e!==E&&e.nodeType===v){var s=e.getAttribute("class");if(s){var d=l===s;if(!d){var b=f(s);d=c.every(x(b))}d&&k.push(e)}}}),k})},createElement:function(l){var c=new q;c.ownerDocument=this,c.nodeName=l,c.tagName=l,c.localName=l,c.childNodes=new L;var E=c.attributes=new te;return E._ownerElement=c,c},createDocumentFragment:function(){var l=new Pe;return l.ownerDocument=this,l.childNodes=new L,l},createTextNode:function(l){var c=new he;return c.ownerDocument=this,c.appendData(l),c},createComment:function(l){var c=new Ie;return c.ownerDocument=this,c.appendData(l),c},createCDATASection:function(l){var c=new gt;return c.ownerDocument=this,c.appendData(l),c},createProcessingInstruction:function(l,c){var E=new je;return E.ownerDocument=this,E.tagName=E.nodeName=E.target=l,E.nodeValue=E.data=c,E},createAttribute:function(l){var c=new Re;return c.ownerDocument=this,c.name=l,c.nodeName=l,c.localName=l,c.specified=!0,c},createEntityReference:function(l){var c=new Ge;return c.ownerDocument=this,c.nodeName=l,c},createElementNS:function(l,c){var E=new q,k=c.split(":"),e=E.attributes=new te;return E.childNodes=new L,E.ownerDocument=this,E.nodeName=c,E.tagName=c,E.namespaceURI=l,k.length==2?(E.prefix=k[0],E.localName=k[1]):E.localName=c,e._ownerElement=E,E},createAttributeNS:function(l,c){var E=new Re,k=c.split(":");return E.ownerDocument=this,E.nodeName=c,E.name=c,E.namespaceURI=l,E.specified=!0,k.length==2?(E.prefix=k[0],E.localName=k[1]):E.localName=c,E}},m(O,R);function q(){this._nsMap={}}q.prototype={nodeType:v,hasAttribute:function(l){return this.getAttributeNode(l)!=null},getAttribute:function(l){var c=this.getAttributeNode(l);return c&&c.value||""},getAttributeNode:function(l){return this.attributes.getNamedItem(l)},setAttribute:function(l,c){var E=this.ownerDocument.createAttribute(l);E.value=E.nodeValue=""+c,this.setAttributeNode(E)},removeAttribute:function(l){var c=this.getAttributeNode(l);c&&this.removeAttributeNode(c)},appendChild:function(l){return l.nodeType===be?this.insertBefore(l,null):I(this,l)},setAttributeNode:function(l){return this.attributes.setNamedItem(l)},setAttributeNodeNS:function(l){return this.attributes.setNamedItemNS(l)},removeAttributeNode:function(l){return this.attributes.removeNamedItem(l.nodeName)},removeAttributeNS:function(l,c){var E=this.getAttributeNodeNS(l,c);E&&this.removeAttributeNode(E)},hasAttributeNS:function(l,c){return this.getAttributeNodeNS(l,c)!=null},getAttributeNS:function(l,c){var E=this.getAttributeNodeNS(l,c);return E&&E.value||""},setAttributeNS:function(l,c,E){var k=this.ownerDocument.createAttributeNS(l,c);k.value=k.nodeValue=""+E,this.setAttributeNode(k)},getAttributeNodeNS:function(l,c){return this.attributes.getNamedItemNS(l,c)},getElementsByTagName:function(l){return new $(this,function(c){var E=[];return D(c,function(k){k!==c&&k.nodeType==v&&(l==="*"||k.tagName==l)&&E.push(k)}),E})},getElementsByTagNameNS:function(l,c){return new $(this,function(E){var k=[];return D(E,function(e){e!==E&&e.nodeType===v&&(l==="*"||e.namespaceURI===l)&&(c==="*"||e.localName==c)&&k.push(e)}),k})}},O.prototype.getElementsByTagName=q.prototype.getElementsByTagName,O.prototype.getElementsByTagNameNS=q.prototype.getElementsByTagNameNS,m(q,R);function Re(){}Re.prototype.nodeType=U,m(Re,R);function Ue(){}Ue.prototype={data:"",substringData:function(l,c){return this.data.substring(l,l+c)},appendData:function(l){l=this.data+l,this.nodeValue=this.data=l,this.length=l.length},insertData:function(l,c){this.replaceData(l,0,c)},appendChild:function(l){throw new Error(le[w])},deleteData:function(l,c){this.replaceData(l,c,"")},replaceData:function(l,c,E){var k=this.data.substring(0,l),e=this.data.substring(l+c);E=k+E+e,this.nodeValue=this.data=E,this.length=E.length}},m(Ue,R);function he(){}he.prototype={nodeName:"#text",nodeType:K,splitText:function(l){var c=this.data,E=c.substring(l);c=c.substring(0,l),this.data=this.nodeValue=c,this.length=c.length;var k=this.ownerDocument.createTextNode(E);return this.parentNode&&this.parentNode.insertBefore(k,this.nextSibling),k}},m(he,Ue);function Ie(){}Ie.prototype={nodeName:"#comment",nodeType:re},m(Ie,Ue);function gt(){}gt.prototype={nodeName:"#cdata-section",nodeType:Y},m(gt,Ue);function ue(){}ue.prototype.nodeType=me,m(ue,R);function ze(){}ze.prototype.nodeType=J,m(ze,R);function He(){}He.prototype.nodeType=H,m(He,R);function Ge(){}Ge.prototype.nodeType=ae,m(Ge,R);function Pe(){}Pe.prototype.nodeName="#document-fragment",Pe.prototype.nodeType=be,m(Pe,R);function je(){}je.prototype.nodeType=de,m(je,R);function ge(){}ge.prototype.serializeToString=function(l,c,E){return fe.call(l,c,E)},R.prototype.toString=fe;function fe(l,c){var E=[],k=this.nodeType==9&&this.documentElement||this,e=k.prefix,s=k.namespaceURI;if(s&&e==null){var e=k.lookupPrefix(s);if(e==null)var d=[{namespace:s,prefix:null}]}return Fe(this,E,l,c,d),E.join("")}function Et(l,c,E){var k=l.prefix||"",e=l.namespaceURI;if(!e||k==="xml"&&e===r.XML||e===r.XMLNS)return!1;for(var s=E.length;s--;){var d=E[s];if(d.prefix===k)return d.namespace!==e}return!0}function Me(l,c,E){l.push(" ",c,'="',E.replace(/[<>&"\t\n\r]/g,ee),'"')}function Fe(l,c,E,k,e){if(e||(e=[]),k)if(l=k(l),l){if(typeof l=="string"){c.push(l);return}}else return;switch(l.nodeType){case v:var s=l.attributes,d=s.length,Se=l.firstChild,b=l.tagName;E=r.isHTML(l.namespaceURI)||E;var h=b;if(!E&&!l.prefix&&l.namespaceURI){for(var T,se=0;se<s.length;se++)if(s.item(se).name==="xmlns"){T=s.item(se).value;break}if(!T)for(var xe=e.length-1;xe>=0;xe--){var Ne=e[xe];if(Ne.prefix===""&&Ne.namespace===l.namespaceURI){T=Ne.namespace;break}}if(T!==l.namespaceURI)for(var xe=e.length-1;xe>=0;xe--){var Ne=e[xe];if(Ne.namespace===l.namespaceURI){Ne.prefix&&(h=Ne.prefix+":"+b);break}}}c.push("<",h);for(var ie=0;ie<d;ie++){var ce=s.item(ie);ce.prefix=="xmlns"?e.push({prefix:ce.localName,namespace:ce.value}):ce.nodeName=="xmlns"&&e.push({prefix:"",namespace:ce.value})}for(var ie=0;ie<d;ie++){var ce=s.item(ie);if(Et(ce,E,e)){var Le=ce.prefix||"",Ke=ce.namespaceURI;Me(c,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}Fe(ce,c,E,k,e)}if(b===h&&Et(l,E,e)){var Le=l.prefix||"",Ke=l.namespaceURI;Me(c,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}if(Se||E&&!/^(?:meta|link|img|br|hr|input)$/i.test(b)){if(c.push(">"),E&&/^script$/i.test(b))for(;Se;)Se.data?c.push(Se.data):Fe(Se,c,E,k,e.slice()),Se=Se.nextSibling;else for(;Se;)Fe(Se,c,E,k,e.slice()),Se=Se.nextSibling;c.push("</",h,">")}else c.push("/>");return;case z:case be:for(var Se=l.firstChild;Se;)Fe(Se,c,E,k,e.slice()),Se=Se.nextSibling;return;case U:return Me(c,l.name,l.value);case K:return c.push(l.data.replace(/[<&>]/g,ee));case Y:return c.push("<![CDATA[",l.data,"]]>");case re:return c.push("<!--",l.data,"-->");case me:var Qe=l.publicId,Xe=l.systemId;if(c.push("<!DOCTYPE ",l.name),Qe)c.push(" PUBLIC ",Qe),Xe&&Xe!="."&&c.push(" ",Xe),c.push(">");else if(Xe&&Xe!=".")c.push(" SYSTEM ",Xe,">");else{var ot=l.internalSubset;ot&&c.push(" [",ot,"]"),c.push(">")}return;case de:return c.push("<?",l.target," ",l.data,"?>");case ae:return c.push("&",l.nodeName,";");default:c.push("??",l.nodeName)}}function tt(l,c,E){var k;switch(c.nodeType){case v:k=c.cloneNode(!1),k.ownerDocument=l;case be:break;case U:E=!0;break}if(k||(k=c.cloneNode(!1)),k.ownerDocument=l,k.parentNode=null,E)for(var e=c.firstChild;e;)k.appendChild(tt(l,e,E)),e=e.nextSibling;return k}function Ye(l,c,E){var k=new c.constructor;for(var e in c)if(Object.prototype.hasOwnProperty.call(c,e)){var s=c[e];typeof s!="object"&&s!=k[e]&&(k[e]=s)}switch(c.childNodes&&(k.childNodes=new L),k.ownerDocument=l,k.nodeType){case v:var d=c.attributes,b=k.attributes=new te,h=d.length;b._ownerElement=k;for(var T=0;T<h;T++)k.setAttributeNode(Ye(l,d.item(T),!0));break;case U:E=!0}if(E)for(var se=c.firstChild;se;)k.appendChild(Ye(l,se,E)),se=se.nextSibling;return k}function Ae(l,c,E){l[c]=E}try{if(Object.defineProperty){let l=function(c){switch(c.nodeType){case v:case be:var E=[];for(c=c.firstChild;c;)c.nodeType!==7&&c.nodeType!==8&&E.push(l(c)),c=c.nextSibling;return E.join("");default:return c.nodeValue}};Object.defineProperty($.prototype,"length",{get:function(){return Z(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return l(this)},set:function(c){switch(this.nodeType){case v:case be:for(;this.firstChild;)this.removeChild(this.firstChild);(c||String(c))&&this.appendChild(this.ownerDocument.createTextNode(c));break;default:this.data=c,this.value=c,this.nodeValue=c}}}),Ae=function(c,E,k){c["$$"+E]=k}}}catch{}return Je.DocumentType=ue,Je.DOMException=_,Je.DOMImplementation=j,Je.Element=q,Je.Node=R,Je.NodeList=L,Je.XMLSerializer=ge,Je}var pt={},wt={},Mt;function sn(){return Mt||(Mt=1,function(n){var t=yt().freeze;n.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),n.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
10
- `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),n.entityMap=n.HTML_ENTITIES}(wt)),wt}var bt={},qt;function an(){if(qt)return bt;qt=1;var n=yt().NAMESPACE,t=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+t.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+t.source+r.source+"*(?::"+t.source+r.source+"*)?$"),i=0,u=1,f=2,x=3,p=4,m=5,S=6,v=7;function U(w,y){this.message=w,this.locator=y,Error.captureStackTrace&&Error.captureStackTrace(this,U)}U.prototype=new Error,U.prototype.name=U.name;function K(){}K.prototype={parse:function(w,y,B){var _=this.domBuilder;_.startDocument(),me(y,y={}),Y(w,y,B,_,this.errorHandler),_.endDocument()}};function Y(w,y,B,_,L){function $(I){if(I>65535){I-=65536;var q=55296+(I>>10),Re=56320+(I&1023);return String.fromCharCode(q,Re)}else return String.fromCharCode(I)}function Z(I){var q=I.slice(1,-1);return Object.hasOwnProperty.call(B,q)?B[q]:q.charAt(0)==="#"?$(parseInt(q.substr(1).replace("x","0x"))):(L.error("entity not found:"+I),I)}function te(I){if(I>O){var q=w.substring(O,I).replace(/&#?\w+;/g,Z);R&&g(O),_.characters(q,0,I-O),O=I}}function g(I,q){for(;I>=V&&(q=j.exec(w));)C=q.index,V=C+q[0].length,R.lineNumber++;R.columnNumber=I-C+1}for(var C=0,V=0,j=/.*(?:\r\n?|\n)|.*$/g,R=_.locator,ee=[{currentNSMap:y}],D={},O=0;;){try{var F=w.indexOf("<",O);if(F<0){if(!w.substr(O).match(/^\s*$/)){var G=_.doc,X=G.createTextNode(w.substr(O));G.appendChild(X),_.currentElement=X}return}switch(F>O&&te(F),w.charAt(F+1)){case"/":var Be=w.indexOf(">",F+3),P=w.substring(F+2,Be).replace(/[ \t\n\r]+$/g,""),Q=ee.pop();Be<0?(P=w.substring(F+2).replace(/[\s<].*/,""),L.error("end tag name: "+P+" is not complete:"+Q.tagName),Be=F+1+P.length):P.match(/\s</)&&(P=P.replace(/[\s<].*/,""),L.error("end tag name: "+P+" maybe not complete"),Be=F+1+P.length);var pe=Q.localNSMap,Ee=Q.tagName==P,Te=Ee||Q.tagName&&Q.tagName.toLowerCase()==P.toLowerCase();if(Te){if(_.endElement(Q.uri,Q.localName,P),pe)for(var ke in pe)Object.prototype.hasOwnProperty.call(pe,ke)&&_.endPrefixMapping(ke);Ee||L.fatalError("end tag name: "+P+" is not match the current start tagName:"+Q.tagName)}else ee.push(Q);Be++;break;case"?":R&&g(F),Be=J(w,F,_);break;case"!":R&&g(F),Be=be(w,F,_,L);break;default:R&&g(F);var De=new N,W=ee[ee.length-1].currentNSMap,Be=H(w,F,De,W,Z,L),A=De.length;if(!De.closed&&z(w,Be,De.tagName,D)&&(De.closed=!0,B.nbsp||L.warning("unclosed xml attribute")),R&&A){for(var oe=ae(R,{}),Ce=0;Ce<A;Ce++){var ye=De[Ce];g(ye.offset),ye.locator=ae(R,{})}_.locator=oe,de(De,_,W)&&ee.push(De),_.locator=R}else de(De,_,W)&&ee.push(De);n.isHTML(De.uri)&&!De.closed?Be=re(w,Be,De.tagName,Z,_):Be++}}catch(I){if(I instanceof U)throw I;L.error("element parse error: "+I),Be=-1}Be>O?O=Be:te(Math.max(F,O)+1)}}function ae(w,y){return y.lineNumber=w.lineNumber,y.columnNumber=w.columnNumber,y}function H(w,y,B,_,L,$){function Z(R,ee,D){B.attributeNames.hasOwnProperty(R)&&$.fatalError("Attribute "+R+" redefined"),B.addValue(R,ee.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,L),D)}for(var te,g,C=++y,V=i;;){var j=w.charAt(C);switch(j){case"=":if(V===u)te=w.slice(y,C),V=x;else if(V===f)V=x;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(V===x||V===u)if(V===u&&($.warning('attribute value must after "="'),te=w.slice(y,C)),y=C+1,C=w.indexOf(j,y),C>0)g=w.slice(y,C),Z(te,g,y-1),V=m;else throw new Error("attribute value no end '"+j+"' match");else if(V==p)g=w.slice(y,C),Z(te,g,y),$.warning('attribute "'+te+'" missed start quot('+j+")!!"),y=C+1,V=m;else throw new Error('attribute value must after "="');break;case"/":switch(V){case i:B.setTagName(w.slice(y,C));case m:case S:case v:V=v,B.closed=!0;case p:case u:break;case f:B.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return $.error("unexpected end of input"),V==i&&B.setTagName(w.slice(y,C)),C;case">":switch(V){case i:B.setTagName(w.slice(y,C));case m:case S:case v:break;case p:case u:g=w.slice(y,C),g.slice(-1)==="/"&&(B.closed=!0,g=g.slice(0,-1));case f:V===f&&(g=te),V==p?($.warning('attribute "'+g+'" missed quot(")!'),Z(te,g,y)):((!n.isHTML(_[""])||!g.match(/^(?:disabled|checked|selected)$/i))&&$.warning('attribute "'+g+'" missed value!! "'+g+'" instead!!'),Z(g,g,y));break;case x:throw new Error("attribute value missed!!")}return C;case"€":j=" ";default:if(j<=" ")switch(V){case i:B.setTagName(w.slice(y,C)),V=S;break;case u:te=w.slice(y,C),V=f;break;case p:var g=w.slice(y,C);$.warning('attribute "'+g+'" missed quot(")!!'),Z(te,g,y);case m:V=S;break}else switch(V){case f:B.tagName,(!n.isHTML(_[""])||!te.match(/^(?:disabled|checked|selected)$/i))&&$.warning('attribute "'+te+'" missed value!! "'+te+'" instead2!!'),Z(te,te,y),y=C,V=u;break;case m:$.warning('attribute space is required"'+te+'"!!');case S:V=u,y=C;break;case x:V=p,y=C;break;case v:throw new Error("elements closed character '/' and '>' must be connected to")}}C++}}function de(w,y,B){for(var _=w.tagName,L=null,j=w.length;j--;){var $=w[j],Z=$.qName,te=$.value,R=Z.indexOf(":");if(R>0)var g=$.prefix=Z.slice(0,R),C=Z.slice(R+1),V=g==="xmlns"&&C;else C=Z,g=null,V=Z==="xmlns"&&"";$.localName=C,V!==!1&&(L==null&&(L={},me(B,B={})),B[V]=L[V]=te,$.uri=n.XMLNS,y.startPrefixMapping(V,te))}for(var j=w.length;j--;){$=w[j];var g=$.prefix;g&&(g==="xml"&&($.uri=n.XML),g!=="xmlns"&&($.uri=B[g||""]))}var R=_.indexOf(":");R>0?(g=w.prefix=_.slice(0,R),C=w.localName=_.slice(R+1)):(g=null,C=w.localName=_);var ee=w.uri=B[g||""];if(y.startElement(ee,C,_,w),w.closed){if(y.endElement(ee,C,_),L)for(g in L)Object.prototype.hasOwnProperty.call(L,g)&&y.endPrefixMapping(g)}else return w.currentNSMap=B,w.localNSMap=L,!0}function re(w,y,B,_,L){if(/^(?:script|textarea)$/i.test(B)){var $=w.indexOf("</"+B+">",y),Z=w.substring(y+1,$);if(/[&<]/.test(Z))return/^script$/i.test(B)?(L.characters(Z,0,Z.length),$):(Z=Z.replace(/&#?\w+;/g,_),L.characters(Z,0,Z.length),$)}return y+1}function z(w,y,B,_){var L=_[B];return L==null&&(L=w.lastIndexOf("</"+B+">"),L<y&&(L=w.lastIndexOf("</"+B)),_[B]=L),L<y}function me(w,y){for(var B in w)Object.prototype.hasOwnProperty.call(w,B)&&(y[B]=w[B])}function be(w,y,B,_){var L=w.charAt(y+2);switch(L){case"-":if(w.charAt(y+3)==="-"){var $=w.indexOf("-->",y+4);return $>y?(B.comment(w,y+4,$-y-4),$+3):(_.error("Unclosed comment"),-1)}else return-1;default:if(w.substr(y+3,6)=="CDATA["){var $=w.indexOf("]]>",y+9);return B.startCDATA(),B.characters(w,y+9,$-y-9),B.endCDATA(),$+3}var Z=le(w,y),te=Z.length;if(te>1&&/!doctype/i.test(Z[0][0])){var g=Z[1][0],C=!1,V=!1;te>3&&(/^public$/i.test(Z[2][0])?(C=Z[3][0],V=te>4&&Z[4][0]):/^system$/i.test(Z[2][0])&&(V=Z[3][0]));var j=Z[te-1];return B.startDTD(g,C,V),B.endDTD(),j.index+j[0].length}}return-1}function J(w,y,B){var _=w.indexOf("?>",y);if(_){var L=w.substring(y,_).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return L?(L[0].length,B.processingInstruction(L[1],L[2]),_+2):-1}return-1}function N(){this.attributeNames={}}N.prototype={setTagName:function(w){if(!a.test(w))throw new Error("invalid tagName:"+w);this.tagName=w},addValue:function(w,y,B){if(!a.test(w))throw new Error("invalid attribute:"+w);this.attributeNames[w]=this.length,this[this.length++]={qName:w,value:y,offset:B}},length:0,getLocalName:function(w){return this[w].localName},getLocator:function(w){return this[w].locator},getQName:function(w){return this[w].qName},getURI:function(w){return this[w].uri},getValue:function(w){return this[w].value}};function le(w,y){var B,_=[],L=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(L.lastIndex=y,L.exec(w);B=L.exec(w);)if(_.push(B),B[1])return _}return bt.XMLReader=K,bt.ParseError=U,bt}var Ut;function un(){if(Ut)return pt;Ut=1;var n=yt(),t=$t(),r=sn(),a=an(),i=t.DOMImplementation,u=n.NAMESPACE,f=a.ParseError,x=a.XMLReader;function p(H){return H.replace(/\r[\n\u0085]/g,`
8
+ `)(K);k=S(u.value,I,z),p.value=k}else throw new Error(`Unsupported filter type: ${D.type}`);m.value="",o.nextTick(()=>{R()})}catch(k){m.value=k instanceof Error?k.message:"Filter execution error",p.value=null}},he=(D,k="root")=>{const K=new Map,z=(I,te)=>{if(I==null)return I;if(typeof I=="object"&&I.__protected_number__!==void 0){const Ee=parseFloat(I.__protected_number__);return K.set(Ee,te),Ee}if(Array.isArray(I)){const Ee=I.map((ye,we)=>{const ke=`${te}[${we}]`,ve=z(ye,ke);return K.set(ve,ke),ve});return K.set(Ee,te),Ee}if(typeof I=="object"){const Ee={};for(const ye in I)if(Object.prototype.hasOwnProperty.call(I,ye)){const we=te==="root"?ye:`${te}.${ye}`;Ee[ye]=z(I[ye],we)}return K.set(Ee,te),Ee}return I};return{proxyData:z(D,k),indexMap:K}},S=(D,k,K)=>{if(k===null||typeof k!="object")return k;if(Array.isArray(k))return k.map(I=>{const te=K.get(I);if(te){const Ee=q(D,te);if(Ee!==void 0)return Ee}return S(D,I,K)});const z=K.get(k);if(z){const I=q(D,z);if(I!==void 0)return I}const Z={};for(const I in k)Object.prototype.hasOwnProperty.call(k,I)&&(Z[I]=S(D,k[I],K));return Z},q=(D,k)=>{if(k==="root")return D;const K=[];let z=k.replace(/^root\.?/,"");const Z=/([^\[\].]+)|\[(\d+)\]/g;let I;for(;(I=Z.exec(z))!==null;)I[1]?K.push(I[1]):I[2]!==void 0&&K.push(parseInt(I[2]));let te=D;for(const Ee of K){if(te==null)return;te=te[Ee]}return te},G=()=>{p.value=null,m.value=""},V=()=>{T.value=!0},g=()=>{T.value=!1};o.watch(()=>a.modelValue,D=>{j(D)},{immediate:!0});const X=(D,k,K)=>{const z=te=>{if(te===null||typeof te!="object")return te;if(!Array.isArray(te)&&"__protected_number__"in te&&Object.keys(te).length===1)return`__PROTECTED_NUMBER_${te.__protected_number__}_PROTECTED_NUMBER__`;if(Array.isArray(te))return te.map(ye=>z(ye));const Ee={};for(const[ye,we]of Object.entries(te))Ee[ye]=z(we);return Ee},Z=z(D);return JSON.stringify(Z,k,K).replace(/"__PROTECTED_NUMBER_(.+?)_PROTECTED_NUMBER__"/g,"$1")},w=(D,k)=>{if(!a.readonly)try{const K=v(u.value,D,k),z=X(K,null,2);i("update:modelValue",z)}catch(K){console.error("Failed to update JSON:",K)}},v=(D,k,K)=>{if(!k||k==="root")return K;const z=k.split("."),Z=W(D,z.slice(0,-1));let I=Z;for(let Ee=0;Ee<z.length-1;Ee++){const ye=z[Ee];ye!=="root"&&(Array.isArray(I)?I=I[parseInt(ye)]:I=I[ye])}const te=z[z.length-1];return te==="root"?K:(Array.isArray(I)?I[parseInt(te)]=K:I[te]=K,Z)},$=D=>{A.value.has(D)?A.value.delete(D):A.value.add(D)},R=()=>{const D=new Set,k=(K,z="")=>{K!==null&&typeof K=="object"&&(D.add(z||"root"),Array.isArray(K)?K.forEach((Z,I)=>{const te=z?`${z}.${I}`:`${I}`;k(Z,te)}):Object.keys(K).forEach(Z=>{const I=z?`${z}.${Z}`:Z;k(K[Z],I)}))};k(ie.value),A.value=D,i("expand-all")},P=()=>{A.value=new Set(["root"]),i("collapse-all")},ee=async()=>{if(x.value)try{const D=ie.value,k=X(D,null,2);await navigator.clipboard.writeText(k),i("copy-success",k)}catch(D){console.error("Failed to copy JSON:",D),i("copy-error",D instanceof Error?D:new Error("Failed to copy JSON"))}},ue=()=>{if(x.value)try{const D=ie.value,k=X(D);i("update:modelValue",k),i("compress",k)}catch(D){console.error("Failed to compress JSON:",D)}},me=async D=>{try{let k;typeof D=="object"&&D!==null&&!Array.isArray(D)&&"__protected_number__"in D&&Object.keys(D).length===1?k=D.__protected_number__:typeof D=="string"?k=`"${D}"`:k=JSON.stringify(D),await navigator.clipboard.writeText(k)}catch(k){console.error("Failed to copy value:",k)}},N=(D,k)=>{if(!a.readonly)try{const K=_(u.value,D,k),z=X(K,null,2);i("update:modelValue",z),le(D,k)}catch(K){console.error("Failed to rename key:",K)}},_=(D,k,K)=>{if(!k||k==="root")return D;const z=k.split("."),Z=W(D,z.slice(0,-1));if(z.length===1){const Ee=z[0];return Z&&typeof Z=="object"&&!Array.isArray(Z)?J(Z,Ee,K):Z}let I=Z;for(let Ee=0;Ee<z.length-1;Ee++){const ye=z[Ee];Array.isArray(I)?I=I[parseInt(ye)]:I=I[ye]}const te=z[z.length-1];if(!Array.isArray(I)&&I&&typeof I=="object"){const Ee=J(I,te,K),ye=z.slice(0,-1);ye.length>0&&U(Z,ye,Ee)}return Z},W=(D,k)=>{if(k.length===0)return D;if(Array.isArray(D)){const K=[...D],z=k[0],Z=parseInt(z);return k.length===1||(K[Z]=W(D[Z],k.slice(1))),K}else if(D&&typeof D=="object"){const K={...D},z=k[0];return k.length===1||(K[z]=W(D[z],k.slice(1))),K}return D},J=(D,k,K)=>{if(!D||typeof D!="object"||Array.isArray(D))return D;const z=Object.keys(D),Z={};for(const I of z)I===k?Z[K]=D[I]:Z[I]=D[I];return Z},U=(D,k,K)=>{let z=D;for(let I=0;I<k.length-1;I++){const te=k[I];Array.isArray(z)?z=z[parseInt(te)]:z=z[te]}const Z=k[k.length-1];Array.isArray(z)?z[parseInt(Z)]=K:z[Z]=K},le=(D,k)=>{const K=new Set;A.value.forEach(z=>{if(z===D){const Z=D.split(".");Z[Z.length-1]=k,K.add(Z.join("."))}else if(z.startsWith(D+".")){const Z=D.split(".");Z[Z.length-1]=k;const I=Z.join("."),te=z.substring(D.length);K.add(I+te)}else K.add(z)}),A.value=K};return t({copyJson:ee,compressSource:ue,expandAll:R,collapseAll:P,toggleExpand:$,updateValue:w,updateKey:N,filter:ce,clearFilter:G,sortKeys:V,clearSortKeys:g,isSorted:()=>T.value,isValidJson:()=>x.value,getParsedJson:()=>u.value,getFilteredJson:()=>p.value,getExpandedNodes:()=>A.value,getParseError:()=>c.value,getFilterError:()=>m.value,parseJson:D=>j(D),copyValue:D=>me(D)}),(D,k)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["json-format",`json-format--${L.value.name}`])},[D.showToolbar?(o.openBlock(),o.createElementBlock("div",qr,[o.createElementVNode("div",Hr,[o.createElementVNode("button",{class:"json-format__btn json-format__btn--primary",onClick:ee,disabled:!x.value,title:"Copy JSON"}," 📋 Copy ",8,jr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:R,disabled:!x.value,title:"Expand All"}," ⬇️ Expand All ",8,Kr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:P,disabled:!x.value,title:"Collapse All"}," ➡️ Collapse All ",8,Gr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:ue,disabled:!x.value,title:"Compress JSON"}," 📦 Compress ",8,Xr)]),o.createElementVNode("div",Wr,[x.value?(o.openBlock(),o.createElementBlock("span",zr," ✅ Valid JSON ")):(o.openBlock(),o.createElementBlock("span",Yr," ❌ Invalid JSON "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",Qr,[x.value?m.value?(o.openBlock(),o.createElementBlock("div",Jr,[k[1]||(k[1]=o.createElementVNode("h4",null,"Filter Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(m.value),1)])):(o.openBlock(),o.createElementBlock("div",en,[o.createVNode($r,{value:ie.value,"key-name":"",level:0,expanded:A.value,"is-last":!0,theme:L.value,"onUpdate:value":w,onToggleExpand:$,onCopy:me,"onUpdate:key":N},null,8,["value","expanded","theme"])])):(o.openBlock(),o.createElementBlock("div",Zr,[k[0]||(k[0]=o.createElementVNode("h4",null,"JSON Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(c.value),1)]))])],2))}}),[["__scopeId","data-v-030f8e3b"]]);function tn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Dt={},Pt;function rn(){return Pt||(Pt=1,function(n){var t=n;(function(r){var a="__namespace",i=function(e){return e==null},u=function(e){return e===a||Number.isInteger(e)&&e>=1&&e<=11},c=function(e){return e&&u(e.nodeType)&&typeof e.nodeName=="string"};function A(e){var s=Array.prototype.slice,d=e.length,y=function(C,oe){return function(){return oe.apply(this,C.concat(s.call(arguments)))}},h=function(){var C=s.call(arguments);return C.length<d?y(C,h):e.apply(this,s.apply(arguments,[0,d]))};return h}var p=function(e,s){for(var d=0;d<s.length;d+=1)e(s[d],d,s)},m=function(e,s,d){var y=s;return p(function(h,C){y=e(y,h,C)},d),y},T=function(e,s){var d=new Array(s.length);return p(function(y,h){d[h]=e(y)},s),d},x=function(e,s){var d=[];return p(function(y,h){e(y,h)&&d.push(y)},s),d},L=function(e,s){for(var d=0;d<e.length;d+=1)if(e[d]===s)return!0;return!1};function F(e){return function(){return e}}function Q(e){return e.toString()}var ie=function(e,s){return s.join(e)},j=function(e,s,d){return e+d+s},ce=Array.prototype.concat,he=function(e,s){var d=new ae;d.addArray(e);var y=d.toArray();return s?y.reverse():y},S=32767;function q(e){for(var s=[],d=0;d<e.length;d+=S){var y=e.slice(d,d+S);s=ce.apply(s,y)}return s}function G(e,s){for(var d=Object(e),y=1;y<arguments.length;y++){var h=arguments[y];if(h!=null)for(var C in h)Object.prototype.hasOwnProperty.call(h,C)&&(d[C]=h[C])}return d}var V={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NAMESPACE_NODE:a};g.prototype=new Object,g.prototype.constructor=g,g.superclass=Object.prototype;function g(){this.init()}g.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(e){return new ee(e[0],e[2])},this.reduceActions[5]=function(e){return new ue(e[0],e[2])},this.reduceActions[7]=function(e){return new me(e[0],e[2])},this.reduceActions[8]=function(e){return new N(e[0],e[2])},this.reduceActions[10]=function(e){return new _(e[0],e[2])},this.reduceActions[11]=function(e){return new W(e[0],e[2])},this.reduceActions[12]=function(e){return new J(e[0],e[2])},this.reduceActions[13]=function(e){return new U(e[0],e[2])},this.reduceActions[15]=function(e){return new le(e[0],e[2])},this.reduceActions[16]=function(e){return new D(e[0],e[2])},this.reduceActions[18]=function(e){return new k(e[0],e[2])},this.reduceActions[19]=function(e){return new K(e[0],e[2])},this.reduceActions[20]=function(e){return new z(e[0],e[2])},this.reduceActions[22]=function(e){return new R(e[1])},this.reduceActions[24]=function(e){return new Z(e[0],e[2])},this.reduceActions[25]=function(e){return new I(void 0,void 0,e[0])},this.reduceActions[27]=function(e){return e[0].locationPath=e[2],e[0]},this.reduceActions[28]=function(e){return e[0].locationPath=e[2],e[0].locationPath.steps.unshift(new Y(Y.DESCENDANTORSELF,b.nodeTest,[])),e[0]},this.reduceActions[29]=function(e){return new I(e[0],[],void 0)},this.reduceActions[30]=function(e){return de.instance_of(e[0],I)?(e[0].filterPredicates==null&&(e[0].filterPredicates=[]),e[0].filterPredicates.push(e[1]),e[0]):new I(e[0],[e[1]],void 0)},this.reduceActions[32]=function(e){return e[1]},this.reduceActions[33]=function(e){return new O(e[0])},this.reduceActions[34]=function(e){return new H(e[0])},this.reduceActions[36]=function(e){return new Ce(e[0],[])},this.reduceActions[37]=function(e){return new Ce(e[0],e[2])},this.reduceActions[38]=function(e){return[e[0]]},this.reduceActions[39]=function(e){return e[2].unshift(e[0]),e[2]},this.reduceActions[43]=function(e){return new ve(!0,[])},this.reduceActions[44]=function(e){return e[1].absolute=!0,e[1]},this.reduceActions[46]=function(e){return new ve(!1,[e[0]])},this.reduceActions[47]=function(e){return e[0].steps.push(e[2]),e[0]},this.reduceActions[49]=function(e){return new Y(e[0],e[1],[])},this.reduceActions[50]=function(e){return new Y(Y.CHILD,e[0],[])},this.reduceActions[51]=function(e){return new Y(e[0],e[1],e[2])},this.reduceActions[52]=function(e){return new Y(Y.CHILD,e[0],e[1])},this.reduceActions[54]=function(e){return[e[0]]},this.reduceActions[55]=function(e){return e[1].unshift(e[0]),e[1]},this.reduceActions[56]=function(e){return e[0]=="ancestor"?Y.ANCESTOR:e[0]=="ancestor-or-self"?Y.ANCESTORORSELF:e[0]=="attribute"?Y.ATTRIBUTE:e[0]=="child"?Y.CHILD:e[0]=="descendant"?Y.DESCENDANT:e[0]=="descendant-or-self"?Y.DESCENDANTORSELF:e[0]=="following"?Y.FOLLOWING:e[0]=="following-sibling"?Y.FOLLOWINGSIBLING:e[0]=="namespace"?Y.NAMESPACE:e[0]=="parent"?Y.PARENT:e[0]=="preceding"?Y.PRECEDING:e[0]=="preceding-sibling"?Y.PRECEDINGSIBLING:e[0]=="self"?Y.SELF:-1},this.reduceActions[57]=function(e){return Y.ATTRIBUTE},this.reduceActions[59]=function(e){return e[0]=="comment"?b.commentTest:e[0]=="text"?b.textTest:e[0]=="processing-instruction"?b.anyPiTest:e[0]=="node"?b.nodeTest:new b(-1,void 0)},this.reduceActions[60]=function(e){return new b.PITest(e[2])},this.reduceActions[61]=function(e){return e[1]},this.reduceActions[63]=function(e){return e[1].absolute=!0,e[1].steps.unshift(new Y(Y.DESCENDANTORSELF,b.nodeTest,[])),e[1]},this.reduceActions[64]=function(e){return e[0].steps.push(new Y(Y.DESCENDANTORSELF,b.nodeTest,[])),e[0].steps.push(e[2]),e[0]},this.reduceActions[65]=function(e){return new Y(Y.SELF,b.nodeTest,[])},this.reduceActions[66]=function(e){return new Y(Y.PARENT,b.nodeTest,[])},this.reduceActions[67]=function(e){return new ne(e[1])},this.reduceActions[68]=function(e){return b.nameTestAny},this.reduceActions[69]=function(e){return new b.NameTestPrefixAny(e[0].split(":")[0])},this.reduceActions[70]=function(e){return new b.NameTestQName(e[0])}},g.actionTable=[" s s sssssssss s ss s ss"," s ","r rrrrrrrrr rrrrrrr rr r "," rrrrr "," s s sssssssss s ss s ss","rs rrrrrrrr s sssssrrrrrr rrs rs "," s s sssssssss s ss s ss"," s "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s "," s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr r ","a ","r s rr r ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrs rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r srrrrrrrr rrrrrrs rr sr ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r "," sssss ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrr rrrrr rr r "," s "," s "," rrrrr "," s s sssssssss s sss s ss","r srrrrrrrr rrrrrrs rr r "," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss ss s ss"," s s sssssssss s ss s ss"," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr rr "," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," rr "," s "," rs ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrr rr r "," r "," s ","r srrrrrrrr rrrrrrs rr r ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s s sssssssss s ss s ss","r rrrrrrrrr rrrrrrr rr rr "," r "],g.actionTableNumber=[` 1 0 /.-,+*)(' & %$ # "!`," J ","a aaaaaaaaa aaaaaaa aa a "," YYYYY ",` 1 0 /.-,+*)(' & %$ # "!`,`K1 KKKKKKKK . +*)('KKKKKK KK# K" `,` 1 0 /.-,+*)(' & %$ # "!`," N "," O ","e eeeeeeeee eeeeeee ee ee ","f fffffffff fffffff ff ff ","d ddddddddd ddddddd dd dd ","B BBBBBBBBB BBBBBBB BB BB ","A AAAAAAAAA AAAAAAA AA AA "," P "," Q ",` 1 . +*)(' # " `,"b bbbbbbbbb bbbbbbb bb b "," ","! S !! ! ",'" T" "" " ',"$ V $$ U $$ $ ","& &ZY&& &XW && & ",") ))))) )))\\[ )) ) ",". ....._^] ..... .. . ","1 11111111 11111 11 1 ","5 55555555 55555` 55 5 ","7 77777777 777777 77 7 ","9 99999999 999999 99 9 ",": c:::::::: ::::::b :: a: ","I fIIIIIIII IIIIIIe II I ","= ========= ======= == == ","? ????????? ??????? ?? ?? ","C CCCCCCCCC CCCCCCC CC CC ","J JJJJJJJJ JJJJJJ JJ J ","M MMMMMMMM MMMMMM MM M ","N NNNNNNNNN NNNNNNN NN N ","P PPPPPPPPP PPPPPPP PP P "," +*)(' ","R RRRRRRRRR RRRRRRR RR aR ","U UUUUUUUUU UUUUUUU UU U ","Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ","c ccccccccc ccccccc cc cc "," j ","L fLLLLLLLL LLLLLLe LL L ","6 66666666 66666 66 6 "," k "," l "," XXXXX ",` 1 0 /.-,+*)(' & %$m # "!`,"_ f________ ______e __ _ ",` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 . +*)(' # " `,` 1 . +*)(' # " `,"> >>>>>>>>> >>>>>>> >> >> ",` 1 . +*)(' # " `,` 1 . +*)(' # " `,"Q QQQQQQQQQ QQQQQQQ QQ aQ ","V VVVVVVVVV VVVVVVV VV aV ","T TTTTTTTTT TTTTTTT TT T ","@ @@@@@@@@@ @@@@@@@ @@ @@ "," ‡ ","[ [[[[[[[[[ [[[[[[[ [[ [[ ","D DDDDDDDDD DDDDDDD DD DD "," HH "," ˆ "," F‰ ","# T# ## # ","% V %% U %% % ","' 'ZY'' 'XW '' ' ","( (ZY(( (XW (( ( ","+ +++++ +++\\[ ++ + ","* ***** ***\\[ ** * ","- ----- ---\\[ -- - ",", ,,,,, ,,,\\[ ,, , ","0 00000_^] 00000 00 0 ","/ /////_^] ///// // / ","2 22222222 22222 22 2 ","3 33333333 33333 33 3 ","4 44444444 44444 44 4 ","8 88888888 888888 88 8 "," ^ "," Š ","; f;;;;;;;; ;;;;;;e ;; ; ","< f<<<<<<<< <<<<<<e << < ","O OOOOOOOOO OOOOOOO OO O ","` ````````` ``````` `` ` ","S SSSSSSSSS SSSSSSS SS S ","W WWWWWWWWW WWWWWWW WW W ","\\ \\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\ \\\\ \\\\ ","E EEEEEEEEE EEEEEEE EE EE ",` 1 0 /.-,+*)(' & %$ # "!`,"] ]]]]]]]]] ]]]]]]] ]] ]] "," G "],g.gotoTable=["3456789:;<=>?@ AB CDEFGH IJ "," "," "," ","L456789:;<=>?@ AB CDEFGH IJ "," M EFGH IJ "," N;<=>?@ AB CDEFGH IJ "," "," "," "," "," "," "," "," "," "," S EFGH IJ "," "," "," "," "," "," "," "," "," "," "," "," "," e "," "," "," "," "," "," "," "," "," h J "," i j "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABpqCDEFGH IJ "," "," r6789:;<=>?@ AB CDEFGH IJ "," s789:;<=>?@ AB CDEFGH IJ "," t89:;<=>?@ AB CDEFGH IJ "," u89:;<=>?@ AB CDEFGH IJ "," v9:;<=>?@ AB CDEFGH IJ "," w9:;<=>?@ AB CDEFGH IJ "," x9:;<=>?@ AB CDEFGH IJ "," y9:;<=>?@ AB CDEFGH IJ "," z:;<=>?@ AB CDEFGH IJ "," {:;<=>?@ AB CDEFGH IJ "," |;<=>?@ AB CDEFGH IJ "," };<=>?@ AB CDEFGH IJ "," ~;<=>?@ AB CDEFGH IJ "," =>?@ AB CDEFGH IJ ","€456789:;<=>?@ AB CDEFGH IJ"," ‚ EFGH IJ "," ƒ EFGH IJ "," "," „ GH IJ "," … GH IJ "," i † "," i ‡ "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABŒqCDEFGH IJ "," "," "],g.productions=[[1,1,2],[2,1,3],[3,1,4],[3,3,3,-9,4],[4,1,5],[4,3,4,-8,5],[5,1,6],[5,3,5,-22,6],[5,3,5,-5,6],[6,1,7],[6,3,6,-23,7],[6,3,6,-24,7],[6,3,6,-6,7],[6,3,6,-7,7],[7,1,8],[7,3,7,-25,8],[7,3,7,-26,8],[8,1,9],[8,3,8,-12,9],[8,3,8,-11,9],[8,3,8,-10,9],[9,1,10],[9,2,-26,9],[10,1,11],[10,3,10,-27,11],[11,1,12],[11,1,13],[11,3,13,-28,14],[11,3,13,-4,14],[13,1,15],[13,2,13,16],[15,1,17],[15,3,-29,2,-30],[15,1,-15],[15,1,-16],[15,1,18],[18,3,-13,-29,-30],[18,4,-13,-29,19,-30],[19,1,20],[19,3,20,-31,19],[20,1,2],[12,1,14],[12,1,21],[21,1,-28],[21,2,-28,14],[21,1,22],[14,1,23],[14,3,14,-28,23],[14,1,24],[23,2,25,26],[23,1,26],[23,3,25,26,27],[23,2,26,27],[23,1,28],[27,1,16],[27,2,16,27],[25,2,-14,-3],[25,1,-32],[26,1,29],[26,3,-20,-29,-30],[26,4,-21,-29,-15,-30],[16,3,-33,30,-34],[30,1,2],[22,2,-4,14],[24,3,14,-4,23],[28,1,-35],[28,1,-2],[17,2,-36,-18],[29,1,-17],[29,1,-19],[29,1,-18]],g.DOUBLEDOT=2,g.DOUBLECOLON=3,g.DOUBLESLASH=4,g.NOTEQUAL=5,g.LESSTHANOREQUAL=6,g.GREATERTHANOREQUAL=7,g.AND=8,g.OR=9,g.MOD=10,g.DIV=11,g.MULTIPLYOPERATOR=12,g.FUNCTIONNAME=13,g.AXISNAME=14,g.LITERAL=15,g.NUMBER=16,g.ASTERISKNAMETEST=17,g.QNAME=18,g.NCNAMECOLONASTERISK=19,g.NODETYPE=20,g.PROCESSINGINSTRUCTIONWITHLITERAL=21,g.EQUALS=22,g.LESSTHAN=23,g.GREATERTHAN=24,g.PLUS=25,g.MINUS=26,g.BAR=27,g.SLASH=28,g.LEFTPARENTHESIS=29,g.RIGHTPARENTHESIS=30,g.COMMA=31,g.AT=32,g.LEFTBRACKET=33,g.RIGHTBRACKET=34,g.DOT=35,g.DOLLAR=36,g.prototype.tokenize=function(e){for(var s=[],d=[],y=e+"\0",h=0,C=y.charAt(h++);;){for(;C==" "||C==" "||C=="\r"||C==`
9
+ `;)C=y.charAt(h++);if(C=="\0"||h>=y.length)break;if(C=="("){s.push(g.LEFTPARENTHESIS),d.push(C),C=y.charAt(h++);continue}if(C==")"){s.push(g.RIGHTPARENTHESIS),d.push(C),C=y.charAt(h++);continue}if(C=="["){s.push(g.LEFTBRACKET),d.push(C),C=y.charAt(h++);continue}if(C=="]"){s.push(g.RIGHTBRACKET),d.push(C),C=y.charAt(h++);continue}if(C=="@"){s.push(g.AT),d.push(C),C=y.charAt(h++);continue}if(C==","){s.push(g.COMMA),d.push(C),C=y.charAt(h++);continue}if(C=="|"){s.push(g.BAR),d.push(C),C=y.charAt(h++);continue}if(C=="+"){s.push(g.PLUS),d.push(C),C=y.charAt(h++);continue}if(C=="-"){s.push(g.MINUS),d.push(C),C=y.charAt(h++);continue}if(C=="="){s.push(g.EQUALS),d.push(C),C=y.charAt(h++);continue}if(C=="$"){s.push(g.DOLLAR),d.push(C),C=y.charAt(h++);continue}if(C=="."){if(C=y.charAt(h++),C=="."){s.push(g.DOUBLEDOT),d.push(".."),C=y.charAt(h++);continue}if(C>="0"&&C<="9"){var oe="."+C;for(C=y.charAt(h++);C>="0"&&C<="9";)oe+=C,C=y.charAt(h++);s.push(g.NUMBER),d.push(oe);continue}s.push(g.DOT),d.push(".");continue}if(C=="'"||C=='"'){for(var Ne=C,xe="";h<y.length&&(C=y.charAt(h))!==Ne;)xe+=C,h+=1;if(C!==Ne)throw Me.fromMessage("Unterminated string literal: "+Ne+xe);h+=1,s.push(g.LITERAL),d.push(xe),C=y.charAt(h++);continue}if(C>="0"&&C<="9"){var oe=C;for(C=y.charAt(h++);C>="0"&&C<="9";)oe+=C,C=y.charAt(h++);if(C=="."&&y.charAt(h)>="0"&&y.charAt(h)<="9")for(oe+=C,oe+=y.charAt(h++),C=y.charAt(h++);C>="0"&&C<="9";)oe+=C,C=y.charAt(h++);s.push(g.NUMBER),d.push(oe);continue}if(C=="*"){if(s.length>0){var se=s[s.length-1];if(se!=g.AT&&se!=g.DOUBLECOLON&&se!=g.LEFTPARENTHESIS&&se!=g.LEFTBRACKET&&se!=g.AND&&se!=g.OR&&se!=g.MOD&&se!=g.DIV&&se!=g.MULTIPLYOPERATOR&&se!=g.SLASH&&se!=g.DOUBLESLASH&&se!=g.BAR&&se!=g.PLUS&&se!=g.MINUS&&se!=g.EQUALS&&se!=g.NOTEQUAL&&se!=g.LESSTHAN&&se!=g.LESSTHANOREQUAL&&se!=g.GREATERTHAN&&se!=g.GREATERTHANOREQUAL){s.push(g.MULTIPLYOPERATOR),d.push(C),C=y.charAt(h++);continue}}s.push(g.ASTERISKNAMETEST),d.push(C),C=y.charAt(h++);continue}if(C==":"&&y.charAt(h)==":"){s.push(g.DOUBLECOLON),d.push("::"),h++,C=y.charAt(h++);continue}if(C=="/"){if(C=y.charAt(h++),C=="/"){s.push(g.DOUBLESLASH),d.push("//"),C=y.charAt(h++);continue}s.push(g.SLASH),d.push("/");continue}if(C=="!"&&y.charAt(h)=="="){s.push(g.NOTEQUAL),d.push("!="),h++,C=y.charAt(h++);continue}if(C=="<"){if(y.charAt(h)=="="){s.push(g.LESSTHANOREQUAL),d.push("<="),h++,C=y.charAt(h++);continue}s.push(g.LESSTHAN),d.push("<"),C=y.charAt(h++);continue}if(C==">"){if(y.charAt(h)=="="){s.push(g.GREATERTHANOREQUAL),d.push(">="),h++,C=y.charAt(h++);continue}s.push(g.GREATERTHAN),d.push(">"),C=y.charAt(h++);continue}if(C=="_"||de.isLetter(C.charCodeAt(0))){var fe=C;for(C=y.charAt(h++);de.isNCNameChar(C.charCodeAt(0));)fe+=C,C=y.charAt(h++);if(s.length>0){var se=s[s.length-1];if(se!=g.AT&&se!=g.DOUBLECOLON&&se!=g.LEFTPARENTHESIS&&se!=g.LEFTBRACKET&&se!=g.AND&&se!=g.OR&&se!=g.MOD&&se!=g.DIV&&se!=g.MULTIPLYOPERATOR&&se!=g.SLASH&&se!=g.DOUBLESLASH&&se!=g.BAR&&se!=g.PLUS&&se!=g.MINUS&&se!=g.EQUALS&&se!=g.NOTEQUAL&&se!=g.LESSTHAN&&se!=g.LESSTHANOREQUAL&&se!=g.GREATERTHAN&&se!=g.GREATERTHANOREQUAL){if(fe=="and"){s.push(g.AND),d.push(fe);continue}if(fe=="or"){s.push(g.OR),d.push(fe);continue}if(fe=="mod"){s.push(g.MOD),d.push(fe);continue}if(fe=="div"){s.push(g.DIV),d.push(fe);continue}}}if(C==":"){if(y.charAt(h)=="*"){s.push(g.NCNAMECOLONASTERISK),d.push(fe+":*"),h++,C=y.charAt(h++);continue}if(y.charAt(h)=="_"||de.isLetter(y.charCodeAt(h))){for(fe+=":",C=y.charAt(h++);de.isNCNameChar(C.charCodeAt(0));)fe+=C,C=y.charAt(h++);if(C=="("){s.push(g.FUNCTIONNAME),d.push(fe);continue}s.push(g.QNAME),d.push(fe);continue}if(y.charAt(h)==":"){s.push(g.AXISNAME),d.push(fe);continue}}if(C=="("){if(fe=="comment"||fe=="text"||fe=="node"){s.push(g.NODETYPE),d.push(fe);continue}if(fe=="processing-instruction"){y.charAt(h)==")"?s.push(g.NODETYPE):s.push(g.PROCESSINGINSTRUCTIONWITHLITERAL),d.push(fe);continue}s.push(g.FUNCTIONNAME),d.push(fe);continue}s.push(g.QNAME),d.push(fe);continue}throw new Error("Unexpected character "+C)}return s.push(1),d.push("[EOF]"),[s,d]},g.SHIFT="s",g.REDUCE="r",g.ACCEPT="a",g.prototype.parse=function(xe){if(!xe)throw new Error("XPath expression unspecified.");if(typeof xe!="string")throw new Error("XPath expression must be a string.");var s,d,y=this.tokenize(xe);if(y!=null){s=y[0],d=y[1];var h=0,C=[],oe=[],Ne=[],xe,se,fe;for(C.push(0),oe.push(1),Ne.push("_S"),se=s[h],fe=d[h++];;)switch(xe=C[C.length-1],g.actionTable[xe].charAt(se-1)){case g.SHIFT:oe.push(-se),Ne.push(fe),C.push(g.actionTableNumber[xe].charCodeAt(se-1)-32),se=s[h],fe=d[h++];break;case g.REDUCE:for(var Le=g.productions[g.actionTableNumber[xe].charCodeAt(se-1)-32][1],Ke=[],Be=0;Be<Le;Be++)oe.pop(),Ke.unshift(Ne.pop()),C.pop();var Qe=C[C.length-1];oe.push(g.productions[g.actionTableNumber[xe].charCodeAt(se-1)-32][0]),this.reduceActions[g.actionTableNumber[xe].charCodeAt(se-1)-32]==null?Ne.push(Ke[0]):Ne.push(this.reduceActions[g.actionTableNumber[xe].charCodeAt(se-1)-32](Ke)),C.push(g.gotoTable[Qe].charCodeAt(g.productions[g.actionTableNumber[xe].charCodeAt(se-1)-32][0]-2)-33);break;case g.ACCEPT:return new X(Ne.pop());default:throw new Error("XPath parse error")}}},X.prototype=new Object,X.prototype.constructor=X,X.superclass=Object.prototype;function X(e){this.expression=e}X.prototype.toString=function(){return this.expression.toString()};function w(e,s,d){s in e||(e[s]=d)}X.prototype.evaluate=function(e){var s=e.expressionContextNode;if(!(i(s)||c(s)))throw new Error("Context node does not appear to be a valid DOM node.");return e.contextNode=e.expressionContextNode,e.contextSize=1,e.contextPosition=1,e.isHtml&&(w(e,"caseInsensitive",!0),w(e,"allowAnyNamespaceForNoPrefix",!0)),w(e,"caseInsensitive",!1),this.expression.evaluate(e)},X.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",X.XMLNS_NAMESPACE_URI="http://www.w3.org/2000/xmlns/",v.prototype=new Object,v.prototype.constructor=v,v.superclass=Object.prototype;function v(){}v.prototype.init=function(){},v.prototype.toString=function(){return"<Expression>"},v.prototype.evaluate=function(e){throw new Error("Could not evaluate expression.")},$.prototype=new v,$.prototype.constructor=$,$.superclass=v.prototype;function $(e){arguments.length>0&&this.init(e)}$.prototype.init=function(e){this.rhs=e},R.prototype=new $,R.prototype.constructor=R,R.superclass=$.prototype;function R(e){arguments.length>0&&this.init(e)}R.prototype.init=function(e){R.superclass.init.call(this,e)},R.prototype.evaluate=function(e){return this.rhs.evaluate(e).number().negate()},R.prototype.toString=function(){return"-"+this.rhs.toString()},P.prototype=new v,P.prototype.constructor=P,P.superclass=v.prototype;function P(e,s){arguments.length>0&&this.init(e,s)}P.prototype.init=function(e,s){this.lhs=e,this.rhs=s},ee.prototype=new P,ee.prototype.constructor=ee,ee.superclass=P.prototype;function ee(e,s){arguments.length>0&&this.init(e,s)}ee.prototype.init=function(e,s){ee.superclass.init.call(this,e,s)},ee.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},ee.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?s:this.rhs.evaluate(e).bool()},ue.prototype=new P,ue.prototype.constructor=ue,ue.superclass=P.prototype;function ue(e,s){arguments.length>0&&this.init(e,s)}ue.prototype.init=function(e,s){ue.superclass.init.call(this,e,s)},ue.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},ue.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?this.rhs.evaluate(e).bool():s},me.prototype=new P,me.prototype.constructor=me,me.superclass=P.prototype;function me(e,s){arguments.length>0&&this.init(e,s)}me.prototype.init=function(e,s){me.superclass.init.call(this,e,s)},me.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},me.prototype.evaluate=function(e){return this.lhs.evaluate(e).equals(this.rhs.evaluate(e))},N.prototype=new P,N.prototype.constructor=N,N.superclass=P.prototype;function N(e,s){arguments.length>0&&this.init(e,s)}N.prototype.init=function(e,s){N.superclass.init.call(this,e,s)},N.prototype.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},N.prototype.evaluate=function(e){return this.lhs.evaluate(e).notequal(this.rhs.evaluate(e))},_.prototype=new P,_.prototype.constructor=_,_.superclass=P.prototype;function _(e,s){arguments.length>0&&this.init(e,s)}_.prototype.init=function(e,s){_.superclass.init.call(this,e,s)},_.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthan(this.rhs.evaluate(e))},_.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},W.prototype=new P,W.prototype.constructor=W,W.superclass=P.prototype;function W(e,s){arguments.length>0&&this.init(e,s)}W.prototype.init=function(e,s){W.superclass.init.call(this,e,s)},W.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthan(this.rhs.evaluate(e))},W.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},J.prototype=new P,J.prototype.constructor=J,J.superclass=P.prototype;function J(e,s){arguments.length>0&&this.init(e,s)}J.prototype.init=function(e,s){J.superclass.init.call(this,e,s)},J.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthanorequal(this.rhs.evaluate(e))},J.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},U.prototype=new P,U.prototype.constructor=U,U.superclass=P.prototype;function U(e,s){arguments.length>0&&this.init(e,s)}U.prototype.init=function(e,s){U.superclass.init.call(this,e,s)},U.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthanorequal(this.rhs.evaluate(e))},U.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},le.prototype=new P,le.prototype.constructor=le,le.superclass=P.prototype;function le(e,s){arguments.length>0&&this.init(e,s)}le.prototype.init=function(e,s){le.superclass.init.call(this,e,s)},le.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().plus(this.rhs.evaluate(e).number())},le.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},D.prototype=new P,D.prototype.constructor=D,D.superclass=P.prototype;function D(e,s){arguments.length>0&&this.init(e,s)}D.prototype.init=function(e,s){D.superclass.init.call(this,e,s)},D.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().minus(this.rhs.evaluate(e).number())},D.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},k.prototype=new P,k.prototype.constructor=k,k.superclass=P.prototype;function k(e,s){arguments.length>0&&this.init(e,s)}k.prototype.init=function(e,s){k.superclass.init.call(this,e,s)},k.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().multiply(this.rhs.evaluate(e).number())},k.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},K.prototype=new P,K.prototype.constructor=K,K.superclass=P.prototype;function K(e,s){arguments.length>0&&this.init(e,s)}K.prototype.init=function(e,s){K.superclass.init.call(this,e,s)},K.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().div(this.rhs.evaluate(e).number())},K.prototype.toString=function(){return"("+this.lhs.toString()+" div "+this.rhs.toString()+")"},z.prototype=new P,z.prototype.constructor=z,z.superclass=P.prototype;function z(e,s){arguments.length>0&&this.init(e,s)}z.prototype.init=function(e,s){z.superclass.init.call(this,e,s)},z.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().mod(this.rhs.evaluate(e).number())},z.prototype.toString=function(){return"("+this.lhs.toString()+" mod "+this.rhs.toString()+")"},Z.prototype=new P,Z.prototype.constructor=Z,Z.superclass=P.prototype;function Z(e,s){arguments.length>0&&this.init(e,s)}Z.prototype.init=function(e,s){Z.superclass.init.call(this,e,s)},Z.prototype.evaluate=function(e){return this.lhs.evaluate(e).nodeset().union(this.rhs.evaluate(e).nodeset())},Z.prototype.toString=function(){return T(Q,[this.lhs,this.rhs]).join(" | ")},I.prototype=new v,I.prototype.constructor=I,I.superclass=v.prototype;function I(e,s,d){arguments.length>0&&this.init(e,s,d)}I.prototype.init=function(e,s,d){I.superclass.init.call(this),this.filter=e,this.filterPredicates=s,this.locationPath=d};function te(e){for(;e&&e.parentNode;)e=e.parentNode;return e}var Ee=function(e,s,d,y){if(e.length===0)return d;var h=s.extend({});return m(function(C,oe){return h.contextSize=C.length,x(function(Ne,xe){return h.contextNode=Ne,h.contextPosition=xe+1,I.predicateMatches(oe,h)},C)},he(d,y),e)};I.getRoot=function(e,s){var d=s[0];if(d&&d.nodeType===V.DOCUMENT_NODE)return d;if(e.virtualRoot)return e.virtualRoot;if(!d)throw new Error("Context node not found when determining document root.");var y=d.ownerDocument;if(y)return y;for(var h=d;h.parentNode!=null;)h=h.parentNode;return h};var ye=function(e){var s=String(e.name);return s==="xmlns"?"":s.substring(0,6)==="xmlns:"?s.substring(6,s.length):null};I.applyStep=function(e,s,d){if(!d)throw new Error("Context node not found when evaluating XPath step: "+e);var y=[];switch(s.contextNode=d,e.axis){case Y.ANCESTOR:if(s.contextNode===s.virtualRoot)break;var h;for(s.contextNode.nodeType==V.ATTRIBUTE_NODE?h=I.getOwnerElement(s.contextNode):h=s.contextNode.parentNode;h!=null&&(e.nodeTest.matches(h,s)&&y.push(h),h!==s.virtualRoot);)h=h.parentNode;break;case Y.ANCESTORORSELF:for(var h=s.contextNode;h!=null&&(e.nodeTest.matches(h,s)&&y.push(h),h!==s.virtualRoot);h=h.nodeType==V.ATTRIBUTE_NODE?I.getOwnerElement(h):h.parentNode);break;case Y.ATTRIBUTE:var C=s.contextNode.attributes;if(C!=null)for(var oe=0;oe<C.length;oe++){var h=C.item(oe);e.nodeTest.matches(h,s)&&y.push(h)}break;case Y.CHILD:for(var h=s.contextNode.firstChild;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&y.push(h);break;case Y.DESCENDANT:for(var fe=[s.contextNode.firstChild];fe.length>0;)for(var h=fe.pop();h!=null;)e.nodeTest.matches(h,s)&&y.push(h),h.firstChild!=null?(fe.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case Y.DESCENDANTORSELF:e.nodeTest.matches(s.contextNode,s)&&y.push(s.contextNode);for(var fe=[s.contextNode.firstChild];fe.length>0;)for(var h=fe.pop();h!=null;)e.nodeTest.matches(h,s)&&y.push(h),h.firstChild!=null?(fe.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case Y.FOLLOWING:if(s.contextNode===s.virtualRoot)break;var fe=[];s.contextNode.firstChild!=null?fe.unshift(s.contextNode.firstChild):fe.unshift(s.contextNode.nextSibling);for(var h=s.contextNode.parentNode;h!=null&&h.nodeType!=V.DOCUMENT_NODE&&h!==s.virtualRoot;h=h.parentNode)fe.unshift(h.nextSibling);do for(var h=fe.pop();h!=null;)e.nodeTest.matches(h,s)&&y.push(h),h.firstChild!=null?(fe.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;while(fe.length>0);break;case Y.FOLLOWINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.nextSibling;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&y.push(h);break;case Y.NAMESPACE:var Ne={};if(s.contextNode.nodeType==V.ELEMENT_NODE){Ne.xml=new ze("xml",null,X.XML_NAMESPACE_URI,s.contextNode);for(var h=s.contextNode;h!=null&&h.nodeType==V.ELEMENT_NODE;h=h.parentNode)for(var oe=0;oe<h.attributes.length;oe++){var xe=h.attributes.item(oe),se=ye(xe);se!=null&&Ne[se]==null&&(Ne[se]=new ze(se,xe,xe.value,s.contextNode))}for(var se in Ne){var d=Ne[se];e.nodeTest.matches(d,s)&&y.push(d)}}break;case Y.PARENT:h=null,s.contextNode!==s.virtualRoot&&(s.contextNode.nodeType==V.ATTRIBUTE_NODE?h=I.getOwnerElement(s.contextNode):h=s.contextNode.parentNode),h!=null&&e.nodeTest.matches(h,s)&&y.push(h);break;case Y.PRECEDING:var fe;s.virtualRoot!=null?fe=[s.virtualRoot]:fe=[te(s.contextNode)];e:for(;fe.length>0;)for(var h=fe.pop();h!=null;){if(h==s.contextNode)break e;e.nodeTest.matches(h,s)&&y.unshift(h),h.firstChild!=null?(fe.push(h.nextSibling),h=h.firstChild):h=h.nextSibling}break;case Y.PRECEDINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.previousSibling;h!=null;h=h.previousSibling)e.nodeTest.matches(h,s)&&y.push(h);break;case Y.SELF:e.nodeTest.matches(s.contextNode,s)&&y.push(s.contextNode);break}return y};function we(e,s,d){return Ee(e.predicates,s,I.applyStep(e,s,d),L(Se,e.axis))}function ke(e,s,d){return q(T(we.bind(null,d,e),s))}I.applySteps=function(e,s,d){return m(ke.bind(null,s),d,e)},I.prototype.applyFilter=function(e,s){if(!this.filter)return{nodes:[e.contextNode]};var d=this.filter.evaluate(e);if(!de.instance_of(d,ae)){if(this.filterPredicates!=null&&this.filterPredicates.length>0||this.locationPath!=null)throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used");return{nonNodes:d}}return{nodes:Ee(this.filterPredicates||[],s,d.toUnsortedArray(),!1)}},I.applyLocationPath=function(e,s,d){if(!e)return d;var y=e.absolute?[I.getRoot(s,d)]:d;return I.applySteps(e.steps,s,y)},I.prototype.evaluate=function(e){var s=G(new He,e),d=this.applyFilter(e,s);if("nonNodes"in d)return d.nonNodes;var y=new ae;return y.addArray(I.applyLocationPath(this.locationPath,s,d.nodes)),y},I.predicateMatches=function(e,s){var d=e.evaluate(s);return de.instance_of(d,H)?s.contextPosition===d.numberValue():d.booleanValue()},I.predicateString=function(e){return j("[","]",e.toString())},I.predicatesString=function(e){return ie("",T(I.predicateString,e))},I.prototype.toString=function(){if(this.filter!=null){var e=Q(this.filter);return de.instance_of(this.filter,O)?j("'","'",e):this.filterPredicates!=null&&this.filterPredicates.length?j("(",")",e)+I.predicatesString(this.filterPredicates):this.locationPath!=null?e+(this.locationPath.absolute?"":"/")+Q(this.locationPath):e}return Q(this.locationPath)},I.getOwnerElement=function(e){if(e.ownerElement)return e.ownerElement;try{if(e.selectSingleNode)return e.selectSingleNode("..")}catch{}for(var s=e.nodeType==V.DOCUMENT_NODE?e:e.ownerDocument,d=s.getElementsByTagName("*"),y=0;y<d.length;y++)for(var h=d.item(y),C=h.attributes,oe=0;oe<C.length;oe++){var Ne=C.item(oe);if(Ne===e)return h}return null},ve.prototype=new Object,ve.prototype.constructor=ve,ve.superclass=Object.prototype;function ve(e,s){arguments.length>0&&this.init(e,s)}ve.prototype.init=function(e,s){this.absolute=e,this.steps=s},ve.prototype.toString=function(){return(this.absolute?"/":"")+T(Q,this.steps).join("/")},Y.prototype=new Object,Y.prototype.constructor=Y,Y.superclass=Object.prototype;function Y(e,s,d){arguments.length>0&&this.init(e,s,d)}Y.prototype.init=function(e,s,d){this.axis=e,this.nodeTest=s,this.predicates=d},Y.prototype.toString=function(){return Y.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+I.predicatesString(this.predicates)},Y.ANCESTOR=0,Y.ANCESTORORSELF=1,Y.ATTRIBUTE=2,Y.CHILD=3,Y.DESCENDANT=4,Y.DESCENDANTORSELF=5,Y.FOLLOWING=6,Y.FOLLOWINGSIBLING=7,Y.NAMESPACE=8,Y.PARENT=9,Y.PRECEDING=10,Y.PRECEDINGSIBLING=11,Y.SELF=12,Y.STEPNAMES=m(function(e,s){return e[s[0]]=s[1],e},{},[[Y.ANCESTOR,"ancestor"],[Y.ANCESTORORSELF,"ancestor-or-self"],[Y.ATTRIBUTE,"attribute"],[Y.CHILD,"child"],[Y.DESCENDANT,"descendant"],[Y.DESCENDANTORSELF,"descendant-or-self"],[Y.FOLLOWING,"following"],[Y.FOLLOWINGSIBLING,"following-sibling"],[Y.NAMESPACE,"namespace"],[Y.PARENT,"parent"],[Y.PRECEDING,"preceding"],[Y.PRECEDINGSIBLING,"preceding-sibling"],[Y.SELF,"self"]]);var Se=[Y.ANCESTOR,Y.ANCESTORORSELF,Y.PARENT,Y.PRECEDING,Y.PRECEDINGSIBLING];b.prototype=new Object,b.prototype.constructor=b,b.superclass=Object.prototype;function b(e,s){arguments.length>0&&this.init(e,s)}b.prototype.init=function(e,s){this.type=e,this.value=s},b.prototype.toString=function(){return"<unknown nodetest type>"},b.prototype.matches=function(e,s){console.warn("unknown node test type")},b.NAMETESTANY=0,b.NAMETESTPREFIXANY=1,b.NAMETESTQNAME=2,b.COMMENT=3,b.TEXT=4,b.PI=5,b.NODE=6,b.isNodeType=function(e){return function(s){return L(e,s.nodeType)}},b.makeNodeTestType=function(e,s,d){var y=d||function(){};return y.prototype=new b(e),y.prototype.constructor=y,G(y.prototype,s),y},b.makeNodeTypeTest=function(e,s,d){return new(b.makeNodeTestType(e,{matches:b.isNodeType(s),toString:F(d)}))},b.hasPrefix=function(e){return e.prefix||(e.nodeName||e.tagName).indexOf(":")!==-1},b.isElementOrAttribute=b.isNodeType([1,2]),b.nameSpaceMatches=function(e,s,d){var y=d.namespaceURI||"";if(!e)return!y||s.allowAnyNamespaceForNoPrefix&&!b.hasPrefix(d);var h=s.namespaceResolver.getNamespace(e,s.expressionContextNode);if(h==null)throw new Error("Cannot resolve QName "+e);return h===y},b.localNameMatches=function(e,s,d){var y=d.localName||d.nodeName;return s.caseInsensitive?e.toLowerCase()===y.toLowerCase():e===y},b.NameTestPrefixAny=b.makeNodeTestType(b.NAMETESTPREFIXANY,{matches:function(e,s){return b.isElementOrAttribute(e)&&b.nameSpaceMatches(this.prefix,s,e)},toString:function(){return this.prefix+":*"}},function(s){this.prefix=s}),b.NameTestQName=b.makeNodeTestType(b.NAMETESTQNAME,{matches:function(e,s){return b.isNodeType([V.ELEMENT_NODE,V.ATTRIBUTE_NODE,V.NAMESPACE_NODE])(e)&&b.nameSpaceMatches(this.prefix,s,e)&&b.localNameMatches(this.localName,s,e)},toString:function(){return this.name}},function(s){var d=s.split(":");this.name=s,this.prefix=d.length>1?d[0]:null,this.localName=d[d.length>1?1:0]}),b.PITest=b.makeNodeTestType(b.PI,{matches:function(e,s){return b.isNodeType([V.PROCESSING_INSTRUCTION_NODE])(e)&&(e.target||e.nodeName)===this.name},toString:function(){return j('processing-instruction("','")',this.name)}},function(e){this.name=e}),b.nameTestAny=b.makeNodeTypeTest(b.NAMETESTANY,[V.ELEMENT_NODE,V.ATTRIBUTE_NODE,V.NAMESPACE_NODE],"*"),b.textTest=b.makeNodeTypeTest(b.TEXT,[V.TEXT_NODE,V.CDATA_SECTION_NODE],"text()"),b.commentTest=b.makeNodeTypeTest(b.COMMENT,[V.COMMENT_NODE],"comment()"),b.nodeTest=b.makeNodeTypeTest(b.NODE,[V.ELEMENT_NODE,V.ATTRIBUTE_NODE,V.TEXT_NODE,V.CDATA_SECTION_NODE,V.PROCESSING_INSTRUCTION_NODE,V.COMMENT_NODE,V.DOCUMENT_NODE],"node()"),b.anyPiTest=b.makeNodeTypeTest(b.PI,[V.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),ne.prototype=new v,ne.prototype.constructor=ne,ne.superclass=v.prototype;function ne(e){arguments.length>0&&this.init(e)}ne.prototype.init=function(e){this.variable=e},ne.prototype.toString=function(){return"$"+this.variable},ne.prototype.evaluate=function(e){var s=de.resolveQName(this.variable,e.namespaceResolver,e.contextNode,!1);if(s[0]==null)throw new Error("Cannot resolve QName "+fn);var d=e.variableResolver.getVariable(s[1],s[0]);if(!d)throw Me.fromMessage("Undeclared variable: "+this.toString());return d},Ce.prototype=new v,Ce.prototype.constructor=Ce,Ce.superclass=v.prototype;function Ce(e,s){arguments.length>0&&this.init(e,s)}Ce.prototype.init=function(e,s){this.functionName=e,this.arguments=s},Ce.prototype.toString=function(){for(var e=this.functionName+"(",s=0;s<this.arguments.length;s++)s>0&&(e+=", "),e+=this.arguments[s].toString();return e+")"},Ce.prototype.evaluate=function(e){var s=Pe.getFunctionFromContext(this.functionName,e);if(!s)throw new Error("Unknown function "+this.functionName);var d=[e].concat(this.arguments);return s.apply(e.functionResolver.thisArg,d)};var be=new Object;be.equals=function(e,s){return e.equals(s)},be.notequal=function(e,s){return e.notequal(s)},be.lessthan=function(e,s){return e.lessthan(s)},be.greaterthan=function(e,s){return e.greaterthan(s)},be.lessthanorequal=function(e,s){return e.lessthanorequal(s)},be.greaterthanorequal=function(e,s){return e.greaterthanorequal(s)},O.prototype=new v,O.prototype.constructor=O,O.superclass=v.prototype;function O(e){arguments.length>0&&this.init(e)}O.prototype.init=function(e){this.str=String(e)},O.prototype.toString=function(){return this.str},O.prototype.evaluate=function(e){return this},O.prototype.string=function(){return this},O.prototype.number=function(){return new H(this.str)},O.prototype.bool=function(){return new pe(this.str)},O.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},O.prototype.stringValue=function(){return this.str},O.prototype.numberValue=function(){return this.number().numberValue()},O.prototype.booleanValue=function(){return this.bool().booleanValue()},O.prototype.equals=function(e){return de.instance_of(e,pe)?this.bool().equals(e):de.instance_of(e,H)?this.number().equals(e):de.instance_of(e,ae)?e.compareWithString(this,be.equals):new pe(this.str==e.str)},O.prototype.notequal=function(e){return de.instance_of(e,pe)?this.bool().notequal(e):de.instance_of(e,H)?this.number().notequal(e):de.instance_of(e,ae)?e.compareWithString(this,be.notequal):new pe(this.str!=e.str)},O.prototype.lessthan=function(e){return this.number().lessthan(e)},O.prototype.greaterthan=function(e){return this.number().greaterthan(e)},O.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},O.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},H.prototype=new v,H.prototype.constructor=H,H.superclass=v.prototype;function H(e){arguments.length>0&&this.init(e)}H.prototype.init=function(e){this.num=typeof e=="string"?this.parse(e):Number(e)},H.prototype.numberFormat=/^\s*-?[0-9]*\.?[0-9]+\s*$/,H.prototype.parse=function(e){return this.numberFormat.test(e)?parseFloat(e):Number.NaN};function Re(e){for(var s=e.split("e-"),d=s[0].replace(".",""),y=Number(s[1]),h=0;h<y-1;h+=1)d="0"+d;return"0."+d}function qe(e){for(var s=e.split("e"),d=s[0].replace(".",""),y=Number(s[1]),h=y+1-d.length,C=0;C<h;C+=1)d+="0";return d}H.prototype.toString=function(){var e=this.num.toString();return e.indexOf("e-")!==-1?Re(e):e.indexOf("e")!==-1?qe(e):e},H.prototype.evaluate=function(e){return this},H.prototype.string=function(){return new O(this.toString())},H.prototype.number=function(){return this},H.prototype.bool=function(){return new pe(this.num)},H.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},H.prototype.stringValue=function(){return this.string().stringValue()},H.prototype.numberValue=function(){return this.num},H.prototype.booleanValue=function(){return this.bool().booleanValue()},H.prototype.negate=function(){return new H(-this.num)},H.prototype.equals=function(e){return de.instance_of(e,pe)?this.bool().equals(e):de.instance_of(e,O)?this.equals(e.number()):de.instance_of(e,ae)?e.compareWithNumber(this,be.equals):new pe(this.num==e.num)},H.prototype.notequal=function(e){return de.instance_of(e,pe)?this.bool().notequal(e):de.instance_of(e,O)?this.notequal(e.number()):de.instance_of(e,ae)?e.compareWithNumber(this,be.notequal):new pe(this.num!=e.num)},H.prototype.lessthan=function(e){return de.instance_of(e,ae)?e.compareWithNumber(this,be.greaterthan):de.instance_of(e,pe)||de.instance_of(e,O)?this.lessthan(e.number()):new pe(this.num<e.num)},H.prototype.greaterthan=function(e){return de.instance_of(e,ae)?e.compareWithNumber(this,be.lessthan):de.instance_of(e,pe)||de.instance_of(e,O)?this.greaterthan(e.number()):new pe(this.num>e.num)},H.prototype.lessthanorequal=function(e){return de.instance_of(e,ae)?e.compareWithNumber(this,be.greaterthanorequal):de.instance_of(e,pe)||de.instance_of(e,O)?this.lessthanorequal(e.number()):new pe(this.num<=e.num)},H.prototype.greaterthanorequal=function(e){return de.instance_of(e,ae)?e.compareWithNumber(this,be.lessthanorequal):de.instance_of(e,pe)||de.instance_of(e,O)?this.greaterthanorequal(e.number()):new pe(this.num>=e.num)},H.prototype.plus=function(e){return new H(this.num+e.num)},H.prototype.minus=function(e){return new H(this.num-e.num)},H.prototype.multiply=function(e){return new H(this.num*e.num)},H.prototype.div=function(e){return new H(this.num/e.num)},H.prototype.mod=function(e){return new H(this.num%e.num)},pe.prototype=new v,pe.prototype.constructor=pe,pe.superclass=v.prototype;function pe(e){arguments.length>0&&this.init(e)}pe.prototype.init=function(e){this.b=!!e},pe.prototype.toString=function(){return this.b.toString()},pe.prototype.evaluate=function(e){return this},pe.prototype.string=function(){return new O(this.b)},pe.prototype.number=function(){return new H(this.b)},pe.prototype.bool=function(){return this},pe.prototype.nodeset=function(){throw new Error("Cannot convert boolean to nodeset")},pe.prototype.stringValue=function(){return this.string().stringValue()},pe.prototype.numberValue=function(){return this.number().numberValue()},pe.prototype.booleanValue=function(){return this.b},pe.prototype.not=function(){return new pe(!this.b)},pe.prototype.equals=function(e){return de.instance_of(e,O)||de.instance_of(e,H)?this.equals(e.bool()):de.instance_of(e,ae)?e.compareWithBoolean(this,be.equals):new pe(this.b==e.b)},pe.prototype.notequal=function(e){return de.instance_of(e,O)||de.instance_of(e,H)?this.notequal(e.bool()):de.instance_of(e,ae)?e.compareWithBoolean(this,be.notequal):new pe(this.b!=e.b)},pe.prototype.lessthan=function(e){return this.number().lessthan(e)},pe.prototype.greaterthan=function(e){return this.number().greaterthan(e)},pe.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},pe.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},pe.true_=new pe(!0),pe.false_=new pe(!1),Ie.prototype=new Object,Ie.prototype.constructor=Ie,Ie.superclass=Object.prototype;function Ie(e){this.init(e)}Ie.prototype.init=function(e){this.left=null,this.right=null,this.node=e,this.depth=1},Ie.prototype.balance=function(){var e=this.left==null?0:this.left.depth,s=this.right==null?0:this.right.depth;if(e>s+1){var d=this.left.left==null?0:this.left.left.depth,y=this.left.right==null?0:this.left.right.depth;d<y&&this.left.rotateRR(),this.rotateLL()}else if(e+1<s){var h=this.right.right==null?0:this.right.right.depth,C=this.right.left==null?0:this.right.left.depth;C>h&&this.right.rotateLL(),this.rotateRR()}},Ie.prototype.rotateLL=function(){var e=this.node,s=this.right;this.node=this.left.node,this.right=this.left,this.left=this.left.left,this.right.left=this.right.right,this.right.right=s,this.right.node=e,this.right.updateInNewLocation(),this.updateInNewLocation()},Ie.prototype.rotateRR=function(){var e=this.node,s=this.left;this.node=this.right.node,this.left=this.right,this.right=this.right.right,this.left.right=this.left.left,this.left.left=s,this.left.node=e,this.left.updateInNewLocation(),this.updateInNewLocation()},Ie.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},Ie.prototype.getDepthFromChildren=function(){this.depth=this.node==null?0:1,this.left!=null&&(this.depth=this.left.depth+1),this.right!=null&&this.depth<=this.right.depth&&(this.depth=this.right.depth+1)};function gt(e,s){if(e===s)return 0;if(e.compareDocumentPosition){var d=e.compareDocumentPosition(s);return d&1||d&10?1:d&20?-1:0}for(var y=0,h=0,C=e;C!=null;C=C.parentNode||C.ownerElement)y++;for(var oe=s;oe!=null;oe=oe.parentNode||oe.ownerElement)h++;if(y>h){for(;y>h;)e=e.parentNode||e.ownerElement,y--;if(e===s)return 1}else if(h>y){for(;h>y;)s=s.parentNode||s.ownerElement,h--;if(e===s)return-1}for(var Ne=e.parentNode||e.ownerElement,xe=s.parentNode||s.ownerElement;Ne!==xe;)e=Ne,s=xe,Ne=e.parentNode||e.ownerElement,xe=s.parentNode||s.ownerElement;var se=Et(e),fe=Et(s);if(se&&!fe)return-1;if(!se&&fe)return 1;if(e.isXPathNamespace){if(e.nodeValue===X.XML_NAMESPACE_URI||!s.isXPathNamespace)return-1;if(s.nodeValue===X.XML_NAMESPACE_URI)return 1}else if(s.isXPathNamespace)return 1;if(Ne)for(var Le=se?Ne.attributes:Ne.childNodes,Ke=Le.length,Be=e.baseNode||e,Qe=s.baseNode||s,Xe=0;Xe<Ke;Xe+=1){var ot=Le[Xe];if(ot===Be)return-1;if(ot===Qe)return 1}throw new Error("Unexpected: could not determine node order")}Ie.prototype.add=function(e){if(e===this.node)return!1;var s=gt(e,this.node),d=!1;return s==-1?this.left==null?(this.left=new Ie(e),d=!0):(d=this.left.add(e),d&&this.balance()):s==1&&(this.right==null?(this.right=new Ie(e),d=!0):(d=this.right.add(e),d&&this.balance())),d&&this.getDepthFromChildren(),d},ae.prototype=new v,ae.prototype.constructor=ae,ae.superclass=v.prototype;function ae(){this.init()}ae.prototype.init=function(){this.tree=null,this.nodes=[],this.size=0},ae.prototype.toString=function(){var e=this.first();return e==null?"":this.stringForNode(e)},ae.prototype.evaluate=function(e){return this},ae.prototype.string=function(){return new O(this.toString())},ae.prototype.stringValue=function(){return this.toString()},ae.prototype.number=function(){return new H(this.string())},ae.prototype.numberValue=function(){return Number(this.string())},ae.prototype.bool=function(){return new pe(this.booleanValue())},ae.prototype.booleanValue=function(){return!!this.size},ae.prototype.nodeset=function(){return this},ae.prototype.stringForNode=function(e){return e.nodeType==V.DOCUMENT_NODE||e.nodeType==V.ELEMENT_NODE||e.nodeType===V.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(e):e.nodeType===V.ATTRIBUTE_NODE?e.value||e.nodeValue:e.isNamespaceNode?e.namespace:e.nodeValue},ae.prototype.stringForContainerNode=function(e){for(var s="",d=e.firstChild;d!=null;d=d.nextSibling){var y=d.nodeType;(y===1||y===3||y===4||y===9||y===11)&&(s+=this.stringForNode(d))}return s},ae.prototype.buildTree=function(){if(!this.tree&&this.nodes.length){this.tree=new Ie(this.nodes[0]);for(var e=1;e<this.nodes.length;e+=1)this.tree.add(this.nodes[e])}return this.tree},ae.prototype.first=function(){var e=this.buildTree();if(e==null)return null;for(;e.left!=null;)e=e.left;return e.node},ae.prototype.add=function(e){for(var s=0;s<this.nodes.length;s+=1)if(e===this.nodes[s])return;this.tree=null,this.nodes.push(e),this.size+=1},ae.prototype.addArray=function(e){var s=this;p(function(d){s.add(d)},e)},ae.prototype.toArray=function(){var e=[];return this.toArrayRec(this.buildTree(),e),e},ae.prototype.toArrayRec=function(e,s){e!=null&&(this.toArrayRec(e.left,s),s.push(e.node),this.toArrayRec(e.right,s))},ae.prototype.toUnsortedArray=function(){return this.nodes.slice()},ae.prototype.compareWithString=function(e,s){for(var d=this.toUnsortedArray(),y=0;y<d.length;y++){var h=d[y],C=new O(this.stringForNode(h)),oe=s(C,e);if(oe.booleanValue())return oe}return new pe(!1)},ae.prototype.compareWithNumber=function(e,s){for(var d=this.toUnsortedArray(),y=0;y<d.length;y++){var h=d[y],C=new H(this.stringForNode(h)),oe=s(C,e);if(oe.booleanValue())return oe}return new pe(!1)},ae.prototype.compareWithBoolean=function(e,s){return s(this.bool(),e)},ae.prototype.compareWithNodeSet=function(e,s){for(var d=this.toUnsortedArray(),y=function(Ne,xe){return s(xe,Ne)},h=0;h<d.length;h++){var C=new O(this.stringForNode(d[h])),oe=e.compareWithString(C,y);if(oe.booleanValue())return oe}return new pe(!1)},ae.compareWith=A(function(e,s){return de.instance_of(s,O)?this.compareWithString(s,e):de.instance_of(s,H)?this.compareWithNumber(s,e):de.instance_of(s,pe)?this.compareWithBoolean(s,e):this.compareWithNodeSet(s,e)}),ae.prototype.equals=ae.compareWith(be.equals),ae.prototype.notequal=ae.compareWith(be.notequal),ae.prototype.lessthan=ae.compareWith(be.lessthan),ae.prototype.greaterthan=ae.compareWith(be.greaterthan),ae.prototype.lessthanorequal=ae.compareWith(be.lessthanorequal),ae.prototype.greaterthanorequal=ae.compareWith(be.greaterthanorequal),ae.prototype.union=function(e){var s=new ae;return s.addArray(this.toUnsortedArray()),s.addArray(e.toUnsortedArray()),s},ze.prototype=new Object,ze.prototype.constructor=ze,ze.superclass=Object.prototype;function ze(e,s,d,y){this.isXPathNamespace=!0,this.baseNode=s,this.ownerDocument=y.ownerDocument,this.nodeName=e,this.prefix=e,this.localName=e,this.namespaceURI=null,this.nodeValue=d,this.ownerElement=y,this.nodeType=V.NAMESPACE_NODE}ze.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},He.prototype=new Object,He.prototype.constructor=He,He.superclass=Object.prototype;function He(e,s,d){this.variableResolver=e??new Ge,this.namespaceResolver=s??new je,this.functionResolver=d??new Pe}He.prototype.extend=function(e){return G(new He,this,e)},Ge.prototype=new Object,Ge.prototype.constructor=Ge,Ge.superclass=Object.prototype;function Ge(){}Ge.prototype.getVariable=function(e,s){return null},Pe.prototype=new Object,Pe.prototype.constructor=Pe,Pe.superclass=Object.prototype;function Pe(e){this.thisArg=e??ge,this.functions=new Object,this.addStandardFunctions()}Pe.prototype.addStandardFunctions=function(){this.functions["{}last"]=ge.last,this.functions["{}position"]=ge.position,this.functions["{}count"]=ge.count,this.functions["{}id"]=ge.id,this.functions["{}local-name"]=ge.localName,this.functions["{}namespace-uri"]=ge.namespaceURI,this.functions["{}name"]=ge.name,this.functions["{}string"]=ge.string,this.functions["{}concat"]=ge.concat,this.functions["{}starts-with"]=ge.startsWith,this.functions["{}contains"]=ge.contains,this.functions["{}substring-before"]=ge.substringBefore,this.functions["{}substring-after"]=ge.substringAfter,this.functions["{}substring"]=ge.substring,this.functions["{}string-length"]=ge.stringLength,this.functions["{}normalize-space"]=ge.normalizeSpace,this.functions["{}translate"]=ge.translate,this.functions["{}boolean"]=ge.boolean_,this.functions["{}not"]=ge.not,this.functions["{}true"]=ge.true_,this.functions["{}false"]=ge.false_,this.functions["{}lang"]=ge.lang,this.functions["{}number"]=ge.number,this.functions["{}sum"]=ge.sum,this.functions["{}floor"]=ge.floor,this.functions["{}ceiling"]=ge.ceiling,this.functions["{}round"]=ge.round},Pe.prototype.addFunction=function(e,s,d){this.functions["{"+e+"}"+s]=d},Pe.getFunctionFromContext=function(e,s){var d=de.resolveQName(e,s.namespaceResolver,s.contextNode,!1);if(d[0]===null)throw new Error("Cannot resolve QName "+name);return s.functionResolver.getFunction(d[1],d[0])},Pe.prototype.getFunction=function(e,s){return this.functions["{"+s+"}"+e]},je.prototype=new Object,je.prototype.constructor=je,je.superclass=Object.prototype;function je(){}je.prototype.getNamespace=function(e,s){if(e=="xml")return X.XML_NAMESPACE_URI;if(e=="xmlns")return X.XMLNS_NAMESPACE_URI;for(s.nodeType==V.DOCUMENT_NODE?s=s.documentElement:s.nodeType==V.ATTRIBUTE_NODE?s=I.getOwnerElement(s):s.nodeType!=V.ELEMENT_NODE&&(s=s.parentNode);s!=null&&s.nodeType==V.ELEMENT_NODE;){for(var d=s.attributes,y=0;y<d.length;y++){var h=d.item(y),C=h.name||h.nodeName;if(C==="xmlns"&&e===""||C==="xmlns:"+e)return String(h.value||h.nodeValue)}s=s.parentNode}return null};var ge=new Object;ge.last=function(e){if(arguments.length!=1)throw new Error("Function last expects ()");return new H(e.contextSize)},ge.position=function(e){if(arguments.length!=1)throw new Error("Function position expects ()");return new H(e.contextPosition)},ge.count=function(){var e=arguments[0],s;if(arguments.length!=2||!de.instance_of(s=arguments[1].evaluate(e),ae))throw new Error("Function count expects (node-set)");return new H(s.size)},ge.id=function(){var e=arguments[0],s;if(arguments.length!=2)throw new Error("Function id expects (object)");s=arguments[1].evaluate(e),de.instance_of(s,ae)?s=s.toArray().join(" "):s=s.stringValue();for(var d=s.split(/[\x0d\x0a\x09\x20]+/),y=new ae,h=e.contextNode.nodeType==V.DOCUMENT_NODE?e.contextNode:e.contextNode.ownerDocument,C=0;C<d.length;C++){var oe;h.getElementById?oe=h.getElementById(d[C]):oe=de.getElementById(h,d[C]),oe!=null&&y.add(oe)}return y},ge.localName=function(e,s){var d;if(arguments.length==1)d=e.contextNode;else if(arguments.length==2)d=s.evaluate(e).first();else throw new Error("Function local-name expects (node-set?)");return d==null?new O(""):new O(d.localName||d.baseName||d.target||d.nodeName||"")},ge.namespaceURI=function(){var e=arguments[0],s;if(arguments.length==1)s=e.contextNode;else if(arguments.length==2)s=arguments[1].evaluate(e).first();else throw new Error("Function namespace-uri expects (node-set?)");return s==null?new O(""):new O(s.namespaceURI||"")},ge.name=function(){var e=arguments[0],s;if(arguments.length==1)s=e.contextNode;else if(arguments.length==2)s=arguments[1].evaluate(e).first();else throw new Error("Function name expects (node-set?)");return s==null?new O(""):s.nodeType==V.ELEMENT_NODE?new O(s.nodeName):s.nodeType==V.ATTRIBUTE_NODE?new O(s.name||s.nodeName):s.nodeType===V.PROCESSING_INSTRUCTION_NODE?new O(s.target||s.nodeName):s.localName==null?new O(""):new O(s.localName)},ge.string=function(){var e=arguments[0];if(arguments.length==1)return new O(ae.prototype.stringForNode(e.contextNode));if(arguments.length==2)return arguments[1].evaluate(e).string();throw new Error("Function string expects (object?)")},ge.concat=function(e){if(arguments.length<3)throw new Error("Function concat expects (string, string[, string]*)");for(var s="",d=1;d<arguments.length;d++)s+=arguments[d].evaluate(e).stringValue();return new O(s)},ge.startsWith=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function startsWith expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new pe(s.substring(0,d.length)==d)},ge.contains=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function contains expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new pe(s.indexOf(d)!==-1)},ge.substringBefore=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-before expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new O(s.substring(0,s.indexOf(d)))},ge.substringAfter=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-after expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();if(d.length==0)return new O(s);var y=s.indexOf(d);return y==-1?new O(""):new O(s.substring(y+d.length))},ge.substring=function(){var e=arguments[0];if(!(arguments.length==3||arguments.length==4))throw new Error("Function substring expects (string, number, number?)");var s=arguments[1].evaluate(e).stringValue(),d=Math.round(arguments[2].evaluate(e).numberValue())-1,y=arguments.length==4?d+Math.round(arguments[3].evaluate(e).numberValue()):void 0;return new O(s.substring(d,y))},ge.stringLength=function(){var e=arguments[0],s;if(arguments.length==1)s=ae.prototype.stringForNode(e.contextNode);else if(arguments.length==2)s=arguments[1].evaluate(e).stringValue();else throw new Error("Function string-length expects (string?)");return new H(s.length)},ge.normalizeSpace=function(){var e=arguments[0],s;if(arguments.length==1)s=ae.prototype.stringForNode(e.contextNode);else if(arguments.length==2)s=arguments[1].evaluate(e).stringValue();else throw new Error("Function normalize-space expects (string?)");for(var d=0,y=s.length-1;de.isSpace(s.charCodeAt(y));)y--;for(var h="";d<=y&&de.isSpace(s.charCodeAt(d));)d++;for(;d<=y;)if(de.isSpace(s.charCodeAt(d)))for(h+=" ";d<=y&&de.isSpace(s.charCodeAt(d));)d++;else h+=s.charAt(d),d++;return new O(h)},ge.translate=function(e,s,d,y){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var h=s.evaluate(e).stringValue(),C=d.evaluate(e).stringValue(),oe=y.evaluate(e).stringValue(),Ne=m(function(se,fe,Le){return fe in se||(se[fe]=Le>oe.length?"":oe[Le]),se},{},C),xe=ie("",T(function(se){return se in Ne?Ne[se]:se},h));return new O(xe)},ge.boolean_=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function boolean expects (object)");return arguments[1].evaluate(e).bool()},ge.not=function(e,s){if(arguments.length!=2)throw new Error("Function not expects (object)");return s.evaluate(e).bool().not()},ge.true_=function(){if(arguments.length!=1)throw new Error("Function true expects ()");return pe.true_},ge.false_=function(){if(arguments.length!=1)throw new Error("Function false expects ()");return pe.false_},ge.lang=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function lang expects (string)");for(var s,d=e.contextNode;d!=null&&d.nodeType!=V.DOCUMENT_NODE;d=d.parentNode){var y=d.getAttributeNS(X.XML_NAMESPACE_URI,"lang");if(y!=null){s=String(y);break}}if(s==null)return pe.false_;var h=arguments[1].evaluate(e).stringValue();return new pe(s.substring(0,h.length)==h&&(s.length==h.length||s.charAt(h.length)=="-"))},ge.number=function(){var e=arguments[0];if(!(arguments.length==1||arguments.length==2))throw new Error("Function number expects (object?)");return arguments.length==1?new H(ae.prototype.stringForNode(e.contextNode)):arguments[1].evaluate(e).number()},ge.sum=function(){var e=arguments[0],s;if(arguments.length!=2||!de.instance_of(s=arguments[1].evaluate(e),ae))throw new Error("Function sum expects (node-set)");s=s.toUnsortedArray();for(var d=0,y=0;y<s.length;y++)d+=new H(ae.prototype.stringForNode(s[y])).numberValue();return new H(d)},ge.floor=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new H(Math.floor(arguments[1].evaluate(e).numberValue()))},ge.ceiling=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function ceiling expects (number)");return new H(Math.ceil(arguments[1].evaluate(e).numberValue()))},ge.round=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function round expects (number)");return new H(Math.round(arguments[1].evaluate(e).numberValue()))};var de=new Object,Et=function(e){return e&&(e.nodeType===V.ATTRIBUTE_NODE||e.ownerElement||e.isXPathNamespace)};de.splitQName=function(e){var s=e.indexOf(":");return s==-1?[null,e]:[e.substring(0,s),e.substring(s+1)]},de.resolveQName=function(e,s,d,y){var h=de.splitQName(e);return h[0]!=null?h[0]=s.getNamespace(h[0],d):y?(h[0]=s.getNamespace("",d),h[0]==null&&(h[0]="")):h[0]="",h},de.isSpace=function(e){return e==9||e==13||e==10||e==32},de.isLetter=function(e){return e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=255||e>=256&&e<=305||e>=308&&e<=318||e>=321&&e<=328||e>=330&&e<=382||e>=384&&e<=451||e>=461&&e<=496||e>=500&&e<=501||e>=506&&e<=535||e>=592&&e<=680||e>=699&&e<=705||e==902||e>=904&&e<=906||e==908||e>=910&&e<=929||e>=931&&e<=974||e>=976&&e<=982||e==986||e==988||e==990||e==992||e>=994&&e<=1011||e>=1025&&e<=1036||e>=1038&&e<=1103||e>=1105&&e<=1116||e>=1118&&e<=1153||e>=1168&&e<=1220||e>=1223&&e<=1224||e>=1227&&e<=1228||e>=1232&&e<=1259||e>=1262&&e<=1269||e>=1272&&e<=1273||e>=1329&&e<=1366||e==1369||e>=1377&&e<=1414||e>=1488&&e<=1514||e>=1520&&e<=1522||e>=1569&&e<=1594||e>=1601&&e<=1610||e>=1649&&e<=1719||e>=1722&&e<=1726||e>=1728&&e<=1742||e>=1744&&e<=1747||e==1749||e>=1765&&e<=1766||e>=2309&&e<=2361||e==2365||e>=2392&&e<=2401||e>=2437&&e<=2444||e>=2447&&e<=2448||e>=2451&&e<=2472||e>=2474&&e<=2480||e==2482||e>=2486&&e<=2489||e>=2524&&e<=2525||e>=2527&&e<=2529||e>=2544&&e<=2545||e>=2565&&e<=2570||e>=2575&&e<=2576||e>=2579&&e<=2600||e>=2602&&e<=2608||e>=2610&&e<=2611||e>=2613&&e<=2614||e>=2616&&e<=2617||e>=2649&&e<=2652||e==2654||e>=2674&&e<=2676||e>=2693&&e<=2699||e==2701||e>=2703&&e<=2705||e>=2707&&e<=2728||e>=2730&&e<=2736||e>=2738&&e<=2739||e>=2741&&e<=2745||e==2749||e==2784||e>=2821&&e<=2828||e>=2831&&e<=2832||e>=2835&&e<=2856||e>=2858&&e<=2864||e>=2866&&e<=2867||e>=2870&&e<=2873||e==2877||e>=2908&&e<=2909||e>=2911&&e<=2913||e>=2949&&e<=2954||e>=2958&&e<=2960||e>=2962&&e<=2965||e>=2969&&e<=2970||e==2972||e>=2974&&e<=2975||e>=2979&&e<=2980||e>=2984&&e<=2986||e>=2990&&e<=2997||e>=2999&&e<=3001||e>=3077&&e<=3084||e>=3086&&e<=3088||e>=3090&&e<=3112||e>=3114&&e<=3123||e>=3125&&e<=3129||e>=3168&&e<=3169||e>=3205&&e<=3212||e>=3214&&e<=3216||e>=3218&&e<=3240||e>=3242&&e<=3251||e>=3253&&e<=3257||e==3294||e>=3296&&e<=3297||e>=3333&&e<=3340||e>=3342&&e<=3344||e>=3346&&e<=3368||e>=3370&&e<=3385||e>=3424&&e<=3425||e>=3585&&e<=3630||e==3632||e>=3634&&e<=3635||e>=3648&&e<=3653||e>=3713&&e<=3714||e==3716||e>=3719&&e<=3720||e==3722||e==3725||e>=3732&&e<=3735||e>=3737&&e<=3743||e>=3745&&e<=3747||e==3749||e==3751||e>=3754&&e<=3755||e>=3757&&e<=3758||e==3760||e>=3762&&e<=3763||e==3773||e>=3776&&e<=3780||e>=3904&&e<=3911||e>=3913&&e<=3945||e>=4256&&e<=4293||e>=4304&&e<=4342||e==4352||e>=4354&&e<=4355||e>=4357&&e<=4359||e==4361||e>=4363&&e<=4364||e>=4366&&e<=4370||e==4412||e==4414||e==4416||e==4428||e==4430||e==4432||e>=4436&&e<=4437||e==4441||e>=4447&&e<=4449||e==4451||e==4453||e==4455||e==4457||e>=4461&&e<=4462||e>=4466&&e<=4467||e==4469||e==4510||e==4520||e==4523||e>=4526&&e<=4527||e>=4535&&e<=4536||e==4538||e>=4540&&e<=4546||e==4587||e==4592||e==4601||e>=7680&&e<=7835||e>=7840&&e<=7929||e>=7936&&e<=7957||e>=7960&&e<=7965||e>=7968&&e<=8005||e>=8008&&e<=8013||e>=8016&&e<=8023||e==8025||e==8027||e==8029||e>=8031&&e<=8061||e>=8064&&e<=8116||e>=8118&&e<=8124||e==8126||e>=8130&&e<=8132||e>=8134&&e<=8140||e>=8144&&e<=8147||e>=8150&&e<=8155||e>=8160&&e<=8172||e>=8178&&e<=8180||e>=8182&&e<=8188||e==8486||e>=8490&&e<=8491||e==8494||e>=8576&&e<=8578||e>=12353&&e<=12436||e>=12449&&e<=12538||e>=12549&&e<=12588||e>=44032&&e<=55203||e>=19968&&e<=40869||e==12295||e>=12321&&e<=12329},de.isNCNameChar=function(e){return e>=48&&e<=57||e>=1632&&e<=1641||e>=1776&&e<=1785||e>=2406&&e<=2415||e>=2534&&e<=2543||e>=2662&&e<=2671||e>=2790&&e<=2799||e>=2918&&e<=2927||e>=3047&&e<=3055||e>=3174&&e<=3183||e>=3302&&e<=3311||e>=3430&&e<=3439||e>=3664&&e<=3673||e>=3792&&e<=3801||e>=3872&&e<=3881||e==46||e==45||e==95||de.isLetter(e)||e>=768&&e<=837||e>=864&&e<=865||e>=1155&&e<=1158||e>=1425&&e<=1441||e>=1443&&e<=1465||e>=1467&&e<=1469||e==1471||e>=1473&&e<=1474||e==1476||e>=1611&&e<=1618||e==1648||e>=1750&&e<=1756||e>=1757&&e<=1759||e>=1760&&e<=1764||e>=1767&&e<=1768||e>=1770&&e<=1773||e>=2305&&e<=2307||e==2364||e>=2366&&e<=2380||e==2381||e>=2385&&e<=2388||e>=2402&&e<=2403||e>=2433&&e<=2435||e==2492||e==2494||e==2495||e>=2496&&e<=2500||e>=2503&&e<=2504||e>=2507&&e<=2509||e==2519||e>=2530&&e<=2531||e==2562||e==2620||e==2622||e==2623||e>=2624&&e<=2626||e>=2631&&e<=2632||e>=2635&&e<=2637||e>=2672&&e<=2673||e>=2689&&e<=2691||e==2748||e>=2750&&e<=2757||e>=2759&&e<=2761||e>=2763&&e<=2765||e>=2817&&e<=2819||e==2876||e>=2878&&e<=2883||e>=2887&&e<=2888||e>=2891&&e<=2893||e>=2902&&e<=2903||e>=2946&&e<=2947||e>=3006&&e<=3010||e>=3014&&e<=3016||e>=3018&&e<=3021||e==3031||e>=3073&&e<=3075||e>=3134&&e<=3140||e>=3142&&e<=3144||e>=3146&&e<=3149||e>=3157&&e<=3158||e>=3202&&e<=3203||e>=3262&&e<=3268||e>=3270&&e<=3272||e>=3274&&e<=3277||e>=3285&&e<=3286||e>=3330&&e<=3331||e>=3390&&e<=3395||e>=3398&&e<=3400||e>=3402&&e<=3405||e==3415||e==3633||e>=3636&&e<=3642||e>=3655&&e<=3662||e==3761||e>=3764&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=3864&&e<=3865||e==3893||e==3895||e==3897||e==3902||e==3903||e>=3953&&e<=3972||e>=3974&&e<=3979||e>=3984&&e<=3989||e==3991||e>=3993&&e<=4013||e>=4017&&e<=4023||e==4025||e>=8400&&e<=8412||e==8417||e>=12330&&e<=12335||e==12441||e==12442||e==183||e==720||e==721||e==903||e==1600||e==3654||e==3782||e==12293||e>=12337&&e<=12341||e>=12445&&e<=12446||e>=12540&&e<=12542},de.coalesceText=function(e){for(var s=e.firstChild;s!=null;s=s.nextSibling)if(s.nodeType==V.TEXT_NODE||s.nodeType==V.CDATA_SECTION_NODE){var d=s.nodeValue,y=s;for(s=s.nextSibling;s!=null&&(s.nodeType==V.TEXT_NODE||s.nodeType==V.CDATA_SECTION_NODE);){d+=s.nodeValue;var h=s;s=s.nextSibling,h.parentNode.removeChild(h)}if(y.nodeType==V.CDATA_SECTION_NODE){var C=y.parentNode;if(y.nextSibling==null)C.removeChild(y),C.appendChild(C.ownerDocument.createTextNode(d));else{var oe=y.nextSibling;C.removeChild(y),C.insertBefore(C.ownerDocument.createTextNode(d),oe)}}else y.nodeValue=d;if(s==null)break}else s.nodeType==V.ELEMENT_NODE&&de.coalesceText(s)},de.instance_of=function(e,s){for(;e!=null;){if(e.constructor===s)return!0;if(e===Object)return!1;e=e.constructor.superclass}return!1},de.getElementById=function(e,s){if(e.nodeType==V.ELEMENT_NODE&&(e.getAttribute("id")==s||e.getAttributeNS(null,"id")==s))return e;for(var d=e.firstChild;d!=null;d=d.nextSibling){var y=de.getElementById(d,s);if(y!=null)return y}return null};var Me=function(){function e(d,y){var h=y?": "+y.toString():"";switch(d){case s.INVALID_EXPRESSION_ERR:return"Invalid expression"+h;case s.TYPE_ERR:return"Type error"+h}return null}function s(d,y,h){var C=Error.call(this,e(d,y)||h);return C.code=d,C.exception=y,C}return s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.superclass=Error,s.prototype.toString=function(){return this.message},s.fromMessage=function(d,y){return new s(null,y,d)},s.INVALID_EXPRESSION_ERR=51,s.TYPE_ERR=52,s}();Fe.prototype={},Fe.prototype.constructor=Fe,Fe.superclass=Object.prototype;function Fe(e,s,d){this.xpath=d.parse(e),this.context=new He,this.context.namespaceResolver=new tt(s)}Fe.getOwnerDocument=function(e){return e.nodeType===V.DOCUMENT_NODE?e:e.ownerDocument},Fe.detectHtmlDom=function(e){if(!e)return!1;var s=Fe.getOwnerDocument(e);try{return s.implementation.hasFeature("HTML","2.0")}catch{return!0}},Fe.prototype.evaluate=function(e,s,d){this.context.expressionContextNode=e,this.context.caseInsensitive=Fe.detectHtmlDom(e);var y=this.xpath.evaluate(this.context);return new Ae(y,s)},tt.prototype={},tt.prototype.constructor=tt,tt.superclass=Object.prototype;function tt(e){this.xpathNSResolver=e}tt.prototype.getNamespace=function(e,s){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(e)},Ye.prototype={},Ye.prototype.constructor=Ye,Ye.superclass=Object.prototype;function Ye(e){this.node=e,this.namespaceResolver=new je}Ye.prototype.lookupNamespaceURI=function(e){return this.namespaceResolver.getNamespace(e,this.node)},Ae.prototype={},Ae.prototype.constructor=Ae,Ae.superclass=Object.prototype;function Ae(e,s){switch(s==Ae.ANY_TYPE&&(e.constructor===O?s=Ae.STRING_TYPE:e.constructor===H?s=Ae.NUMBER_TYPE:e.constructor===pe?s=Ae.BOOLEAN_TYPE:e.constructor===ae&&(s=Ae.UNORDERED_NODE_ITERATOR_TYPE)),this.resultType=s,s){case Ae.NUMBER_TYPE:this.numberValue=e.numberValue();return;case Ae.STRING_TYPE:this.stringValue=e.stringValue();return;case Ae.BOOLEAN_TYPE:this.booleanValue=e.booleanValue();return;case Ae.ANY_UNORDERED_NODE_TYPE:case Ae.FIRST_ORDERED_NODE_TYPE:if(e.constructor===ae){this.singleNodeValue=e.first();return}break;case Ae.UNORDERED_NODE_ITERATOR_TYPE:case Ae.ORDERED_NODE_ITERATOR_TYPE:if(e.constructor===ae){this.invalidIteratorState=!1,this.nodes=e.toArray(),this.iteratorIndex=0;return}break;case Ae.UNORDERED_NODE_SNAPSHOT_TYPE:case Ae.ORDERED_NODE_SNAPSHOT_TYPE:if(e.constructor===ae){this.nodes=e.toArray(),this.snapshotLength=this.nodes.length;return}break}throw new Me(Me.TYPE_ERR)}Ae.prototype.iterateNext=function(){if(this.resultType!=Ae.UNORDERED_NODE_ITERATOR_TYPE&&this.resultType!=Ae.ORDERED_NODE_ITERATOR_TYPE)throw new Me(Me.TYPE_ERR);return this.nodes[this.iteratorIndex++]},Ae.prototype.snapshotItem=function(e){if(this.resultType!=Ae.UNORDERED_NODE_SNAPSHOT_TYPE&&this.resultType!=Ae.ORDERED_NODE_SNAPSHOT_TYPE)throw new Me(Me.TYPE_ERR);return this.nodes[e]},Ae.ANY_TYPE=0,Ae.NUMBER_TYPE=1,Ae.STRING_TYPE=2,Ae.BOOLEAN_TYPE=3,Ae.UNORDERED_NODE_ITERATOR_TYPE=4,Ae.ORDERED_NODE_ITERATOR_TYPE=5,Ae.UNORDERED_NODE_SNAPSHOT_TYPE=6,Ae.ORDERED_NODE_SNAPSHOT_TYPE=7,Ae.ANY_UNORDERED_NODE_TYPE=8,Ae.FIRST_ORDERED_NODE_TYPE=9;function l(e,s){e.createExpression=function(d,y){try{return new Fe(d,y,s)}catch(h){throw new Me(Me.INVALID_EXPRESSION_ERR,h)}},e.createNSResolver=function(d){return new Ye(d)},e.evaluate=function(d,y,h,C,oe){if(C<0||C>9)throw{code:0,toString:function(){return"Request type not supported"}};return e.createExpression(d,h,s).evaluate(y,C,oe)}}try{var f=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(f=!1)}catch{}f&&l(document,new g)}catch{}l(r,new g),function(){var e=new g,s=new je,d=new Pe,y=new Ge;function h(re){return{getNamespace:function(De,Ue){var st=re(De,Ue);return st||s.getNamespace(De,Ue)}}}function C(re){return h(re.getNamespace.bind(re))}function oe(re){return h(function(De){return re[De]})}function Ne(re){return re&&typeof re.getNamespace=="function"?C(re):typeof re=="function"?h(re):typeof re=="object"?oe(re):s}function xe(re){if(re===null||typeof re>"u"||re instanceof O||re instanceof pe||re instanceof H||re instanceof ae)return re;switch(typeof re){case"string":return new O(re);case"boolean":return new pe(re);case"number":return new H(re)}var De=new ae;return De.addArray([].concat(re)),De}function se(re){return function(De){var Ue=Array.prototype.slice.call(arguments,1).map(function(ui){return ui.evaluate(De)}),st=re.apply(this,[].concat(De,Ue));return xe(st)}}function fe(re){return{getFunction:function(De,Ue){var st=re(De,Ue);return st?se(st):d.getFunction(De,Ue)}}}function Le(re){return fe(re.getFunction.bind(re))}function Ke(re){return fe(function(De){return re[De]})}function Be(re){return re&&typeof re.getFunction=="function"?Le(re):typeof re=="function"?fe(re):typeof re=="object"?Ke(re):d}function Qe(re){return{getVariable:function(De,Ue){var st=re(De,Ue);return xe(st)}}}function Xe(re){if(re){if(typeof re.getVariable=="function")return Qe(re.getVariable.bind(re));if(typeof re=="function")return Qe(re);if(typeof re=="object")return Qe(function(De){return re[De]})}return y}function ot(re,De,Ue){re in Ue&&(De[re]=Ue[re])}function oi(re){var De=new He;return re?(De.namespaceResolver=Ne(re.namespaces),De.functionResolver=Be(re.functions),De.variableResolver=Xe(re.variables),De.expressionContextNode=re.node,ot("allowAnyNamespaceForNoPrefix",De,re),ot("isHtml",De,re)):De.namespaceResolver=s,De}function si(re,De){var Ue=oi(De);return re.evaluate(Ue)}var ii={evaluate:function(re){return si(this.expression,re)},evaluateNumber:function(re){return this.evaluate(re).numberValue()},evaluateString:function(re){return this.evaluate(re).stringValue()},evaluateBoolean:function(re){return this.evaluate(re).booleanValue()},evaluateNodeSet:function(re){return this.evaluate(re).nodeset()},select:function(re){return this.evaluateNodeSet(re).toArray()},select1:function(re){return this.select(re)[0]}};function ai(re){var De=e.parse(re);return Object.create(ii,{expression:{value:De}})}r.parse=ai}(),G(r,{XPath:X,XPathParser:g,XPathResult:Ae,Step:Y,PathExpr:I,NodeTest:b,LocationPath:ve,OrOperation:ee,AndOperation:ue,BarOperation:Z,EqualsOperation:me,NotEqualOperation:N,LessThanOperation:_,GreaterThanOperation:W,LessThanOrEqualOperation:J,GreaterThanOrEqualOperation:U,PlusOperation:le,MinusOperation:D,MultiplyOperation:k,DivOperation:K,ModOperation:z,UnaryMinusOperation:R,FunctionCall:Ce,VariableReference:ne,XPathContext:He,XNodeSet:ae,XBoolean:pe,XString:O,XNumber:H,NamespaceResolver:je,FunctionResolver:Pe,VariableResolver:Ge,Utilities:de}),r.select=function(e,s,d){return r.selectWithResolver(e,s,null,d)},r.useNamespaces=function(e){var s={mappings:e||{},lookupNamespaceURI:function(d){return this.mappings[d]}};return function(d,y,h){return r.selectWithResolver(d,y,s,h)}},r.selectWithResolver=function(e,s,d,y){var h=new Fe(e,d,new g),C=Ae.ANY_TYPE,oe=h.evaluate(s,C,null);return oe.resultType==Ae.STRING_TYPE?oe=oe.stringValue:oe.resultType==Ae.NUMBER_TYPE?oe=oe.numberValue:oe.resultType==Ae.BOOLEAN_TYPE?oe=oe.booleanValue:(oe=oe.nodes,y&&(oe=oe[0])),oe},r.select1=function(e,s){return r.select(e,s,!0)};var E=function(e){return Array.isArray(e)&&e.every(c)},B=function(e){return function(s){return c(s)&&s.nodeType===e}};G(r,{isNodeLike:c,isArrayOfNodes:E,isElement:B(V.ELEMENT_NODE),isAttribute:B(V.ATTRIBUTE_NODE),isTextNode:B(V.TEXT_NODE),isCDATASection:B(V.CDATA_SECTION_NODE),isProcessingInstruction:B(V.PROCESSING_INSTRUCTION_NODE),isComment:B(V.COMMENT_NODE),isDocumentNode:B(V.DOCUMENT_NODE),isDocumentTypeNode:B(V.DOCUMENT_TYPE_NODE),isDocumentFragment:B(V.DOCUMENT_FRAGMENT_NODE)})})(t)}(Dt)),Dt}var nn=rn();const on=tn(nn);var dt={},Je={},it={},Lt;function yt(){if(Lt)return it;Lt=1;function n(u,c,A){if(A===void 0&&(A=Array.prototype),u&&typeof A.find=="function")return A.find.call(u,c);for(var p=0;p<u.length;p++)if(Object.prototype.hasOwnProperty.call(u,p)){var m=u[p];if(c.call(void 0,m,p,u))return m}}function t(u,c){return c===void 0&&(c=Object),c&&typeof c.freeze=="function"?c.freeze(u):u}function r(u,c){if(u===null||typeof u!="object")throw new TypeError("target is not an object");for(var A in c)Object.prototype.hasOwnProperty.call(c,A)&&(u[A]=c[A]);return u}var a=t({HTML:"text/html",isHTML:function(u){return u===a.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=t({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(u){return u===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return it.assign=r,it.find=n,it.freeze=t,it.MIME_TYPE=a,it.NAMESPACE=i,it}var Vt;function $t(){if(Vt)return Je;Vt=1;var n=yt(),t=n.find,r=n.NAMESPACE;function a(l){return l!==""}function i(l){return l?l.split(/[\t\n\f\r ]+/).filter(a):[]}function u(l,f){return l.hasOwnProperty(f)||(l[f]=!0),l}function c(l){if(!l)return[];var f=i(l);return Object.keys(f.reduce(u,{}))}function A(l){return function(f){return l&&l.indexOf(f)!==-1}}function p(l,f){for(var E in l)Object.prototype.hasOwnProperty.call(l,E)&&(f[E]=l[E])}function m(l,f){var E=l.prototype;if(!(E instanceof f)){let B=function(){};B.prototype=f.prototype,B=new B,p(E,B),l.prototype=E=B}E.constructor!=l&&(typeof l!="function"&&console.error("unknown Class:"+l),E.constructor=l)}var T={},x=T.ELEMENT_NODE=1,L=T.ATTRIBUTE_NODE=2,F=T.TEXT_NODE=3,Q=T.CDATA_SECTION_NODE=4,ie=T.ENTITY_REFERENCE_NODE=5,j=T.ENTITY_NODE=6,ce=T.PROCESSING_INSTRUCTION_NODE=7,he=T.COMMENT_NODE=8,S=T.DOCUMENT_NODE=9,q=T.DOCUMENT_TYPE_NODE=10,G=T.DOCUMENT_FRAGMENT_NODE=11,V=T.NOTATION_NODE=12,g={},X={};g.INDEX_SIZE_ERR=(X[1]="Index size error",1),g.DOMSTRING_SIZE_ERR=(X[2]="DOMString size error",2);var w=g.HIERARCHY_REQUEST_ERR=(X[3]="Hierarchy request error",3);g.WRONG_DOCUMENT_ERR=(X[4]="Wrong document",4),g.INVALID_CHARACTER_ERR=(X[5]="Invalid character",5),g.NO_DATA_ALLOWED_ERR=(X[6]="No data allowed",6),g.NO_MODIFICATION_ALLOWED_ERR=(X[7]="No modification allowed",7);var v=g.NOT_FOUND_ERR=(X[8]="Not found",8);g.NOT_SUPPORTED_ERR=(X[9]="Not supported",9);var $=g.INUSE_ATTRIBUTE_ERR=(X[10]="Attribute in use",10);g.INVALID_STATE_ERR=(X[11]="Invalid state",11),g.SYNTAX_ERR=(X[12]="Syntax error",12),g.INVALID_MODIFICATION_ERR=(X[13]="Invalid modification",13),g.NAMESPACE_ERR=(X[14]="Invalid namespace",14),g.INVALID_ACCESS_ERR=(X[15]="Invalid access",15);function R(l,f){if(f instanceof Error)var E=f;else E=this,Error.call(this,X[l]),this.message=X[l],Error.captureStackTrace&&Error.captureStackTrace(this,R);return E.code=l,f&&(this.message=this.message+": "+f),E}R.prototype=Error.prototype,p(g,R);function P(){}P.prototype={length:0,item:function(l){return l>=0&&l<this.length?this[l]:null},toString:function(l,f){for(var E=[],B=0;B<this.length;B++)Fe(this[B],E,l,f);return E.join("")},filter:function(l){return Array.prototype.filter.call(this,l)},indexOf:function(l){return Array.prototype.indexOf.call(this,l)}};function ee(l,f){this._node=l,this._refresh=f,ue(this)}function ue(l){var f=l._node._inc||l._node.ownerDocument._inc;if(l._inc!==f){var E=l._refresh(l._node);if(Ae(l,"length",E.length),!l.$$length||E.length<l.$$length)for(var B=E.length;B in l;B++)Object.prototype.hasOwnProperty.call(l,B)&&delete l[B];p(E,l),l._inc=f}}ee.prototype.item=function(l){return ue(this),this[l]||null},m(ee,P);function me(){}function N(l,f){for(var E=l.length;E--;)if(l[E]===f)return E}function _(l,f,E,B){if(B?f[N(f,B)]=E:f[f.length++]=E,l){E.ownerElement=l;var e=l.ownerDocument;e&&(B&&z(e,l,B),K(e,l,E))}}function W(l,f,E){var B=N(f,E);if(B>=0){for(var e=f.length-1;B<e;)f[B]=f[++B];if(f.length=e,l){var s=l.ownerDocument;s&&(z(s,l,E),E.ownerElement=null)}}else throw new R(v,new Error(l.tagName+"@"+E))}me.prototype={length:0,item:P.prototype.item,getNamedItem:function(l){for(var f=this.length;f--;){var E=this[f];if(E.nodeName==l)return E}},setNamedItem:function(l){var f=l.ownerElement;if(f&&f!=this._ownerElement)throw new R($);var E=this.getNamedItem(l.nodeName);return _(this._ownerElement,this,l,E),E},setNamedItemNS:function(l){var f=l.ownerElement,E;if(f&&f!=this._ownerElement)throw new R($);return E=this.getNamedItemNS(l.namespaceURI,l.localName),_(this._ownerElement,this,l,E),E},removeNamedItem:function(l){var f=this.getNamedItem(l);return W(this._ownerElement,this,f),f},removeNamedItemNS:function(l,f){var E=this.getNamedItemNS(l,f);return W(this._ownerElement,this,E),E},getNamedItemNS:function(l,f){for(var E=this.length;E--;){var B=this[E];if(B.localName==f&&B.namespaceURI==l)return B}return null}};function J(){}J.prototype={hasFeature:function(l,f){return!0},createDocument:function(l,f,E){var B=new k;if(B.implementation=this,B.childNodes=new P,B.doctype=E||null,E&&B.appendChild(E),f){var e=B.createElementNS(l,f);B.appendChild(e)}return B},createDocumentType:function(l,f,E){var B=new ae;return B.name=l,B.nodeName=l,B.publicId=f||"",B.systemId=E||"",B}};function U(){}U.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(l,f){return Ce(this,l,f)},replaceChild:function(l,f){Ce(this,l,f,ne),f&&this.removeChild(f)},removeChild:function(l){return I(this,l)},appendChild:function(l){return this.insertBefore(l,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(l){return Ye(this.ownerDocument||this,this,l)},normalize:function(){for(var l=this.firstChild;l;){var f=l.nextSibling;f&&f.nodeType==F&&l.nodeType==F?(this.removeChild(f),l.appendData(f.data)):(l.normalize(),l=f)}},isSupported:function(l,f){return this.ownerDocument.implementation.hasFeature(l,f)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(l){for(var f=this;f;){var E=f._nsMap;if(E){for(var B in E)if(Object.prototype.hasOwnProperty.call(E,B)&&E[B]===l)return B}f=f.nodeType==L?f.ownerDocument:f.parentNode}return null},lookupNamespaceURI:function(l){for(var f=this;f;){var E=f._nsMap;if(E&&Object.prototype.hasOwnProperty.call(E,l))return E[l];f=f.nodeType==L?f.ownerDocument:f.parentNode}return null},isDefaultNamespace:function(l){var f=this.lookupPrefix(l);return f==null}};function le(l){return l=="<"&&"&lt;"||l==">"&&"&gt;"||l=="&"&&"&amp;"||l=='"'&&"&quot;"||"&#"+l.charCodeAt()+";"}p(T,U),p(T,U.prototype);function D(l,f){if(f(l))return!0;if(l=l.firstChild)do if(D(l,f))return!0;while(l=l.nextSibling)}function k(){this.ownerDocument=this}function K(l,f,E){l&&l._inc++;var B=E.namespaceURI;B===r.XMLNS&&(f._nsMap[E.prefix?E.localName:""]=E.value)}function z(l,f,E,B){l&&l._inc++;var e=E.namespaceURI;e===r.XMLNS&&delete f._nsMap[E.prefix?E.localName:""]}function Z(l,f,E){if(l&&l._inc){l._inc++;var B=f.childNodes;if(E)B[B.length++]=E;else{for(var e=f.firstChild,s=0;e;)B[s++]=e,e=e.nextSibling;B.length=s,delete B[B.length]}}}function I(l,f){var E=f.previousSibling,B=f.nextSibling;return E?E.nextSibling=B:l.firstChild=B,B?B.previousSibling=E:l.lastChild=E,f.parentNode=null,f.previousSibling=null,f.nextSibling=null,Z(l.ownerDocument,l),f}function te(l){return l&&(l.nodeType===U.DOCUMENT_NODE||l.nodeType===U.DOCUMENT_FRAGMENT_NODE||l.nodeType===U.ELEMENT_NODE)}function Ee(l){return l&&(we(l)||ke(l)||ye(l)||l.nodeType===U.DOCUMENT_FRAGMENT_NODE||l.nodeType===U.COMMENT_NODE||l.nodeType===U.PROCESSING_INSTRUCTION_NODE)}function ye(l){return l&&l.nodeType===U.DOCUMENT_TYPE_NODE}function we(l){return l&&l.nodeType===U.ELEMENT_NODE}function ke(l){return l&&l.nodeType===U.TEXT_NODE}function ve(l,f){var E=l.childNodes||[];if(t(E,we)||ye(f))return!1;var B=t(E,ye);return!(f&&B&&E.indexOf(B)>E.indexOf(f))}function Y(l,f){var E=l.childNodes||[];function B(s){return we(s)&&s!==f}if(t(E,B))return!1;var e=t(E,ye);return!(f&&e&&E.indexOf(e)>E.indexOf(f))}function Se(l,f,E){if(!te(l))throw new R(w,"Unexpected parent node type "+l.nodeType);if(E&&E.parentNode!==l)throw new R(v,"child not in parent");if(!Ee(f)||ye(f)&&l.nodeType!==U.DOCUMENT_NODE)throw new R(w,"Unexpected node type "+f.nodeType+" for parent node type "+l.nodeType)}function b(l,f,E){var B=l.childNodes||[],e=f.childNodes||[];if(f.nodeType===U.DOCUMENT_FRAGMENT_NODE){var s=e.filter(we);if(s.length>1||t(e,ke))throw new R(w,"More than one element or text in fragment");if(s.length===1&&!ve(l,E))throw new R(w,"Element in fragment can not be inserted before doctype")}if(we(f)&&!ve(l,E))throw new R(w,"Only one element can be added and only after doctype");if(ye(f)){if(t(B,ye))throw new R(w,"Only one doctype is allowed");var d=t(B,we);if(E&&B.indexOf(d)<B.indexOf(E))throw new R(w,"Doctype can only be inserted before an element");if(!E&&d)throw new R(w,"Doctype can not be appended since element is present")}}function ne(l,f,E){var B=l.childNodes||[],e=f.childNodes||[];if(f.nodeType===U.DOCUMENT_FRAGMENT_NODE){var s=e.filter(we);if(s.length>1||t(e,ke))throw new R(w,"More than one element or text in fragment");if(s.length===1&&!Y(l,E))throw new R(w,"Element in fragment can not be inserted before doctype")}if(we(f)&&!Y(l,E))throw new R(w,"Only one element can be added and only after doctype");if(ye(f)){if(t(B,function(h){return ye(h)&&h!==E}))throw new R(w,"Only one doctype is allowed");var d=t(B,we);if(E&&B.indexOf(d)<B.indexOf(E))throw new R(w,"Doctype can only be inserted before an element")}}function Ce(l,f,E,B){Se(l,f,E),l.nodeType===U.DOCUMENT_NODE&&(B||b)(l,f,E);var e=f.parentNode;if(e&&e.removeChild(f),f.nodeType===G){var s=f.firstChild;if(s==null)return f;var d=f.lastChild}else s=d=f;var y=E?E.previousSibling:l.lastChild;s.previousSibling=y,d.nextSibling=E,y?y.nextSibling=s:l.firstChild=s,E==null?l.lastChild=d:E.previousSibling=d;do{s.parentNode=l;var h=l.ownerDocument||l;be(s,h)}while(s!==d&&(s=s.nextSibling));return Z(l.ownerDocument||l,l),f.nodeType==G&&(f.firstChild=f.lastChild=null),f}function be(l,f){if(l.ownerDocument!==f){if(l.ownerDocument=f,l.nodeType===x&&l.attributes)for(var E=0;E<l.attributes.length;E++){var B=l.attributes.item(E);B&&(B.ownerDocument=f)}for(var e=l.firstChild;e;)be(e,f),e=e.nextSibling}}function O(l,f){f.parentNode&&f.parentNode.removeChild(f),f.parentNode=l,f.previousSibling=l.lastChild,f.nextSibling=null,f.previousSibling?f.previousSibling.nextSibling=f:l.firstChild=f,l.lastChild=f,Z(l.ownerDocument,l,f);var E=l.ownerDocument||l;return be(f,E),f}k.prototype={nodeName:"#document",nodeType:S,doctype:null,documentElement:null,_inc:1,insertBefore:function(l,f){if(l.nodeType==G){for(var E=l.firstChild;E;){var B=E.nextSibling;this.insertBefore(E,f),E=B}return l}return Ce(this,l,f),be(l,this),this.documentElement===null&&l.nodeType===x&&(this.documentElement=l),l},removeChild:function(l){return this.documentElement==l&&(this.documentElement=null),I(this,l)},replaceChild:function(l,f){Ce(this,l,f,ne),be(l,this),f&&this.removeChild(f),we(l)&&(this.documentElement=l)},importNode:function(l,f){return tt(this,l,f)},getElementById:function(l){var f=null;return D(this.documentElement,function(E){if(E.nodeType==x&&E.getAttribute("id")==l)return f=E,!0}),f},getElementsByClassName:function(l){var f=c(l);return new ee(this,function(E){var B=[];return f.length>0&&D(E.documentElement,function(e){if(e!==E&&e.nodeType===x){var s=e.getAttribute("class");if(s){var d=l===s;if(!d){var y=c(s);d=f.every(A(y))}d&&B.push(e)}}}),B})},createElement:function(l){var f=new H;f.ownerDocument=this,f.nodeName=l,f.tagName=l,f.localName=l,f.childNodes=new P;var E=f.attributes=new me;return E._ownerElement=f,f},createDocumentFragment:function(){var l=new Pe;return l.ownerDocument=this,l.childNodes=new P,l},createTextNode:function(l){var f=new pe;return f.ownerDocument=this,f.appendData(l),f},createComment:function(l){var f=new Ie;return f.ownerDocument=this,f.appendData(l),f},createCDATASection:function(l){var f=new gt;return f.ownerDocument=this,f.appendData(l),f},createProcessingInstruction:function(l,f){var E=new je;return E.ownerDocument=this,E.tagName=E.nodeName=E.target=l,E.nodeValue=E.data=f,E},createAttribute:function(l){var f=new Re;return f.ownerDocument=this,f.name=l,f.nodeName=l,f.localName=l,f.specified=!0,f},createEntityReference:function(l){var f=new Ge;return f.ownerDocument=this,f.nodeName=l,f},createElementNS:function(l,f){var E=new H,B=f.split(":"),e=E.attributes=new me;return E.childNodes=new P,E.ownerDocument=this,E.nodeName=f,E.tagName=f,E.namespaceURI=l,B.length==2?(E.prefix=B[0],E.localName=B[1]):E.localName=f,e._ownerElement=E,E},createAttributeNS:function(l,f){var E=new Re,B=f.split(":");return E.ownerDocument=this,E.nodeName=f,E.name=f,E.namespaceURI=l,E.specified=!0,B.length==2?(E.prefix=B[0],E.localName=B[1]):E.localName=f,E}},m(k,U);function H(){this._nsMap={}}H.prototype={nodeType:x,hasAttribute:function(l){return this.getAttributeNode(l)!=null},getAttribute:function(l){var f=this.getAttributeNode(l);return f&&f.value||""},getAttributeNode:function(l){return this.attributes.getNamedItem(l)},setAttribute:function(l,f){var E=this.ownerDocument.createAttribute(l);E.value=E.nodeValue=""+f,this.setAttributeNode(E)},removeAttribute:function(l){var f=this.getAttributeNode(l);f&&this.removeAttributeNode(f)},appendChild:function(l){return l.nodeType===G?this.insertBefore(l,null):O(this,l)},setAttributeNode:function(l){return this.attributes.setNamedItem(l)},setAttributeNodeNS:function(l){return this.attributes.setNamedItemNS(l)},removeAttributeNode:function(l){return this.attributes.removeNamedItem(l.nodeName)},removeAttributeNS:function(l,f){var E=this.getAttributeNodeNS(l,f);E&&this.removeAttributeNode(E)},hasAttributeNS:function(l,f){return this.getAttributeNodeNS(l,f)!=null},getAttributeNS:function(l,f){var E=this.getAttributeNodeNS(l,f);return E&&E.value||""},setAttributeNS:function(l,f,E){var B=this.ownerDocument.createAttributeNS(l,f);B.value=B.nodeValue=""+E,this.setAttributeNode(B)},getAttributeNodeNS:function(l,f){return this.attributes.getNamedItemNS(l,f)},getElementsByTagName:function(l){return new ee(this,function(f){var E=[];return D(f,function(B){B!==f&&B.nodeType==x&&(l==="*"||B.tagName==l)&&E.push(B)}),E})},getElementsByTagNameNS:function(l,f){return new ee(this,function(E){var B=[];return D(E,function(e){e!==E&&e.nodeType===x&&(l==="*"||e.namespaceURI===l)&&(f==="*"||e.localName==f)&&B.push(e)}),B})}},k.prototype.getElementsByTagName=H.prototype.getElementsByTagName,k.prototype.getElementsByTagNameNS=H.prototype.getElementsByTagNameNS,m(H,U);function Re(){}Re.prototype.nodeType=L,m(Re,U);function qe(){}qe.prototype={data:"",substringData:function(l,f){return this.data.substring(l,l+f)},appendData:function(l){l=this.data+l,this.nodeValue=this.data=l,this.length=l.length},insertData:function(l,f){this.replaceData(l,0,f)},appendChild:function(l){throw new Error(X[w])},deleteData:function(l,f){this.replaceData(l,f,"")},replaceData:function(l,f,E){var B=this.data.substring(0,l),e=this.data.substring(l+f);E=B+E+e,this.nodeValue=this.data=E,this.length=E.length}},m(qe,U);function pe(){}pe.prototype={nodeName:"#text",nodeType:F,splitText:function(l){var f=this.data,E=f.substring(l);f=f.substring(0,l),this.data=this.nodeValue=f,this.length=f.length;var B=this.ownerDocument.createTextNode(E);return this.parentNode&&this.parentNode.insertBefore(B,this.nextSibling),B}},m(pe,qe);function Ie(){}Ie.prototype={nodeName:"#comment",nodeType:he},m(Ie,qe);function gt(){}gt.prototype={nodeName:"#cdata-section",nodeType:Q},m(gt,qe);function ae(){}ae.prototype.nodeType=q,m(ae,U);function ze(){}ze.prototype.nodeType=V,m(ze,U);function He(){}He.prototype.nodeType=j,m(He,U);function Ge(){}Ge.prototype.nodeType=ie,m(Ge,U);function Pe(){}Pe.prototype.nodeName="#document-fragment",Pe.prototype.nodeType=G,m(Pe,U);function je(){}je.prototype.nodeType=ce,m(je,U);function ge(){}ge.prototype.serializeToString=function(l,f,E){return de.call(l,f,E)},U.prototype.toString=de;function de(l,f){var E=[],B=this.nodeType==9&&this.documentElement||this,e=B.prefix,s=B.namespaceURI;if(s&&e==null){var e=B.lookupPrefix(s);if(e==null)var d=[{namespace:s,prefix:null}]}return Fe(this,E,l,f,d),E.join("")}function Et(l,f,E){var B=l.prefix||"",e=l.namespaceURI;if(!e||B==="xml"&&e===r.XML||e===r.XMLNS)return!1;for(var s=E.length;s--;){var d=E[s];if(d.prefix===B)return d.namespace!==e}return!0}function Me(l,f,E){l.push(" ",f,'="',E.replace(/[<>&"\t\n\r]/g,le),'"')}function Fe(l,f,E,B,e){if(e||(e=[]),B)if(l=B(l),l){if(typeof l=="string"){f.push(l);return}}else return;switch(l.nodeType){case x:var s=l.attributes,d=s.length,Be=l.firstChild,y=l.tagName;E=r.isHTML(l.namespaceURI)||E;var h=y;if(!E&&!l.prefix&&l.namespaceURI){for(var C,oe=0;oe<s.length;oe++)if(s.item(oe).name==="xmlns"){C=s.item(oe).value;break}if(!C)for(var Ne=e.length-1;Ne>=0;Ne--){var xe=e[Ne];if(xe.prefix===""&&xe.namespace===l.namespaceURI){C=xe.namespace;break}}if(C!==l.namespaceURI)for(var Ne=e.length-1;Ne>=0;Ne--){var xe=e[Ne];if(xe.namespace===l.namespaceURI){xe.prefix&&(h=xe.prefix+":"+y);break}}}f.push("<",h);for(var se=0;se<d;se++){var fe=s.item(se);fe.prefix=="xmlns"?e.push({prefix:fe.localName,namespace:fe.value}):fe.nodeName=="xmlns"&&e.push({prefix:"",namespace:fe.value})}for(var se=0;se<d;se++){var fe=s.item(se);if(Et(fe,E,e)){var Le=fe.prefix||"",Ke=fe.namespaceURI;Me(f,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}Fe(fe,f,E,B,e)}if(y===h&&Et(l,E,e)){var Le=l.prefix||"",Ke=l.namespaceURI;Me(f,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}if(Be||E&&!/^(?:meta|link|img|br|hr|input)$/i.test(y)){if(f.push(">"),E&&/^script$/i.test(y))for(;Be;)Be.data?f.push(Be.data):Fe(Be,f,E,B,e.slice()),Be=Be.nextSibling;else for(;Be;)Fe(Be,f,E,B,e.slice()),Be=Be.nextSibling;f.push("</",h,">")}else f.push("/>");return;case S:case G:for(var Be=l.firstChild;Be;)Fe(Be,f,E,B,e.slice()),Be=Be.nextSibling;return;case L:return Me(f,l.name,l.value);case F:return f.push(l.data.replace(/[<&>]/g,le));case Q:return f.push("<![CDATA[",l.data,"]]>");case he:return f.push("<!--",l.data,"-->");case q:var Qe=l.publicId,Xe=l.systemId;if(f.push("<!DOCTYPE ",l.name),Qe)f.push(" PUBLIC ",Qe),Xe&&Xe!="."&&f.push(" ",Xe),f.push(">");else if(Xe&&Xe!=".")f.push(" SYSTEM ",Xe,">");else{var ot=l.internalSubset;ot&&f.push(" [",ot,"]"),f.push(">")}return;case ce:return f.push("<?",l.target," ",l.data,"?>");case ie:return f.push("&",l.nodeName,";");default:f.push("??",l.nodeName)}}function tt(l,f,E){var B;switch(f.nodeType){case x:B=f.cloneNode(!1),B.ownerDocument=l;case G:break;case L:E=!0;break}if(B||(B=f.cloneNode(!1)),B.ownerDocument=l,B.parentNode=null,E)for(var e=f.firstChild;e;)B.appendChild(tt(l,e,E)),e=e.nextSibling;return B}function Ye(l,f,E){var B=new f.constructor;for(var e in f)if(Object.prototype.hasOwnProperty.call(f,e)){var s=f[e];typeof s!="object"&&s!=B[e]&&(B[e]=s)}switch(f.childNodes&&(B.childNodes=new P),B.ownerDocument=l,B.nodeType){case x:var d=f.attributes,y=B.attributes=new me,h=d.length;y._ownerElement=B;for(var C=0;C<h;C++)B.setAttributeNode(Ye(l,d.item(C),!0));break;case L:E=!0}if(E)for(var oe=f.firstChild;oe;)B.appendChild(Ye(l,oe,E)),oe=oe.nextSibling;return B}function Ae(l,f,E){l[f]=E}try{if(Object.defineProperty){let l=function(f){switch(f.nodeType){case x:case G:var E=[];for(f=f.firstChild;f;)f.nodeType!==7&&f.nodeType!==8&&E.push(l(f)),f=f.nextSibling;return E.join("");default:return f.nodeValue}};Object.defineProperty(ee.prototype,"length",{get:function(){return ue(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){return l(this)},set:function(f){switch(this.nodeType){case x:case G:for(;this.firstChild;)this.removeChild(this.firstChild);(f||String(f))&&this.appendChild(this.ownerDocument.createTextNode(f));break;default:this.data=f,this.value=f,this.nodeValue=f}}}),Ae=function(f,E,B){f["$$"+E]=B}}}catch{}return Je.DocumentType=ae,Je.DOMException=R,Je.DOMImplementation=J,Je.Element=H,Je.Node=U,Je.NodeList=P,Je.XMLSerializer=ge,Je}var pt={},Tt={},Mt;function sn(){return Mt||(Mt=1,function(n){var t=yt().freeze;n.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),n.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
10
+ `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),n.entityMap=n.HTML_ENTITIES}(Tt)),Tt}var bt={},Ut;function an(){if(Ut)return bt;Ut=1;var n=yt().NAMESPACE,t=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+t.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+t.source+r.source+"*(?::"+t.source+r.source+"*)?$"),i=0,u=1,c=2,A=3,p=4,m=5,T=6,x=7;function L(w,v){this.message=w,this.locator=v,Error.captureStackTrace&&Error.captureStackTrace(this,L)}L.prototype=new Error,L.prototype.name=L.name;function F(){}F.prototype={parse:function(w,v,$){var R=this.domBuilder;R.startDocument(),q(v,v={}),Q(w,v,$,R,this.errorHandler),R.endDocument()}};function Q(w,v,$,R,P){function ee(O){if(O>65535){O-=65536;var H=55296+(O>>10),Re=56320+(O&1023);return String.fromCharCode(H,Re)}else return String.fromCharCode(O)}function ue(O){var H=O.slice(1,-1);return Object.hasOwnProperty.call($,H)?$[H]:H.charAt(0)==="#"?ee(parseInt(H.substr(1).replace("x","0x"))):(P.error("entity not found:"+O),O)}function me(O){if(O>k){var H=w.substring(k,O).replace(/&#?\w+;/g,ue);U&&N(k),R.characters(H,0,O-k),k=O}}function N(O,H){for(;O>=W&&(H=J.exec(w));)_=H.index,W=_+H[0].length,U.lineNumber++;U.columnNumber=O-_+1}for(var _=0,W=0,J=/.*(?:\r\n?|\n)|.*$/g,U=R.locator,le=[{currentNSMap:v}],D={},k=0;;){try{var K=w.indexOf("<",k);if(K<0){if(!w.substr(k).match(/^\s*$/)){var z=R.doc,Z=z.createTextNode(w.substr(k));z.appendChild(Z),R.currentElement=Z}return}switch(K>k&&me(K),w.charAt(K+1)){case"/":var Se=w.indexOf(">",K+3),I=w.substring(K+2,Se).replace(/[ \t\n\r]+$/g,""),te=le.pop();Se<0?(I=w.substring(K+2).replace(/[\s<].*/,""),P.error("end tag name: "+I+" is not complete:"+te.tagName),Se=K+1+I.length):I.match(/\s</)&&(I=I.replace(/[\s<].*/,""),P.error("end tag name: "+I+" maybe not complete"),Se=K+1+I.length);var Ee=te.localNSMap,ye=te.tagName==I,we=ye||te.tagName&&te.tagName.toLowerCase()==I.toLowerCase();if(we){if(R.endElement(te.uri,te.localName,I),Ee)for(var ke in Ee)Object.prototype.hasOwnProperty.call(Ee,ke)&&R.endPrefixMapping(ke);ye||P.fatalError("end tag name: "+I+" is not match the current start tagName:"+te.tagName)}else le.push(te);Se++;break;case"?":U&&N(K),Se=V(w,K,R);break;case"!":U&&N(K),Se=G(w,K,R,P);break;default:U&&N(K);var ve=new g,Y=le[le.length-1].currentNSMap,Se=j(w,K,ve,Y,ue,P),b=ve.length;if(!ve.closed&&S(w,Se,ve.tagName,D)&&(ve.closed=!0,$.nbsp||P.warning("unclosed xml attribute")),U&&b){for(var ne=ie(U,{}),Ce=0;Ce<b;Ce++){var be=ve[Ce];N(be.offset),be.locator=ie(U,{})}R.locator=ne,ce(ve,R,Y)&&le.push(ve),R.locator=U}else ce(ve,R,Y)&&le.push(ve);n.isHTML(ve.uri)&&!ve.closed?Se=he(w,Se,ve.tagName,ue,R):Se++}}catch(O){if(O instanceof L)throw O;P.error("element parse error: "+O),Se=-1}Se>k?k=Se:me(Math.max(K,k)+1)}}function ie(w,v){return v.lineNumber=w.lineNumber,v.columnNumber=w.columnNumber,v}function j(w,v,$,R,P,ee){function ue(U,le,D){$.attributeNames.hasOwnProperty(U)&&ee.fatalError("Attribute "+U+" redefined"),$.addValue(U,le.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,P),D)}for(var me,N,_=++v,W=i;;){var J=w.charAt(_);switch(J){case"=":if(W===u)me=w.slice(v,_),W=A;else if(W===c)W=A;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(W===A||W===u)if(W===u&&(ee.warning('attribute value must after "="'),me=w.slice(v,_)),v=_+1,_=w.indexOf(J,v),_>0)N=w.slice(v,_),ue(me,N,v-1),W=m;else throw new Error("attribute value no end '"+J+"' match");else if(W==p)N=w.slice(v,_),ue(me,N,v),ee.warning('attribute "'+me+'" missed start quot('+J+")!!"),v=_+1,W=m;else throw new Error('attribute value must after "="');break;case"/":switch(W){case i:$.setTagName(w.slice(v,_));case m:case T:case x:W=x,$.closed=!0;case p:case u:break;case c:$.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return ee.error("unexpected end of input"),W==i&&$.setTagName(w.slice(v,_)),_;case">":switch(W){case i:$.setTagName(w.slice(v,_));case m:case T:case x:break;case p:case u:N=w.slice(v,_),N.slice(-1)==="/"&&($.closed=!0,N=N.slice(0,-1));case c:W===c&&(N=me),W==p?(ee.warning('attribute "'+N+'" missed quot(")!'),ue(me,N,v)):((!n.isHTML(R[""])||!N.match(/^(?:disabled|checked|selected)$/i))&&ee.warning('attribute "'+N+'" missed value!! "'+N+'" instead!!'),ue(N,N,v));break;case A:throw new Error("attribute value missed!!")}return _;case"€":J=" ";default:if(J<=" ")switch(W){case i:$.setTagName(w.slice(v,_)),W=T;break;case u:me=w.slice(v,_),W=c;break;case p:var N=w.slice(v,_);ee.warning('attribute "'+N+'" missed quot(")!!'),ue(me,N,v);case m:W=T;break}else switch(W){case c:$.tagName,(!n.isHTML(R[""])||!me.match(/^(?:disabled|checked|selected)$/i))&&ee.warning('attribute "'+me+'" missed value!! "'+me+'" instead2!!'),ue(me,me,v),v=_,W=u;break;case m:ee.warning('attribute space is required"'+me+'"!!');case T:W=u,v=_;break;case A:W=p,v=_;break;case x:throw new Error("elements closed character '/' and '>' must be connected to")}}_++}}function ce(w,v,$){for(var R=w.tagName,P=null,J=w.length;J--;){var ee=w[J],ue=ee.qName,me=ee.value,U=ue.indexOf(":");if(U>0)var N=ee.prefix=ue.slice(0,U),_=ue.slice(U+1),W=N==="xmlns"&&_;else _=ue,N=null,W=ue==="xmlns"&&"";ee.localName=_,W!==!1&&(P==null&&(P={},q($,$={})),$[W]=P[W]=me,ee.uri=n.XMLNS,v.startPrefixMapping(W,me))}for(var J=w.length;J--;){ee=w[J];var N=ee.prefix;N&&(N==="xml"&&(ee.uri=n.XML),N!=="xmlns"&&(ee.uri=$[N||""]))}var U=R.indexOf(":");U>0?(N=w.prefix=R.slice(0,U),_=w.localName=R.slice(U+1)):(N=null,_=w.localName=R);var le=w.uri=$[N||""];if(v.startElement(le,_,R,w),w.closed){if(v.endElement(le,_,R),P)for(N in P)Object.prototype.hasOwnProperty.call(P,N)&&v.endPrefixMapping(N)}else return w.currentNSMap=$,w.localNSMap=P,!0}function he(w,v,$,R,P){if(/^(?:script|textarea)$/i.test($)){var ee=w.indexOf("</"+$+">",v),ue=w.substring(v+1,ee);if(/[&<]/.test(ue))return/^script$/i.test($)?(P.characters(ue,0,ue.length),ee):(ue=ue.replace(/&#?\w+;/g,R),P.characters(ue,0,ue.length),ee)}return v+1}function S(w,v,$,R){var P=R[$];return P==null&&(P=w.lastIndexOf("</"+$+">"),P<v&&(P=w.lastIndexOf("</"+$)),R[$]=P),P<v}function q(w,v){for(var $ in w)Object.prototype.hasOwnProperty.call(w,$)&&(v[$]=w[$])}function G(w,v,$,R){var P=w.charAt(v+2);switch(P){case"-":if(w.charAt(v+3)==="-"){var ee=w.indexOf("-->",v+4);return ee>v?($.comment(w,v+4,ee-v-4),ee+3):(R.error("Unclosed comment"),-1)}else return-1;default:if(w.substr(v+3,6)=="CDATA["){var ee=w.indexOf("]]>",v+9);return $.startCDATA(),$.characters(w,v+9,ee-v-9),$.endCDATA(),ee+3}var ue=X(w,v),me=ue.length;if(me>1&&/!doctype/i.test(ue[0][0])){var N=ue[1][0],_=!1,W=!1;me>3&&(/^public$/i.test(ue[2][0])?(_=ue[3][0],W=me>4&&ue[4][0]):/^system$/i.test(ue[2][0])&&(W=ue[3][0]));var J=ue[me-1];return $.startDTD(N,_,W),$.endDTD(),J.index+J[0].length}}return-1}function V(w,v,$){var R=w.indexOf("?>",v);if(R){var P=w.substring(v,R).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return P?(P[0].length,$.processingInstruction(P[1],P[2]),R+2):-1}return-1}function g(){this.attributeNames={}}g.prototype={setTagName:function(w){if(!a.test(w))throw new Error("invalid tagName:"+w);this.tagName=w},addValue:function(w,v,$){if(!a.test(w))throw new Error("invalid attribute:"+w);this.attributeNames[w]=this.length,this[this.length++]={qName:w,value:v,offset:$}},length:0,getLocalName:function(w){return this[w].localName},getLocator:function(w){return this[w].locator},getQName:function(w){return this[w].qName},getURI:function(w){return this[w].uri},getValue:function(w){return this[w].value}};function X(w,v){var $,R=[],P=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(P.lastIndex=v,P.exec(w);$=P.exec(w);)if(R.push($),$[1])return R}return bt.XMLReader=F,bt.ParseError=L,bt}var qt;function un(){if(qt)return pt;qt=1;var n=yt(),t=$t(),r=sn(),a=an(),i=t.DOMImplementation,u=n.NAMESPACE,c=a.ParseError,A=a.XMLReader;function p(j){return j.replace(/\r[\n\u0085]/g,`
11
11
  `).replace(/[\r\u0085\u2028]/g,`
12
- `)}function m(H){this.options=H||{locator:{}}}m.prototype.parseFromString=function(H,de){var re=this.options,z=new x,me=re.domBuilder||new v,be=re.errorHandler,J=re.locator,N=re.xmlns||{},le=/\/x?html?$/.test(de),w=le?r.HTML_ENTITIES:r.XML_ENTITIES;J&&me.setDocumentLocator(J),z.errorHandler=S(be,me,J),z.domBuilder=re.domBuilder||me,le&&(N[""]=u.HTML),N.xml=N.xml||u.XML;var y=re.normalizeLineEndings||p;return H&&typeof H=="string"?z.parse(y(H),N,w):z.errorHandler.error("invalid doc source"),me.doc};function S(H,de,re){if(!H){if(de instanceof v)return de;H=de}var z={},me=H instanceof Function;re=re||{};function be(J){var N=H[J];!N&&me&&(N=H.length==2?function(le){H(J,le)}:H),z[J]=N&&function(le){N("[xmldom "+J+"] "+le+K(re))}||function(){}}return be("warning"),be("error"),be("fatalError"),z}function v(){this.cdata=!1}function U(H,de){de.lineNumber=H.lineNumber,de.columnNumber=H.columnNumber}v.prototype={startDocument:function(){this.doc=new i().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(H,de,re,z){var me=this.doc,be=me.createElementNS(H,re||de),J=z.length;ae(this,be),this.currentElement=be,this.locator&&U(this.locator,be);for(var N=0;N<J;N++){var H=z.getURI(N),le=z.getValue(N),re=z.getQName(N),w=me.createAttributeNS(H,re);this.locator&&U(z.getLocator(N),w),w.value=w.nodeValue=le,be.setAttributeNode(w)}},endElement:function(H,de,re){var z=this.currentElement;z.tagName,this.currentElement=z.parentNode},startPrefixMapping:function(H,de){},endPrefixMapping:function(H){},processingInstruction:function(H,de){var re=this.doc.createProcessingInstruction(H,de);this.locator&&U(this.locator,re),ae(this,re)},ignorableWhitespace:function(H,de,re){},characters:function(H,de,re){if(H=Y.apply(this,arguments),H){if(this.cdata)var z=this.doc.createCDATASection(H);else var z=this.doc.createTextNode(H);this.currentElement?this.currentElement.appendChild(z):/^\s*$/.test(H)&&this.doc.appendChild(z),this.locator&&U(this.locator,z)}},skippedEntity:function(H){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(H){(this.locator=H)&&(H.lineNumber=0)},comment:function(H,de,re){H=Y.apply(this,arguments);var z=this.doc.createComment(H);this.locator&&U(this.locator,z),ae(this,z)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(H,de,re){var z=this.doc.implementation;if(z&&z.createDocumentType){var me=z.createDocumentType(H,de,re);this.locator&&U(this.locator,me),ae(this,me),this.doc.doctype=me}},warning:function(H){console.warn("[xmldom warning] "+H,K(this.locator))},error:function(H){console.error("[xmldom error] "+H,K(this.locator))},fatalError:function(H){throw new f(H,this.locator)}};function K(H){if(H)return`
13
- @`+(H.systemId||"")+"#[line:"+H.lineNumber+",col:"+H.columnNumber+"]"}function Y(H,de,re){return typeof H=="string"?H.substr(de,re):H.length>=de+re||de?new java.lang.String(H,de,re)+"":H}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(H){v.prototype[H]=function(){return null}});function ae(H,de){H.currentElement?H.currentElement.appendChild(de):H.doc.appendChild(de)}return pt.__DOMHandler=v,pt.normalizeLineEndings=p,pt.DOMParser=m,pt}var Ht;function ln(){if(Ht)return dt;Ht=1;var n=$t();return dt.DOMImplementation=n.DOMImplementation,dt.XMLSerializer=n.XMLSerializer,dt.DOMParser=un().DOMParser,dt}var jt=ln();const cn={key:0,class:"xml-node__comment"},dn={key:1,class:"xml-node__cdata"},pn={key:2,class:"xml-node__element"},hn={key:0,class:"xml-node__line"},mn=["contenteditable","onKeydown"],gn=["contenteditable","onDblclick","onKeydown"],En=["contenteditable","onDblclick","onKeydown"],yn=["contenteditable","onKeydown"],bn={key:1,class:"xml-node__line"},An=["contenteditable","onKeydown"],xn=["contenteditable","onDblclick","onKeydown"],Nn=["contenteditable","onDblclick","onKeydown"],Cn=["contenteditable","onKeydown"],Dn={key:2,class:"xml-node__line"},vn=["contenteditable","onKeydown"],wn=["contenteditable","onDblclick","onKeydown"],Tn=["contenteditable","onDblclick","onKeydown"],_n={key:3,class:"xml-node__line"},Bn=["contenteditable","onKeydown"],Sn=["contenteditable","onDblclick","onKeydown"],On=["contenteditable","onDblclick","onKeydown"],kn={key:4},Rn={key:0,class:"xml-node__line"},In=["contenteditable","onKeydown"],Fn=["contenteditable","onDblclick","onKeydown"],Pn=["contenteditable","onDblclick","onKeydown"],Ln=["title"],Vn={class:"xml-node__line"},$n=["title"],Mn=["contenteditable","onKeydown"],qn={key:1},Un=["contenteditable","onKeydown"],Hn=["contenteditable","onDblclick","onKeydown"],jn=["contenteditable","onDblclick","onKeydown"],Kn=["title"],Gn={key:0,class:"xml-node__children"},Xn={key:0,class:"xml-node__text"},Wn=["contenteditable","onKeydown"],zn={key:1,class:"xml-node__line"},Yn=ft(o.defineComponent({__name:"XmlNode",props:{node:{},index:{},level:{default:0},parentPath:{default:""},expanded:{},theme:{},selfClosingTags:{default:()=>new Set}},emits:["toggle-expand","copy","update:tagName","update:attributeName","update:attributeValue","update:textContent","update:cdataContent"],setup(n,{emit:t}){o.useCssVars(A=>({a71f898c:A.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(null),f=o.ref(null),x=o.ref(!1),p=o.ref(!1),m=o.ref(""),S=o.ref(""),v=o.ref(""),U=o.ref(""),K=o.ref(""),Y=o.ref(null),ae=o.ref(null),H=o.ref(null),de=o.ref(null),re=o.ref(null),z=o.computed(()=>Object.keys(r.node).find(oe=>!oe.startsWith(":")&&!oe.startsWith("#"))||""),me=o.computed(()=>z.value?r.parentPath?`${r.parentPath}.${z.value}[${r.index}]`:`${z.value}[${r.index}]`:""),be=o.computed(()=>r.expanded.has(me.value)),J=o.computed(()=>r.node["#comment"]?"comment":r.node.__cdata?"cdata":z.value?"element":"unknown"),N=o.computed(()=>{const A=r.node[":@"]||{},oe={};return Object.keys(A).forEach(Ce=>{Ce.startsWith("@_")&&(oe[Ce.substring(2)]=A[Ce])}),oe}),le=o.computed(()=>{if(J.value!=="element"||!z.value)return[];const A=r.node[z.value];return Array.isArray(A)?A:[]}),w=o.computed(()=>le.value.some(A=>A.__cdata)),y=o.computed(()=>{if(!w.value)return"";const A=le.value.find(oe=>oe.__cdata);if(A&&Array.isArray(A.__cdata)){const oe=A.__cdata;if(oe.length>0&&oe[0]["#text"])return oe[0]["#text"]}return""}),B=o.computed(()=>{if(J.value!=="element"||!z.value||w.value)return"";const A=r.node[z.value];if(!Array.isArray(A))return"";const oe=A.find(Ce=>Ce["#text"]);return oe?oe["#text"]:""}),_=o.computed(()=>{if(J.value!=="comment")return"";const A=r.node["#comment"];return Array.isArray(A)&&A.length>0&&A[0]["#text"]||""}),L=o.computed(()=>le.value.some(A=>Object.keys(A).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":")))),$=o.computed(()=>L.value?le.value.filter(A=>Object.keys(A).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":"))).length:0),Z=o.computed(()=>J.value==="element"&&!L.value&&B.value!==""),te=o.computed(()=>J.value==="element"&&!L.value&&B.value===""),g=o.computed(()=>te.value&&r.selfClosingTags?.has(z.value)||!1),C=()=>{L.value&&a("toggle-expand",me.value)},V=(A,oe)=>`${me.value}-child-${oe}`,j=()=>`${me.value}.${z.value}`,R=()=>{i.value=!0,m.value=z.value,o.nextTick(()=>{if(Y.value){Y.value.focus();const A=document.createRange();A.selectNodeContents(Y.value);const oe=window.getSelection();oe?.removeAllRanges(),oe?.addRange(A)}})},ee=A=>{u.value=A,S.value=A,o.nextTick(()=>{if(ae.value){ae.value.focus();const oe=document.createRange();oe.selectNodeContents(ae.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(oe)}})},D=A=>{f.value=A,v.value=N.value[A]||"",o.nextTick(()=>{if(H.value){H.value.focus();const oe=document.createRange();oe.selectNodeContents(H.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(oe)}})},O=()=>{x.value=!0,U.value=B.value,o.nextTick(()=>{if(de.value){de.value.focus();const A=document.createRange();A.selectNodeContents(de.value);const oe=window.getSelection();oe?.removeAllRanges(),oe?.addRange(A)}})},F=()=>{if(!i.value)return;const A=Y.value?.innerText.trim()||"";if(!A||A===z.value){i.value=!1;return}i.value=!1,a("update:tagName",me.value,z.value,A)},G=()=>{if(!u.value)return;const A=u.value,oe=ae.value?.innerText.trim()||"";if(!oe||oe===A){u.value=null;return}u.value=null,a("update:attributeName",me.value,A,oe)},X=()=>{if(!f.value)return;const A=f.value,oe=H.value?.innerText.trim()||"";f.value=null,a("update:attributeValue",me.value,A,oe)},P=()=>{if(!x.value)return;const A=de.value?.innerText||"";if(A===B.value){x.value=!1;return}x.value=!1,a("update:textContent",me.value,A)},Q=()=>{i.value=!1,m.value=z.value},pe=()=>{u.value&&(S.value=u.value,u.value=null)},Ee=()=>{f.value&&(v.value=N.value[f.value]||"",f.value=null)},Te=()=>{x.value=!1,U.value=B.value},ke=()=>{p.value=!0,K.value=y.value,o.nextTick(()=>{if(re.value){re.value.focus();const A=document.createRange();A.selectNodeContents(re.value);const oe=window.getSelection();oe?.removeAllRanges(),oe?.addRange(A)}})},De=()=>{if(!p.value)return;const A=re.value?.innerText||"";if(A===y.value){p.value=!1;return}p.value=!1,a("update:cdataContent",me.value,A)},W=()=>{p.value=!1,K.value=y.value},Be=A=>{L.value&&(A.preventDefault(),R())};return(A,oe)=>{const Ce=o.resolveComponent("XmlNode",!0);return o.openBlock(),o.createElementBlock("div",{class:"xml-node",style:o.normalizeStyle({paddingLeft:A.level>0?"16px":"0"})},[J.value==="comment"?(o.openBlock(),o.createElementBlock("div",cn,[o.createElementVNode("span",{style:o.normalizeStyle({color:A.theme.colors.xmlComment})}," <!-- "+o.toDisplayString(_.value)+" --> ",5)])):J.value==="cdata"?(o.openBlock(),o.createElementBlock("div",dn,[o.createElementVNode("span",{style:o.normalizeStyle({color:A.theme.colors.xmlCdata})}," <![CDATA["+o.toDisplayString(A.node.__cdata)+"]]> ",5)])):J.value==="element"?(o.openBlock(),o.createElementBlock("div",pn,[w.value?(o.openBlock(),o.createElementBlock("div",hn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:R,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,mn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,gn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,En),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:A.theme.colors.xmlCdata})},"<![CDATA[",4),o.createElementVNode("span",{class:"xml-node__cdata-content xml-node__cdata-content--editable",style:o.normalizeStyle({color:A.theme.colors.xmlCdata}),contenteditable:p.value,onDblclick:ke,onKeydown:[o.withKeys(o.withModifiers(De,["prevent"]),["enter"]),o.withKeys(W,["escape"])],onBlur:De,ref_key:"cdataContentRef",ref:re,title:"Double-click to edit CDATA content"},o.toDisplayString(p.value?K.value:y.value),45,yn),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:A.theme.colors.xmlCdata})},"]]>",4),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:z.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])):Z.value?(o.openBlock(),o.createElementBlock("div",bn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:R,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,An),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,xn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,Nn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:o.normalizeStyle({color:A.theme.colors.xmlText}),contenteditable:x.value,onDblclick:O,onKeydown:[o.withKeys(o.withModifiers(P,["prevent"]),["enter"]),o.withKeys(Te,["escape"])],onBlur:P,ref_key:"textContentRef",ref:de,title:"Double-click to edit text content"},o.toDisplayString(x.value?U.value:B.value),45,Cn),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:z.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])):te.value&&g.value?(o.openBlock(),o.createElementBlock("div",Dn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:R,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,vn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,wn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,Tn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})}," />",4)])):te.value?(o.openBlock(),o.createElementBlock("div",_n,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:R,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,Bn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,Sn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,On),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"></",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:z.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])):(o.openBlock(),o.createElementBlock("div",kn,[!be.value&&L.value?(o.openBlock(),o.createElementBlock("div",Rn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:oe[0]||(oe[0]=ye=>C()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(R,["stop"]),onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,In)]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,Fn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,Pn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:oe[1]||(oe[1]=ye=>C()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)]),o.createElementVNode("span",{class:"xml-node__collapsed-badge",style:o.normalizeStyle({backgroundColor:A.theme.colors.collapsedBackground,color:A.theme.colors.collapsedText}),onClick:oe[2]||(oe[2]=ye=>C()),title:`Click to expand ${$.value} child element${$.value>1?"s":""}`},o.toDisplayString($.value)+" child"+o.toDisplayString($.value>1?"ren":""),13,Ln),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:oe[3]||(oe[3]=ye=>C()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:z.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",Vn,[L.value?(o.openBlock(),o.createElementBlock("span",{key:0,class:"xml-node__clickable-part",onClick:oe[4]||(oe[4]=ye=>C()),title:be.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(R,["stop"]),onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,Mn)],8,$n)):(o.openBlock(),o.createElementBlock("span",qn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:R,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,Un)])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,Hn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,jn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),L.value?(o.openBlock(),o.createElementBlock("span",{key:2,class:"xml-node__clickable-part",onClick:oe[5]||(oe[5]=ye=>C()),title:be.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)],8,Kn)):(o.openBlock(),o.createElementBlock("span",{key:3,class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},o.toDisplayString(L.value?">":"/>"),5))]),be.value&&L.value?(o.openBlock(),o.createElementBlock("div",Gn,[le.value.length===0&&B.value.trim()?(o.openBlock(),o.createElementBlock("div",Xn,[o.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:o.normalizeStyle({color:A.theme.colors.xmlText}),contenteditable:x.value,onDblclick:O,onKeydown:[o.withKeys(o.withModifiers(P,["prevent"]),["enter"]),o.withKeys(Te,["escape"])],onBlur:P,ref_key:"textContentRef",ref:de,title:"Double-click to edit text content"},o.toDisplayString(x.value?U.value:B.value),45,Wn)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(le.value,(ye,I)=>(o.openBlock(),o.createBlock(Ce,{key:V(ye,I),node:ye,index:I,level:A.level+1,"parent-path":j(),expanded:A.expanded,theme:A.theme,selfClosingTags:A.selfClosingTags,onToggleExpand:oe[6]||(oe[6]=q=>A.$emit("toggle-expand",q)),onCopy:oe[7]||(oe[7]=q=>A.$emit("copy",q)),"onUpdate:tagName":oe[8]||(oe[8]=(q,Re,Ue)=>A.$emit("update:tagName",q,Re,Ue)),"onUpdate:attributeName":oe[9]||(oe[9]=(q,Re,Ue)=>A.$emit("update:attributeName",q,Re,Ue)),"onUpdate:attributeValue":oe[10]||(oe[10]=(q,Re,Ue)=>A.$emit("update:attributeValue",q,Re,Ue)),"onUpdate:textContent":oe[11]||(oe[11]=(q,Re)=>A.$emit("update:textContent",q,Re)),"onUpdate:cdataContent":oe[12]||(oe[12]=(q,Re)=>A.$emit("update:cdataContent",q,Re))},null,8,["node","index","level","parent-path","expanded","theme","selfClosingTags"]))),128))])):o.createCommentVNode("",!0),be.value&&L.value?(o.openBlock(),o.createElementBlock("div",zn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:oe[13]||(oe[13]=ye=>C()),title:"Click to collapse"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:z.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])])):o.createCommentVNode("",!0)],64))]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-acda96f3"]]),Kt={"github-light":{name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#57606a",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#1f883d",buttonPrimaryHover:"#1a7f37",success:"#1f883d",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",xmlTag:"#116329",xmlAttribute:"#0550ae",xmlAttributeValue:"#0a3069",xmlText:"#24292f",xmlComment:"#6e7781",xmlCdata:"#8250df",xmlDeclaration:"#953800",xmlBracket:"#6e7781",xmlEquals:"#6e7781",xmlQuote:"#0550ae",collapsedBackground:"#ddf4ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#c9d1d9",textSecondary:"#8b949e",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#c9d1d9",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2e1c",error:"#f85149",errorBackground:"#3d1319",xmlTag:"#7ee787",xmlAttribute:"#79c0ff",xmlAttributeValue:"#a5d6ff",xmlText:"#c9d1d9",xmlComment:"#8b949e",xmlCdata:"#d2a8ff",xmlDeclaration:"#ffa657",xmlBracket:"#8b949e",xmlEquals:"#8b949e",xmlQuote:"#79c0ff",collapsedBackground:"#1c2d41",collapsedText:"#58a6ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#171717",textSecondary:"#737373",buttonBackground:"#fafafa",buttonBackgroundHover:"#f5f5f5",buttonBorder:"#e5e5e5",buttonText:"#171717",buttonPrimary:"#22c55e",buttonPrimaryHover:"#16a34a",success:"#22c55e",successBackground:"#dcfce7",error:"#ef4444",errorBackground:"#fee2e2",xmlTag:"#16a34a",xmlAttribute:"#2563eb",xmlAttributeValue:"#1e40af",xmlText:"#171717",xmlComment:"#737373",xmlCdata:"#9333ea",xmlDeclaration:"#ea580c",xmlBracket:"#737373",xmlEquals:"#737373",xmlQuote:"#2563eb",collapsedBackground:"#dbeafe",collapsedText:"#1d4ed8",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fef5ed",surfaceBackground:"#fef9f3",border:"#e9dcc9",text:"#3d3c40",textSecondary:"#616061",buttonBackground:"#fef9f3",buttonBackgroundHover:"#f9f0e5",buttonBorder:"#e9dcc9",buttonText:"#3d3c40",buttonPrimary:"#007a5a",buttonPrimaryHover:"#006644",success:"#007a5a",successBackground:"#d1f4e0",error:"#e01e5a",errorBackground:"#ffdbea",xmlTag:"#007a5a",xmlAttribute:"#1264a3",xmlAttributeValue:"#0b4c8c",xmlText:"#3d3c40",xmlComment:"#616061",xmlCdata:"#8b2eff",xmlDeclaration:"#e8912d",xmlBracket:"#616061",xmlEquals:"#616061",xmlQuote:"#1264a3",collapsedBackground:"#d8eaf5",collapsedText:"#0b4c8c",indentLine:"#e8d5b7"}}},Qn=n=>Kt[n]||Kt["github-light"],Gt=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Zn=Gt+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Jn="["+Gt+"]["+Zn+"]*",eo=new RegExp("^"+Jn+"$");function Xt(n,t){const r=[];let a=t.exec(n);for(;a;){const i=[];i.startIndex=t.lastIndex-a[0].length;const u=a.length;for(let f=0;f<u;f++)i.push(a[f]);r.push(i),a=t.exec(n)}return r}const At=function(n){const t=eo.exec(n);return!(t===null||typeof t>"u")};function to(n){return typeof n<"u"}const ro={allowBooleanAttributes:!1,unpairedTags:[]};function Wt(n,t){t=Object.assign({},ro,t);const r=[];let a=!1,i=!1;n[0]==="\uFEFF"&&(n=n.substr(1));for(let u=0;u<n.length;u++)if(n[u]==="<"&&n[u+1]==="?"){if(u+=2,u=Yt(n,u),u.err)return u}else if(n[u]==="<"){let f=u;if(u++,n[u]==="!"){u=Qt(n,u);continue}else{let x=!1;n[u]==="/"&&(x=!0,u++);let p="";for(;u<n.length&&n[u]!==">"&&n[u]!==" "&&n[u]!==" "&&n[u]!==`
14
- `&&n[u]!=="\r";u++)p+=n[u];if(p=p.trim(),p[p.length-1]==="/"&&(p=p.substring(0,p.length-1),u--),!co(p)){let v;return p.trim().length===0?v="Invalid space after '<'.":v="Tag '"+p+"' is an invalid name.",Oe("InvalidTag",v,Ve(n,u))}const m=so(n,u);if(m===!1)return Oe("InvalidAttr","Attributes for '"+p+"' have open quote.",Ve(n,u));let S=m.value;if(u=m.index,S[S.length-1]==="/"){const v=u-S.length;S=S.substring(0,S.length-1);const U=Zt(S,t);if(U===!0)a=!0;else return Oe(U.err.code,U.err.msg,Ve(n,v+U.err.line))}else if(x)if(m.tagClosed){if(S.trim().length>0)return Oe("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",Ve(n,f));if(r.length===0)return Oe("InvalidTag","Closing tag '"+p+"' has not been opened.",Ve(n,f));{const v=r.pop();if(p!==v.tagName){let U=Ve(n,v.tagStartPos);return Oe("InvalidTag","Expected closing tag '"+v.tagName+"' (opened in line "+U.line+", col "+U.col+") instead of closing tag '"+p+"'.",Ve(n,f))}r.length==0&&(i=!0)}}else return Oe("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",Ve(n,u));else{const v=Zt(S,t);if(v!==!0)return Oe(v.err.code,v.err.msg,Ve(n,u-S.length+v.err.line));if(i===!0)return Oe("InvalidXml","Multiple possible root nodes found.",Ve(n,u));t.unpairedTags.indexOf(p)!==-1||r.push({tagName:p,tagStartPos:f}),a=!0}for(u++;u<n.length;u++)if(n[u]==="<")if(n[u+1]==="!"){u++,u=Qt(n,u);continue}else if(n[u+1]==="?"){if(u=Yt(n,++u),u.err)return u}else break;else if(n[u]==="&"){const v=uo(n,u);if(v==-1)return Oe("InvalidChar","char '&' is not expected.",Ve(n,u));u=v}else if(i===!0&&!zt(n[u]))return Oe("InvalidXml","Extra text at the end",Ve(n,u));n[u]==="<"&&u--}}else{if(zt(n[u]))continue;return Oe("InvalidChar","char '"+n[u]+"' is not expected.",Ve(n,u))}if(a){if(r.length==1)return Oe("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Ve(n,r[0].tagStartPos));if(r.length>0)return Oe("InvalidXml","Invalid '"+JSON.stringify(r.map(u=>u.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Oe("InvalidXml","Start tag expected.",1);return!0}function zt(n){return n===" "||n===" "||n===`
15
- `||n==="\r"}function Yt(n,t){const r=t;for(;t<n.length;t++)if(n[t]=="?"||n[t]==" "){const a=n.substr(r,t-r);if(t>5&&a==="xml")return Oe("InvalidXml","XML declaration allowed only at the start of the document.",Ve(n,t));if(n[t]=="?"&&n[t+1]==">"){t++;break}else continue}return t}function Qt(n,t){if(n.length>t+5&&n[t+1]==="-"&&n[t+2]==="-"){for(t+=3;t<n.length;t++)if(n[t]==="-"&&n[t+1]==="-"&&n[t+2]===">"){t+=2;break}}else if(n.length>t+8&&n[t+1]==="D"&&n[t+2]==="O"&&n[t+3]==="C"&&n[t+4]==="T"&&n[t+5]==="Y"&&n[t+6]==="P"&&n[t+7]==="E"){let r=1;for(t+=8;t<n.length;t++)if(n[t]==="<")r++;else if(n[t]===">"&&(r--,r===0))break}else if(n.length>t+9&&n[t+1]==="["&&n[t+2]==="C"&&n[t+3]==="D"&&n[t+4]==="A"&&n[t+5]==="T"&&n[t+6]==="A"&&n[t+7]==="["){for(t+=8;t<n.length;t++)if(n[t]==="]"&&n[t+1]==="]"&&n[t+2]===">"){t+=2;break}}return t}const no='"',oo="'";function so(n,t){let r="",a="",i=!1;for(;t<n.length;t++){if(n[t]===no||n[t]===oo)a===""?a=n[t]:a!==n[t]||(a="");else if(n[t]===">"&&a===""){i=!0;break}r+=n[t]}return a!==""?!1:{value:r,index:t,tagClosed:i}}const io=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Zt(n,t){const r=Xt(n,io),a={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return Oe("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",ht(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return Oe("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",ht(r[i]));if(r[i][3]===void 0&&!t.allowBooleanAttributes)return Oe("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",ht(r[i]));const u=r[i][2];if(!lo(u))return Oe("InvalidAttr","Attribute '"+u+"' is an invalid name.",ht(r[i]));if(!a.hasOwnProperty(u))a[u]=1;else return Oe("InvalidAttr","Attribute '"+u+"' is repeated.",ht(r[i]))}return!0}function ao(n,t){let r=/\d/;for(n[t]==="x"&&(t++,r=/[\da-fA-F]/);t<n.length;t++){if(n[t]===";")return t;if(!n[t].match(r))break}return-1}function uo(n,t){if(t++,n[t]===";")return-1;if(n[t]==="#")return t++,ao(n,t);let r=0;for(;t<n.length;t++,r++)if(!(n[t].match(/\w/)&&r<20)){if(n[t]===";")break;return-1}return t}function Oe(n,t,r){return{err:{code:n,msg:t,line:r.line||r,col:r.col}}}function lo(n){return At(n)}function co(n){return At(n)}function Ve(n,t){const r=n.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function ht(n){return n.startIndex+n[1].length}const fo={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,t,r){return n},captureMetaData:!1},po=function(n){return Object.assign({},fo,n)};let xt;typeof Symbol!="function"?xt="@@xmlMetadata":xt=Symbol("XML Node Metadata");class at{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t,r){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),r!==void 0&&(this.child[this.child.length-1][xt]={startIndex:r})}static getMetaDataSymbol(){return xt}}class ho{constructor(t){this.suppressValidationErr=!t}readDocType(t,r){const a={};if(t[r+3]==="O"&&t[r+4]==="C"&&t[r+5]==="T"&&t[r+6]==="Y"&&t[r+7]==="P"&&t[r+8]==="E"){r=r+9;let i=1,u=!1,f=!1,x="";for(;r<t.length;r++)if(t[r]==="<"&&!f){if(u&&ut(t,"!ENTITY",r)){r+=7;let p,m;[p,m,r]=this.readEntityExp(t,r+1,this.suppressValidationErr),m.indexOf("&")===-1&&(a[p]={regx:RegExp(`&${p};`,"g"),val:m})}else if(u&&ut(t,"!ELEMENT",r)){r+=8;const{index:p}=this.readElementExp(t,r+1);r=p}else if(u&&ut(t,"!ATTLIST",r))r+=8;else if(u&&ut(t,"!NOTATION",r)){r+=9;const{index:p}=this.readNotationExp(t,r+1,this.suppressValidationErr);r=p}else if(ut(t,"!--",r))f=!0;else throw new Error("Invalid DOCTYPE");i++,x=""}else if(t[r]===">"){if(f?t[r-1]==="-"&&t[r-2]==="-"&&(f=!1,i--):i--,i===0)break}else t[r]==="["?u=!0:x+=t[r];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:a,i:r}}readEntityExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r])&&t[r]!=='"'&&t[r]!=="'";)a+=t[r],r++;if(mt(a),r=$e(t,r),!this.suppressValidationErr){if(t.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[r]==="%")throw new Error("Parameter entities are not supported")}let i="";return[r,i]=this.readIdentifierVal(t,r,"entity"),r--,[a,i,r]}readNotationExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;!this.suppressValidationErr&&mt(a),r=$e(t,r);const i=t.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=$e(t,r);let u=null,f=null;if(i==="PUBLIC")[r,u]=this.readIdentifierVal(t,r,"publicIdentifier"),r=$e(t,r),(t[r]==='"'||t[r]==="'")&&([r,f]=this.readIdentifierVal(t,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,f]=this.readIdentifierVal(t,r,"systemIdentifier"),!this.suppressValidationErr&&!f))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:a,publicIdentifier:u,systemIdentifier:f,index:--r}}readIdentifierVal(t,r,a){let i="";const u=t[r];if(u!=='"'&&u!=="'")throw new Error(`Expected quoted string, found "${u}"`);for(r++;r<t.length&&t[r]!==u;)i+=t[r],r++;if(t[r]!==u)throw new Error(`Unterminated ${a} value`);return r++,[r,i]}readElementExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;if(!this.suppressValidationErr&&!At(a))throw new Error(`Invalid element name: "${a}"`);r=$e(t,r);let i="";if(t[r]==="E"&&ut(t,"MPTY",r))r+=4;else if(t[r]==="A"&&ut(t,"NY",r))r+=2;else if(t[r]==="("){for(r++;r<t.length&&t[r]!==")";)i+=t[r],r++;if(t[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[r]}"`);return{elementName:a,contentModel:i.trim(),index:r}}readAttlistExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;mt(a),r=$e(t,r);let i="";for(;r<t.length&&!/\s/.test(t[r]);)i+=t[r],r++;if(!mt(i))throw new Error(`Invalid attribute name: "${i}"`);r=$e(t,r);let u="";if(t.substring(r,r+8).toUpperCase()==="NOTATION"){if(u="NOTATION",r+=8,r=$e(t,r),t[r]!=="(")throw new Error(`Expected '(', found "${t[r]}"`);r++;let x=[];for(;r<t.length&&t[r]!==")";){let p="";for(;r<t.length&&t[r]!=="|"&&t[r]!==")";)p+=t[r],r++;if(p=p.trim(),!mt(p))throw new Error(`Invalid notation name: "${p}"`);x.push(p),t[r]==="|"&&(r++,r=$e(t,r))}if(t[r]!==")")throw new Error("Unterminated list of notations");r++,u+=" ("+x.join("|")+")"}else{for(;r<t.length&&!/\s/.test(t[r]);)u+=t[r],r++;const x=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!x.includes(u.toUpperCase()))throw new Error(`Invalid attribute type: "${u}"`)}r=$e(t,r);let f="";return t.substring(r,r+8).toUpperCase()==="#REQUIRED"?(f="#REQUIRED",r+=8):t.substring(r,r+7).toUpperCase()==="#IMPLIED"?(f="#IMPLIED",r+=7):[r,f]=this.readIdentifierVal(t,r,"ATTLIST"),{elementName:a,attributeName:i,attributeType:u,defaultValue:f,index:r}}}const $e=(n,t)=>{for(;t<n.length&&/\s/.test(n[t]);)t++;return t};function ut(n,t,r){for(let a=0;a<t.length;a++)if(t[a]!==n[r+a+1])return!1;return!0}function mt(n){if(At(n))return n;throw new Error(`Invalid entity name ${n}`)}const mo=/^[-+]?0x[a-fA-F0-9]+$/,go=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Eo={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function yo(n,t={}){if(t=Object.assign({},Eo,t),!n||typeof n!="string")return n;let r=n.trim();if(t.skipLike!==void 0&&t.skipLike.test(r))return n;if(n==="0")return 0;if(t.hex&&mo.test(r))return No(r,16);if(r.search(/.+[eE].+/)!==-1)return Ao(n,r,t);{const a=go.exec(r);if(a){const i=a[1]||"",u=a[2];let f=xo(a[3]);const x=i?n[u.length+1]===".":n[u.length]===".";if(!t.leadingZeros&&(u.length>1||u.length===1&&!x))return n;{const p=Number(r),m=String(p);if(p===0)return p;if(m.search(/[eE]/)!==-1)return t.eNotation?p:n;if(r.indexOf(".")!==-1)return m==="0"||m===f||m===`${i}${f}`?p:n;let S=u?f:r;return u?S===m||i+S===m?p:n:S===m||S===i+m?p:n}}else return n}}const bo=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Ao(n,t,r){if(!r.eNotation)return n;const a=t.match(bo);if(a){let i=a[1]||"";const u=a[3].indexOf("e")===-1?"E":"e",f=a[2],x=i?n[f.length+1]===u:n[f.length]===u;return f.length>1&&x?n:f.length===1&&(a[3].startsWith(`.${u}`)||a[3][0]===u)?Number(t):r.leadingZeros&&!x?(t=(a[1]||"")+a[3],Number(t)):n}else return n}function xo(n){return n&&n.indexOf(".")!==-1&&(n=n.replace(/0+$/,""),n==="."?n="0":n[0]==="."?n="0"+n:n[n.length-1]==="."&&(n=n.substring(0,n.length-1))),n}function No(n,t){if(parseInt)return parseInt(n,t);if(Number.parseInt)return Number.parseInt(n,t);if(window&&window.parseInt)return window.parseInt(n,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Jt(n){return typeof n=="function"?n:Array.isArray(n)?t=>{for(const r of n)if(typeof r=="string"&&t===r||r instanceof RegExp&&r.test(t))return!0}:()=>!1}class Co{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,a)=>String.fromCodePoint(Number.parseInt(a,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,a)=>String.fromCodePoint(Number.parseInt(a,16))}},this.addExternalEntities=Do,this.parseXml=Bo,this.parseTextData=vo,this.resolveNameSpace=wo,this.buildAttributesMap=_o,this.isItStopNode=Ro,this.replaceEntitiesValue=Oo,this.readStopNodeData=Fo,this.saveTextToParentTag=ko,this.addChild=So,this.ignoreAttributesFn=Jt(this.options.ignoreAttributes)}}function Do(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];this.lastEntities[a]={regex:new RegExp("&"+a+";","g"),val:n[a]}}}function vo(n,t,r,a,i,u,f){if(n!==void 0&&(this.options.trimValues&&!a&&(n=n.trim()),n.length>0)){f||(n=this.replaceEntitiesValue(n));const x=this.options.tagValueProcessor(t,n,r,i,u);return x==null?n:typeof x!=typeof n||x!==n?x:this.options.trimValues?_t(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?_t(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function wo(n){if(this.options.removeNSPrefix){const t=n.split(":"),r=n.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(n=r+t[1])}return n}const To=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function _o(n,t,r){if(this.options.ignoreAttributes!==!0&&typeof n=="string"){const a=Xt(n,To),i=a.length,u={};for(let f=0;f<i;f++){const x=this.resolveNameSpace(a[f][1]);if(this.ignoreAttributesFn(x,t))continue;let p=a[f][4],m=this.options.attributeNamePrefix+x;if(x.length)if(this.options.transformAttributeName&&(m=this.options.transformAttributeName(m)),m==="__proto__"&&(m="#__proto__"),p!==void 0){this.options.trimValues&&(p=p.trim()),p=this.replaceEntitiesValue(p);const S=this.options.attributeValueProcessor(x,p,t);S==null?u[m]=p:typeof S!=typeof p||S!==p?u[m]=S:u[m]=_t(p,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(u[m]=!0)}if(!Object.keys(u).length)return;if(this.options.attributesGroupName){const f={};return f[this.options.attributesGroupName]=u,f}return u}}const Bo=function(n){n=n.replace(/\r\n?/g,`
16
- `);const t=new at("!xml");let r=t,a="",i="";const u=new ho(this.options.processEntities);for(let f=0;f<n.length;f++)if(n[f]==="<")if(n[f+1]==="/"){const p=lt(n,">",f,"Closing Tag is not closed.");let m=n.substring(f+2,p).trim();if(this.options.removeNSPrefix){const U=m.indexOf(":");U!==-1&&(m=m.substr(U+1))}this.options.transformTagName&&(m=this.options.transformTagName(m)),r&&(a=this.saveTextToParentTag(a,r,i));const S=i.substring(i.lastIndexOf(".")+1);if(m&&this.options.unpairedTags.indexOf(m)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${m}>`);let v=0;S&&this.options.unpairedTags.indexOf(S)!==-1?(v=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):v=i.lastIndexOf("."),i=i.substring(0,v),r=this.tagsNodeStack.pop(),a="",f=p}else if(n[f+1]==="?"){let p=Tt(n,f,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");if(a=this.saveTextToParentTag(a,r,i),!(this.options.ignoreDeclaration&&p.tagName==="?xml"||this.options.ignorePiTags)){const m=new at(p.tagName);m.add(this.options.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&(m[":@"]=this.buildAttributesMap(p.tagExp,i,p.tagName)),this.addChild(r,m,i,f)}f=p.closeIndex+1}else if(n.substr(f+1,3)==="!--"){const p=lt(n,"-->",f+4,"Comment is not closed.");if(this.options.commentPropName){const m=n.substring(f+4,p-2);a=this.saveTextToParentTag(a,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:m}])}f=p}else if(n.substr(f+1,2)==="!D"){const p=u.readDocType(n,f);this.docTypeEntities=p.entities,f=p.i}else if(n.substr(f+1,2)==="!["){const p=lt(n,"]]>",f,"CDATA is not closed.")-2,m=n.substring(f+9,p);a=this.saveTextToParentTag(a,r,i);let S=this.parseTextData(m,r.tagname,i,!0,!1,!0,!0);S==null&&(S=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:m}]):r.add(this.options.textNodeName,S),f=p+2}else{let p=Tt(n,f,this.options.removeNSPrefix),m=p.tagName;const S=p.rawTagName;let v=p.tagExp,U=p.attrExpPresent,K=p.closeIndex;this.options.transformTagName&&(m=this.options.transformTagName(m)),r&&a&&r.tagname!=="!xml"&&(a=this.saveTextToParentTag(a,r,i,!1));const Y=r;Y&&this.options.unpairedTags.indexOf(Y.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),m!==t.tagname&&(i+=i?"."+m:m);const ae=f;if(this.isItStopNode(this.options.stopNodes,i,m)){let H="";if(v.length>0&&v.lastIndexOf("/")===v.length-1)m[m.length-1]==="/"?(m=m.substr(0,m.length-1),i=i.substr(0,i.length-1),v=m):v=v.substr(0,v.length-1),f=p.closeIndex;else if(this.options.unpairedTags.indexOf(m)!==-1)f=p.closeIndex;else{const re=this.readStopNodeData(n,S,K+1);if(!re)throw new Error(`Unexpected end of ${S}`);f=re.i,H=re.tagContent}const de=new at(m);m!==v&&U&&(de[":@"]=this.buildAttributesMap(v,i,m)),H&&(H=this.parseTextData(H,m,i,!0,U,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),de.add(this.options.textNodeName,H),this.addChild(r,de,i,ae)}else{if(v.length>0&&v.lastIndexOf("/")===v.length-1){m[m.length-1]==="/"?(m=m.substr(0,m.length-1),i=i.substr(0,i.length-1),v=m):v=v.substr(0,v.length-1),this.options.transformTagName&&(m=this.options.transformTagName(m));const H=new at(m);m!==v&&U&&(H[":@"]=this.buildAttributesMap(v,i,m)),this.addChild(r,H,i,ae),i=i.substr(0,i.lastIndexOf("."))}else{const H=new at(m);this.tagsNodeStack.push(r),m!==v&&U&&(H[":@"]=this.buildAttributesMap(v,i,m)),this.addChild(r,H,i,ae),r=H}a="",f=K}}else a+=n[f];return t.child};function So(n,t,r,a){this.options.captureMetaData||(a=void 0);const i=this.options.updateTag(t.tagname,r,t[":@"]);i===!1||(typeof i=="string"&&(t.tagname=i),n.addChild(t,a))}const Oo=function(n){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];n=n.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];n=n.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];n=n.replace(r.regex,r.val)}n=n.replace(this.ampEntity.regex,this.ampEntity.val)}return n};function ko(n,t,r,a){return n&&(a===void 0&&(a=t.child.length===0),n=this.parseTextData(n,t.tagname,r,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,a),n!==void 0&&n!==""&&t.add(this.options.textNodeName,n),n=""),n}function Ro(n,t,r){const a="*."+r;for(const i in n){const u=n[i];if(a===u||t===u)return!0}return!1}function Io(n,t,r=">"){let a,i="";for(let u=t;u<n.length;u++){let f=n[u];if(a)f===a&&(a="");else if(f==='"'||f==="'")a=f;else if(f===r[0])if(r[1]){if(n[u+1]===r[1])return{data:i,index:u}}else return{data:i,index:u};else f===" "&&(f=" ");i+=f}}function lt(n,t,r,a){const i=n.indexOf(t,r);if(i===-1)throw new Error(a);return i+t.length-1}function Tt(n,t,r,a=">"){const i=Io(n,t+1,a);if(!i)return;let u=i.data;const f=i.index,x=u.search(/\s/);let p=u,m=!0;x!==-1&&(p=u.substring(0,x),u=u.substring(x+1).trimStart());const S=p;if(r){const v=p.indexOf(":");v!==-1&&(p=p.substr(v+1),m=p!==i.data.substr(v+1))}return{tagName:p,tagExp:u,closeIndex:f,attrExpPresent:m,rawTagName:S}}function Fo(n,t,r){const a=r;let i=1;for(;r<n.length;r++)if(n[r]==="<")if(n[r+1]==="/"){const u=lt(n,">",r,`${t} is not closed`);if(n.substring(r+2,u).trim()===t&&(i--,i===0))return{tagContent:n.substring(a,r),i:u};r=u}else if(n[r+1]==="?")r=lt(n,"?>",r+1,"StopNode is not closed.");else if(n.substr(r+1,3)==="!--")r=lt(n,"-->",r+3,"StopNode is not closed.");else if(n.substr(r+1,2)==="![")r=lt(n,"]]>",r,"StopNode is not closed.")-2;else{const u=Tt(n,r,">");u&&((u&&u.tagName)===t&&u.tagExp[u.tagExp.length-1]!=="/"&&i++,r=u.closeIndex)}}function _t(n,t,r){if(t&&typeof n=="string"){const a=n.trim();return a==="true"?!0:a==="false"?!1:yo(n,r)}else return to(n)?n:""}const Bt=at.getMetaDataSymbol();function Po(n,t){return er(n,t)}function er(n,t,r){let a;const i={};for(let u=0;u<n.length;u++){const f=n[u],x=Lo(f);let p="";if(r===void 0?p=x:p=r+"."+x,x===t.textNodeName)a===void 0?a=f[x]:a+=""+f[x];else{if(x===void 0)continue;if(f[x]){let m=er(f[x],t,p);const S=$o(m,t);f[Bt]!==void 0&&(m[Bt]=f[Bt]),f[":@"]?Vo(m,f[":@"],p,t):Object.keys(m).length===1&&m[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?m=m[t.textNodeName]:Object.keys(m).length===0&&(t.alwaysCreateTextNode?m[t.textNodeName]="":m=""),i[x]!==void 0&&i.hasOwnProperty(x)?(Array.isArray(i[x])||(i[x]=[i[x]]),i[x].push(m)):t.isArray(x,p,S)?i[x]=[m]:i[x]=m}}}return typeof a=="string"?a.length>0&&(i[t.textNodeName]=a):a!==void 0&&(i[t.textNodeName]=a),i}function Lo(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];if(a!==":@")return a}}function Vo(n,t,r,a){if(t){const i=Object.keys(t),u=i.length;for(let f=0;f<u;f++){const x=i[f];a.isArray(x,r+"."+x,!0,!0)?n[x]=[t[x]]:n[x]=t[x]}}}function $o(n,t){const{textNodeName:r}=t,a=Object.keys(n).length;return!!(a===0||a===1&&(n[r]||typeof n[r]=="boolean"||n[r]===0))}class Mo{constructor(t){this.externalEntities={},this.options=po(t)}parse(t,r){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const u=Wt(t,r);if(u!==!0)throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`)}const a=new Co(this.options);a.addExternalEntities(this.externalEntities);const i=a.parseXml(t);return this.options.preserveOrder||i===void 0?i:Po(i,this.options)}addEntity(t,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=r}static getMetaDataSymbol(){return at.getMetaDataSymbol()}}const qo=`
17
- `;function Uo(n,t){let r="";return t.format&&t.indentBy.length>0&&(r=qo),tr(n,t,"",r)}function tr(n,t,r,a){let i="",u=!1;for(let f=0;f<n.length;f++){const x=n[f],p=Ho(x);if(p===void 0)continue;let m="";if(r.length===0?m=p:m=`${r}.${p}`,p===t.textNodeName){let Y=x[p];jo(m,t)||(Y=t.tagValueProcessor(p,Y),Y=nr(Y,t)),u&&(i+=a),i+=Y,u=!1;continue}else if(p===t.cdataPropName){u&&(i+=a),i+=`<![CDATA[${x[p][0][t.textNodeName]}]]>`,u=!1;continue}else if(p===t.commentPropName){i+=a+`<!--${x[p][0][t.textNodeName]}-->`,u=!0;continue}else if(p[0]==="?"){const Y=rr(x[":@"],t),ae=p==="?xml"?"":a;let H=x[p][0][t.textNodeName];H=H.length!==0?" "+H:"",i+=ae+`<${p}${H}${Y}?>`,u=!0;continue}let S=a;S!==""&&(S+=t.indentBy);const v=rr(x[":@"],t),U=a+`<${p}${v}`,K=tr(x[p],t,m,S);t.unpairedTags.indexOf(p)!==-1?t.suppressUnpairedNode?i+=U+">":i+=U+"/>":(!K||K.length===0)&&t.suppressEmptyNode?i+=U+"/>":K&&K.endsWith(">")?i+=U+`>${K}${a}</${p}>`:(i+=U+">",K&&a!==""&&(K.includes("/>")||K.includes("</"))?i+=a+t.indentBy+K+a:i+=K,i+=`</${p}>`),u=!0}return i}function Ho(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];if(n.hasOwnProperty(a)&&a!==":@")return a}}function rr(n,t){let r="";if(n&&!t.ignoreAttributes)for(let a in n){if(!n.hasOwnProperty(a))continue;let i=t.attributeValueProcessor(a,n[a]);i=nr(i,t),i===!0&&t.suppressBooleanAttributes?r+=` ${a.substr(t.attributeNamePrefix.length)}`:r+=` ${a.substr(t.attributeNamePrefix.length)}="${i}"`}return r}function jo(n,t){n=n.substr(0,n.length-t.textNodeName.length-1);let r=n.substr(n.lastIndexOf(".")+1);for(let a in t.stopNodes)if(t.stopNodes[a]===n||t.stopNodes[a]==="*."+r)return!0;return!1}function nr(n,t){if(n&&n.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const a=t.entities[r];n=n.replace(a.regex,a.val)}return n}const Ko={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function nt(n){this.options=Object.assign({},Ko,n),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Jt(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Wo),this.processTextOrObjNode=Go,this.options.format?(this.indentate=Xo,this.tagEndChar=`>
12
+ `)}function m(j){this.options=j||{locator:{}}}m.prototype.parseFromString=function(j,ce){var he=this.options,S=new A,q=he.domBuilder||new x,G=he.errorHandler,V=he.locator,g=he.xmlns||{},X=/\/x?html?$/.test(ce),w=X?r.HTML_ENTITIES:r.XML_ENTITIES;V&&q.setDocumentLocator(V),S.errorHandler=T(G,q,V),S.domBuilder=he.domBuilder||q,X&&(g[""]=u.HTML),g.xml=g.xml||u.XML;var v=he.normalizeLineEndings||p;return j&&typeof j=="string"?S.parse(v(j),g,w):S.errorHandler.error("invalid doc source"),q.doc};function T(j,ce,he){if(!j){if(ce instanceof x)return ce;j=ce}var S={},q=j instanceof Function;he=he||{};function G(V){var g=j[V];!g&&q&&(g=j.length==2?function(X){j(V,X)}:j),S[V]=g&&function(X){g("[xmldom "+V+"] "+X+F(he))}||function(){}}return G("warning"),G("error"),G("fatalError"),S}function x(){this.cdata=!1}function L(j,ce){ce.lineNumber=j.lineNumber,ce.columnNumber=j.columnNumber}x.prototype={startDocument:function(){this.doc=new i().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(j,ce,he,S){var q=this.doc,G=q.createElementNS(j,he||ce),V=S.length;ie(this,G),this.currentElement=G,this.locator&&L(this.locator,G);for(var g=0;g<V;g++){var j=S.getURI(g),X=S.getValue(g),he=S.getQName(g),w=q.createAttributeNS(j,he);this.locator&&L(S.getLocator(g),w),w.value=w.nodeValue=X,G.setAttributeNode(w)}},endElement:function(j,ce,he){var S=this.currentElement;S.tagName,this.currentElement=S.parentNode},startPrefixMapping:function(j,ce){},endPrefixMapping:function(j){},processingInstruction:function(j,ce){var he=this.doc.createProcessingInstruction(j,ce);this.locator&&L(this.locator,he),ie(this,he)},ignorableWhitespace:function(j,ce,he){},characters:function(j,ce,he){if(j=Q.apply(this,arguments),j){if(this.cdata)var S=this.doc.createCDATASection(j);else var S=this.doc.createTextNode(j);this.currentElement?this.currentElement.appendChild(S):/^\s*$/.test(j)&&this.doc.appendChild(S),this.locator&&L(this.locator,S)}},skippedEntity:function(j){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(j){(this.locator=j)&&(j.lineNumber=0)},comment:function(j,ce,he){j=Q.apply(this,arguments);var S=this.doc.createComment(j);this.locator&&L(this.locator,S),ie(this,S)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(j,ce,he){var S=this.doc.implementation;if(S&&S.createDocumentType){var q=S.createDocumentType(j,ce,he);this.locator&&L(this.locator,q),ie(this,q),this.doc.doctype=q}},warning:function(j){console.warn("[xmldom warning] "+j,F(this.locator))},error:function(j){console.error("[xmldom error] "+j,F(this.locator))},fatalError:function(j){throw new c(j,this.locator)}};function F(j){if(j)return`
13
+ @`+(j.systemId||"")+"#[line:"+j.lineNumber+",col:"+j.columnNumber+"]"}function Q(j,ce,he){return typeof j=="string"?j.substr(ce,he):j.length>=ce+he||ce?new java.lang.String(j,ce,he)+"":j}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(j){x.prototype[j]=function(){return null}});function ie(j,ce){j.currentElement?j.currentElement.appendChild(ce):j.doc.appendChild(ce)}return pt.__DOMHandler=x,pt.normalizeLineEndings=p,pt.DOMParser=m,pt}var Ht;function ln(){if(Ht)return dt;Ht=1;var n=$t();return dt.DOMImplementation=n.DOMImplementation,dt.XMLSerializer=n.XMLSerializer,dt.DOMParser=un().DOMParser,dt}var jt=ln();const cn={key:0,class:"xml-node__comment"},dn={key:1,class:"xml-node__cdata"},pn={key:2,class:"xml-node__element"},hn={key:0,class:"xml-node__line"},mn=["contenteditable","onKeydown"],gn=["contenteditable","onDblclick","onKeydown"],En=["contenteditable","onDblclick","onKeydown"],yn=["contenteditable","onKeydown"],bn={key:1,class:"xml-node__line"},An=["contenteditable","onKeydown"],Nn=["contenteditable","onDblclick","onKeydown"],xn=["contenteditable","onDblclick","onKeydown"],Cn=["contenteditable","onKeydown"],vn={key:2,class:"xml-node__line"},Dn=["contenteditable","onKeydown"],Tn=["contenteditable","onDblclick","onKeydown"],wn=["contenteditable","onDblclick","onKeydown"],_n={key:3,class:"xml-node__line"},Sn=["contenteditable","onKeydown"],Bn=["contenteditable","onDblclick","onKeydown"],On=["contenteditable","onDblclick","onKeydown"],kn={key:4},Rn={key:0,class:"xml-node__line"},In=["contenteditable","onKeydown"],Fn=["contenteditable","onDblclick","onKeydown"],Pn=["contenteditable","onDblclick","onKeydown"],Ln=["title"],Vn={class:"xml-node__line"},$n=["title"],Mn=["contenteditable","onKeydown"],Un={key:1},qn=["contenteditable","onKeydown"],Hn=["contenteditable","onDblclick","onKeydown"],jn=["contenteditable","onDblclick","onKeydown"],Kn=["title"],Gn={key:0,class:"xml-node__children"},Xn={key:0,class:"xml-node__text"},Wn=["contenteditable","onKeydown"],zn={key:1,class:"xml-node__line"},Yn=ft(o.defineComponent({__name:"XmlNode",props:{node:{},index:{},level:{default:0},parentPath:{default:""},expanded:{},theme:{},selfClosingTags:{default:()=>new Set}},emits:["toggle-expand","copy","update:tagName","update:attributeName","update:attributeValue","update:textContent","update:cdataContent"],setup(n,{emit:t}){o.useCssVars(b=>({a71f898c:b.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(null),c=o.ref(null),A=o.ref(!1),p=o.ref(!1),m=o.ref(""),T=o.ref(""),x=o.ref(""),L=o.ref(""),F=o.ref(""),Q=o.ref(null),ie=o.ref(null),j=o.ref(null),ce=o.ref(null),he=o.ref(null),S=o.computed(()=>Object.keys(r.node).find(ne=>!ne.startsWith(":")&&!ne.startsWith("#"))||""),q=o.computed(()=>S.value?r.parentPath?`${r.parentPath}.${S.value}[${r.index}]`:`${S.value}[${r.index}]`:""),G=o.computed(()=>r.expanded.has(q.value)),V=o.computed(()=>r.node["#comment"]?"comment":r.node.__cdata?"cdata":S.value?"element":"unknown"),g=o.computed(()=>{const b=r.node[":@"]||{},ne={};return Object.keys(b).forEach(Ce=>{Ce.startsWith("@_")&&(ne[Ce.substring(2)]=b[Ce])}),ne}),X=o.computed(()=>{if(V.value!=="element"||!S.value)return[];const b=r.node[S.value];return Array.isArray(b)?b:[]}),w=o.computed(()=>X.value.some(b=>b.__cdata)),v=o.computed(()=>{if(!w.value)return"";const b=X.value.find(ne=>ne.__cdata);if(b&&Array.isArray(b.__cdata)){const ne=b.__cdata;if(ne.length>0&&ne[0]["#text"])return ne[0]["#text"]}return""}),$=o.computed(()=>{if(V.value!=="element"||!S.value||w.value)return"";const b=r.node[S.value];if(!Array.isArray(b))return"";const ne=b.find(Ce=>Ce["#text"]);return ne?ne["#text"]:""}),R=o.computed(()=>{if(V.value!=="comment")return"";const b=r.node["#comment"];return Array.isArray(b)&&b.length>0&&b[0]["#text"]||""}),P=o.computed(()=>X.value.some(b=>Object.keys(b).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":")))),ee=o.computed(()=>P.value?X.value.filter(b=>Object.keys(b).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":"))).length:0),ue=o.computed(()=>V.value==="element"&&!P.value&&$.value!==""),me=o.computed(()=>V.value==="element"&&!P.value&&$.value===""),N=o.computed(()=>me.value&&r.selfClosingTags?.has(S.value)||!1),_=()=>{P.value&&a("toggle-expand",q.value)},W=(b,ne)=>`${q.value}-child-${ne}`,J=()=>`${q.value}.${S.value}`,U=()=>{i.value=!0,m.value=S.value,o.nextTick(()=>{if(Q.value){Q.value.focus();const b=document.createRange();b.selectNodeContents(Q.value);const ne=window.getSelection();ne?.removeAllRanges(),ne?.addRange(b)}})},le=b=>{u.value=b,T.value=b,o.nextTick(()=>{if(ie.value){ie.value.focus();const ne=document.createRange();ne.selectNodeContents(ie.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(ne)}})},D=b=>{c.value=b,x.value=g.value[b]||"",o.nextTick(()=>{if(j.value){j.value.focus();const ne=document.createRange();ne.selectNodeContents(j.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(ne)}})},k=()=>{A.value=!0,L.value=$.value,o.nextTick(()=>{if(ce.value){ce.value.focus();const b=document.createRange();b.selectNodeContents(ce.value);const ne=window.getSelection();ne?.removeAllRanges(),ne?.addRange(b)}})},K=()=>{if(!i.value)return;const b=Q.value?.innerText.trim()||"";if(!b||b===S.value){i.value=!1;return}i.value=!1,a("update:tagName",q.value,S.value,b)},z=()=>{if(!u.value)return;const b=u.value,ne=ie.value?.innerText.trim()||"";if(!ne||ne===b){u.value=null;return}u.value=null,a("update:attributeName",q.value,b,ne)},Z=()=>{if(!c.value)return;const b=c.value,ne=j.value?.innerText.trim()||"";c.value=null,a("update:attributeValue",q.value,b,ne)},I=()=>{if(!A.value)return;const b=ce.value?.innerText||"";if(b===$.value){A.value=!1;return}A.value=!1,a("update:textContent",q.value,b)},te=()=>{i.value=!1,m.value=S.value},Ee=()=>{u.value&&(T.value=u.value,u.value=null)},ye=()=>{c.value&&(x.value=g.value[c.value]||"",c.value=null)},we=()=>{A.value=!1,L.value=$.value},ke=()=>{p.value=!0,F.value=v.value,o.nextTick(()=>{if(he.value){he.value.focus();const b=document.createRange();b.selectNodeContents(he.value);const ne=window.getSelection();ne?.removeAllRanges(),ne?.addRange(b)}})},ve=()=>{if(!p.value)return;const b=he.value?.innerText||"";if(b===v.value){p.value=!1;return}p.value=!1,a("update:cdataContent",q.value,b)},Y=()=>{p.value=!1,F.value=v.value},Se=b=>{P.value&&(b.preventDefault(),U())};return(b,ne)=>{const Ce=o.resolveComponent("XmlNode",!0);return o.openBlock(),o.createElementBlock("div",{class:"xml-node",style:o.normalizeStyle({paddingLeft:b.level>0?"16px":"0"})},[V.value==="comment"?(o.openBlock(),o.createElementBlock("div",cn,[o.createElementVNode("span",{style:o.normalizeStyle({color:b.theme.colors.xmlComment})}," <!-- "+o.toDisplayString(R.value)+" --> ",5)])):V.value==="cdata"?(o.openBlock(),o.createElementBlock("div",dn,[o.createElementVNode("span",{style:o.normalizeStyle({color:b.theme.colors.xmlCdata})}," <![CDATA["+o.toDisplayString(b.node.__cdata)+"]]> ",5)])):V.value==="element"?(o.openBlock(),o.createElementBlock("div",pn,[w.value?(o.openBlock(),o.createElementBlock("div",hn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:b.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:U,onContextmenu:Se,onKeydown:[o.withKeys(o.withModifiers(K,["prevent"]),["enter"]),o.withKeys(te,["escape"])],onBlur:K,ref_key:"tagNameRef",ref:Q,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:S.value),45,mn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:H=>le(O),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:H=>{u.value===O&&(ie.value=H)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?T.value:O),45,gn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:b.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:H=>D(O),onKeydown:[o.withKeys(o.withModifiers(Z,["prevent"]),["enter"]),o.withKeys(ye,["escape"])],onBlur:Z,ref_for:!0,ref:H=>{c.value===O&&(j.value=H)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?x.value:be),45,En),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:b.theme.colors.xmlCdata})},"<![CDATA[",4),o.createElementVNode("span",{class:"xml-node__cdata-content xml-node__cdata-content--editable",style:o.normalizeStyle({color:b.theme.colors.xmlCdata}),contenteditable:p.value,onDblclick:ke,onKeydown:[o.withKeys(o.withModifiers(ve,["prevent"]),["enter"]),o.withKeys(Y,["escape"])],onBlur:ve,ref_key:"cdataContentRef",ref:he,title:"Double-click to edit CDATA content"},o.toDisplayString(p.value?F.value:v.value),45,yn),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:b.theme.colors.xmlCdata})},"]]>",4),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:b.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:S.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},">",4)])):ue.value?(o.openBlock(),o.createElementBlock("div",bn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:b.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:U,onContextmenu:Se,onKeydown:[o.withKeys(o.withModifiers(K,["prevent"]),["enter"]),o.withKeys(te,["escape"])],onBlur:K,ref_key:"tagNameRef",ref:Q,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:S.value),45,An),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:H=>le(O),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:H=>{u.value===O&&(ie.value=H)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?T.value:O),45,Nn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:b.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:H=>D(O),onKeydown:[o.withKeys(o.withModifiers(Z,["prevent"]),["enter"]),o.withKeys(ye,["escape"])],onBlur:Z,ref_for:!0,ref:H=>{c.value===O&&(j.value=H)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?x.value:be),45,xn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:o.normalizeStyle({color:b.theme.colors.xmlText}),contenteditable:A.value,onDblclick:k,onKeydown:[o.withKeys(o.withModifiers(I,["prevent"]),["enter"]),o.withKeys(we,["escape"])],onBlur:I,ref_key:"textContentRef",ref:ce,title:"Double-click to edit text content"},o.toDisplayString(A.value?L.value:$.value),45,Cn),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:b.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:S.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},">",4)])):me.value&&N.value?(o.openBlock(),o.createElementBlock("div",vn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:b.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:U,onContextmenu:Se,onKeydown:[o.withKeys(o.withModifiers(K,["prevent"]),["enter"]),o.withKeys(te,["escape"])],onBlur:K,ref_key:"tagNameRef",ref:Q,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:S.value),45,Dn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:H=>le(O),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:H=>{u.value===O&&(ie.value=H)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?T.value:O),45,Tn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:b.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:H=>D(O),onKeydown:[o.withKeys(o.withModifiers(Z,["prevent"]),["enter"]),o.withKeys(ye,["escape"])],onBlur:Z,ref_for:!0,ref:H=>{c.value===O&&(j.value=H)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?x.value:be),45,wn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})}," />",4)])):me.value?(o.openBlock(),o.createElementBlock("div",_n,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:b.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:U,onContextmenu:Se,onKeydown:[o.withKeys(o.withModifiers(K,["prevent"]),["enter"]),o.withKeys(te,["escape"])],onBlur:K,ref_key:"tagNameRef",ref:Q,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:S.value),45,Sn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:H=>le(O),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:H=>{u.value===O&&(ie.value=H)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?T.value:O),45,Bn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:b.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:H=>D(O),onKeydown:[o.withKeys(o.withModifiers(Z,["prevent"]),["enter"]),o.withKeys(ye,["escape"])],onBlur:Z,ref_for:!0,ref:H=>{c.value===O&&(j.value=H)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?x.value:be),45,On),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"></",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:b.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:S.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},">",4)])):(o.openBlock(),o.createElementBlock("div",kn,[!G.value&&P.value?(o.openBlock(),o.createElementBlock("div",Rn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[0]||(ne[0]=be=>_()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:b.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(U,["stop"]),onContextmenu:Se,onKeydown:[o.withKeys(o.withModifiers(K,["prevent"]),["enter"]),o.withKeys(te,["escape"])],onBlur:K,ref_key:"tagNameRef",ref:Q,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:S.value),45,In)]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:H=>le(O),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:H=>{u.value===O&&(ie.value=H)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?T.value:O),45,Fn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:b.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:H=>D(O),onKeydown:[o.withKeys(o.withModifiers(Z,["prevent"]),["enter"]),o.withKeys(ye,["escape"])],onBlur:Z,ref_for:!0,ref:H=>{c.value===O&&(j.value=H)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?x.value:be),45,Pn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[1]||(ne[1]=be=>_()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},">",4)]),o.createElementVNode("span",{class:"xml-node__collapsed-badge",style:o.normalizeStyle({backgroundColor:b.theme.colors.collapsedBackground,color:b.theme.colors.collapsedText}),onClick:ne[2]||(ne[2]=be=>_()),title:`Click to expand ${ee.value} child element${ee.value>1?"s":""}`},o.toDisplayString(ee.value)+" child"+o.toDisplayString(ee.value>1?"ren":""),13,Ln),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[3]||(ne[3]=be=>_()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:b.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:S.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},">",4)])])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",Vn,[P.value?(o.openBlock(),o.createElementBlock("span",{key:0,class:"xml-node__clickable-part",onClick:ne[4]||(ne[4]=be=>_()),title:G.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:b.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(U,["stop"]),onContextmenu:Se,onKeydown:[o.withKeys(o.withModifiers(K,["prevent"]),["enter"]),o.withKeys(te,["escape"])],onBlur:K,ref_key:"tagNameRef",ref:Q,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:S.value),45,Mn)],8,$n)):(o.openBlock(),o.createElementBlock("span",Un,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:b.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:U,onKeydown:[o.withKeys(o.withModifiers(K,["prevent"]),["enter"]),o.withKeys(te,["escape"])],onBlur:K,ref_key:"tagNameRef",ref:Q,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:S.value),45,qn)])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:H=>le(O),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:H=>{u.value===O&&(ie.value=H)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?T.value:O),45,Hn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:b.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:b.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:H=>D(O),onKeydown:[o.withKeys(o.withModifiers(Z,["prevent"]),["enter"]),o.withKeys(ye,["escape"])],onBlur:Z,ref_for:!0,ref:H=>{c.value===O&&(j.value=H)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?x.value:be),45,jn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:b.theme.colors.xmlQuote})},'"',4)]))),128)),P.value?(o.openBlock(),o.createElementBlock("span",{key:2,class:"xml-node__clickable-part",onClick:ne[5]||(ne[5]=be=>_()),title:G.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},">",4)],8,Kn)):(o.openBlock(),o.createElementBlock("span",{key:3,class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},o.toDisplayString(P.value?">":"/>"),5))]),G.value&&P.value?(o.openBlock(),o.createElementBlock("div",Gn,[X.value.length===0&&$.value.trim()?(o.openBlock(),o.createElementBlock("div",Xn,[o.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:o.normalizeStyle({color:b.theme.colors.xmlText}),contenteditable:A.value,onDblclick:k,onKeydown:[o.withKeys(o.withModifiers(I,["prevent"]),["enter"]),o.withKeys(we,["escape"])],onBlur:I,ref_key:"textContentRef",ref:ce,title:"Double-click to edit text content"},o.toDisplayString(A.value?L.value:$.value),45,Wn)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(X.value,(be,O)=>(o.openBlock(),o.createBlock(Ce,{key:W(be,O),node:be,index:O,level:b.level+1,"parent-path":J(),expanded:b.expanded,theme:b.theme,selfClosingTags:b.selfClosingTags,onToggleExpand:ne[6]||(ne[6]=H=>b.$emit("toggle-expand",H)),onCopy:ne[7]||(ne[7]=H=>b.$emit("copy",H)),"onUpdate:tagName":ne[8]||(ne[8]=(H,Re,qe)=>b.$emit("update:tagName",H,Re,qe)),"onUpdate:attributeName":ne[9]||(ne[9]=(H,Re,qe)=>b.$emit("update:attributeName",H,Re,qe)),"onUpdate:attributeValue":ne[10]||(ne[10]=(H,Re,qe)=>b.$emit("update:attributeValue",H,Re,qe)),"onUpdate:textContent":ne[11]||(ne[11]=(H,Re)=>b.$emit("update:textContent",H,Re)),"onUpdate:cdataContent":ne[12]||(ne[12]=(H,Re)=>b.$emit("update:cdataContent",H,Re))},null,8,["node","index","level","parent-path","expanded","theme","selfClosingTags"]))),128))])):o.createCommentVNode("",!0),G.value&&P.value?(o.openBlock(),o.createElementBlock("div",zn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[13]||(ne[13]=be=>_()),title:"Click to collapse"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:b.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:S.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:b.theme.colors.xmlBracket})},">",4)])])):o.createCommentVNode("",!0)],64))]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-acda96f3"]]),Kt={"github-light":{name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#57606a",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#1f883d",buttonPrimaryHover:"#1a7f37",success:"#1f883d",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",xmlTag:"#116329",xmlAttribute:"#0550ae",xmlAttributeValue:"#0a3069",xmlText:"#24292f",xmlComment:"#6e7781",xmlCdata:"#8250df",xmlDeclaration:"#953800",xmlBracket:"#6e7781",xmlEquals:"#6e7781",xmlQuote:"#0550ae",collapsedBackground:"#ddf4ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#c9d1d9",textSecondary:"#8b949e",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#c9d1d9",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2e1c",error:"#f85149",errorBackground:"#3d1319",xmlTag:"#7ee787",xmlAttribute:"#79c0ff",xmlAttributeValue:"#a5d6ff",xmlText:"#c9d1d9",xmlComment:"#8b949e",xmlCdata:"#d2a8ff",xmlDeclaration:"#ffa657",xmlBracket:"#8b949e",xmlEquals:"#8b949e",xmlQuote:"#79c0ff",collapsedBackground:"#1c2d41",collapsedText:"#58a6ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#171717",textSecondary:"#737373",buttonBackground:"#fafafa",buttonBackgroundHover:"#f5f5f5",buttonBorder:"#e5e5e5",buttonText:"#171717",buttonPrimary:"#22c55e",buttonPrimaryHover:"#16a34a",success:"#22c55e",successBackground:"#dcfce7",error:"#ef4444",errorBackground:"#fee2e2",xmlTag:"#16a34a",xmlAttribute:"#2563eb",xmlAttributeValue:"#1e40af",xmlText:"#171717",xmlComment:"#737373",xmlCdata:"#9333ea",xmlDeclaration:"#ea580c",xmlBracket:"#737373",xmlEquals:"#737373",xmlQuote:"#2563eb",collapsedBackground:"#dbeafe",collapsedText:"#1d4ed8",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fef5ed",surfaceBackground:"#fef9f3",border:"#e9dcc9",text:"#3d3c40",textSecondary:"#616061",buttonBackground:"#fef9f3",buttonBackgroundHover:"#f9f0e5",buttonBorder:"#e9dcc9",buttonText:"#3d3c40",buttonPrimary:"#007a5a",buttonPrimaryHover:"#006644",success:"#007a5a",successBackground:"#d1f4e0",error:"#e01e5a",errorBackground:"#ffdbea",xmlTag:"#007a5a",xmlAttribute:"#1264a3",xmlAttributeValue:"#0b4c8c",xmlText:"#3d3c40",xmlComment:"#616061",xmlCdata:"#8b2eff",xmlDeclaration:"#e8912d",xmlBracket:"#616061",xmlEquals:"#616061",xmlQuote:"#1264a3",collapsedBackground:"#d8eaf5",collapsedText:"#0b4c8c",indentLine:"#e8d5b7"}}},Qn=n=>Kt[n]||Kt["github-light"],Gt=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Zn=Gt+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Jn="["+Gt+"]["+Zn+"]*",eo=new RegExp("^"+Jn+"$");function Xt(n,t){const r=[];let a=t.exec(n);for(;a;){const i=[];i.startIndex=t.lastIndex-a[0].length;const u=a.length;for(let c=0;c<u;c++)i.push(a[c]);r.push(i),a=t.exec(n)}return r}const At=function(n){const t=eo.exec(n);return!(t===null||typeof t>"u")};function to(n){return typeof n<"u"}const ro={allowBooleanAttributes:!1,unpairedTags:[]};function Wt(n,t){t=Object.assign({},ro,t);const r=[];let a=!1,i=!1;n[0]==="\uFEFF"&&(n=n.substr(1));for(let u=0;u<n.length;u++)if(n[u]==="<"&&n[u+1]==="?"){if(u+=2,u=Yt(n,u),u.err)return u}else if(n[u]==="<"){let c=u;if(u++,n[u]==="!"){u=Qt(n,u);continue}else{let A=!1;n[u]==="/"&&(A=!0,u++);let p="";for(;u<n.length&&n[u]!==">"&&n[u]!==" "&&n[u]!==" "&&n[u]!==`
14
+ `&&n[u]!=="\r";u++)p+=n[u];if(p=p.trim(),p[p.length-1]==="/"&&(p=p.substring(0,p.length-1),u--),!co(p)){let x;return p.trim().length===0?x="Invalid space after '<'.":x="Tag '"+p+"' is an invalid name.",Oe("InvalidTag",x,Ve(n,u))}const m=so(n,u);if(m===!1)return Oe("InvalidAttr","Attributes for '"+p+"' have open quote.",Ve(n,u));let T=m.value;if(u=m.index,T[T.length-1]==="/"){const x=u-T.length;T=T.substring(0,T.length-1);const L=Zt(T,t);if(L===!0)a=!0;else return Oe(L.err.code,L.err.msg,Ve(n,x+L.err.line))}else if(A)if(m.tagClosed){if(T.trim().length>0)return Oe("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",Ve(n,c));if(r.length===0)return Oe("InvalidTag","Closing tag '"+p+"' has not been opened.",Ve(n,c));{const x=r.pop();if(p!==x.tagName){let L=Ve(n,x.tagStartPos);return Oe("InvalidTag","Expected closing tag '"+x.tagName+"' (opened in line "+L.line+", col "+L.col+") instead of closing tag '"+p+"'.",Ve(n,c))}r.length==0&&(i=!0)}}else return Oe("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",Ve(n,u));else{const x=Zt(T,t);if(x!==!0)return Oe(x.err.code,x.err.msg,Ve(n,u-T.length+x.err.line));if(i===!0)return Oe("InvalidXml","Multiple possible root nodes found.",Ve(n,u));t.unpairedTags.indexOf(p)!==-1||r.push({tagName:p,tagStartPos:c}),a=!0}for(u++;u<n.length;u++)if(n[u]==="<")if(n[u+1]==="!"){u++,u=Qt(n,u);continue}else if(n[u+1]==="?"){if(u=Yt(n,++u),u.err)return u}else break;else if(n[u]==="&"){const x=uo(n,u);if(x==-1)return Oe("InvalidChar","char '&' is not expected.",Ve(n,u));u=x}else if(i===!0&&!zt(n[u]))return Oe("InvalidXml","Extra text at the end",Ve(n,u));n[u]==="<"&&u--}}else{if(zt(n[u]))continue;return Oe("InvalidChar","char '"+n[u]+"' is not expected.",Ve(n,u))}if(a){if(r.length==1)return Oe("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Ve(n,r[0].tagStartPos));if(r.length>0)return Oe("InvalidXml","Invalid '"+JSON.stringify(r.map(u=>u.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Oe("InvalidXml","Start tag expected.",1);return!0}function zt(n){return n===" "||n===" "||n===`
15
+ `||n==="\r"}function Yt(n,t){const r=t;for(;t<n.length;t++)if(n[t]=="?"||n[t]==" "){const a=n.substr(r,t-r);if(t>5&&a==="xml")return Oe("InvalidXml","XML declaration allowed only at the start of the document.",Ve(n,t));if(n[t]=="?"&&n[t+1]==">"){t++;break}else continue}return t}function Qt(n,t){if(n.length>t+5&&n[t+1]==="-"&&n[t+2]==="-"){for(t+=3;t<n.length;t++)if(n[t]==="-"&&n[t+1]==="-"&&n[t+2]===">"){t+=2;break}}else if(n.length>t+8&&n[t+1]==="D"&&n[t+2]==="O"&&n[t+3]==="C"&&n[t+4]==="T"&&n[t+5]==="Y"&&n[t+6]==="P"&&n[t+7]==="E"){let r=1;for(t+=8;t<n.length;t++)if(n[t]==="<")r++;else if(n[t]===">"&&(r--,r===0))break}else if(n.length>t+9&&n[t+1]==="["&&n[t+2]==="C"&&n[t+3]==="D"&&n[t+4]==="A"&&n[t+5]==="T"&&n[t+6]==="A"&&n[t+7]==="["){for(t+=8;t<n.length;t++)if(n[t]==="]"&&n[t+1]==="]"&&n[t+2]===">"){t+=2;break}}return t}const no='"',oo="'";function so(n,t){let r="",a="",i=!1;for(;t<n.length;t++){if(n[t]===no||n[t]===oo)a===""?a=n[t]:a!==n[t]||(a="");else if(n[t]===">"&&a===""){i=!0;break}r+=n[t]}return a!==""?!1:{value:r,index:t,tagClosed:i}}const io=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Zt(n,t){const r=Xt(n,io),a={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return Oe("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",ht(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return Oe("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",ht(r[i]));if(r[i][3]===void 0&&!t.allowBooleanAttributes)return Oe("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",ht(r[i]));const u=r[i][2];if(!lo(u))return Oe("InvalidAttr","Attribute '"+u+"' is an invalid name.",ht(r[i]));if(!a.hasOwnProperty(u))a[u]=1;else return Oe("InvalidAttr","Attribute '"+u+"' is repeated.",ht(r[i]))}return!0}function ao(n,t){let r=/\d/;for(n[t]==="x"&&(t++,r=/[\da-fA-F]/);t<n.length;t++){if(n[t]===";")return t;if(!n[t].match(r))break}return-1}function uo(n,t){if(t++,n[t]===";")return-1;if(n[t]==="#")return t++,ao(n,t);let r=0;for(;t<n.length;t++,r++)if(!(n[t].match(/\w/)&&r<20)){if(n[t]===";")break;return-1}return t}function Oe(n,t,r){return{err:{code:n,msg:t,line:r.line||r,col:r.col}}}function lo(n){return At(n)}function co(n){return At(n)}function Ve(n,t){const r=n.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function ht(n){return n.startIndex+n[1].length}const fo={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,t,r){return n},captureMetaData:!1},po=function(n){return Object.assign({},fo,n)};let Nt;typeof Symbol!="function"?Nt="@@xmlMetadata":Nt=Symbol("XML Node Metadata");class at{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t,r){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),r!==void 0&&(this.child[this.child.length-1][Nt]={startIndex:r})}static getMetaDataSymbol(){return Nt}}class ho{constructor(t){this.suppressValidationErr=!t}readDocType(t,r){const a={};if(t[r+3]==="O"&&t[r+4]==="C"&&t[r+5]==="T"&&t[r+6]==="Y"&&t[r+7]==="P"&&t[r+8]==="E"){r=r+9;let i=1,u=!1,c=!1,A="";for(;r<t.length;r++)if(t[r]==="<"&&!c){if(u&&ut(t,"!ENTITY",r)){r+=7;let p,m;[p,m,r]=this.readEntityExp(t,r+1,this.suppressValidationErr),m.indexOf("&")===-1&&(a[p]={regx:RegExp(`&${p};`,"g"),val:m})}else if(u&&ut(t,"!ELEMENT",r)){r+=8;const{index:p}=this.readElementExp(t,r+1);r=p}else if(u&&ut(t,"!ATTLIST",r))r+=8;else if(u&&ut(t,"!NOTATION",r)){r+=9;const{index:p}=this.readNotationExp(t,r+1,this.suppressValidationErr);r=p}else if(ut(t,"!--",r))c=!0;else throw new Error("Invalid DOCTYPE");i++,A=""}else if(t[r]===">"){if(c?t[r-1]==="-"&&t[r-2]==="-"&&(c=!1,i--):i--,i===0)break}else t[r]==="["?u=!0:A+=t[r];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:a,i:r}}readEntityExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r])&&t[r]!=='"'&&t[r]!=="'";)a+=t[r],r++;if(mt(a),r=$e(t,r),!this.suppressValidationErr){if(t.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[r]==="%")throw new Error("Parameter entities are not supported")}let i="";return[r,i]=this.readIdentifierVal(t,r,"entity"),r--,[a,i,r]}readNotationExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;!this.suppressValidationErr&&mt(a),r=$e(t,r);const i=t.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=$e(t,r);let u=null,c=null;if(i==="PUBLIC")[r,u]=this.readIdentifierVal(t,r,"publicIdentifier"),r=$e(t,r),(t[r]==='"'||t[r]==="'")&&([r,c]=this.readIdentifierVal(t,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,c]=this.readIdentifierVal(t,r,"systemIdentifier"),!this.suppressValidationErr&&!c))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:a,publicIdentifier:u,systemIdentifier:c,index:--r}}readIdentifierVal(t,r,a){let i="";const u=t[r];if(u!=='"'&&u!=="'")throw new Error(`Expected quoted string, found "${u}"`);for(r++;r<t.length&&t[r]!==u;)i+=t[r],r++;if(t[r]!==u)throw new Error(`Unterminated ${a} value`);return r++,[r,i]}readElementExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;if(!this.suppressValidationErr&&!At(a))throw new Error(`Invalid element name: "${a}"`);r=$e(t,r);let i="";if(t[r]==="E"&&ut(t,"MPTY",r))r+=4;else if(t[r]==="A"&&ut(t,"NY",r))r+=2;else if(t[r]==="("){for(r++;r<t.length&&t[r]!==")";)i+=t[r],r++;if(t[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[r]}"`);return{elementName:a,contentModel:i.trim(),index:r}}readAttlistExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;mt(a),r=$e(t,r);let i="";for(;r<t.length&&!/\s/.test(t[r]);)i+=t[r],r++;if(!mt(i))throw new Error(`Invalid attribute name: "${i}"`);r=$e(t,r);let u="";if(t.substring(r,r+8).toUpperCase()==="NOTATION"){if(u="NOTATION",r+=8,r=$e(t,r),t[r]!=="(")throw new Error(`Expected '(', found "${t[r]}"`);r++;let A=[];for(;r<t.length&&t[r]!==")";){let p="";for(;r<t.length&&t[r]!=="|"&&t[r]!==")";)p+=t[r],r++;if(p=p.trim(),!mt(p))throw new Error(`Invalid notation name: "${p}"`);A.push(p),t[r]==="|"&&(r++,r=$e(t,r))}if(t[r]!==")")throw new Error("Unterminated list of notations");r++,u+=" ("+A.join("|")+")"}else{for(;r<t.length&&!/\s/.test(t[r]);)u+=t[r],r++;const A=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!A.includes(u.toUpperCase()))throw new Error(`Invalid attribute type: "${u}"`)}r=$e(t,r);let c="";return t.substring(r,r+8).toUpperCase()==="#REQUIRED"?(c="#REQUIRED",r+=8):t.substring(r,r+7).toUpperCase()==="#IMPLIED"?(c="#IMPLIED",r+=7):[r,c]=this.readIdentifierVal(t,r,"ATTLIST"),{elementName:a,attributeName:i,attributeType:u,defaultValue:c,index:r}}}const $e=(n,t)=>{for(;t<n.length&&/\s/.test(n[t]);)t++;return t};function ut(n,t,r){for(let a=0;a<t.length;a++)if(t[a]!==n[r+a+1])return!1;return!0}function mt(n){if(At(n))return n;throw new Error(`Invalid entity name ${n}`)}const mo=/^[-+]?0x[a-fA-F0-9]+$/,go=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Eo={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function yo(n,t={}){if(t=Object.assign({},Eo,t),!n||typeof n!="string")return n;let r=n.trim();if(t.skipLike!==void 0&&t.skipLike.test(r))return n;if(n==="0")return 0;if(t.hex&&mo.test(r))return xo(r,16);if(r.search(/.+[eE].+/)!==-1)return Ao(n,r,t);{const a=go.exec(r);if(a){const i=a[1]||"",u=a[2];let c=No(a[3]);const A=i?n[u.length+1]===".":n[u.length]===".";if(!t.leadingZeros&&(u.length>1||u.length===1&&!A))return n;{const p=Number(r),m=String(p);if(p===0)return p;if(m.search(/[eE]/)!==-1)return t.eNotation?p:n;if(r.indexOf(".")!==-1)return m==="0"||m===c||m===`${i}${c}`?p:n;let T=u?c:r;return u?T===m||i+T===m?p:n:T===m||T===i+m?p:n}}else return n}}const bo=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Ao(n,t,r){if(!r.eNotation)return n;const a=t.match(bo);if(a){let i=a[1]||"";const u=a[3].indexOf("e")===-1?"E":"e",c=a[2],A=i?n[c.length+1]===u:n[c.length]===u;return c.length>1&&A?n:c.length===1&&(a[3].startsWith(`.${u}`)||a[3][0]===u)?Number(t):r.leadingZeros&&!A?(t=(a[1]||"")+a[3],Number(t)):n}else return n}function No(n){return n&&n.indexOf(".")!==-1&&(n=n.replace(/0+$/,""),n==="."?n="0":n[0]==="."?n="0"+n:n[n.length-1]==="."&&(n=n.substring(0,n.length-1))),n}function xo(n,t){if(parseInt)return parseInt(n,t);if(Number.parseInt)return Number.parseInt(n,t);if(window&&window.parseInt)return window.parseInt(n,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Jt(n){return typeof n=="function"?n:Array.isArray(n)?t=>{for(const r of n)if(typeof r=="string"&&t===r||r instanceof RegExp&&r.test(t))return!0}:()=>!1}class Co{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,a)=>String.fromCodePoint(Number.parseInt(a,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,a)=>String.fromCodePoint(Number.parseInt(a,16))}},this.addExternalEntities=vo,this.parseXml=So,this.parseTextData=Do,this.resolveNameSpace=To,this.buildAttributesMap=_o,this.isItStopNode=Ro,this.replaceEntitiesValue=Oo,this.readStopNodeData=Fo,this.saveTextToParentTag=ko,this.addChild=Bo,this.ignoreAttributesFn=Jt(this.options.ignoreAttributes)}}function vo(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];this.lastEntities[a]={regex:new RegExp("&"+a+";","g"),val:n[a]}}}function Do(n,t,r,a,i,u,c){if(n!==void 0&&(this.options.trimValues&&!a&&(n=n.trim()),n.length>0)){c||(n=this.replaceEntitiesValue(n));const A=this.options.tagValueProcessor(t,n,r,i,u);return A==null?n:typeof A!=typeof n||A!==n?A:this.options.trimValues?_t(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?_t(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function To(n){if(this.options.removeNSPrefix){const t=n.split(":"),r=n.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(n=r+t[1])}return n}const wo=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function _o(n,t,r){if(this.options.ignoreAttributes!==!0&&typeof n=="string"){const a=Xt(n,wo),i=a.length,u={};for(let c=0;c<i;c++){const A=this.resolveNameSpace(a[c][1]);if(this.ignoreAttributesFn(A,t))continue;let p=a[c][4],m=this.options.attributeNamePrefix+A;if(A.length)if(this.options.transformAttributeName&&(m=this.options.transformAttributeName(m)),m==="__proto__"&&(m="#__proto__"),p!==void 0){this.options.trimValues&&(p=p.trim()),p=this.replaceEntitiesValue(p);const T=this.options.attributeValueProcessor(A,p,t);T==null?u[m]=p:typeof T!=typeof p||T!==p?u[m]=T:u[m]=_t(p,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(u[m]=!0)}if(!Object.keys(u).length)return;if(this.options.attributesGroupName){const c={};return c[this.options.attributesGroupName]=u,c}return u}}const So=function(n){n=n.replace(/\r\n?/g,`
16
+ `);const t=new at("!xml");let r=t,a="",i="";const u=new ho(this.options.processEntities);for(let c=0;c<n.length;c++)if(n[c]==="<")if(n[c+1]==="/"){const p=lt(n,">",c,"Closing Tag is not closed.");let m=n.substring(c+2,p).trim();if(this.options.removeNSPrefix){const L=m.indexOf(":");L!==-1&&(m=m.substr(L+1))}this.options.transformTagName&&(m=this.options.transformTagName(m)),r&&(a=this.saveTextToParentTag(a,r,i));const T=i.substring(i.lastIndexOf(".")+1);if(m&&this.options.unpairedTags.indexOf(m)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${m}>`);let x=0;T&&this.options.unpairedTags.indexOf(T)!==-1?(x=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):x=i.lastIndexOf("."),i=i.substring(0,x),r=this.tagsNodeStack.pop(),a="",c=p}else if(n[c+1]==="?"){let p=wt(n,c,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");if(a=this.saveTextToParentTag(a,r,i),!(this.options.ignoreDeclaration&&p.tagName==="?xml"||this.options.ignorePiTags)){const m=new at(p.tagName);m.add(this.options.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&(m[":@"]=this.buildAttributesMap(p.tagExp,i,p.tagName)),this.addChild(r,m,i,c)}c=p.closeIndex+1}else if(n.substr(c+1,3)==="!--"){const p=lt(n,"-->",c+4,"Comment is not closed.");if(this.options.commentPropName){const m=n.substring(c+4,p-2);a=this.saveTextToParentTag(a,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:m}])}c=p}else if(n.substr(c+1,2)==="!D"){const p=u.readDocType(n,c);this.docTypeEntities=p.entities,c=p.i}else if(n.substr(c+1,2)==="!["){const p=lt(n,"]]>",c,"CDATA is not closed.")-2,m=n.substring(c+9,p);a=this.saveTextToParentTag(a,r,i);let T=this.parseTextData(m,r.tagname,i,!0,!1,!0,!0);T==null&&(T=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:m}]):r.add(this.options.textNodeName,T),c=p+2}else{let p=wt(n,c,this.options.removeNSPrefix),m=p.tagName;const T=p.rawTagName;let x=p.tagExp,L=p.attrExpPresent,F=p.closeIndex;this.options.transformTagName&&(m=this.options.transformTagName(m)),r&&a&&r.tagname!=="!xml"&&(a=this.saveTextToParentTag(a,r,i,!1));const Q=r;Q&&this.options.unpairedTags.indexOf(Q.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),m!==t.tagname&&(i+=i?"."+m:m);const ie=c;if(this.isItStopNode(this.options.stopNodes,i,m)){let j="";if(x.length>0&&x.lastIndexOf("/")===x.length-1)m[m.length-1]==="/"?(m=m.substr(0,m.length-1),i=i.substr(0,i.length-1),x=m):x=x.substr(0,x.length-1),c=p.closeIndex;else if(this.options.unpairedTags.indexOf(m)!==-1)c=p.closeIndex;else{const he=this.readStopNodeData(n,T,F+1);if(!he)throw new Error(`Unexpected end of ${T}`);c=he.i,j=he.tagContent}const ce=new at(m);m!==x&&L&&(ce[":@"]=this.buildAttributesMap(x,i,m)),j&&(j=this.parseTextData(j,m,i,!0,L,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),ce.add(this.options.textNodeName,j),this.addChild(r,ce,i,ie)}else{if(x.length>0&&x.lastIndexOf("/")===x.length-1){m[m.length-1]==="/"?(m=m.substr(0,m.length-1),i=i.substr(0,i.length-1),x=m):x=x.substr(0,x.length-1),this.options.transformTagName&&(m=this.options.transformTagName(m));const j=new at(m);m!==x&&L&&(j[":@"]=this.buildAttributesMap(x,i,m)),this.addChild(r,j,i,ie),i=i.substr(0,i.lastIndexOf("."))}else{const j=new at(m);this.tagsNodeStack.push(r),m!==x&&L&&(j[":@"]=this.buildAttributesMap(x,i,m)),this.addChild(r,j,i,ie),r=j}a="",c=F}}else a+=n[c];return t.child};function Bo(n,t,r,a){this.options.captureMetaData||(a=void 0);const i=this.options.updateTag(t.tagname,r,t[":@"]);i===!1||(typeof i=="string"&&(t.tagname=i),n.addChild(t,a))}const Oo=function(n){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];n=n.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];n=n.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];n=n.replace(r.regex,r.val)}n=n.replace(this.ampEntity.regex,this.ampEntity.val)}return n};function ko(n,t,r,a){return n&&(a===void 0&&(a=t.child.length===0),n=this.parseTextData(n,t.tagname,r,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,a),n!==void 0&&n!==""&&t.add(this.options.textNodeName,n),n=""),n}function Ro(n,t,r){const a="*."+r;for(const i in n){const u=n[i];if(a===u||t===u)return!0}return!1}function Io(n,t,r=">"){let a,i="";for(let u=t;u<n.length;u++){let c=n[u];if(a)c===a&&(a="");else if(c==='"'||c==="'")a=c;else if(c===r[0])if(r[1]){if(n[u+1]===r[1])return{data:i,index:u}}else return{data:i,index:u};else c===" "&&(c=" ");i+=c}}function lt(n,t,r,a){const i=n.indexOf(t,r);if(i===-1)throw new Error(a);return i+t.length-1}function wt(n,t,r,a=">"){const i=Io(n,t+1,a);if(!i)return;let u=i.data;const c=i.index,A=u.search(/\s/);let p=u,m=!0;A!==-1&&(p=u.substring(0,A),u=u.substring(A+1).trimStart());const T=p;if(r){const x=p.indexOf(":");x!==-1&&(p=p.substr(x+1),m=p!==i.data.substr(x+1))}return{tagName:p,tagExp:u,closeIndex:c,attrExpPresent:m,rawTagName:T}}function Fo(n,t,r){const a=r;let i=1;for(;r<n.length;r++)if(n[r]==="<")if(n[r+1]==="/"){const u=lt(n,">",r,`${t} is not closed`);if(n.substring(r+2,u).trim()===t&&(i--,i===0))return{tagContent:n.substring(a,r),i:u};r=u}else if(n[r+1]==="?")r=lt(n,"?>",r+1,"StopNode is not closed.");else if(n.substr(r+1,3)==="!--")r=lt(n,"-->",r+3,"StopNode is not closed.");else if(n.substr(r+1,2)==="![")r=lt(n,"]]>",r,"StopNode is not closed.")-2;else{const u=wt(n,r,">");u&&((u&&u.tagName)===t&&u.tagExp[u.tagExp.length-1]!=="/"&&i++,r=u.closeIndex)}}function _t(n,t,r){if(t&&typeof n=="string"){const a=n.trim();return a==="true"?!0:a==="false"?!1:yo(n,r)}else return to(n)?n:""}const St=at.getMetaDataSymbol();function Po(n,t){return er(n,t)}function er(n,t,r){let a;const i={};for(let u=0;u<n.length;u++){const c=n[u],A=Lo(c);let p="";if(r===void 0?p=A:p=r+"."+A,A===t.textNodeName)a===void 0?a=c[A]:a+=""+c[A];else{if(A===void 0)continue;if(c[A]){let m=er(c[A],t,p);const T=$o(m,t);c[St]!==void 0&&(m[St]=c[St]),c[":@"]?Vo(m,c[":@"],p,t):Object.keys(m).length===1&&m[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?m=m[t.textNodeName]:Object.keys(m).length===0&&(t.alwaysCreateTextNode?m[t.textNodeName]="":m=""),i[A]!==void 0&&i.hasOwnProperty(A)?(Array.isArray(i[A])||(i[A]=[i[A]]),i[A].push(m)):t.isArray(A,p,T)?i[A]=[m]:i[A]=m}}}return typeof a=="string"?a.length>0&&(i[t.textNodeName]=a):a!==void 0&&(i[t.textNodeName]=a),i}function Lo(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];if(a!==":@")return a}}function Vo(n,t,r,a){if(t){const i=Object.keys(t),u=i.length;for(let c=0;c<u;c++){const A=i[c];a.isArray(A,r+"."+A,!0,!0)?n[A]=[t[A]]:n[A]=t[A]}}}function $o(n,t){const{textNodeName:r}=t,a=Object.keys(n).length;return!!(a===0||a===1&&(n[r]||typeof n[r]=="boolean"||n[r]===0))}class Mo{constructor(t){this.externalEntities={},this.options=po(t)}parse(t,r){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const u=Wt(t,r);if(u!==!0)throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`)}const a=new Co(this.options);a.addExternalEntities(this.externalEntities);const i=a.parseXml(t);return this.options.preserveOrder||i===void 0?i:Po(i,this.options)}addEntity(t,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=r}static getMetaDataSymbol(){return at.getMetaDataSymbol()}}const Uo=`
17
+ `;function qo(n,t){let r="";return t.format&&t.indentBy.length>0&&(r=Uo),tr(n,t,"",r)}function tr(n,t,r,a){let i="",u=!1;for(let c=0;c<n.length;c++){const A=n[c],p=Ho(A);if(p===void 0)continue;let m="";if(r.length===0?m=p:m=`${r}.${p}`,p===t.textNodeName){let Q=A[p];jo(m,t)||(Q=t.tagValueProcessor(p,Q),Q=nr(Q,t)),u&&(i+=a),i+=Q,u=!1;continue}else if(p===t.cdataPropName){u&&(i+=a),i+=`<![CDATA[${A[p][0][t.textNodeName]}]]>`,u=!1;continue}else if(p===t.commentPropName){i+=a+`<!--${A[p][0][t.textNodeName]}-->`,u=!0;continue}else if(p[0]==="?"){const Q=rr(A[":@"],t),ie=p==="?xml"?"":a;let j=A[p][0][t.textNodeName];j=j.length!==0?" "+j:"",i+=ie+`<${p}${j}${Q}?>`,u=!0;continue}let T=a;T!==""&&(T+=t.indentBy);const x=rr(A[":@"],t),L=a+`<${p}${x}`,F=tr(A[p],t,m,T);t.unpairedTags.indexOf(p)!==-1?t.suppressUnpairedNode?i+=L+">":i+=L+"/>":(!F||F.length===0)&&t.suppressEmptyNode?i+=L+"/>":F&&F.endsWith(">")?i+=L+`>${F}${a}</${p}>`:(i+=L+">",F&&a!==""&&(F.includes("/>")||F.includes("</"))?i+=a+t.indentBy+F+a:i+=F,i+=`</${p}>`),u=!0}return i}function Ho(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];if(n.hasOwnProperty(a)&&a!==":@")return a}}function rr(n,t){let r="";if(n&&!t.ignoreAttributes)for(let a in n){if(!n.hasOwnProperty(a))continue;let i=t.attributeValueProcessor(a,n[a]);i=nr(i,t),i===!0&&t.suppressBooleanAttributes?r+=` ${a.substr(t.attributeNamePrefix.length)}`:r+=` ${a.substr(t.attributeNamePrefix.length)}="${i}"`}return r}function jo(n,t){n=n.substr(0,n.length-t.textNodeName.length-1);let r=n.substr(n.lastIndexOf(".")+1);for(let a in t.stopNodes)if(t.stopNodes[a]===n||t.stopNodes[a]==="*."+r)return!0;return!1}function nr(n,t){if(n&&n.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const a=t.entities[r];n=n.replace(a.regex,a.val)}return n}const Ko={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function nt(n){this.options=Object.assign({},Ko,n),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Jt(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Wo),this.processTextOrObjNode=Go,this.options.format?(this.indentate=Xo,this.tagEndChar=`>
18
18
  `,this.newLine=`
19
- `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}nt.prototype.build=function(n){return this.options.preserveOrder?Uo(n,this.options):(Array.isArray(n)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(n={[this.options.arrayNodeName]:n}),this.j2x(n,0,[]).val)},nt.prototype.j2x=function(n,t,r){let a="",i="";const u=r.join(".");for(let f in n)if(Object.prototype.hasOwnProperty.call(n,f))if(typeof n[f]>"u")this.isAttribute(f)&&(i+="");else if(n[f]===null)this.isAttribute(f)||f===this.options.cdataPropName?i+="":f[0]==="?"?i+=this.indentate(t)+"<"+f+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+f+"/"+this.tagEndChar;else if(n[f]instanceof Date)i+=this.buildTextValNode(n[f],f,"",t);else if(typeof n[f]!="object"){const x=this.isAttribute(f);if(x&&!this.ignoreAttributesFn(x,u))a+=this.buildAttrPairStr(x,""+n[f]);else if(!x)if(f===this.options.textNodeName){let p=this.options.tagValueProcessor(f,""+n[f]);i+=this.replaceEntitiesValue(p)}else i+=this.buildTextValNode(n[f],f,"",t)}else if(Array.isArray(n[f])){const x=n[f].length;let p="",m="";for(let S=0;S<x;S++){const v=n[f][S];if(!(typeof v>"u"))if(v===null)f[0]==="?"?i+=this.indentate(t)+"<"+f+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+f+"/"+this.tagEndChar;else if(typeof v=="object")if(this.options.oneListGroup){const U=this.j2x(v,t+1,r.concat(f));p+=U.val,this.options.attributesGroupName&&v.hasOwnProperty(this.options.attributesGroupName)&&(m+=U.attrStr)}else p+=this.processTextOrObjNode(v,f,t,r);else if(this.options.oneListGroup){let U=this.options.tagValueProcessor(f,v);U=this.replaceEntitiesValue(U),p+=U}else p+=this.buildTextValNode(v,f,"",t)}this.options.oneListGroup&&(p=this.buildObjectNode(p,f,m,t)),i+=p}else if(this.options.attributesGroupName&&f===this.options.attributesGroupName){const x=Object.keys(n[f]),p=x.length;for(let m=0;m<p;m++)a+=this.buildAttrPairStr(x[m],""+n[f][x[m]])}else i+=this.processTextOrObjNode(n[f],f,t,r);return{attrStr:a,val:i}},nt.prototype.buildAttrPairStr=function(n,t){return t=this.options.attributeValueProcessor(n,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+n:" "+n+'="'+t+'"'};function Go(n,t,r,a){const i=this.j2x(n,r+1,a.concat(t));return n[this.options.textNodeName]!==void 0&&Object.keys(n).length===1?this.buildTextValNode(n[this.options.textNodeName],t,i.attrStr,r):this.buildObjectNode(i.val,t,i.attrStr,r)}nt.prototype.buildObjectNode=function(n,t,r,a){if(n==="")return t[0]==="?"?this.indentate(a)+"<"+t+r+"?"+this.tagEndChar:this.indentate(a)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,u="";return t[0]==="?"&&(u="?",i=""),(r||r==="")&&n.indexOf("<")===-1?this.indentate(a)+"<"+t+r+u+">"+n+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&u.length===0?this.indentate(a)+`<!--${n}-->`+this.newLine:this.indentate(a)+"<"+t+r+u+this.tagEndChar+n+this.indentate(a)+i}},nt.prototype.closeTag=function(n){let t="";return this.options.unpairedTags.indexOf(n)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`></${n}`,t},nt.prototype.buildTextValNode=function(n,t,r,a){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(a)+`<![CDATA[${n}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(a)+`<!--${n}-->`+this.newLine;if(t[0]==="?")return this.indentate(a)+"<"+t+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,n);return i=this.replaceEntitiesValue(i),i===""?this.indentate(a)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(a)+"<"+t+r+">"+i+"</"+t+this.tagEndChar}},nt.prototype.replaceEntitiesValue=function(n){if(n&&n.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];n=n.replace(r.regex,r.val)}return n};function Xo(n){return this.options.indentBy.repeat(n)}function Wo(n){return n.startsWith(this.options.attributeNamePrefix)&&n!==this.options.textNodeName?n.substr(this.attrPrefixLen):!1}const zo={validate:Wt},Yo={ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#text",ignoreDeclaration:!1,commentPropName:"#comment",cdataPropName:"__cdata",preserveOrder:!0,parseAttributeValue:!1,trimValues:!1,parseTagValue:!1,processEntities:!1,htmlEntities:!1,ignoreNameSpace:!1,allowBooleanAttributes:!0,unpairedTags:[],stopNodes:[],alwaysCreateTextNode:!1},Qo={ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#text",format:!0,indentBy:" ",suppressEmptyNode:!1,suppressBooleanAttributes:!1,suppressUnpairedNode:!1},Zo=n=>{const t=/<!\[CDATA\[([\s\S]*?)\]\]>/g,r=[];let a;for(;(a=t.exec(n))!==null;)r.push({start:a.index,end:a.index+a[0].length});const i=S=>r.some(v=>S>=v.start&&S<v.end),u=/&([a-zA-Z0-9#]+);/g,f=["lt","gt","amp","quot","apos"];let x,p=1,m=0;for(;(x=u.exec(n))!==null;){const S=x[1],v=x.index;if(i(v))continue;const U=n.substring(m,v);if(p+=(U.match(/\n/g)||[]).length,m=v,S.startsWith("#")){const K=S.substring(1);if(K.startsWith("x")||K.startsWith("X")){const Y=K.substring(1);if(!/^[0-9a-fA-F]+$/.test(Y))return{valid:!1,error:`Line ${p}: Invalid hexadecimal character reference '&${S};'`}}else if(!/^[0-9]+$/.test(K))return{valid:!1,error:`Line ${p}: Invalid numeric character reference '&${S};'`};continue}if(!f.includes(S))return{valid:!1,error:`Line ${p}: Invalid entity reference '&${S};'. Valid predefined entities are: &lt; &gt; &amp; &quot; &apos;`}}return{valid:!0}},Jo=n=>{try{const t=zo.validate(n,{allowBooleanAttributes:!0});if(t!==!0)return{valid:!1,error:`Line ${t.err.line}: ${t.err.msg}`};const r=Zo(n);return r.valid?{valid:!0}:r}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}},St=(n,t)=>{try{return new Mo({...Yo,...t}).parse(n)}catch(r){throw new Error(`XML 解析失败: ${r instanceof Error?r.message:"Unknown error"}`)}},Ot=(n,t)=>{try{let a=new nt({...Qo,format:t?.format??!0,indentBy:t?.indentBy??" "}).build(n);return t?.showDeclaration!==!1&&!a.startsWith("<?xml")&&(a=`<?xml version="1.0" encoding="UTF-8"?>
20
- `+a),a}catch(r){throw new Error(`XML 构建失败: ${r instanceof Error?r.message:"Unknown error"}`)}},es=(n,t)=>Array.isArray(n)?et(n,{format:!1,originalXml:t}):Ot(n,{format:!1,showDeclaration:!1}),ts=(n,t)=>{const r=St(n);return Array.isArray(r)?et(r,{indent:t?.indentBy,originalXml:n}):Ot(r,t)},or=n=>{const t=new Set,r=/<([a-zA-Z0-9_-]+)(?:\s[^>]*)?\s*\/>/g;let a;for(;(a=r.exec(n))!==null;)t.add(a[1]);return t},et=(n,t={})=>{const r=t.indent!==void 0?t.indent:" ",a=t.level||0,i=t.format!==!1,u=i?r.repeat(a):"",f=i?`
21
- `:"";let x=t.selfClosingTags;!x&&t.originalXml&&a===0&&(x=or(t.originalXml));let p="";for(const m of n){if(m["?xml"]){const z=m[":@"]||{},me=Object.entries(z).map(([be,J])=>`${be.startsWith("@_")?be.substring(2):be}="${J}"`).join(" ");p+=`<?xml ${me}?>${f}`;continue}if(m["#comment"]){const z=m["#comment"];if(Array.isArray(z)&&z.length>0){const me=z[0]["#text"]||z[0];p+=`${u}<!--${me}-->${f}`}continue}const S=Object.keys(m).find(z=>!z.startsWith(":")&&!z.startsWith("#")&&!z.startsWith("__"));if(!S)continue;const v=m[S],U=m[":@"]||{},K=Object.entries(U).map(([z,me])=>`${z.startsWith("@_")?z.substring(2):z}="${me}"`).join(" "),Y=K?" "+K:"";if(!Array.isArray(v)||v.length===0){x&&x.has(S)?p+=`${u}<${S}${Y}/>${f}`:p+=`${u}<${S}${Y}></${S}>${f}`;continue}const ae=v.length===1&&v[0]["#text"]!==void 0,H=ae?v[0]["#text"]:"",de=v.some(z=>z.__cdata),re=ae&&H==="";if(de){const z=v.find(me=>me.__cdata);if(z){const me=z.__cdata[0]["#text"]||"";p+=`${u}<${S}${Y}><![CDATA[${me}]]></${S}>${f}`}}else re?p+=`${u}<${S}${Y}></${S}>${f}`:ae?p+=`${u}<${S}${Y}>${H}</${S}>${f}`:(p+=`${u}<${S}${Y}>${f}`,p+=et(v,{indent:r,level:a+1,format:i,selfClosingTags:x}),p+=`${u}</${S}>${f}`)}return p},rs={key:0,class:"xml-format__toolbar"},ns={class:"xml-format__actions"},os=["disabled"],ss=["disabled"],is=["disabled"],as=["disabled"],us=["disabled"],ls={class:"xml-format__info"},cs={key:0,class:"xml-format__status xml-format__status--success"},fs={key:1,class:"xml-format__status xml-format__status--error"},ds={class:"xml-format__content"},ps={key:0,class:"xml-format__error"},hs={key:1,class:"xml-format__error"},ms={key:2,class:"xml-format__viewer"},gs=ft(o.defineComponent({__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},maxDepth:{default:10},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"},showComments:{type:Boolean,default:!0},showCdata:{type:Boolean,default:!0},preserveWhitespace:{type:Boolean,default:!1}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress","format"],setup(n,{expose:t,emit:r}){o.useCssVars(g=>({"123bc86d":Y.value.colors.border,"6ddcbe22":Y.value.colors.background,dd0094a4:Y.value.colors.text,"094dda4c":Y.value.colors.surfaceBackground,"0ab18d02":Y.value.colors.buttonBorder,"854b8dfe":Y.value.colors.buttonBackground,"2dd84340":Y.value.colors.buttonText,"55fdce8a":Y.value.colors.buttonBackgroundHover,"437af30f":Y.value.colors.buttonPrimary,bfaf1126:Y.value.colors.buttonPrimaryHover,"7c1f183c":Y.value.colors.success,"6b8cb2b0":Y.value.colors.successBackground,c4ad1cb2:Y.value.colors.error,cc2a0396:Y.value.colors.errorBackground}));const a=n,i=r,u=o.ref(null),f=o.ref(""),x=o.ref(new Set),p=o.ref(null),m=o.ref(""),S=o.ref(""),v=o.ref(new Set),U=o.computed(()=>f.value===""),K=o.computed(()=>m.value?null:p.value!==null?p.value:u.value),Y=o.computed(()=>Qn(a.theme)),ae=o.computed(()=>{const g=K.value;return!g||!Array.isArray(g)?[]:g.map((C,V)=>({node:C,originalIndex:V})).filter(C=>!C.node["?xml"])}),H=o.computed(()=>{const g=K.value;if(!g||!Array.isArray(g))return null;const C=g.find(R=>R["?xml"]);if(!C||!C[":@"])return null;const V=C[":@"],j=[];return V["@_version"]&&j.push(`version="${V["@_version"]}"`),V["@_encoding"]&&j.push(`encoding="${V["@_encoding"]}"`),V["@_standalone"]&&j.push(`standalone="${V["@_standalone"]}"`),j.length>0?`<?xml ${j.join(" ")}?>`:null}),de=o.computed(()=>ae.value),re=g=>{if(!g||!g.trim()){f.value="",u.value=null,S.value="",p.value=null,m.value="";return}try{const C=Jo(g);if(!C.valid){f.value=C.error||"Invalid XML",u.value=null,S.value="",v.value=new Set;return}S.value=g,v.value=or(g),u.value=St(g),f.value="",p.value=null,m.value="",o.nextTick(()=>{me()})}catch(C){f.value=C instanceof Error?C.message:"Unknown parse error",u.value=null,S.value="",p.value=null,m.value=""}},z=g=>{x.value.has(g)?x.value.delete(g):x.value.add(g)},me=()=>{const g=new Set,C=(V,j="")=>{Array.isArray(V)&&V.forEach((R,ee)=>{const D=Object.keys(R).find(G=>!G.startsWith(":")&&!G.startsWith("#"));if(!D)return;const O=j?`${j}.${D}[${ee}]`:`${D}[${ee}]`;g.add(O);const F=R[D];Array.isArray(F)&&C(F,O+"."+D)})};ae.value.forEach(({node:V,originalIndex:j})=>{const R=Object.keys(V).find(ee=>!ee.startsWith(":")&&!ee.startsWith("#"));if(R){const ee=`${R}[${j}]`;g.add(ee);const D=V[R];Array.isArray(D)&&C(D,ee+"."+R)}}),x.value=g,i("expand-all")},be=()=>{x.value.clear(),i("collapse-all")},J=async()=>{if(U.value)try{const g=K.value||u.value;if(!g)return;const C=Array.isArray(g)?et(g,{indent:" ",selfClosingTags:v.value}):Ot(g,{format:!0,indentBy:" "});await navigator.clipboard.writeText(C),i("copy-success",C)}catch(g){const C=g instanceof Error?g:new Error("Copy failed");i("copy-error",C),console.error("Failed to copy XML:",g)}},N=()=>{if(!(!U.value||!u.value))try{const g=es(u.value,a.modelValue);i("update:modelValue",g),i("compress",g)}catch(g){console.error("Failed to compress XML:",g)}},le=()=>{if(U.value)try{const g=ts(a.modelValue,{format:!0,indentBy:" "});i("update:modelValue",g),i("format",g)}catch(g){console.error("Failed to format XML:",g)}},w=g=>{if(!g||!g.expression.trim()){y();return}if(!u.value||!S.value){m.value="No valid XML data to filter";return}try{const V=new jt.DOMParser().parseFromString(S.value,"text/xml"),j=on.select(g.expression,V);if(!j||Array.isArray(j)&&j.length===0){p.value=[],m.value="";return}const R=new jt.XMLSerializer;let ee="";Array.isArray(j)?(ee=`<result>
22
- `,j.forEach(D=>{D.nodeType===1?ee+=" "+R.serializeToString(D)+`
23
- `:D.nodeType===2?ee+=` <attribute name="${D.name}" value="${D.value}"/>
24
- `:D.nodeType===3&&(ee+=` <text>${D.nodeValue}</text>
25
- `)}),ee+="</result>"):ee=R.serializeToString(j),p.value=St(ee),m.value="",o.nextTick(()=>{me()})}catch(C){m.value=C instanceof Error?C.message:"Filter execution error",p.value=null}},y=()=>{p.value=null,m.value="",o.nextTick(()=>{me()})},B=async g=>{try{const C=typeof g=="string"?g:JSON.stringify(g,null,2);await navigator.clipboard.writeText(C),i("copy-success",C)}catch(C){const V=C instanceof Error?C:new Error("Copy failed");i("copy-error",V),console.error("Failed to copy value:",C)}},_=(g,C,V)=>{if(!(!u.value||!Array.isArray(u.value)))try{const j=g.split(/\./).filter(Boolean);let R=u.value;for(let D=0;D<j.length;D++){const O=j[D],F=O.match(/^(.+?)\[(\d+)\]$/);if(F){const G=F[1],X=parseInt(F[2]);if(D===j.length-1){if(Array.isArray(R)&&R[X]){const P=R[X];if(P[C]){const Q=P[C];delete P[C],P[V]=Q,v.value.has(C)&&(v.value.delete(C),v.value.add(V))}}}else Array.isArray(R)&&R[X]&&(R=R[X])}else R[O]&&(R=R[O])}const ee=et(u.value,{indent:" ",selfClosingTags:v.value});i("update:modelValue",ee)}catch(j){console.error("Failed to update tag name:",j)}},L=(g,C,V)=>{if(!(!u.value||!Array.isArray(u.value)))try{const j=g.split(/\./).filter(Boolean);let R=u.value;for(let D=0;D<j.length;D++){const O=j[D],F=O.match(/^(.+?)\[(\d+)\]$/);if(F){const G=F[1],X=parseInt(F[2]);if(D===j.length-1){if(Array.isArray(R)&&R[X]){const Q=R[X][":@"];if(Q&&Q[`@_${C}`]!==void 0){const pe=Q[`@_${C}`];delete Q[`@_${C}`],Q[`@_${V}`]=pe}}}else Array.isArray(R)&&R[X]&&(R=R[X])}else R[O]&&(R=R[O])}const ee=et(u.value,{indent:" ",selfClosingTags:v.value});i("update:modelValue",ee)}catch(j){console.error("Failed to update attribute name:",j)}},$=(g,C,V)=>{if(!(!u.value||!Array.isArray(u.value)))try{const j=g.split(/\./).filter(Boolean);let R=u.value;for(let D=0;D<j.length;D++){const O=j[D],F=O.match(/^(.+?)\[(\d+)\]$/);if(F){const G=F[1],X=parseInt(F[2]);if(D===j.length-1){if(Array.isArray(R)&&R[X]){const Q=R[X][":@"];Q&&Q[`@_${C}`]!==void 0&&(Q[`@_${C}`]=V)}}else Array.isArray(R)&&R[X]&&(R=R[X])}else R[O]&&(R=R[O])}const ee=et(u.value,{indent:" ",selfClosingTags:v.value});i("update:modelValue",ee)}catch(j){console.error("Failed to update attribute value:",j)}},Z=(g,C)=>{if(!(!u.value||!Array.isArray(u.value)))try{const V=g.split(/\./).filter(Boolean);let j=u.value,R="";for(let D=0;D<V.length;D++){const O=V[D],F=O.match(/^(.+?)\[(\d+)\]$/);if(F){const G=F[1],X=parseInt(F[2]);if(D===V.length-1){if(Array.isArray(j)&&j[X]){const P=j[X];if(R=Object.keys(P).find(Q=>!Q.startsWith(":")&&!Q.startsWith("#"))||"",R&&Array.isArray(P[R])){const Q=P[R],pe=Q.findIndex(Ee=>Ee["#text"]!==void 0);pe!==-1?Q[pe]["#text"]=C:Q.push({"#text":C})}}}else Array.isArray(j)&&j[X]&&(j=j[X])}else j[O]&&(j=j[O])}const ee=et(u.value,{indent:" ",selfClosingTags:v.value});i("update:modelValue",ee)}catch(V){console.error("Failed to update text content:",V)}},te=(g,C)=>{if(!(!u.value||!Array.isArray(u.value)))try{const V=g.split(/\./).filter(Boolean);let j=u.value;for(let ee=0;ee<V.length;ee++){const D=V[ee],O=D.match(/^(.+?)\[(\d+)\]$/);if(O){const F=O[1],G=parseInt(O[2]);if(ee===V.length-1){if(Array.isArray(j)&&j[G]){const X=j[G],P=Object.keys(X).find(Q=>!Q.startsWith(":")&&!Q.startsWith("#"));if(P&&Array.isArray(X[P])){const Q=X[P],pe=Q.findIndex(Ee=>Ee.__cdata!==void 0);if(pe!==-1){const Ee=Q[pe];Array.isArray(Ee.__cdata)&&Ee.__cdata[0]&&(Ee.__cdata[0]["#text"]=C)}else Q.push({__cdata:[{"#text":C}]})}}}else Array.isArray(j)&&j[G]&&(j=j[G])}else j[D]&&(j=j[D])}const R=et(u.value,{indent:" ",selfClosingTags:v.value});i("update:modelValue",R)}catch(V){console.error("Failed to update CDATA content:",V)}};return o.watch(()=>a.modelValue,g=>{re(g)},{immediate:!0}),t({copyXml:J,compressSource:N,formatSource:le,expandAll:me,collapseAll:be,toggleExpand:z,filter:w,clearFilter:y,isValidXml:()=>U.value,getParsedXml:()=>u.value,getFilteredXml:()=>p.value,getExpandedNodes:()=>x.value,getParseError:()=>f.value,getFilterError:()=>m.value,parseXmlString:g=>re(g),copyValue:g=>B(g)}),(g,C)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["xml-format",`xml-format--${Y.value.name}`])},[g.showToolbar?(o.openBlock(),o.createElementBlock("div",rs,[o.createElementVNode("div",ns,[o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--primary",onClick:J,disabled:!U.value,title:"Copy XML"}," 📋 Copy ",8,os),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:me,disabled:!U.value,title:"Expand All"}," ⬇️ Expand All ",8,ss),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:be,disabled:!U.value,title:"Collapse All"}," ➡️ Collapse All ",8,is),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:N,disabled:!U.value,title:"Compress XML"}," 📦 Compress ",8,as),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:le,disabled:!U.value,title:"Format XML"}," ✨ Format ",8,us)]),o.createElementVNode("div",ls,[U.value?(o.openBlock(),o.createElementBlock("span",cs," ✅ Valid XML ")):(o.openBlock(),o.createElementBlock("span",fs," ❌ Invalid XML "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",ds,[U.value?m.value?(o.openBlock(),o.createElementBlock("div",hs,[C[1]||(C[1]=o.createElementVNode("h4",null,"Filter Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(m.value),1)])):(o.openBlock(),o.createElementBlock("div",ms,[H.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"xml-declaration",style:o.normalizeStyle({color:Y.value.colors.xmlDeclaration})},o.toDisplayString(H.value),5)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(de.value,(V,j)=>(o.openBlock(),o.createBlock(Yn,{key:j,node:V.node,index:V.originalIndex,level:0,expanded:x.value,theme:Y.value,selfClosingTags:v.value,onToggleExpand:z,onCopy:B,"onUpdate:tagName":_,"onUpdate:attributeName":L,"onUpdate:attributeValue":$,"onUpdate:textContent":Z,"onUpdate:cdataContent":te},null,8,["node","index","expanded","theme","selfClosingTags"]))),128))])):(o.openBlock(),o.createElementBlock("div",ps,[C[0]||(C[0]=o.createElementVNode("h4",null,"XML Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(f.value),1)]))])],2))}}),[["__scopeId","data-v-adf2b2e1"]]),sr={"github-light":{name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",hoverBackground:"#f3f4f6",border:"#d0d7de",text:"#24292f",textSecondary:"#57606a",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#1f883d",buttonPrimaryHover:"#1a7f37",success:"#1f883d",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",sqlKeyword:"#cf222e",sqlFunction:"#8250df",sqlString:"#0a3069",sqlNumber:"#0550ae",sqlComment:"#6e7781",sqlOperator:"#cf222e",sqlIdentifier:"#24292f",sqlPunctuation:"#24292f",collapsedBackground:"#ddf4ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",hoverBackground:"#30363d",border:"#30363d",text:"#c9d1d9",textSecondary:"#8b949e",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#c9d1d9",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2e1c",error:"#f85149",errorBackground:"#3d1319",sqlKeyword:"#ff7b72",sqlFunction:"#d2a8ff",sqlString:"#a5d6ff",sqlNumber:"#79c0ff",sqlComment:"#8b949e",sqlOperator:"#ff7b72",sqlIdentifier:"#c9d1d9",sqlPunctuation:"#c9d1d9",collapsedBackground:"#1c2d41",collapsedText:"#58a6ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",hoverBackground:"#f5f5f5",border:"#e5e5e5",text:"#171717",textSecondary:"#737373",buttonBackground:"#fafafa",buttonBackgroundHover:"#f5f5f5",buttonBorder:"#e5e5e5",buttonText:"#171717",buttonPrimary:"#22c55e",buttonPrimaryHover:"#16a34a",success:"#22c55e",successBackground:"#dcfce7",error:"#ef4444",errorBackground:"#fee2e2",sqlKeyword:"#dc2626",sqlFunction:"#9333ea",sqlString:"#1e40af",sqlNumber:"#2563eb",sqlComment:"#737373",sqlOperator:"#dc2626",sqlIdentifier:"#171717",sqlPunctuation:"#171717",collapsedBackground:"#dbeafe",collapsedText:"#1d4ed8",indentLine:"#e0e0e0"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fef5ed",surfaceBackground:"#fef9f3",hoverBackground:"#f9f0e5",border:"#e9dcc9",text:"#3d3c40",textSecondary:"#616061",buttonBackground:"#fef9f3",buttonBackgroundHover:"#f9f0e5",buttonBorder:"#e9dcc9",buttonText:"#3d3c40",buttonPrimary:"#007a5a",buttonPrimaryHover:"#006644",success:"#007a5a",successBackground:"#d1f4e0",error:"#e01e5a",errorBackground:"#ffdbea",sqlKeyword:"#e01e5a",sqlFunction:"#8b2eff",sqlString:"#0b4c8c",sqlNumber:"#1264a3",sqlComment:"#616061",sqlOperator:"#e01e5a",sqlIdentifier:"#3d3c40",sqlPunctuation:"#3d3c40",collapsedBackground:"#d8eaf5",collapsedText:"#0b4c8c",indentLine:"#3e4348"}}},Es=n=>sr[n]||sr["github-light"],Nt=["SELECT","FROM","WHERE","JOIN","INNER","LEFT","RIGHT","FULL","OUTER","ON","GROUP","BY","HAVING","ORDER","LIMIT","OFFSET","INSERT","INTO","VALUES","UPDATE","SET","DELETE","CREATE","ALTER","DROP","TABLE","DATABASE","INDEX","VIEW","AND","OR","NOT","IN","BETWEEN","LIKE","IS","NULL","AS","DISTINCT","UNION","ALL","EXISTS","CASE","WHEN","THEN","ELSE","END"],ys=["WITH","SELECT","FROM","WHERE","GROUP BY","HAVING","ORDER BY","LIMIT","INSERT","UPDATE","DELETE","CREATE","ALTER","DROP","JOIN","INNER JOIN","LEFT JOIN","RIGHT JOIN","FULL JOIN","OUTER JOIN"],bs=n=>{try{if(!n||!n.trim())return{valid:!1,error:"SQL string is empty"};const t=n.toUpperCase();if(!Nt.some(x=>new RegExp(`\\b${x}\\b`).test(t)))return{valid:!1,error:"No valid SQL keywords found"};let a=0;for(const x of n)if(x==="("&&a++,x===")"&&a--,a<0)return{valid:!1,error:"Mismatched parentheses"};if(a!==0)return{valid:!1,error:"Mismatched parentheses"};let i=0,u=0,f=!1;for(let x=0;x<n.length;x++){const p=n[x];if(f){f=!1;continue}if(p==="\\"){f=!0;continue}p==="'"&&i++,p==='"'&&u++}return i%2!==0?{valid:!1,error:"Mismatched single quotes"}:u%2!==0?{valid:!1,error:"Mismatched double quotes"}:{valid:!0}}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}},kt=(n,t)=>{try{const r=t?.tabWidth||2,a=t?.keywordCase||"upper",i=" ".repeat(r);let u=n.trim();const f=[],x=/CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?(\w+)\s*\(/gi;let p,m=u,S=0;for(;(p=x.exec(u))!==null;){const w=p[1],y=/IF\s+NOT\s+EXISTS/i.test(p[0]),B=p.index,_=p.index+p[0].length;let L=1,$=_;for(;$<u.length&&L>0;)u[$]==="("?L++:u[$]===")"&&L--,$++;if(L!==0)continue;const Z=$-1,te=u.substring(_,Z),C=u.substring(Z+1).match(/^([^;]*);/);if(!C)continue;const V=C[1],j=Z+1+C[0].length,R=a==="upper"?"CREATE TABLE":"create table",ee=y?a==="upper"?" IF NOT EXISTS":" if not exists":"",D=[];let O="",F=0;for(let Q=0;Q<te.length;Q++){const pe=te[Q];pe==="("?(F++,O+=pe):pe===")"?(F--,O+=pe):pe===","&&F===0?(O.trim()&&D.push(O.trim()),O=""):O+=pe}O.trim()&&D.push(O.trim());let G=`${R}${ee} ${w} (`;D.forEach((Q,pe)=>{G+=`
26
- ${i}${Q}`,pe<D.length-1&&(G+=",")}),G+=`
27
- ) ${V.trim()};`;const X=`__CREATE_TABLE_${f.length}__`;f.push({placeholder:X,content:G});const P=u.substring(B,j);m=m.replace(P,X)}u=m;const v=[];u=u.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,w=>(v.push({type:"string",value:w}),`__PROTECTED_${v.length-1}__`)),u=u.replace(/--[^\n]*/g,w=>(v.push({type:"comment",value:w}),`__PROTECTED_${v.length-1}__`)),u=u.replace(/\/\*[\s\S]*?\*\//g,w=>(v.push({type:"comment",value:w}),`__PROTECTED_${v.length-1}__`)),u=u.replace(/,(?!\s)/g,", ").replace(/\s*\bAS\b\s*/gi," AS ").replace(/\s*\bOVER\b\s*/gi," OVER ").replace(/\s*\b(DESC|ASC)\b\s*/gi," $1 ").replace(/\s*([<>=!]+)\s*/g," $1 ").replace(/\s*\bON\b\s*/gi," ON ").replace(/\)([A-Z])/gi,") $1").replace(/[ \t]+/g," ").replace(/ +$/gm,"").replace(/^ +/gm,""),a==="upper"?Nt.forEach(w=>{const y=new RegExp(`\\b${w}\\b`,"gi");u=u.replace(y,w.toUpperCase())}):a==="lower"&&Nt.forEach(w=>{const y=new RegExp(`\\b${w}\\b`,"gi");u=u.replace(y,w.toLowerCase())});const U=["WITH","SELECT","FROM","WHERE","GROUP BY","HAVING","ORDER BY","LIMIT","OFFSET","INNER JOIN","LEFT JOIN","RIGHT JOIN","FULL JOIN","CROSS JOIN","OUTER JOIN","JOIN","UNION","UNION ALL","INTERSECT","EXCEPT","INSERT INTO","UPDATE","DELETE FROM","CREATE","ALTER","DROP"];U.sort((w,y)=>y.length-w.length),u=u.replace(/\b(WITH)\s+(\w+)\s+(AS)\s*\(/gi,(w,y,B,_)=>`${a==="upper"?"WITH":"with"}
28
- ${i}${B} ${a==="upper"?"AS":"as"} (`);const K=w=>{const y=w.split(`
29
- `),B=[];let _=!1,L=0,$=0;for(let Z=0;Z<y.length;Z++){const te=y[Z],g=te.trim();if(/^\s*\w+\s+AS\s*\(/.test(te)){_=!0,L=1,$=1,B.push(i+te.trim());continue}if(_){let C=!1,V="";for(const j of g)(j==='"'||j==="'")&&!C?(C=!0,V=j):j===V&&C?C=!1:C||(j==="("?$++:j===")"&&$--);$===0?(_=!1,B.push(i+")")):g?B.push(i+te):B.push("")}else B.push(te)}return B.join(`
30
- `)},Y=[];U.forEach((w,y)=>{if(w.includes(" ")){const B=a==="upper"?w:w.toLowerCase(),_=new RegExp(`\\b${w}\\b`,"gi"),L=`__KEYWORD_${y}__`;u=u.replace(_,L),Y.push({placeholder:L,original:B})}}),U.forEach(w=>{if(!w.includes(" ")&&w!=="WITH"){const y=a==="upper"?w:w.toLowerCase(),B=new RegExp(`\\b${w}\\b`,"gi");u=u.replace(B,`
31
- ${y}`)}}),Y.forEach(({placeholder:w,original:y})=>{u=u.replace(new RegExp(w,"g"),`
32
- ${y}`)}),u=(w=>{let y=w;const B=/\b(\w+)\s+OVER\s*\(/gi;let _;for(;(_=B.exec(y))!==null;){const L=_[1],$=_.index+_[0].length;let Z=1,te=$;for(;Z>0&&te<y.length;)y[te]==="("?Z++:y[te]===")"&&Z--,te++;if(Z===0){const g=y.substring($,te-1).trim(),C=a==="upper"?"OVER":"over",V=/\bORDER\s+BY\b/i.test(g),j=/\bPARTITION\s+BY\b/i.test(g);if(V||j){let R=g;if(V){const D=a==="upper"?"ORDER BY":"order by";R=R.replace(/\bORDER\s+BY\s+(.+)/gi,(O,F)=>`
33
- ${i}${D}
34
- ${i}${i}${F.trim()}`)}if(j){const D=a==="upper"?"PARTITION BY":"partition by";R=R.replace(/\bPARTITION\s+BY\s+(.+)/gi,(O,F)=>`
35
- ${i}${D}
36
- ${i}${i}${F.trim()}`)}const ee=`${L} ${C} (${R}
37
- ${i})`;y=y.substring(0,_.index)+ee+y.substring(te),B.lastIndex=_.index+ee.length}}}return y})(u),u=u.replace(/\b((?:INNER\s+|LEFT\s+|RIGHT\s+|FULL\s+|CROSS\s+|OUTER\s+)?JOIN\s+[^\n]+?)\s+ON\s+(.+?)(?=\n|$)/gi,(w,y,B)=>`${y} ${a==="upper"?"ON":"on"} ${B.trim()}`),u=u.replace(/\b(WHERE)\s+([^\n]+?)(?=\s+AND\b|\s+OR\b|\n|$)/gis,(w,y,B)=>{const _=a==="upper"?"WHERE":"where",L=B.trim();return`${_}
38
- ${i}${L}`}),u=u.replace(/\b(HAVING)\s+(?!\n)(.+?)(?=\n|$)/gis,(w,y,B)=>`${a==="upper"?"HAVING":"having"}
39
- ${i}${B.trim()}`),u=u.replace(/\b(ORDER BY)\s+(?!\n)([^,\n]+?)(?=\n|$|;)/gis,(w,y,B)=>{const _=a==="upper"?"ORDER BY":"order by";return B.includes(",")?w:`${_}
40
- ${i}${B.trim()}`}),u=u.replace(/\b(INSERT\s+INTO)\s+(\w+)\s*\(([^)]+)\)\s*(VALUES)\s*(.+?)(?=;|$)/gis,(w,y,B,_,L,$)=>{const Z=a==="upper"?"INSERT INTO":"insert into",te=a==="upper"?"VALUES":"values",g=_.split(",").map(O=>O.trim()).join(", ");let C=`${Z}
41
- ${i}${B} (${g})
42
- ${te}`;const V=[];let j=0,R="",ee=!1,D="";for(let O=0;O<$.length;O++){const F=$[O],G=O>0?$[O-1]:"";(F==='"'||F==="'")&&G!=="\\"&&(ee?F===D&&(ee=!1):(ee=!0,D=F)),ee?R+=F:F==="("?(j===0?R="":R+=F,j++):F===")"?(j--,j===0?V.push(R.trim()):R+=F):j>0&&(R+=F)}return V.forEach((O,F)=>{const G=O.split(/,\s*(?=(?:[^']*'[^']*')*[^']*$)/).map(X=>X.trim());C+=`
43
- `+i+"(",G.forEach((X,P)=>{C+=`
44
- `+i+i+X,P<G.length-1&&(C+=",")}),C+=`
45
- `+i+")",F<V.length-1&&(C+=",")}),C}),u=u.replace(/\b(UPDATE\s+)(\w+)\s+(SET)\s+([^\n]+?)(?=\n(?:WHERE)|$|;)/gis,(w,y,B,_,L)=>{const $=a==="upper"?"UPDATE":"update",Z=a==="upper"?"SET":"set",te=L.split(/,\s*(?![^()]*\))/).map(C=>C.trim());let g=`${$} ${B}
46
- ${Z}`;return te.forEach((C,V)=>{g+=`
47
- ${i}${C}`,V<te.length-1&&(g+=",")}),g}),["AND","OR"].forEach(w=>{const y=a==="upper"?w:w.toLowerCase(),B=new RegExp(`\\s*\\b${w}\\b`,"gi");u=u.replace(B,`
48
- ${i}${y}`)});const de=u.split(`
49
- `),re=[];let z=0;const me=w=>{const y=[];let B="",_=0;for(let L=0;L<w.length;L++){const $=w[L];$==="("?(_++,B+=$):$===")"?(_--,B+=$):$===","&&_===0?(y.push(B.trim()),B=""):B+=$}return B.trim()&&y.push(B.trim()),y},be=w=>{if(!/\bCASE\b/i.test(w))return[w];const y=[],B=[];let _=w.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,g=>{const C=B.length;return B.push(g),`__STRING_${C}__`});const L=/\b(CASE)\b([\s\S]*?)\b(END)\b/gi;let $=0,Z;for(;(Z=L.exec(_))!==null;){if(Z.index>$){const V=_.substring($,Z.index).trim();V&&y.push(V)}y.push("CASE");const C=Z[2].split(/\b(WHEN|ELSE)\b/gi);for(let V=0;V<C.length;V++){const j=C[V].trim();if(j){if(/^WHEN$/i.test(j)){const R=C[++V]?.trim()||"",ee=R.match(/^(.*?)\s+THEN\s+(.*)$/i);if(ee){const D=a==="upper"?"WHEN":"when",O=a==="upper"?"THEN":"then";y.push(i+D+" "+ee[1].trim()+" "+O+" "+ee[2].trim())}else{const D=a==="upper"?"WHEN":"when";y.push(i+D+" "+R)}}else if(/^ELSE$/i.test(j)){const R=C[++V]?.trim()||"",ee=a==="upper"?"ELSE":"else";y.push(i+ee+" "+R)}}}y.push("END"),$=L.lastIndex}if($<_.length){const g=_.substring($).trim();g&&(y[y.length-1]+=" "+g)}return y.map(g=>g.replace(/__STRING_(\d+)__/g,(C,V)=>B[parseInt(V)]))};for(let w=0;w<de.length;w++){const y=de[w],B=y.trim();/^\)\s+AS\s+/i.test(B)&&(z=Math.max(0,z-1));const _=i.repeat(z);if(y!==B&&B.length>0&&!/^(SELECT|FROM|GROUP BY|ORDER BY)\b/i.test(B)){re.push(_+y);continue}if(/^SELECT\b/i.test(B)){const $=B.match(/^(SELECT\s+(?:DISTINCT\s+)?)(.*)/i);if($){const Z=$[1].trim(),te=$[2],g=me(te);re.push(_+Z),g.forEach((C,V)=>{const j=V===g.length-1;if(/\bCASE\b/i.test(C)){const R=be(C);R.forEach((ee,D)=>{D===0?re.push(_+i+ee):D===R.length-1?re.push(_+i+ee+(j?"":",")):re.push(_+i+ee)})}else j?re.push(_+i+C):re.push(_+i+C+",")})}else re.push(_+B)}else if(/^FROM\b/i.test(B)){const $=B.match(/^(FROM\s+)(.*)/i);if($){const Z=$[1].trim(),te=$[2].trim();re.push(_+Z),te==="("?(re.push(_+i+"("),z++):re.push(_+i+te)}else re.push(_+B)}else if(/^(INNER\s+JOIN|LEFT\s+JOIN|RIGHT\s+JOIN|FULL\s+JOIN|CROSS\s+JOIN|OUTER\s+JOIN|JOIN)\b/i.test(B))re.push(_+i+B);else if(/^GROUP BY\b/i.test(B)){const $=B.match(/^(GROUP BY\s+)(.*)/i);if($){const Z=$[1].trim(),te=$[2],g=me(te);g.length>1?(re.push(_+Z),g.forEach((C,V)=>{V===g.length-1?re.push(_+i+C):re.push(_+i+C+",")})):re.push(_+y)}else re.push(_+y)}else if(/^ORDER BY\b/i.test(B)){const $=B.match(/^(ORDER BY\s+)(.*)/i);if($){const Z=$[1].trim(),te=$[2],g=me(te);g.length>1?(re.push(_+Z),g.forEach((C,V)=>{V===g.length-1?re.push(_+i+C):re.push(_+i+C+",")})):re.push(_+B)}else re.push(_+B)}else/^\)\s+AS\s+/i.test(B),re.push(_+B)}u=re.join(`
19
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}nt.prototype.build=function(n){return this.options.preserveOrder?qo(n,this.options):(Array.isArray(n)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(n={[this.options.arrayNodeName]:n}),this.j2x(n,0,[]).val)},nt.prototype.j2x=function(n,t,r){let a="",i="";const u=r.join(".");for(let c in n)if(Object.prototype.hasOwnProperty.call(n,c))if(typeof n[c]>"u")this.isAttribute(c)&&(i+="");else if(n[c]===null)this.isAttribute(c)||c===this.options.cdataPropName?i+="":c[0]==="?"?i+=this.indentate(t)+"<"+c+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+c+"/"+this.tagEndChar;else if(n[c]instanceof Date)i+=this.buildTextValNode(n[c],c,"",t);else if(typeof n[c]!="object"){const A=this.isAttribute(c);if(A&&!this.ignoreAttributesFn(A,u))a+=this.buildAttrPairStr(A,""+n[c]);else if(!A)if(c===this.options.textNodeName){let p=this.options.tagValueProcessor(c,""+n[c]);i+=this.replaceEntitiesValue(p)}else i+=this.buildTextValNode(n[c],c,"",t)}else if(Array.isArray(n[c])){const A=n[c].length;let p="",m="";for(let T=0;T<A;T++){const x=n[c][T];if(!(typeof x>"u"))if(x===null)c[0]==="?"?i+=this.indentate(t)+"<"+c+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+c+"/"+this.tagEndChar;else if(typeof x=="object")if(this.options.oneListGroup){const L=this.j2x(x,t+1,r.concat(c));p+=L.val,this.options.attributesGroupName&&x.hasOwnProperty(this.options.attributesGroupName)&&(m+=L.attrStr)}else p+=this.processTextOrObjNode(x,c,t,r);else if(this.options.oneListGroup){let L=this.options.tagValueProcessor(c,x);L=this.replaceEntitiesValue(L),p+=L}else p+=this.buildTextValNode(x,c,"",t)}this.options.oneListGroup&&(p=this.buildObjectNode(p,c,m,t)),i+=p}else if(this.options.attributesGroupName&&c===this.options.attributesGroupName){const A=Object.keys(n[c]),p=A.length;for(let m=0;m<p;m++)a+=this.buildAttrPairStr(A[m],""+n[c][A[m]])}else i+=this.processTextOrObjNode(n[c],c,t,r);return{attrStr:a,val:i}},nt.prototype.buildAttrPairStr=function(n,t){return t=this.options.attributeValueProcessor(n,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+n:" "+n+'="'+t+'"'};function Go(n,t,r,a){const i=this.j2x(n,r+1,a.concat(t));return n[this.options.textNodeName]!==void 0&&Object.keys(n).length===1?this.buildTextValNode(n[this.options.textNodeName],t,i.attrStr,r):this.buildObjectNode(i.val,t,i.attrStr,r)}nt.prototype.buildObjectNode=function(n,t,r,a){if(n==="")return t[0]==="?"?this.indentate(a)+"<"+t+r+"?"+this.tagEndChar:this.indentate(a)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,u="";return t[0]==="?"&&(u="?",i=""),(r||r==="")&&n.indexOf("<")===-1?this.indentate(a)+"<"+t+r+u+">"+n+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&u.length===0?this.indentate(a)+`<!--${n}-->`+this.newLine:this.indentate(a)+"<"+t+r+u+this.tagEndChar+n+this.indentate(a)+i}},nt.prototype.closeTag=function(n){let t="";return this.options.unpairedTags.indexOf(n)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`></${n}`,t},nt.prototype.buildTextValNode=function(n,t,r,a){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(a)+`<![CDATA[${n}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(a)+`<!--${n}-->`+this.newLine;if(t[0]==="?")return this.indentate(a)+"<"+t+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,n);return i=this.replaceEntitiesValue(i),i===""?this.indentate(a)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(a)+"<"+t+r+">"+i+"</"+t+this.tagEndChar}},nt.prototype.replaceEntitiesValue=function(n){if(n&&n.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];n=n.replace(r.regex,r.val)}return n};function Xo(n){return this.options.indentBy.repeat(n)}function Wo(n){return n.startsWith(this.options.attributeNamePrefix)&&n!==this.options.textNodeName?n.substr(this.attrPrefixLen):!1}const zo={validate:Wt},Yo={ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#text",ignoreDeclaration:!1,commentPropName:"#comment",cdataPropName:"__cdata",preserveOrder:!0,parseAttributeValue:!1,trimValues:!1,parseTagValue:!1,processEntities:!1,htmlEntities:!1,ignoreNameSpace:!1,allowBooleanAttributes:!0,unpairedTags:[],stopNodes:[],alwaysCreateTextNode:!1},Qo={ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#text",format:!0,indentBy:" ",suppressEmptyNode:!1,suppressBooleanAttributes:!1,suppressUnpairedNode:!1},Zo=n=>{const t=/<!\[CDATA\[([\s\S]*?)\]\]>/g,r=[];let a;for(;(a=t.exec(n))!==null;)r.push({start:a.index,end:a.index+a[0].length});const i=T=>r.some(x=>T>=x.start&&T<x.end),u=/&([a-zA-Z0-9#]+);/g,c=["lt","gt","amp","quot","apos"];let A,p=1,m=0;for(;(A=u.exec(n))!==null;){const T=A[1],x=A.index;if(i(x))continue;const L=n.substring(m,x);if(p+=(L.match(/\n/g)||[]).length,m=x,T.startsWith("#")){const F=T.substring(1);if(F.startsWith("x")||F.startsWith("X")){const Q=F.substring(1);if(!/^[0-9a-fA-F]+$/.test(Q))return{valid:!1,error:`Line ${p}: Invalid hexadecimal character reference '&${T};'`}}else if(!/^[0-9]+$/.test(F))return{valid:!1,error:`Line ${p}: Invalid numeric character reference '&${T};'`};continue}if(!c.includes(T))return{valid:!1,error:`Line ${p}: Invalid entity reference '&${T};'. Valid predefined entities are: &lt; &gt; &amp; &quot; &apos;`}}return{valid:!0}},Jo=n=>{try{const t=zo.validate(n,{allowBooleanAttributes:!0});if(t!==!0)return{valid:!1,error:`Line ${t.err.line}: ${t.err.msg}`};const r=Zo(n);return r.valid?{valid:!0}:r}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}},Bt=(n,t)=>{try{return new Mo({...Yo,...t}).parse(n)}catch(r){throw new Error(`XML 解析失败: ${r instanceof Error?r.message:"Unknown error"}`)}},Ot=(n,t)=>{try{let a=new nt({...Qo,format:t?.format??!0,indentBy:t?.indentBy??" "}).build(n);return t?.showDeclaration!==!1&&!a.startsWith("<?xml")&&(a=`<?xml version="1.0" encoding="UTF-8"?>
20
+ `+a),a}catch(r){throw new Error(`XML 构建失败: ${r instanceof Error?r.message:"Unknown error"}`)}},es=(n,t)=>Array.isArray(n)?et(n,{format:!1,originalXml:t}):Ot(n,{format:!1,showDeclaration:!1}),ts=(n,t)=>{const r=Bt(n);return Array.isArray(r)?et(r,{indent:t?.indentBy,originalXml:n}):Ot(r,t)},or=n=>{const t=new Set,r=/<([a-zA-Z0-9_-]+)(?:\s[^>]*)?\s*\/>/g;let a;for(;(a=r.exec(n))!==null;)t.add(a[1]);return t},et=(n,t={})=>{const r=t.indent!==void 0?t.indent:" ",a=t.level||0,i=t.format!==!1,u=i?r.repeat(a):"",c=i?`
21
+ `:"";let A=t.selfClosingTags;!A&&t.originalXml&&a===0&&(A=or(t.originalXml));let p="";for(const m of n){if(m["?xml"]){const S=m[":@"]||{},q=Object.entries(S).map(([G,V])=>`${G.startsWith("@_")?G.substring(2):G}="${V}"`).join(" ");p+=`<?xml ${q}?>${c}`;continue}if(m["#comment"]){const S=m["#comment"];if(Array.isArray(S)&&S.length>0){const q=S[0]["#text"]||S[0];p+=`${u}<!--${q}-->${c}`}continue}const T=Object.keys(m).find(S=>!S.startsWith(":")&&!S.startsWith("#")&&!S.startsWith("__"));if(!T)continue;const x=m[T],L=m[":@"]||{},F=Object.entries(L).map(([S,q])=>`${S.startsWith("@_")?S.substring(2):S}="${q}"`).join(" "),Q=F?" "+F:"";if(!Array.isArray(x)||x.length===0){A&&A.has(T)?p+=`${u}<${T}${Q}/>${c}`:p+=`${u}<${T}${Q}></${T}>${c}`;continue}const ie=x.length===1&&x[0]["#text"]!==void 0,j=ie?x[0]["#text"]:"",ce=x.some(S=>S.__cdata),he=ie&&j==="";if(ce){const S=x.find(q=>q.__cdata);if(S){const q=S.__cdata[0]["#text"]||"";p+=`${u}<${T}${Q}><![CDATA[${q}]]></${T}>${c}`}}else he?p+=`${u}<${T}${Q}></${T}>${c}`:ie?p+=`${u}<${T}${Q}>${j}</${T}>${c}`:(p+=`${u}<${T}${Q}>${c}`,p+=et(x,{indent:r,level:a+1,format:i,selfClosingTags:A}),p+=`${u}</${T}>${c}`)}return p},rs={key:0,class:"xml-format__toolbar"},ns={class:"xml-format__actions"},os=["disabled"],ss=["disabled"],is=["disabled"],as=["disabled"],us=["disabled"],ls={class:"xml-format__info"},cs={key:0,class:"xml-format__status xml-format__status--success"},fs={key:1,class:"xml-format__status xml-format__status--error"},ds={class:"xml-format__content"},ps={key:0,class:"xml-format__error"},hs={key:1,class:"xml-format__error"},ms={key:2,class:"xml-format__viewer"},gs=ft(o.defineComponent({__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},maxDepth:{default:10},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"},showComments:{type:Boolean,default:!0},showCdata:{type:Boolean,default:!0},preserveWhitespace:{type:Boolean,default:!1}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress","format"],setup(n,{expose:t,emit:r}){o.useCssVars(N=>({"123bc86d":Q.value.colors.border,"6ddcbe22":Q.value.colors.background,dd0094a4:Q.value.colors.text,"094dda4c":Q.value.colors.surfaceBackground,"0ab18d02":Q.value.colors.buttonBorder,"854b8dfe":Q.value.colors.buttonBackground,"2dd84340":Q.value.colors.buttonText,"55fdce8a":Q.value.colors.buttonBackgroundHover,"437af30f":Q.value.colors.buttonPrimary,bfaf1126:Q.value.colors.buttonPrimaryHover,"7c1f183c":Q.value.colors.success,"6b8cb2b0":Q.value.colors.successBackground,c4ad1cb2:Q.value.colors.error,cc2a0396:Q.value.colors.errorBackground}));const a=n,i=r,u=o.ref(null),c=o.ref(""),A=o.ref(new Set),p=o.ref(null),m=o.ref(""),T=o.ref(""),x=o.ref(new Set),L=o.computed(()=>c.value===""),F=o.computed(()=>m.value?null:p.value!==null?p.value:u.value),Q=o.computed(()=>Qn(a.theme)),ie=o.computed(()=>{const N=F.value;return!N||!Array.isArray(N)?[]:N.map((_,W)=>({node:_,originalIndex:W})).filter(_=>!_.node["?xml"])}),j=o.computed(()=>{const N=F.value;if(!N||!Array.isArray(N))return null;const _=N.find(U=>U["?xml"]);if(!_||!_[":@"])return null;const W=_[":@"],J=[];return W["@_version"]&&J.push(`version="${W["@_version"]}"`),W["@_encoding"]&&J.push(`encoding="${W["@_encoding"]}"`),W["@_standalone"]&&J.push(`standalone="${W["@_standalone"]}"`),J.length>0?`<?xml ${J.join(" ")}?>`:null}),ce=o.computed(()=>ie.value),he=N=>{if(!N||!N.trim()){c.value="",u.value=null,T.value="",p.value=null,m.value="";return}try{const _=Jo(N);if(!_.valid){c.value=_.error||"Invalid XML",u.value=null,T.value="",x.value=new Set;return}T.value=N,x.value=or(N),u.value=Bt(N),c.value="",p.value=null,m.value="",o.nextTick(()=>{q()})}catch(_){c.value=_ instanceof Error?_.message:"Unknown parse error",u.value=null,T.value="",p.value=null,m.value=""}},S=N=>{A.value.has(N)?A.value.delete(N):A.value.add(N)},q=()=>{const N=new Set,_=(W,J="")=>{Array.isArray(W)&&W.forEach((U,le)=>{const D=Object.keys(U).find(z=>!z.startsWith(":")&&!z.startsWith("#"));if(!D)return;const k=J?`${J}.${D}[${le}]`:`${D}[${le}]`;N.add(k);const K=U[D];Array.isArray(K)&&_(K,k+"."+D)})};ie.value.forEach(({node:W,originalIndex:J})=>{const U=Object.keys(W).find(le=>!le.startsWith(":")&&!le.startsWith("#"));if(U){const le=`${U}[${J}]`;N.add(le);const D=W[U];Array.isArray(D)&&_(D,le+"."+U)}}),A.value=N,i("expand-all")},G=()=>{A.value.clear(),i("collapse-all")},V=async()=>{if(L.value)try{const N=F.value||u.value;if(!N)return;const _=Array.isArray(N)?et(N,{indent:" ",selfClosingTags:x.value}):Ot(N,{format:!0,indentBy:" "});await navigator.clipboard.writeText(_),i("copy-success",_)}catch(N){const _=N instanceof Error?N:new Error("Copy failed");i("copy-error",_),console.error("Failed to copy XML:",N)}},g=()=>{if(!(!L.value||!u.value))try{const N=es(u.value,a.modelValue);i("update:modelValue",N),i("compress",N)}catch(N){console.error("Failed to compress XML:",N)}},X=()=>{if(L.value)try{const N=ts(a.modelValue,{format:!0,indentBy:" "});i("update:modelValue",N),i("format",N)}catch(N){console.error("Failed to format XML:",N)}},w=N=>{if(!N||!N.expression.trim()){v();return}if(!u.value||!T.value){m.value="No valid XML data to filter";return}try{const W=new jt.DOMParser().parseFromString(T.value,"text/xml"),J=on.select(N.expression,W);if(!J||Array.isArray(J)&&J.length===0){p.value=[],m.value="";return}const U=new jt.XMLSerializer;let le="";Array.isArray(J)?(le=`<result>
22
+ `,J.forEach(D=>{D.nodeType===1?le+=" "+U.serializeToString(D)+`
23
+ `:D.nodeType===2?le+=` <attribute name="${D.name}" value="${D.value}"/>
24
+ `:D.nodeType===3&&(le+=` <text>${D.nodeValue}</text>
25
+ `)}),le+="</result>"):le=U.serializeToString(J),p.value=Bt(le),m.value="",o.nextTick(()=>{q()})}catch(_){m.value=_ instanceof Error?_.message:"Filter execution error",p.value=null}},v=()=>{p.value=null,m.value="",o.nextTick(()=>{q()})},$=async N=>{try{const _=typeof N=="string"?N:JSON.stringify(N,null,2);await navigator.clipboard.writeText(_),i("copy-success",_)}catch(_){const W=_ instanceof Error?_:new Error("Copy failed");i("copy-error",W),console.error("Failed to copy value:",_)}},R=(N,_,W)=>{if(!(!u.value||!Array.isArray(u.value)))try{const J=N.split(/\./).filter(Boolean);let U=u.value;for(let D=0;D<J.length;D++){const k=J[D],K=k.match(/^(.+?)\[(\d+)\]$/);if(K){const z=K[1],Z=parseInt(K[2]);if(D===J.length-1){if(Array.isArray(U)&&U[Z]){const I=U[Z];if(I[_]){const te=I[_];delete I[_],I[W]=te,x.value.has(_)&&(x.value.delete(_),x.value.add(W))}}}else Array.isArray(U)&&U[Z]&&(U=U[Z])}else U[k]&&(U=U[k])}const le=et(u.value,{indent:" ",selfClosingTags:x.value});i("update:modelValue",le)}catch(J){console.error("Failed to update tag name:",J)}},P=(N,_,W)=>{if(!(!u.value||!Array.isArray(u.value)))try{const J=N.split(/\./).filter(Boolean);let U=u.value;for(let D=0;D<J.length;D++){const k=J[D],K=k.match(/^(.+?)\[(\d+)\]$/);if(K){const z=K[1],Z=parseInt(K[2]);if(D===J.length-1){if(Array.isArray(U)&&U[Z]){const te=U[Z][":@"];if(te&&te[`@_${_}`]!==void 0){const Ee=te[`@_${_}`];delete te[`@_${_}`],te[`@_${W}`]=Ee}}}else Array.isArray(U)&&U[Z]&&(U=U[Z])}else U[k]&&(U=U[k])}const le=et(u.value,{indent:" ",selfClosingTags:x.value});i("update:modelValue",le)}catch(J){console.error("Failed to update attribute name:",J)}},ee=(N,_,W)=>{if(!(!u.value||!Array.isArray(u.value)))try{const J=N.split(/\./).filter(Boolean);let U=u.value;for(let D=0;D<J.length;D++){const k=J[D],K=k.match(/^(.+?)\[(\d+)\]$/);if(K){const z=K[1],Z=parseInt(K[2]);if(D===J.length-1){if(Array.isArray(U)&&U[Z]){const te=U[Z][":@"];te&&te[`@_${_}`]!==void 0&&(te[`@_${_}`]=W)}}else Array.isArray(U)&&U[Z]&&(U=U[Z])}else U[k]&&(U=U[k])}const le=et(u.value,{indent:" ",selfClosingTags:x.value});i("update:modelValue",le)}catch(J){console.error("Failed to update attribute value:",J)}},ue=(N,_)=>{if(!(!u.value||!Array.isArray(u.value)))try{const W=N.split(/\./).filter(Boolean);let J=u.value,U="";for(let D=0;D<W.length;D++){const k=W[D],K=k.match(/^(.+?)\[(\d+)\]$/);if(K){const z=K[1],Z=parseInt(K[2]);if(D===W.length-1){if(Array.isArray(J)&&J[Z]){const I=J[Z];if(U=Object.keys(I).find(te=>!te.startsWith(":")&&!te.startsWith("#"))||"",U&&Array.isArray(I[U])){const te=I[U],Ee=te.findIndex(ye=>ye["#text"]!==void 0);Ee!==-1?te[Ee]["#text"]=_:te.push({"#text":_})}}}else Array.isArray(J)&&J[Z]&&(J=J[Z])}else J[k]&&(J=J[k])}const le=et(u.value,{indent:" ",selfClosingTags:x.value});i("update:modelValue",le)}catch(W){console.error("Failed to update text content:",W)}},me=(N,_)=>{if(!(!u.value||!Array.isArray(u.value)))try{const W=N.split(/\./).filter(Boolean);let J=u.value;for(let le=0;le<W.length;le++){const D=W[le],k=D.match(/^(.+?)\[(\d+)\]$/);if(k){const K=k[1],z=parseInt(k[2]);if(le===W.length-1){if(Array.isArray(J)&&J[z]){const Z=J[z],I=Object.keys(Z).find(te=>!te.startsWith(":")&&!te.startsWith("#"));if(I&&Array.isArray(Z[I])){const te=Z[I],Ee=te.findIndex(ye=>ye.__cdata!==void 0);if(Ee!==-1){const ye=te[Ee];Array.isArray(ye.__cdata)&&ye.__cdata[0]&&(ye.__cdata[0]["#text"]=_)}else te.push({__cdata:[{"#text":_}]})}}}else Array.isArray(J)&&J[z]&&(J=J[z])}else J[D]&&(J=J[D])}const U=et(u.value,{indent:" ",selfClosingTags:x.value});i("update:modelValue",U)}catch(W){console.error("Failed to update CDATA content:",W)}};return o.watch(()=>a.modelValue,N=>{he(N)},{immediate:!0}),t({copyXml:V,compressSource:g,formatSource:X,expandAll:q,collapseAll:G,toggleExpand:S,filter:w,clearFilter:v,isValidXml:()=>L.value,getParsedXml:()=>u.value,getFilteredXml:()=>p.value,getExpandedNodes:()=>A.value,getParseError:()=>c.value,getFilterError:()=>m.value,parseXmlString:N=>he(N),copyValue:N=>$(N)}),(N,_)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["xml-format",`xml-format--${Q.value.name}`])},[N.showToolbar?(o.openBlock(),o.createElementBlock("div",rs,[o.createElementVNode("div",ns,[o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--primary",onClick:V,disabled:!L.value,title:"Copy XML"}," 📋 Copy ",8,os),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:q,disabled:!L.value,title:"Expand All"}," ⬇️ Expand All ",8,ss),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:G,disabled:!L.value,title:"Collapse All"}," ➡️ Collapse All ",8,is),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:g,disabled:!L.value,title:"Compress XML"}," 📦 Compress ",8,as),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:X,disabled:!L.value,title:"Format XML"}," ✨ Format ",8,us)]),o.createElementVNode("div",ls,[L.value?(o.openBlock(),o.createElementBlock("span",cs," ✅ Valid XML ")):(o.openBlock(),o.createElementBlock("span",fs," ❌ Invalid XML "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",ds,[L.value?m.value?(o.openBlock(),o.createElementBlock("div",hs,[_[1]||(_[1]=o.createElementVNode("h4",null,"Filter Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(m.value),1)])):(o.openBlock(),o.createElementBlock("div",ms,[j.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"xml-declaration",style:o.normalizeStyle({color:Q.value.colors.xmlDeclaration})},o.toDisplayString(j.value),5)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(ce.value,(W,J)=>(o.openBlock(),o.createBlock(Yn,{key:J,node:W.node,index:W.originalIndex,level:0,expanded:A.value,theme:Q.value,selfClosingTags:x.value,onToggleExpand:S,onCopy:$,"onUpdate:tagName":R,"onUpdate:attributeName":P,"onUpdate:attributeValue":ee,"onUpdate:textContent":ue,"onUpdate:cdataContent":me},null,8,["node","index","expanded","theme","selfClosingTags"]))),128))])):(o.openBlock(),o.createElementBlock("div",ps,[_[0]||(_[0]=o.createElementVNode("h4",null,"XML Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(c.value),1)]))])],2))}}),[["__scopeId","data-v-adf2b2e1"]]),sr={"github-light":{name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",hoverBackground:"#f3f4f6",border:"#d0d7de",text:"#24292f",textSecondary:"#57606a",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#1f883d",buttonPrimaryHover:"#1a7f37",success:"#1f883d",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",sqlKeyword:"#cf222e",sqlFunction:"#8250df",sqlString:"#0a3069",sqlNumber:"#0550ae",sqlComment:"#6e7781",sqlOperator:"#cf222e",sqlIdentifier:"#24292f",sqlPunctuation:"#24292f",collapsedBackground:"#ddf4ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",hoverBackground:"#30363d",border:"#30363d",text:"#c9d1d9",textSecondary:"#8b949e",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#c9d1d9",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2e1c",error:"#f85149",errorBackground:"#3d1319",sqlKeyword:"#ff7b72",sqlFunction:"#d2a8ff",sqlString:"#a5d6ff",sqlNumber:"#79c0ff",sqlComment:"#8b949e",sqlOperator:"#ff7b72",sqlIdentifier:"#c9d1d9",sqlPunctuation:"#c9d1d9",collapsedBackground:"#1c2d41",collapsedText:"#58a6ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",hoverBackground:"#f5f5f5",border:"#e5e5e5",text:"#171717",textSecondary:"#737373",buttonBackground:"#fafafa",buttonBackgroundHover:"#f5f5f5",buttonBorder:"#e5e5e5",buttonText:"#171717",buttonPrimary:"#22c55e",buttonPrimaryHover:"#16a34a",success:"#22c55e",successBackground:"#dcfce7",error:"#ef4444",errorBackground:"#fee2e2",sqlKeyword:"#dc2626",sqlFunction:"#9333ea",sqlString:"#1e40af",sqlNumber:"#2563eb",sqlComment:"#737373",sqlOperator:"#dc2626",sqlIdentifier:"#171717",sqlPunctuation:"#171717",collapsedBackground:"#dbeafe",collapsedText:"#1d4ed8",indentLine:"#e0e0e0"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fef5ed",surfaceBackground:"#fef9f3",hoverBackground:"#f9f0e5",border:"#e9dcc9",text:"#3d3c40",textSecondary:"#616061",buttonBackground:"#fef9f3",buttonBackgroundHover:"#f9f0e5",buttonBorder:"#e9dcc9",buttonText:"#3d3c40",buttonPrimary:"#007a5a",buttonPrimaryHover:"#006644",success:"#007a5a",successBackground:"#d1f4e0",error:"#e01e5a",errorBackground:"#ffdbea",sqlKeyword:"#e01e5a",sqlFunction:"#8b2eff",sqlString:"#0b4c8c",sqlNumber:"#1264a3",sqlComment:"#616061",sqlOperator:"#e01e5a",sqlIdentifier:"#3d3c40",sqlPunctuation:"#3d3c40",collapsedBackground:"#d8eaf5",collapsedText:"#0b4c8c",indentLine:"#3e4348"}}},Es=n=>sr[n]||sr["github-light"],xt=["SELECT","FROM","WHERE","JOIN","INNER","LEFT","RIGHT","FULL","OUTER","ON","GROUP","BY","HAVING","ORDER","LIMIT","OFFSET","INSERT","INTO","VALUES","UPDATE","SET","DELETE","CREATE","ALTER","DROP","TABLE","DATABASE","INDEX","VIEW","AND","OR","NOT","IN","BETWEEN","LIKE","IS","NULL","AS","DISTINCT","UNION","ALL","EXISTS","CASE","WHEN","THEN","ELSE","END"],ys=["WITH","SELECT","FROM","WHERE","GROUP BY","HAVING","ORDER BY","LIMIT","INSERT","UPDATE","DELETE","CREATE","ALTER","DROP","JOIN","INNER JOIN","LEFT JOIN","RIGHT JOIN","FULL JOIN","OUTER JOIN"],bs=n=>{try{if(!n||!n.trim())return{valid:!1,error:"SQL string is empty"};const t=n.toUpperCase().trim();if(!xt.some(x=>new RegExp(`\\b${x}\\b`).test(t)))return{valid:!1,error:"No valid SQL keywords found"};let a=0,i=!1,u="";for(let x=0;x<n.length;x++){const L=n[x],F=x>0?n[x-1]:"";if((L==="'"||L==='"')&&F!=="\\"&&(i?L===u&&(i=!1,u=""):(i=!0,u=L)),!i&&(L==="("&&a++,L===")"&&a--,a<0))return{valid:!1,error:"Mismatched parentheses: unexpected closing parenthesis"}}if(a!==0)return{valid:!1,error:`Mismatched parentheses: ${a} unclosed opening parenthesis`};let c=0,A=0,p=!1;for(let x=0;x<n.length;x++){const L=n[x];if(p){p=!1;continue}if(L==="\\"){p=!0;continue}L==="'"&&c++,L==='"'&&A++}if(c%2!==0)return{valid:!1,error:"Mismatched single quotes"};if(A%2!==0)return{valid:!1,error:"Mismatched double quotes"};let m=n.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?").replace(/--[^\n]*/g,"").replace(/\/\*[\s\S]*?\*\//g,"").toUpperCase().trim();const T=As(m);switch(T){case"WITH":return xs(m);case"SELECT":return Ns(m);case"INSERT":return Cs(m);case"UPDATE":return vs(m);case"DELETE":return Ds(m);case"CREATE":case"ALTER":case"DROP":return Ts(m,T);case"UNKNOWN":return{valid:!1,error:"Unable to determine SQL statement type"};default:return{valid:!0}}}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}};function As(n){const t=n.trim().split(/\s+/)[0];return["WITH","SELECT","INSERT","UPDATE","DELETE","CREATE","ALTER","DROP"].includes(t)?t:"UNKNOWN"}function Ns(n){if(!/SELECT\s+.+/.test(n))return{valid:!1,error:"SELECT statement must specify columns"};if(/\bFROM\b/.test(n)&&!/FROM\s+\S+/.test(n))return{valid:!1,error:"FROM clause must specify a table name"};if(/\bGROUP\s+BY\b/.test(n)&&!/GROUP\s+BY\s+\S+/.test(n))return{valid:!1,error:"GROUP BY must specify columns"};if(/\bORDER\s+BY\b/.test(n)&&!/ORDER\s+BY\s+\S+/.test(n))return{valid:!1,error:"ORDER BY must specify columns"};if(/\bJOIN\b/.test(n)){if(!/JOIN\s+\S+/.test(n))return{valid:!1,error:"JOIN must specify a table name"};if(!/\bON\b/.test(n)&&!/CROSS\s+JOIN/.test(n))return{valid:!1,error:"JOIN must have ON condition"}}return{valid:!0}}function xs(n){return/WITH\s+\S+/.test(n)?/\bAS\b/.test(n)?/\)\s*(SELECT|INSERT|UPDATE|DELETE)\b/.test(n)?{valid:!0}:{valid:!1,error:"WITH statement must have a main query (SELECT/INSERT/UPDATE/DELETE)"}:{valid:!1,error:"CTE must have AS clause"}:{valid:!1,error:"WITH must specify a CTE name"}}function Cs(n){return/INSERT\s+INTO\s+\S+/.test(n)?!/\bVALUES\b/.test(n)&&!/\bSELECT\b/.test(n)?{valid:!1,error:"INSERT statement must have VALUES or SELECT clause"}:/\bVALUES\b/.test(n)&&!/VALUES\s*\(/.test(n)?{valid:!1,error:"VALUES must be followed by parentheses"}:{valid:!0}:{valid:!1,error:"INSERT INTO must specify a table name"}}function vs(n){return/UPDATE\s+\S+/.test(n)?/\bSET\b/.test(n)?/SET\s+\S+\s*=/.test(n)?{valid:!0}:{valid:!1,error:"SET clause must have column assignments"}:{valid:!1,error:"UPDATE statement must have SET clause"}:{valid:!1,error:"UPDATE must specify a table name"}}function Ds(n){return/DELETE\s+FROM\s+\S+/.test(n)?{valid:!0}:{valid:!1,error:"DELETE FROM must specify a table name"}}function Ts(n,t){return new RegExp(`${t}\\s+(TABLE|DATABASE|INDEX|VIEW|SCHEMA|PROCEDURE|FUNCTION)\\s+\\S+`).test(n)?{valid:!0}:{valid:!1,error:`${t} must specify object type and name`}}const kt=(n,t)=>{try{const r=t?.tabWidth||2,a=t?.keywordCase||"upper",i=" ".repeat(r);let u=n.trim();const c=[];u=u.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,S=>(c.push({type:"string",value:S}),`__PROTECTED_${c.length-1}__`)),u=u.replace(/--[^\n]*/g,S=>(c.push({type:"comment",value:S}),`__PROTECTED_${c.length-1}__`)),u=u.replace(/\/\*[\s\S]*?\*\//g,S=>(c.push({type:"comment",value:S}),`__PROTECTED_${c.length-1}__`)),u=u.replace(/\s*\n\s*/g," ").replace(/\s+/g," "),u=u.replace(/,(?!\s)/g,", ").replace(/\s*\bAS\b\s*/gi," AS ").replace(/\s*\bOVER\b\s*/gi," OVER ").replace(/\s*\b(DESC|ASC)\b\s*/gi," $1 ").replace(/\s*([<>=!]+)\s*/g," $1 ").replace(/\s*\bON\b\s*/gi," ON ").replace(/\)([A-Z])/gi,") $1").replace(/[ \t]+/g," ").replace(/ +$/gm,"").replace(/^ +/gm,""),a==="upper"?xt.forEach(S=>{const q=new RegExp(`\\b${S}\\b`,"gi");u=u.replace(q,S.toUpperCase())}):a==="lower"&&xt.forEach(S=>{const q=new RegExp(`\\b${S}\\b`,"gi");u=u.replace(q,S.toLowerCase())});const A=["WITH","SELECT","FROM","WHERE","GROUP BY","HAVING","ORDER BY","LIMIT","OFFSET","INNER JOIN","LEFT JOIN","RIGHT JOIN","FULL JOIN","CROSS JOIN","OUTER JOIN","JOIN","UNION","UNION ALL","INTERSECT","EXCEPT","INSERT INTO","UPDATE","DELETE FROM","CREATE","ALTER","DROP"];A.sort((S,q)=>q.length-S.length),u=u.replace(/\b(WITH)\s+(\w+)\s+(AS)\s*\(/gi,(S,q,G,V)=>`${a==="upper"?"WITH":"with"}
26
+ ${i}${G} ${a==="upper"?"AS":"as"} (`);const p=S=>{const q=S.split(`
27
+ `),G=[];let V=!1,g=0,X=0;for(let w=0;w<q.length;w++){const v=q[w],$=v.trim();if(/^\s*\w+\s+AS\s*\(/.test(v)){V=!0,g=1,X=1,G.push(i+v.trim());continue}if(V){let R=!1,P="";for(const ee of $)(ee==='"'||ee==="'")&&!R?(R=!0,P=ee):ee===P&&R?R=!1:R||(ee==="("?X++:ee===")"&&X--);X===0?(V=!1,G.push(i+")")):$?G.push(i+v):G.push("")}else G.push(v)}return G.join(`
28
+ `)},m=[];A.forEach((S,q)=>{if(S.includes(" ")){const G=a==="upper"?S:S.toLowerCase(),V=new RegExp(`\\b${S}\\b`,"gi"),g=`__KEYWORD_${q}__`;u=u.replace(V,g),m.push({placeholder:g,original:G})}}),A.forEach(S=>{if(!S.includes(" ")&&S!=="WITH"){const q=a==="upper"?S:S.toLowerCase(),G=new RegExp(`\\b${S}\\b`,"gi");u=u.replace(G,`
29
+ ${q}`)}}),m.forEach(({placeholder:S,original:q})=>{u=u.replace(new RegExp(S,"g"),`
30
+ ${q}`)}),u=(S=>{let q=S;const G=/\b(\w+)\s+OVER\s*\(/gi;let V;for(;(V=G.exec(q))!==null;){const g=V[1],X=V.index+V[0].length;let w=1,v=X;for(;w>0&&v<q.length;)q[v]==="("?w++:q[v]===")"&&w--,v++;if(w===0){const $=q.substring(X,v-1).trim(),R=a==="upper"?"OVER":"over",P=/\bORDER\s+BY\b/i.test($),ee=/\bPARTITION\s+BY\b/i.test($);if(P||ee){let ue=$;if(P){const N=a==="upper"?"ORDER BY":"order by";ue=ue.replace(/\bORDER\s+BY\s+(.+)/gi,(_,W)=>`
31
+ ${i}${N}
32
+ ${i}${i}${W.trim()}`)}if(ee){const N=a==="upper"?"PARTITION BY":"partition by";ue=ue.replace(/\bPARTITION\s+BY\s+(.+)/gi,(_,W)=>`
33
+ ${i}${N}
34
+ ${i}${i}${W.trim()}`)}const me=`${g} ${R} (${ue}
35
+ ${i})`;q=q.substring(0,V.index)+me+q.substring(v),G.lastIndex=V.index+me.length}}}return q})(u),u=u.replace(/\b((?:INNER\s+|LEFT\s+|RIGHT\s+|FULL\s+|CROSS\s+|OUTER\s+)?JOIN\s+[^\n]+?)\s+ON\s+(.+?)(?=\n|$)/gi,(S,q,G)=>`${q} ${a==="upper"?"ON":"on"} ${G.trim()}`),u=u.replace(/\b(WHERE)\s+([^\n]+?)(?=\s+AND\b|\s+OR\b|\n|$)/gis,(S,q,G)=>{const V=a==="upper"?"WHERE":"where",g=G.trim();return`${V}
36
+ ${i}${g}`}),u=u.replace(/\b(HAVING)\s+(?!\n)(.+?)(?=\n|$)/gis,(S,q,G)=>`${a==="upper"?"HAVING":"having"}
37
+ ${i}${G.trim()}`),u=u.replace(/\b(ORDER BY)\s+(?!\n)([^,\n]+?)(?=\n|$|;)/gis,(S,q,G)=>{const V=a==="upper"?"ORDER BY":"order by";return G.includes(",")?S:`${V}
38
+ ${i}${G.trim()}`}),u=u.replace(/\b(INSERT\s+INTO)\s+(\w+)\s*\(([^)]+)\)\s*(VALUES)/gis,(S,q,G,V,g)=>{const X=a==="upper"?"INSERT INTO":"insert into",w=a==="upper"?"VALUES":"values",v=V.split(",").map(R=>R.trim());let $=`${X} ${G}
39
+ (`;return $+=v.join(`,
40
+ `),$+=`)
41
+ ${w}`,$}),u=u.replace(/\b(VALUES)\s*\n?\s*\(([^)]+)\)/gis,(S,q,G)=>{const V=a==="upper"?"VALUES":"values",g=G.split(/,\s*(?=(?:[^']*'[^']*')*[^']*$)/).map(w=>w.trim());let X=`${V}
42
+ (`;return X+=g.join(`,
43
+ `),X+=")",X}),u=u.replace(/\b(UPDATE\s+)(\w+)\s+(SET)\s+([^\n]+?)(?=\n(?:WHERE)|$|;)/gis,(S,q,G,V,g)=>{const X=a==="upper"?"UPDATE":"update",w=a==="upper"?"SET":"set",v=g.split(/,\s*(?![^()]*\))/).map(R=>R.trim());let $=`${X} ${G}
44
+ ${w}`;return v.forEach((R,P)=>{$+=`
45
+ ${i}${R}`,P<v.length-1&&($+=",")}),$}),["AND","OR"].forEach(S=>{const q=a==="upper"?S:S.toLowerCase(),G=new RegExp(`\\b${S}\\b`,"gi");u=u.replace(G,`
46
+ ${i}${q}`)});const L=u.split(`
47
+ `),F=[],Q=S=>{const q=[];let G="",V=0;for(let g=0;g<S.length;g++){const X=S[g];X==="("?(V++,G+=X):X===")"?(V--,G+=X):X===","&&V===0?(q.push(G.trim()),G=""):G+=X}return G.trim()&&q.push(G.trim()),q},ie=S=>{if(!/\bCASE\b/i.test(S))return[S];const q=[],G=[];let V=S.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,$=>{const R=G.length;return G.push($),`__STRING_${R}__`});const g=/\b(CASE)\b([\s\S]*?)\b(END)\b/gi;let X=0,w;for(;(w=g.exec(V))!==null;){if(w.index>X){const P=V.substring(X,w.index).trim();P&&q.push(P)}q.push("CASE");const R=w[2].split(/\b(WHEN|ELSE)\b/gi);for(let P=0;P<R.length;P++){const ee=R[P].trim();if(ee){if(/^WHEN$/i.test(ee)){const ue=R[++P]?.trim()||"",me=ue.match(/^(.*?)\s+THEN\s+(.*)$/i);if(me){const N=a==="upper"?"WHEN":"when",_=a==="upper"?"THEN":"then";q.push(i+N+" "+me[1].trim()+" "+_+" "+me[2].trim())}else{const N=a==="upper"?"WHEN":"when";q.push(i+N+" "+ue)}}else if(/^ELSE$/i.test(ee)){const ue=R[++P]?.trim()||"",me=a==="upper"?"ELSE":"else";q.push(i+me+" "+ue)}}}q.push("END"),X=g.lastIndex}if(X<V.length){const $=V.substring(X).trim();$&&(q[q.length-1]+=" "+$)}return q.map($=>$.replace(/__STRING_(\d+)__/g,(R,P)=>G[parseInt(P)]))};for(let S=0;S<L.length;S++){const q=L[S].trim();if(/^SELECT\b/i.test(q)){const G=q.match(/^(SELECT\s+(?:DISTINCT\s+)?)(.*)/i);if(G){const V=G[1].trim(),g=G[2],X=Q(g);F.push(V),X.forEach((w,v)=>{const $=v===X.length-1;if(/\bCASE\b/i.test(w)){const R=ie(w);R.forEach((P,ee)=>{ee===0?F.push(i+P):ee===R.length-1?F.push(i+P+($?"":",")):F.push(i+P)})}else $?F.push(i+w):F.push(i+w+",")})}else F.push(q)}else if(/^FROM\b/i.test(q)){const G=q.match(/^(FROM\s+)(.*)/i);if(G){const V=G[1].trim(),g=G[2].trim();F.push(V),F.push(i+g)}else F.push(q)}else if(/^(INNER\s+JOIN|LEFT\s+JOIN|RIGHT\s+JOIN|FULL\s+JOIN|CROSS\s+JOIN|OUTER\s+JOIN|JOIN)\b/i.test(q))F.push(i+q);else if(/^GROUP BY\b/i.test(q)){const G=q.match(/^(GROUP BY\s+)(.*)/i);if(G){const V=G[1].trim(),g=G[2],X=Q(g);X.length>1?(F.push(V),X.forEach((w,v)=>{v===X.length-1?F.push(i+w):F.push(i+w+",")})):F.push(q)}else F.push(q)}else if(/^ORDER BY\b/i.test(q)){const G=q.match(/^(ORDER BY\s+)(.*)/i);if(G){const V=G[1].trim(),g=G[2],X=Q(g);X.length>1?(F.push(V),X.forEach((w,v)=>{v===X.length-1?F.push(i+w):F.push(i+w+",")})):F.push(q)}else F.push(q)}else F.push(q)}u=F.join(`
50
48
  `),u=u.split(`
51
- `).filter(w=>w.trim().length>0).join(`
52
- `),v.forEach((w,y)=>{u=u.replace(`__PROTECTED_${y}__`,w.value)}),f.forEach(({placeholder:w,content:y})=>{u=u.replace(w,y)});const J=u.split(`
53
- `),N=[];for(let w=0;w<J.length;w++){const y=J[w],B=y.trim();if(y.startsWith(" ")||y.startsWith(" ")){N.push(y);continue}if(U.some(Z=>new RegExp(`^${Z}\\b`,"i").test(B))){N.push(B);continue}let $="";for(let Z=w-1;Z>=0;Z--){const te=J[Z].trim(),g=U.find(C=>new RegExp(`^${C}\\b`,"i").test(te));if(g){$=g;break}}/^(AND|OR)\b/i.test(B)||$.match(/^SELECT$/i)||$.match(/^(WHERE|HAVING)$/i)||$.match(/JOIN$/i)||$.match(/^ORDER BY$/i)?N.push(i+B):N.push(B)}let le=N.join(`
54
- `);return le=K(le),le}catch(r){throw new Error(`SQL 格式化失败: ${r instanceof Error?r.message:"Unknown error"}`)}},As=n=>{try{let t=n.replace(/--[^\n]*/g,"").replace(/\/\*[\s\S]*?\*\//g,"");const r=[];return t=t.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,a=>(r.push(a),`__STRING_${r.length-1}__`)),t=t.replace(/\s+/g," ").replace(/\s*([(),;])\s*/g,"$1").trim(),r.forEach((a,i)=>{t=t.replace(`__STRING_${i}__`,a)}),t}catch(t){throw new Error(`SQL 压缩失败: ${t instanceof Error?t.message:"Unknown error"}`)}},xs=n=>{const t=[];try{const a=kt(n,{keywordCase:"upper"}).split(`
55
- `);let i=null,u=[],f=[];for(const x of a){const p=x.trim();if(!p){i&&u.push(x);continue}if(p.startsWith("--")||p.startsWith("/*")){i?u.push(x):f.push(x);continue}let S=!1,v="UNKNOWN";for(const U of ys)if(new RegExp(`^${U}\\b`,"i").test(p)){S=!0,v=U.replace(/ /g," ");break}S?(f.length>0&&(t.push({type:"UNKNOWN",content:f.join(`
56
- `),raw:f.join(`
57
- `),collapsible:!1,path:`clause-${t.length}`}),f=[]),i&&u.length>0&&(i.content=u.join(`
49
+ `).filter(S=>S.trim().length>0).join(`
50
+ `),c.forEach((S,q)=>{u=u.replace(`__PROTECTED_${q}__`,S.value)});const j=u.split(`
51
+ `),ce=[];for(let S=0;S<j.length;S++){const q=j[S],G=q.trim();if(q.startsWith(" ")||q.startsWith(" ")){ce.push(q);continue}if(A.some(w=>new RegExp(`^${w}\\b`,"i").test(G))){ce.push(G);continue}let X="";for(let w=S-1;w>=0;w--){const v=j[w].trim(),$=A.find(R=>new RegExp(`^${R}\\b`,"i").test(v));if($){X=$;break}}/^(AND|OR)\b/i.test(G)||X.match(/^(WHERE|HAVING)$/i)||X.match(/JOIN$/i)||X.match(/^ORDER BY$/i)?ce.push(i+G):ce.push(G)}let he=ce.join(`
52
+ `);return he=p(he),he}catch(r){throw new Error(`SQL 格式化失败: ${r instanceof Error?r.message:"Unknown error"}`)}},ws=n=>{try{let t=n.replace(/--[^\n]*/g,"").replace(/\/\*[\s\S]*?\*\//g,"");const r=[];return t=t.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,a=>(r.push(a),`__STRING_${r.length-1}__`)),t=t.replace(/\s+/g," ").replace(/\s*([,;])\s*/g,"$1").replace(/\(\s+/g,"(").replace(/\s+\)/g,")").trim(),r.forEach((a,i)=>{t=t.replace(`__STRING_${i}__`,a)}),t}catch(t){throw new Error(`SQL 压缩失败: ${t instanceof Error?t.message:"Unknown error"}`)}},_s=n=>{const t=[];try{const a=kt(n,{keywordCase:"upper"}).split(`
53
+ `);let i=null,u=[],c=[];for(const A of a){const p=A.trim();if(!p){i&&u.push(A);continue}if(p.startsWith("--")||p.startsWith("/*")){i?u.push(A):c.push(A);continue}let T=!1,x="UNKNOWN";for(const L of ys)if(new RegExp(`^${L}\\b`,"i").test(p)){T=!0,x=L.replace(/ /g," ");break}T?(i&&u.length>0&&(i.content=u.join(`
58
54
  `),i.raw=u.join(`
59
- `),t.push(i)),u=[x],i={type:v,content:"",raw:"",collapsible:!0,path:`clause-${t.length}`}):i?u.push(x):(u=[...f,x],f=[],i={type:"UNKNOWN",content:"",raw:"",collapsible:!1,path:`clause-${t.length}`})}return i&&u.length>0&&(i.content=u.join(`
55
+ `),t.push(i)),c.length>0&&(t.push({type:"UNKNOWN",content:c.join(`
56
+ `),raw:c.join(`
57
+ `),collapsible:!1,path:`clause-${t.length}`}),c=[]),u=[A],i={type:x,content:"",raw:"",collapsible:!0,path:`clause-${t.length}`}):i?u.push(A):(u=[...c,A],c=[],i={type:"UNKNOWN",content:"",raw:"",collapsible:!1,path:`clause-${t.length}`})}return i&&u.length>0&&(i.content=u.join(`
60
58
  `),i.raw=u.join(`
61
- `),t.push(i)),f.length>0&&t.push({type:"UNKNOWN",content:f.join(`
62
- `),raw:f.join(`
63
- `),collapsible:!1,path:`clause-${t.length}`}),{clauses:t,raw:n}}catch{return{clauses:[{type:"UNKNOWN",content:n,raw:n,collapsible:!1,path:"clause-0"}],raw:n}}},Ns=n=>{const t=[];let r=n;const a=["COUNT","SUM","AVG","MAX","MIN","UPPER","LOWER","SUBSTRING","CONCAT","LENGTH","TRIM","NOW","DATE","YEAR","MONTH","DAY","COALESCE","CAST","CONVERT","ROUND","ABS","FLOOR","CEIL"],i=["=","!=","<>","<",">","<=",">=","+","-","*","/","%","||"],u=["(",")",",",";","."];for(;r.length>0;){let f=!1;const x=r.match(/^(\s+)/);if(x){t.push({type:"whitespace",value:x[1]}),r=r.slice(x[1].length);continue}const p=r.match(/^(--[^\n]*)/);if(p){t.push({type:"comment",value:p[1]}),r=r.slice(p[1].length);continue}const m=r.match(/^(\/\*[\s\S]*?\*\/)/);if(m){t.push({type:"comment",value:m[1]}),r=r.slice(m[1].length);continue}const S=r.match(/^(["'])(?:(?=(\\?))\2.)*?\1/);if(S){t.push({type:"string",value:S[0]}),r=r.slice(S[0].length);continue}const v=r.match(/^(\d+\.?\d*|\.\d+)/);if(v){t.push({type:"number",value:v[1]}),r=r.slice(v[1].length);continue}for(const K of i)if(r.startsWith(K)){t.push({type:"operator",value:K}),r=r.slice(K.length),f=!0;break}if(f)continue;for(const K of u)if(r.startsWith(K)){t.push({type:"punctuation",value:K}),r=r.slice(K.length),f=!0;break}if(f)continue;const U=r.match(/^([a-zA-Z_][a-zA-Z0-9_]*)/);if(U){const K=U[1],Y=K.toUpperCase();Nt.includes(Y)?t.push({type:"keyword",value:K}):a.includes(Y)?t.push({type:"function",value:K}):t.push({type:"identifier",value:K}),r=r.slice(K.length);continue}t.push({type:"punctuation",value:r[0]}),r=r.slice(1)}return t},Cs={key:0,class:"sql-format__toolbar"},Ds={class:"sql-format__actions"},vs=["disabled"],ws=["disabled"],Ts=["disabled"],_s=["disabled"],Bs=["disabled"],Ss={class:"sql-format__info"},Os={key:0,class:"sql-format__status sql-format__status--success"},ks={key:1,class:"sql-format__status sql-format__status--error"},Rs={class:"sql-format__content"},Is={key:0,class:"sql-format__error"},Fs={key:1,class:"sql-format__viewer"},Ps={key:0,class:"sql-format__clauses"},Ls=["onClick"],Vs=["onClick","title"],$s={key:1,class:"sql-format__toggle-spacer"},Ms={class:"sql-format__clause-keyword"},qs={class:"sql-format__clause-code"},Us=["innerHTML"],Hs={key:0,class:"sql-format__clause-content"},js={class:"sql-format__clause-code"},Ks=["innerHTML"],Gs={key:1,class:"sql-format__code"},Xs=["innerHTML"],Ws=ft(o.defineComponent({__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"},dialect:{default:"sql"},tabWidth:{default:2}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress","format"],setup(n,{expose:t,emit:r}){o.useCssVars(y=>({"36e4ab9e":v.value.colors.background,"1b3fa0c6":v.value.colors.text,"8634fac8":v.value.colors.border,"8e57156a":v.value.colors.surfaceBackground,"3fe2546e":v.value.colors.buttonBorder,"68a04470":v.value.colors.buttonBackground,c8a96422:v.value.colors.buttonText,"6f984aa8":v.value.colors.buttonBackgroundHover,b4b99400:v.value.colors.buttonPrimary,dbcd39c8:v.value.colors.buttonPrimaryHover,29081521:v.value.colors.successBackground,"6c7dff93":v.value.colors.success,"130e48e6":v.value.colors.errorBackground,"58d83598":v.value.colors.error,"4d25a257":v.value.colors.textSecondary}));const a=n,i=r,u=o.ref(""),f=o.ref(a.dialect),x=o.ref([]),p=o.ref(new Set),m=o.ref(""),S=o.computed(()=>u.value===""),v=o.computed(()=>Es(a.theme)),U=y=>{if(!y||!y.trim()){u.value="",x.value=[],p.value.clear();return}try{const B=bs(y);if(!B.valid){u.value=B.error||"Invalid SQL",x.value=[],m.value="";return}const _=xs(y);x.value=_.clauses,m.value=kt(y,{dialect:f.value,tabWidth:a.tabWidth}),p.value=new Set(_.clauses.map(L=>L.path||"")),u.value=""}catch(B){u.value=B instanceof Error?B.message:"Unknown parse error",x.value=[],m.value=""}},K=y=>{const B=Ns(y),_=v.value.colors;return B.map(L=>{let $=_.text;switch(L.type){case"keyword":$=_.sqlKeyword;break;case"function":$=_.sqlFunction;break;case"string":$=_.sqlString;break;case"number":$=_.sqlNumber;break;case"comment":$=_.sqlComment;break;case"operator":$=_.sqlOperator;break;case"identifier":$=_.sqlIdentifier;break;case"punctuation":$=_.sqlPunctuation;break;case"whitespace":return L.value.replace(/ /g,"&nbsp;").replace(/\n/g,`
64
- `)}const Z=L.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");return`<span style="color: ${$}">${Z}</span>`}).join("")},Y=y=>{p.value.has(y)?p.value.delete(y):p.value.add(y),p.value=new Set(p.value)},ae=y=>p.value.has(y),H=y=>{const B=y.content.split(`
65
- `);if(B.length===0)return"";for(const _ of B)if(_.trim())return _;return""},de=y=>{const B=H(y),_=ae(y.path||""),L=!!re(y);return y.collapsible&&!_&&L?`${K(B)}<span style="color: ${v.value.colors.textSecondary}; opacity: 0.6; font-style: italic; margin-left: 4px;"> ...</span>`:K(B)},re=y=>{const B=y.content.split(`
66
- `);if(B.length<=1)return"";let _=0;for(let $=0;$<B.length;$++)if(B[$].trim()){_=$;break}return B.slice(_+1).join(`
67
- `)},z=()=>{p.value=new Set(x.value.map(y=>y.path||"")),i("expand-all")},me=()=>{p.value=new Set,i("collapse-all")},be=async()=>{if(S.value)try{const y=m.value||a.modelValue;await navigator.clipboard.writeText(y),i("copy-success",y)}catch(y){const B=y instanceof Error?y:new Error("Failed to copy");i("copy-error",B)}},J=()=>{if(S.value)try{const y=kt(a.modelValue,{dialect:f.value,tabWidth:a.tabWidth});i("update:modelValue",y),i("format",y)}catch(y){console.error("Format error:",y)}},N=()=>{if(S.value)try{const y=As(a.modelValue);i("update:modelValue",y),i("compress",y)}catch(y){console.error("Compress error:",y)}},le=()=>null,w=()=>u.value;return o.watch(()=>a.modelValue,y=>{U(y)},{immediate:!0}),o.watch(()=>a.dialect,y=>{f.value=y}),t({copySql:be,formatSource:J,compressSource:N,expandAll:z,collapseAll:me,toggleExpand:Y,isValidSql:()=>S.value,getParsedSql:le,getParseError:w}),(y,B)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["sql-format",`sql-format--${v.value.name}`])},[y.showToolbar?(o.openBlock(),o.createElementBlock("div",Cs,[o.createElementVNode("div",Ds,[o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--primary",onClick:be,disabled:!S.value,title:"Copy SQL"}," 📋 Copy ",8,vs),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:J,disabled:!S.value,title:"Format SQL"}," ✨ Format ",8,ws),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:N,disabled:!S.value,title:"Compress SQL"}," 📦 Compress ",8,Ts),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:z,disabled:!S.value||x.value.length===0,title:"Expand All Clauses"}," ⬇️ Expand All ",8,_s),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:me,disabled:!S.value||x.value.length===0,title:"Collapse All Clauses"}," ⬆️ Collapse All ",8,Bs),o.withDirectives(o.createElementVNode("select",{"onUpdate:modelValue":B[0]||(B[0]=_=>f.value=_),class:"sql-format__dialect-select",title:"SQL Dialect"},B[1]||(B[1]=[o.createStaticVNode('<option value="sql" data-v-990d3559>SQL</option><option value="mysql" data-v-990d3559>MySQL</option><option value="postgresql" data-v-990d3559>PostgreSQL</option><option value="sqlite" data-v-990d3559>SQLite</option><option value="plsql" data-v-990d3559>PL/SQL</option><option value="tsql" data-v-990d3559>T-SQL</option>',6)]),512),[[o.vModelSelect,f.value]])]),o.createElementVNode("div",Ss,[S.value?(o.openBlock(),o.createElementBlock("span",Os," ✅ Valid SQL ")):(o.openBlock(),o.createElementBlock("span",ks," ❌ Invalid SQL "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",Rs,[S.value?(o.openBlock(),o.createElementBlock("div",Fs,[x.value.length>0?(o.openBlock(),o.createElementBlock("div",Ps,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x.value,_=>(o.openBlock(),o.createElementBlock("div",{key:_.path,class:"sql-format__clause"},[o.createElementVNode("div",{class:"sql-format__clause-header",onClick:L=>_.collapsible&&Y(_.path||"")},[_.collapsible?(o.openBlock(),o.createElementBlock("button",{key:0,class:"sql-format__toggle-btn",onClick:o.withModifiers(L=>Y(_.path||""),["stop"]),title:ae(_.path||"")?"Collapse":"Expand"},[o.createElementVNode("span",{class:o.normalizeClass(["sql-format__toggle-icon",{"sql-format__toggle-icon--expanded":ae(_.path||"")}])},"▶",2)],8,Vs)):(o.openBlock(),o.createElementBlock("span",$s)),o.createElementVNode("div",Ms,[o.createElementVNode("pre",qs,[o.createElementVNode("code",{innerHTML:de(_)},null,8,Us)])])],8,Ls),ae(_.path||"")&&re(_)?(o.openBlock(),o.createElementBlock("div",Hs,[o.createElementVNode("pre",js,[o.createElementVNode("code",{innerHTML:K(re(_))},null,8,Ks)])])):o.createCommentVNode("",!0)]))),128))])):(o.openBlock(),o.createElementBlock("pre",Gs,[o.createElementVNode("code",{innerHTML:K(a.modelValue)},null,8,Xs)]))])):(o.openBlock(),o.createElementBlock("div",Is,[B[2]||(B[2]=o.createElementVNode("h4",null,"SQL Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(u.value),1)]))])],2))}}),[["__scopeId","data-v-990d3559"]]),zs=[Ft],Ys={install:n=>{zs.forEach(t=>{const r=t.name||t.__name||"UnknownComponent";n.component(r,t)})}};We.JsonFormat=Ft,We.SqlFormat=Ws,We.XmlFormat=gs,We.default=Ys,Object.defineProperties(We,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
59
+ `),t.push(i)),c.length>0&&t.push({type:"UNKNOWN",content:c.join(`
60
+ `),raw:c.join(`
61
+ `),collapsible:!1,path:`clause-${t.length}`}),{clauses:t,raw:n}}catch{return{clauses:[{type:"UNKNOWN",content:n,raw:n,collapsible:!1,path:"clause-0"}],raw:n}}},Ss=n=>{const t=[];let r=n;const a=["COUNT","SUM","AVG","MAX","MIN","UPPER","LOWER","SUBSTRING","CONCAT","LENGTH","TRIM","NOW","DATE","YEAR","MONTH","DAY","COALESCE","CAST","CONVERT","ROUND","ABS","FLOOR","CEIL"],i=["=","!=","<>","<",">","<=",">=","+","-","*","/","%","||"],u=["(",")",",",";","."];for(;r.length>0;){let c=!1;const A=r.match(/^(\s+)/);if(A){t.push({type:"whitespace",value:A[1]}),r=r.slice(A[1].length);continue}const p=r.match(/^(--[^\n]*)/);if(p){t.push({type:"comment",value:p[1]}),r=r.slice(p[1].length);continue}const m=r.match(/^(\/\*[\s\S]*?\*\/)/);if(m){t.push({type:"comment",value:m[1]}),r=r.slice(m[1].length);continue}const T=r.match(/^(["'])(?:(?=(\\?))\2.)*?\1/);if(T){t.push({type:"string",value:T[0]}),r=r.slice(T[0].length);continue}const x=r.match(/^(\d+\.?\d*|\.\d+)/);if(x){t.push({type:"number",value:x[1]}),r=r.slice(x[1].length);continue}for(const F of i)if(r.startsWith(F)){t.push({type:"operator",value:F}),r=r.slice(F.length),c=!0;break}if(c)continue;for(const F of u)if(r.startsWith(F)){t.push({type:"punctuation",value:F}),r=r.slice(F.length),c=!0;break}if(c)continue;const L=r.match(/^([a-zA-Z_][a-zA-Z0-9_]*)/);if(L){const F=L[1],Q=F.toUpperCase();xt.includes(Q)?t.push({type:"keyword",value:F}):a.includes(Q)?t.push({type:"function",value:F}):t.push({type:"identifier",value:F}),r=r.slice(F.length);continue}t.push({type:"punctuation",value:r[0]}),r=r.slice(1)}return t},Bs={key:0,class:"sql-format__toolbar"},Os={class:"sql-format__actions"},ks=["disabled"],Rs=["disabled"],Is=["disabled"],Fs=["disabled"],Ps=["disabled"],Ls={class:"sql-format__info"},Vs={key:0,class:"sql-format__status sql-format__status--success"},$s={key:1,class:"sql-format__status sql-format__status--error"},Ms={class:"sql-format__content"},Us={key:0,class:"sql-format__error"},qs={key:1,class:"sql-format__viewer"},Hs={key:0,class:"sql-format__clauses"},js=["onClick"],Ks=["onClick","title"],Gs={key:1,class:"sql-format__toggle-spacer"},Xs={class:"sql-format__clause-keyword"},Ws={class:"sql-format__clause-code"},zs=["innerHTML"],Ys={key:0,class:"sql-format__clause-content"},Qs={class:"sql-format__clause-code"},Zs=["innerHTML"],Js={key:1,class:"sql-format__code"},ei=["innerHTML"],ti=ft(o.defineComponent({__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"},dialect:{default:"sql"},tabWidth:{default:2}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress","format"],setup(n,{expose:t,emit:r}){o.useCssVars(v=>({"0f8e0258":x.value.colors.background,"1168a353":x.value.colors.text,"3b9fe0d2":x.value.colors.border,"7c0c3955":x.value.colors.surfaceBackground,"05229bb8":x.value.colors.buttonBorder,ae8a51b4:x.value.colors.buttonBackground,"5cffa125":x.value.colors.buttonText,"3b12ec94":x.value.colors.buttonBackgroundHover,ccbae1ec:x.value.colors.buttonPrimary,"35da2052":x.value.colors.buttonPrimaryHover,"27804daa":x.value.colors.successBackground,"75e12fc6":x.value.colors.success,"049b8770":x.value.colors.errorBackground,"1ade38a2":x.value.colors.error,"4124fb61":x.value.colors.textSecondary}));const a=n,i=r,u=o.ref(""),c=o.ref(a.dialect),A=o.ref([]),p=o.ref(new Set),m=o.ref(""),T=o.computed(()=>u.value===""),x=o.computed(()=>Es(a.theme)),L=v=>{if(!v||!v.trim()){u.value="",A.value=[],p.value.clear();return}try{const $=bs(v);if(!$.valid){u.value=$.error||"Invalid SQL",A.value=[],m.value="";return}const R=_s(v);A.value=R.clauses,m.value=kt(v,{dialect:c.value,tabWidth:a.tabWidth}),p.value=new Set(R.clauses.map(P=>P.path||"")),u.value=""}catch($){u.value=$ instanceof Error?$.message:"Unknown parse error",A.value=[],m.value=""}},F=v=>{const $=Ss(v),R=x.value.colors;return $.map(P=>{let ee=R.text;switch(P.type){case"keyword":ee=R.sqlKeyword;break;case"function":ee=R.sqlFunction;break;case"string":ee=R.sqlString;break;case"number":ee=R.sqlNumber;break;case"comment":ee=R.sqlComment;break;case"operator":ee=R.sqlOperator;break;case"identifier":ee=R.sqlIdentifier;break;case"punctuation":ee=R.sqlPunctuation;break;case"whitespace":return P.value.replace(/ /g,"&nbsp;").replace(/\n/g,`
62
+ `)}const ue=P.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");return`<span style="color: ${ee}">${ue}</span>`}).join("")},Q=v=>{p.value.has(v)?p.value.delete(v):p.value.add(v),p.value=new Set(p.value)},ie=v=>p.value.has(v),j=v=>{const $=v.content.split(`
63
+ `);if($.length===0)return"";for(const R of $)if(R.trim())return R;return""},ce=v=>{const $=j(v),R=ie(v.path||""),P=!!he(v);return v.collapsible&&!R&&P?`${F($)}<span style="color: ${x.value.colors.textSecondary}; opacity: 0.6; font-style: italic; margin-left: 4px;"> ...</span>`:F($)},he=v=>{const $=v.content.split(`
64
+ `);if($.length<=1)return"";let R=0;for(let ee=0;ee<$.length;ee++)if($[ee].trim()){R=ee;break}return $.slice(R+1).join(`
65
+ `)},S=()=>{p.value=new Set(A.value.map(v=>v.path||"")),i("expand-all")},q=()=>{p.value=new Set,i("collapse-all")},G=async()=>{if(T.value)try{const v=m.value||a.modelValue;await navigator.clipboard.writeText(v),i("copy-success",v)}catch(v){const $=v instanceof Error?v:new Error("Failed to copy");i("copy-error",$)}},V=()=>{if(T.value)try{const v=kt(a.modelValue,{dialect:c.value,tabWidth:a.tabWidth});i("update:modelValue",v),i("format",v)}catch(v){console.error("Format error:",v)}},g=()=>{if(T.value)try{const v=ws(a.modelValue);i("update:modelValue",v),i("compress",v)}catch(v){console.error("Compress error:",v)}},X=()=>null,w=()=>u.value;return o.watch(()=>a.modelValue,v=>{L(v)},{immediate:!0}),o.watch(()=>a.dialect,v=>{c.value=v}),t({copySql:G,formatSource:V,compressSource:g,expandAll:S,collapseAll:q,toggleExpand:Q,isValidSql:()=>T.value,getParsedSql:X,getParseError:w}),(v,$)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["sql-format",`sql-format--${x.value.name}`])},[v.showToolbar?(o.openBlock(),o.createElementBlock("div",Bs,[o.createElementVNode("div",Os,[o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--primary",onClick:G,disabled:!T.value,title:"Copy SQL"}," 📋 Copy ",8,ks),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:V,disabled:!T.value,title:"Format SQL"}," ✨ Format ",8,Rs),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:g,disabled:!T.value,title:"Compress SQL"}," 📦 Compress ",8,Is),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:S,disabled:!T.value||A.value.length===0,title:"Expand All Clauses"}," ⬇️ Expand All ",8,Fs),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:q,disabled:!T.value||A.value.length===0,title:"Collapse All Clauses"}," ⬆️ Collapse All ",8,Ps),o.withDirectives(o.createElementVNode("select",{"onUpdate:modelValue":$[0]||($[0]=R=>c.value=R),class:"sql-format__dialect-select",title:"SQL Dialect"},$[1]||($[1]=[o.createStaticVNode('<option value="sql" data-v-14525f87>SQL</option><option value="mysql" data-v-14525f87>MySQL</option><option value="postgresql" data-v-14525f87>PostgreSQL</option><option value="sqlite" data-v-14525f87>SQLite</option><option value="plsql" data-v-14525f87>PL/SQL</option><option value="tsql" data-v-14525f87>T-SQL</option>',6)]),512),[[o.vModelSelect,c.value]])]),o.createElementVNode("div",Ls,[T.value?(o.openBlock(),o.createElementBlock("span",Vs," ✅ Valid SQL ")):(o.openBlock(),o.createElementBlock("span",$s," ❌ Invalid SQL "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",Ms,[T.value?(o.openBlock(),o.createElementBlock("div",qs,[A.value.length>0?(o.openBlock(),o.createElementBlock("div",Hs,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,R=>(o.openBlock(),o.createElementBlock("div",{key:R.path,class:"sql-format__clause"},[o.createElementVNode("div",{class:"sql-format__clause-header",onClick:P=>R.collapsible&&Q(R.path||"")},[R.collapsible?(o.openBlock(),o.createElementBlock("button",{key:0,class:"sql-format__toggle-btn",onClick:o.withModifiers(P=>Q(R.path||""),["stop"]),title:ie(R.path||"")?"Collapse":"Expand"},[o.createElementVNode("span",{class:o.normalizeClass(["sql-format__toggle-icon",{"sql-format__toggle-icon--expanded":ie(R.path||"")}])},"▶",2)],8,Ks)):(o.openBlock(),o.createElementBlock("span",Gs)),o.createElementVNode("div",Xs,[o.createElementVNode("pre",Ws,[o.createElementVNode("code",{innerHTML:ce(R)},null,8,zs)])])],8,js),ie(R.path||"")&&he(R)?(o.openBlock(),o.createElementBlock("div",Ys,[o.createElementVNode("pre",Qs,[o.createElementVNode("code",{innerHTML:F(he(R))},null,8,Zs)])])):o.createCommentVNode("",!0)]))),128))])):(o.openBlock(),o.createElementBlock("pre",Js,[o.createElementVNode("code",{innerHTML:F(a.modelValue)},null,8,ei)]))])):(o.openBlock(),o.createElementBlock("div",Us,[$[2]||($[2]=o.createElementVNode("h4",null,"SQL Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(u.value),1)]))])],2))}}),[["__scopeId","data-v-14525f87"]]),ri=[Ft],ni={install:n=>{ri.forEach(t=>{const r=t.name||t.__name||"UnknownComponent";n.component(r,t)})}};We.JsonFormat=Ft,We.SqlFormat=ti,We.XmlFormat=gs,We.default=ni,Object.defineProperties(We,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});