2 lines
78 KiB
JavaScript
2 lines
78 KiB
JavaScript
define(["@emotion/css","@grafana/data","@grafana/runtime","@grafana/ui","lodash","react","react-dom","react-redux","react-router-dom","redux","rxjs"],((t,e,r,i,s,n,o,a,h,l,u)=>(()=>{"use strict";var O,f,c,p,d={9077:(t,e,r)=>{r.r(e),r.d(e,{plugin:()=>p});var i=r(5959),s=r.n(i),n=r(7781),o=r(7608),a=r(2007);const h=(0,i.lazy)((()=>r.e(543).then(r.bind(r,1543)))),l=[{id:"grafana-lokiexplore-app/open-in-explore-logs-button/v1",title:"Open in Logs Drilldown button",description:"A button that opens a logs view in the Logs Drilldown app.",component:function(t){return s().createElement(i.Suspense,{fallback:s().createElement(a.LinkButton,{variant:"secondary",disabled:!0},"Open in Logs Drilldown")},s().createElement(h,t))}}];function u(t,e,r,i,s,n,o){try{var a=t[n](o),h=a.value}catch(t){return void r(t)}a.done?e(h):Promise.resolve(h).then(i,s)}function O(t){return function(){var e=this,r=arguments;return new Promise((function(i,s){var n=t.apply(e,r);function o(t){u(n,i,s,o,a,"next",t)}function a(t){u(n,i,s,o,a,"throw",t)}o(void 0)}))}}const f=(0,i.lazy)(O((function*(){const{wasmSupported:t}=yield Promise.all([r.e(854),r.e(944),r.e(105),r.e(747)]).then(r.bind(r,5722)),{default:e}=yield Promise.all([r.e(854),r.e(944),r.e(105),r.e(747)]).then(r.bind(r,2854)),{default:i}=yield r.e(854).then(r.bind(r,1854)),{default:s}=yield r.e(944).then(r.bind(r,6944));return e(),t()&&(yield Promise.all([i(),s()])),r.e(631).then(r.bind(r,9631))}))),c=(0,i.lazy)(O((function*(){return yield r.e(599).then(r.bind(r,4599))}))),p=(new n.AppPlugin).setRootPage(f).addConfigPage({title:"Configuration",icon:"cog",body:c,id:"configuration"});for(const t of o.Ge)p.addLink(t);for(const t of l)p.exposeComponent(t)},7608:(t,e,r)=>{r.d(e,{Ge:()=>g,I8:()=>b,R6:()=>d,Rk:()=>Q,XH:()=>w,rx:()=>P,uu:()=>X,vh:()=>m,xh:()=>k,zH:()=>v});var i=r(7781),s=r(3143),n=r(2533),o=r(8682),a=r(7232),h=r(5111),l=r(4793),u=r(541);const O="Grafana Logs Drilldown",f=`Open in ${O}`,c=`Open current query in the ${O} view`,p="gf-logs",d={MetricInvestigation:"grafana-lokiexplore-app/investigation/v1"},g=[{targets:i.PluginExtensionPoints.DashboardPanelMenu,title:f,description:c,icon:p,path:Q(),configure:x},{targets:i.PluginExtensionPoints.ExploreToolbarAction,title:f,description:c,icon:p,path:Q(),configure:x}];function $(t){return t||s.ZO}function P(t){return null==t?void 0:t.replace(/\\\\/g,"\\")}function m(t){return t?(0,s.OQ)(P(t)):s.ZO}function x(t){var e,r;if(!t)return;const i=t.targets.find((t=>{var e;return"loki"===(null===(e=t.datasource)||void 0===e?void 0:e.type)}));if(!i||!(null===(e=i.datasource)||void 0===e?void 0:e.uid))return;const n=i.expr,{labelFilters:O,lineFilters:f,fields:c,patternFilters:p}=(0,o.BW)(n,t,i),d=O.find((t=>(0,h.BG)(t.operator)));if(!d)return;const g=X(d.value.split("|")[0]);let x=d.key===s.OX?"service":d.key;O.sort((t=>t.key===x?-1:1));let y=k(b.DatasourceId,null===(r=i.datasource)||void 0===r?void 0:r.uid,new URLSearchParams);y=k(b.TimeRangeFrom,t.timeRange.from.valueOf().toString(),y),y=k(b.TimeRangeTo,t.timeRange.to.valueOf().toString(),y);for(const t of O){if(t.type!==a.H.Indexed)continue;const e=`${t.key}|${t.operator}|${w(m(t.value))},${w(P(t.value))}`;y=v(b.Labels,e,y)}if(f)for(const t of f)y=v(b.LineFilters,`${t.key}|${w(t.operator)}|${w($(t.value))}`,y);if(null==c?void 0:c.length)for(const t of c)if(t.type===a.H.StructuredMetadata)y=t.key===s.e4?v(b.Levels,`${t.key}|${t.operator}|${w($(t.value))}`,y):v(b.Metadata,`${t.key}|${t.operator}|${w(m(t.value))},${w(P(t.value))}`,y);else{const e={value:t.value,parser:t.parser},r=`${t.key}|${t.operator}|${w(m(JSON.stringify(e)))},${R=e.value,R?w(P(R)):s.ZO}`;y=v(b.Fields,r,y)}var R;if(null==p?void 0:p.length){const t=[];for(const e of p)t.push({type:e.operator===l.a6.match?"include":"exclude",pattern:$(e.value)});let e=(0,u.M)(t);y=v(b.Patterns,JSON.stringify(t),y),y=v(b.PatternsVariable,e,y)}return{path:Q(`/explore/${x}/${g}/logs`,y)}}function Q(t="/explore",e){return`/a/${n.id}${t}${e?`?${e.toString()}`:""}`}const b={DatasourceId:`var-${s.EY}`,TimeRangeFrom:"from",TimeRangeTo:"to",Labels:`var-${s.MB}`,Fields:`var-${s.mB}`,Metadata:`var-${s._P}`,Levels:`var-${s._Y}`,LineFilters:`var-${s.NW}`,Patterns:s.uw,PatternsVariable:`var-${s.uw}`};function k(t,e,r){var i;const s=new URLSearchParams(null!==(i=null==r?void 0:r.toString())&&void 0!==i?i:location.search);return s.set(t,e),s}function v(t,e,r){var i;const s=new URLSearchParams(null!==(i=null==r?void 0:r.toString())&&void 0!==i?i:location.search);return s.append(t,e),s}function X(t){return(0,s.Dx)(t).replace(/\//g,"-").replace(/\\/g,"-")}function w(t){return function(t){return null==t?"":/,/g[Symbol.replace](t,"__gfc__")}(function(t){return null==t?"":/\|/g[Symbol.replace](t,"__gfp__")}(t))}},7232:(t,e,r)=>{r.d(e,{H:()=>i});var i=function(t){return t.Indexed="I",t.StructuredMetadata="S",t.Parsed="P",t}({})},4793:(t,e,r)=>{function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{KQ:()=>s,Rk:()=>n,a6:()=>h,cK:()=>a,ld:()=>l,w7:()=>o});var s=function(t){return t.Equal="=",t.NotEqual="!=",t.RegexEqual="=~",t.RegexNotEqual="!~",t}({}),n=function(t){return t.gt=">",t.lt="<",t.gte=">=",t.lte="<=",t}({});const o=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},s=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),s.forEach((function(e){i(t,e,r[e])}))}return t}({},s,n);var a=function(t){return t.match="|=",t.negativeMatch="!=",t.regex="|~",t.negativeRegex="!~",t}({}),h=function(t){return t.match="|>",t.negativeMatch="!>",t}({}),l=function(t){return t.caseSensitive="caseSensitive",t.caseInsensitive="caseInsensitive",t}({})},2871:(t,e,r)=>{r.d(e,{v:()=>l});var i=r(8531),s=r(2533),n=r(4011);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),i.forEach((function(e){o(t,e,r[e])}))}return t}const h={app:s.id,version:"1.0.10"},l={info:(t,e)=>{const r=a({},h,e);console.log(t,r),u(t,r)},warn:(t,e)=>{const r=a({},h,e);console.warn(t,r),O(t,r)},error:(t,e)=>{const r=a({},h,e);console.error(t,r),f(t,r)}},u=(t,e)=>{try{(0,i.logInfo)(t,e)}catch(t){console.warn("Failed to log faro event!")}},O=(t,e)=>{try{(0,i.logWarning)(t,e)}catch(r){console.warn("Failed to log faro warning!",{msg:t,context:e})}},f=(t,e)=>{let r=e;try{!function(t,e){if("object"==typeof t&&null!==t&&((0,n.u4)(t)&&Object.keys(t).forEach((r=>{const i=t[r];"string"!=typeof i&&"boolean"!=typeof i&&"number"!=typeof i||(e[r]=i.toString())})),c(t)))if("object"==typeof t.data&&null!==t.data)try{e.data=JSON.stringify(t.data)}catch(t){}else"string"!=typeof t.data&&"boolean"!=typeof t.data&&"number"!=typeof t.data||(e.data=t.data.toString())}(t,r),t instanceof Error?(0,i.logError)(t,r):"string"==typeof t?(0,i.logError)(new Error(t),r):t&&"object"==typeof t?r.msg?(0,i.logError)(new Error(r.msg),r):(0,i.logError)(new Error("error object"),r):(0,i.logError)(new Error("unknown error"),r)}catch(e){console.error("Failed to log faro error!",{err:t,context:r})}},c=t=>"data"in t},8682:(t,e,r)=>{r.d(e,{BW:()=>d,QH:()=>l,T0:()=>$});var i=r(2344),s=r(4793),n=r(581),o=r(7232);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class h{static fromNode(t){return new h(t.from,t.to,t,t.type)}contains(t){return this.from<=t.from&&this.to>=t.to}getExpression(t){return t.substring(this.from,this.to)}constructor(t,e,r,i){a(this,"from",void 0),a(this,"to",void 0),a(this,"type",void 0),a(this,"syntaxNode",void 0),this.from=t,this.to=e,this.type=i,this.syntaxNode=r}}function l(t,e){const r=[];return i.K3.parse(t).iterate({enter:t=>{(void 0===e||e.includes(t.type.id))&&r.push(t.node)}}),r}function u(t,e){if(t.type.id===e)return[h.fromNode(t)];const r=[];let i=0,s=t.childAfter(i);for(;s;)r.push(...u(s,e)),i=s.to,s=t.childAfter(i);return r}function O(t,e,r,i,n){const o=n===s.cK.regex||n===s.cK.negativeRegex,a=t.includes("(?i)")&&o;if('"'===e&&o){const e=new RegExp(/\\\\/,"g");t=t.replace(e,"\\")}else if('"'===e){const e=new RegExp(/\\\\\"/,"g");t=t.replace(e,'"');const r=new RegExp(/\\\\/,"g");t=t.replace(r,"\\")}return a&&(t=t.replace("(?i)","")),r.push({key:a?s.ld.caseInsensitive.toString():s.ld.caseSensitive.toString()+","+i.toString(),operator:n,value:t}),t}function f(t,e,r){const i=new RegExp(/\\"/,"g");t=t.replace(i,'"'),e.push({operator:r,value:t})}function c(t){return u(t,i._2).length?s.w7.lte:u(t,i.Hd).length?s.w7.lt:u(t,i.H3).length?s.w7.gte:u(t,i.AN).length?s.w7.gt:void console.warn("unknown numeric operator")}function p(t){return u(t,i.Eq).length?s.w7.Equal:u(t,i.l3).length?s.w7.NotEqual:u(t,i.Re).length?s.w7.RegexEqual:u(t,i.q6).length?s.w7.RegexNotEqual:void 0}function d(t,e,r){const a=[],d=[],g=[],$=[],m=l(t,[i.MD]);return 0===m.length?{labelFilters:a}:(function(t,e){const r=l(t,[i.g$]);for(const h of r){var n,a;const r=u(h,i.gw),l=u(h,i.Qf),O=t.substring(null===(n=r[0])||void 0===n?void 0:n.to,null===(a=l[0])||void 0===a?void 0:a.from),f=r[0].getExpression(t),c=l.map((e=>t.substring(e.from+1,e.to-1)))[0];f&&c&&(O===s.w7.NotEqual||O===s.w7.Equal||O===s.w7.RegexEqual||O===s.w7.RegexNotEqual)&&e.push({key:f,operator:O,value:c,type:o.H.Indexed})}}(u(m[0],i.MD)[0].getExpression(t),a),function(t,e,r){const n=l(t,[i.PN]);for(const[o,a]of n.entries()){const n=u(a,i.Sg),h=u(a,i.q5),l=u(a,i.l3),c=u(a,i.q6),p=u(a,i.ds),d=u(a,i._9),g=P(a);for(const i of g){const u=t.substring((null==i?void 0:i.from)+1,null==i?void 0:i.from);let g=t.substring((null==i?void 0:i.from)+1,(null==i?void 0:i.to)-1);if(g.length){let i;if(n.length)i=s.cK.match;else if(l.length)i=s.cK.negativeMatch;else if(c.length)i=s.cK.negativeRegex;else if(h.length)i=s.cK.regex;else if(p.length)i=s.a6.match;else{if(!d.length){console.warn("unknown line filter",{query:t.substring(a.from,a.to)});continue}i=s.a6.negativeMatch}i!==s.a6.match&&i!==s.a6.negativeMatch?O(g,u,e,o,i):f(g,r,i)}}}}(t,d,g),function(t,e,r,s){var a;const O=null===(a=r.data)||void 0===a?void 0:a.series.find((t=>t.refId===s.refId)),f=l(t,[i.bY]);for(const r of f){var d;const s=h.fromNode(r).getExpression(t);if(r.getChild(i.bY))continue;if("__error__"===s.substring(0,9))continue;const a=l(t.substring(0,r.node.to),[i.c$]),f=l(t.substring(0,r.node.to),[i.LM]),$=null===(d=u(r,i.gw)[0])||void 0===d?void 0:d.getExpression(t),P=u(r,i.Qf),m=u(r,i.wN),x=u(r,i.Ix),Q=u(r,i.dw);let b,k,v;if(P.length)k=p(r),b=t.substring(P[0].from+1,P[0].to-1);else if(m.length)b=m[0].getExpression(t),k=c(r);else if(Q.length)k=c(r),b=Q[0].getExpression(t);else{if(!x.length)continue;k=c(r),b=x[0].getExpression(t)}var g;if(O&&(v=null!==(g=(0,n.E)($,O))&&void 0!==g?g:void 0),k){let t;a.length&&f.length?t="mixed":a.length?t="logfmt":f.length?t="json":v=o.H.StructuredMetadata,e.push({key:$,operator:k,type:null!=v?v:o.H.Parsed,parser:t,value:b})}}}(t,$,e,r),{labelFilters:a,lineFilters:d,fields:$,patternFilters:g})}const g=0;function $(t){return!1===function(t,e){let r=!1;return i.K3.parse(t).iterate({enter:({type:t})=>{if(t.id===e)return r=!0,!1}}),r}(t,g)}function P(t){const e=[];let r=t;do{const t=r.getChild(i.Qf);t&&!r.getChild(i.w7)&&e.push(t),r=r.getChild(i.ih)}while(null!=r);return e}},581:(t,e,r)=>{r.d(e,{E:()=>n,t:()=>s});var i=r(7232),s=function(t){return t.Backward="backward",t.Forward="forward",t.Scan="scan",t}({});function n(t,e,r=0){var s;const n=null===(s=e.fields.find((t=>"labelTypes"===t.name)))||void 0===s?void 0:s.values[r];if(!n)return null;switch(n[t]){case"I":return i.H.Indexed;case"S":return i.H.StructuredMetadata;case"P":return i.H.Parsed;default:return null}}},4011:(t,e,r)=>{r.d(e,{FH:()=>f,OK:()=>d,QX:()=>$,Zt:()=>p,aJ:()=>l,fS:()=>c,kR:()=>g,lb:()=>u,u4:()=>h,v_:()=>O});var i=r(7781),s=r(4793);const n=t=>"object"==typeof t&&null!==t;function o(t,e){return e in t}const a=t=>"string"==typeof t&&t||"",h=t=>"object"==typeof t;function l(t){let e=[];if(Array.isArray(t))for(let r=0;r<t.length;r++)e.push(a(t[r]));return e}function u(t){const e=n(t)&&o(t,"row")&&o(t,"id")&&t;if(e){const t="number"==typeof e.row&&e.row,r="string"==typeof e.id&&e.id;if(!1!==r&&!1!==t)return{row:t,id:r}}return!1}function O(t){return"string"==typeof t&&("logs"===t||"table"===t)&&t}function f(t){return"string"==typeof t&&t===i.LogsSortOrder.Ascending.toString()?i.LogsSortOrder.Ascending:"string"==typeof t&&t===i.LogsSortOrder.Descending.toString()&&i.LogsSortOrder.Descending}function c(t){const e=n(t)&&o(t,"value")&&o(t,"parser")&&t;if(e){const t="string"==typeof e.parser&&("logfmt"===e.parser||"json"===e.parser||"mixed"===e.parser||"structuredMetadata"===e.parser)&&e.parser,r="string"==typeof e.value&&e.value;if(!1!==t&&!1!==r)return{parser:t,value:r}}return!1}function p(t){const e=n(t)&&h(t)&&t;if(e){const t=Object.keys(e),r={};for(let i=0;i<t.length;i++){const s=t[i],n=e[t[i]];"number"==typeof n&&(r[s]=n)}return r}return!1}function d(t){const e=n(t)&&o(t,"to")&&o(t,"from")&&t;if(e){const t=a(e.to),r=a(e.from);if(t&&r)return{to:t,from:r}}}function g(t){switch(t){case s.KQ.Equal:case s.KQ.NotEqual:case s.KQ.RegexEqual:case s.KQ.RegexNotEqual:case s.Rk.gt:case s.Rk.gte:case s.Rk.lt:case s.Rk.lte:return t;default:throw new $("operator is invalid!")}}class $ extends Error{}},5111:(t,e,r)=>{r.d(e,{BG:()=>n,Lw:()=>o,SM:()=>a,iu:()=>h});var i=r(4793),s=r(5548);const n=t=>t===i.w7.Equal||t===i.w7.RegexEqual,o=t=>t===i.w7.NotEqual||t===i.w7.RegexNotEqual,a=t=>t===i.w7.RegexEqual||t===i.w7.RegexNotEqual,h=t=>s.nB.includes(t)},5548:(t,e,r)=>{r.d(e,{_i:()=>a,eb:()=>u,nB:()=>h,hI:()=>l,II:()=>o});var i=r(4793),s=r(2871);function n(t){if(t===i.w7.NotEqual)return"Not equal";if(t===i.w7.RegexNotEqual)return"Does not match regex";if(t===i.w7.Equal)return"Equals";if(t===i.w7.RegexEqual)return"Matches regex";if(t===i.w7.lt)return"Less than";if(t===i.w7.gt)return"Greater than";if(t===i.w7.gte)return"Greater than or equal to";if(t===i.w7.lte)return"Less than or equal to";const e=new Error("Invalid operator!");throw s.v.error(e,{msg:"Invalid operator",operator:t}),e}const o=[i.w7.Equal,i.w7.NotEqual,i.w7.RegexEqual,i.w7.RegexNotEqual].map(((t,e,r)=>({description:n(t),label:t,value:t}))),a=[i.w7.Equal,i.w7.RegexEqual].map((t=>({description:n(t),label:t,value:t}))),h=[i.w7.gt,i.w7.gte,i.w7.lt,i.w7.lte],l=h.map((t=>({description:n(t),label:t,value:t}))),u=[{label:"match",value:i.cK.match},{label:"negativeMatch",value:i.cK.negativeMatch},{label:"regex",value:i.cK.regex},{label:"negativeRegex",value:i.cK.negativeRegex}]},541:(t,e,r)=>{function i(t){return t.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/"/g,'\\"')}function s(t){const e=t.filter((t=>"exclude"===t.type)).map((t=>`!> "${i(t.pattern)}"`)).join(" ").trim(),r=t.filter((t=>"include"===t.type));let s="";return r.length>0&&(s=1===r.length?`|> "${i(r[0].pattern)}"`:`|> ${r.map((t=>`"${i(t.pattern)}"`)).join(" or ")}`),`${e} ${s}`.trim()}r.d(e,{M:()=>s})},3143:(t,e,r)=>{r.d(e,{Du:()=>Q,Dx:()=>I,EY:()=>v,FX:()=>j,Gb:()=>b,Gd:()=>l,Jg:()=>m,LI:()=>P,MB:()=>i,NW:()=>q,OQ:()=>B,OX:()=>W,Oc:()=>h,QE:()=>S,S1:()=>s,S6:()=>c,SA:()=>z,Sy:()=>A,To:()=>V,VL:()=>y,WM:()=>E,Wi:()=>Y,YN:()=>w,ZO:()=>D,_P:()=>f,_Y:()=>g,e4:()=>G,eL:()=>N,fJ:()=>Z,fi:()=>n,gR:()=>X,kl:()=>k,ky:()=>U,ll:()=>o,mB:()=>a,mF:()=>R,pT:()=>C,qZ:()=>$,rl:()=>T,sC:()=>d,sL:()=>O,uw:()=>p,w0:()=>u,zE:()=>F,zp:()=>x});const i="filters",s="${filters}",n="filters_replica",o="${filters_replica}",a="fields",h="${fields}",l="${pendingFields}",u="${pendingMetadata}",O="all-fields",f="metadata",c="${metadata}",p="patterns",d="${patterns}",g="levels",$="${levels}",P="fieldBy",m="labelBy",x="${labelBy}",Q="primary_label_search",b="primary_label",k="${primary_label}",v="ds",X="${ds}",w="| json | logfmt | drop __error__, __error_details__",y="| json | drop __error__, __error_details__",R="| logfmt",S="logsFormat",_="${logsFormat}",E="lineFilterV2",q="lineFilters",T="${lineFilters}",z=`{${s}} ${$} ${c} ${d} ${T} ${_} ${h}`,Z=`{${s}} ${$} ${u} ${d} ${T} ${_} ${l}`,A=`{${s}} ${l} ${c} ${d} ${T} ${_} ${h}`,C=`{${s}} ${c} ${d} ${_}`,j=`${s} ${$} ${c} ${d} ${T} ${h}`,N={uid:X},V="$__all",G="detected_level",W="service_name",U="service",Y="var_aggregated_metrics",D='""',L="__CVΩ__";function I(t=""){return t.startsWith(L)?t.substring(L.length):t}function F(t=""){return t.startsWith(L)}function B(t=""){return L+t}},6089:e=>{e.exports=t},7781:t=>{t.exports=e},8531:t=>{t.exports=r},2007:t=>{t.exports=i},3241:t=>{t.exports=s},5959:t=>{t.exports=n},8398:t=>{t.exports=o},200:t=>{t.exports=a},3806:t=>{t.exports=h},7694:t=>{t.exports=l},1269:t=>{t.exports=u},2344:(t,e,r)=>{r.d(e,{Ix:()=>St,dw:()=>Xt,Eq:()=>Ot,w7:()=>Qt,H3:()=>wt,AN:()=>vt,gw:()=>ut,LM:()=>ot,bY:()=>kt,PN:()=>gt,c$:()=>at,Hd:()=>yt,_2:()=>Rt,g$:()=>lt,Yw:()=>Et,l3:()=>ct,_9:()=>xt,q6:()=>dt,wN:()=>_t,ih:()=>bt,Sg:()=>$t,q5:()=>Pt,ds:()=>mt,Re:()=>pt,MD:()=>ht,Qf:()=>ft,K3:()=>nt});const i=1024;let s=0;class n{constructor(t,e){this.from=t,this.to=e}}class o{constructor(t={}){this.id=s++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=l.match(t)),e=>{let r=t(e);return void 0===r?null:[this,r]}}}o.closedBy=new o({deserialize:t=>t.split(" ")}),o.openedBy=new o({deserialize:t=>t.split(" ")}),o.group=new o({deserialize:t=>t.split(" ")}),o.isolate=new o({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),o.contextHash=new o({perNode:!0}),o.lookAhead=new o({perNode:!0}),o.mounted=new o({perNode:!0});class a{constructor(t,e,r){this.tree=t,this.overlay=e,this.parser=r}static get(t){return t&&t.props&&t.props[o.mounted.id]}}const h=Object.create(null);class l{constructor(t,e,r,i=0){this.name=t,this.props=e,this.id=r,this.flags=i}static define(t){let e=t.props&&t.props.length?Object.create(null):h,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),i=new l(t.name||"",e,t.id,r);if(t.props)for(let r of t.props)if(Array.isArray(r)||(r=r(i)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[r[0].id]=r[1]}return i}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(o.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let r in t)for(let i of r.split(" "))e[i]=t[r];return t=>{for(let r=t.prop(o.group),i=-1;i<(r?r.length:0);i++){let s=e[i<0?t.name:r[i]];if(s)return s}}}}l.none=new l("",Object.create(null),0,8);class u{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let r of this.types){let i=null;for(let e of t){let t=e(r);t&&(i||(i=Object.assign({},r.props)),i[t[0].id]=t[1])}e.push(i?new l(r.name,i,r.id,r.flags):r)}return new u(e)}}const O=new WeakMap,f=new WeakMap;var c;!function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"}(c||(c={}));class p{constructor(t,e,r,i,s){if(this.type=t,this.children=e,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[t,e]of s)this.props["number"==typeof t?t:t.id]=e}}toString(){let t=a.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let t of this.children){let r=t.toString();r&&(e&&(e+=","),e+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new y(this.topNode,t)}cursorAt(t,e=0,r=0){let i=O.get(this)||this.topNode,s=new y(i);return s.moveTo(t,e),O.set(this,s._tree),s}get topNode(){return new x(this,0,0,null)}resolve(t,e=0){let r=P(O.get(this)||this.topNode,t,e,!1);return O.set(this,r),r}resolveInner(t,e=0){let r=P(f.get(this)||this.topNode,t,e,!0);return f.set(this,r),r}resolveStack(t,e=0){return function(t,e,r){let i=t.resolveInner(e,r),s=null;for(let t=i instanceof x?i:i.context.parent;t;t=t.parent)if(t.index<0){let n=t.parent;(s||(s=[i])).push(n.resolve(e,r)),t=n}else{let n=a.get(t.tree);if(n&&n.overlay&&n.overlay[0].from<=e&&n.overlay[n.overlay.length-1].to>=e){let o=new x(n.tree,n.overlay[0].from+t.from,-1,t);(s||(s=[i])).push(P(o,e,r,!1))}}return s?X(s):i}(this,t,e)}iterate(t){let{enter:e,leave:r,from:i=0,to:s=this.length}=t,n=t.mode||0,o=(n&c.IncludeAnonymous)>0;for(let t=this.cursor(n|c.IncludeAnonymous);;){let n=!1;if(t.from<=s&&t.to>=i&&(!o&&t.type.isAnonymous||!1!==e(t))){if(t.firstChild())continue;n=!0}for(;n&&r&&(o||!t.type.isAnonymous)&&r(t),!t.nextSibling();){if(!t.parent())return;n=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:E(l.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,r)=>new p(this.type,t,e,r,this.propValues)),t.makeTree||((t,e,r)=>new p(l.none,t,e,r)))}static build(t){return function(t){var e;let{buffer:r,nodeSet:s,maxBufferLength:n=i,reused:a=[],minRepeatType:h=s.types.length}=t,l=Array.isArray(r)?new d(r,r.length):r,u=s.types,O=0,f=0;function c(t,e,r,i,d,Q){let{id:b,start:k,end:v,size:X}=l,w=f,y=O;for(;X<0;){if(l.next(),-1==X){let e=a[b];return r.push(e),void i.push(k-t)}if(-3==X)return void(O=b);if(-4==X)return void(f=b);throw new RangeError(`Unrecognized record size: ${X}`)}let R,S,_=u[b],q=k-t;if(v-k<=n&&(S=function(t,e){let r=l.fork(),i=0,s=0,o=0,a=r.end-n,u={size:0,start:0,skip:0};t:for(let n=r.pos-t;r.pos>n;){let t=r.size;if(r.id==e&&t>=0){u.size=i,u.start=s,u.skip=o,o+=4,i+=4,r.next();continue}let l=r.pos-t;if(t<0||l<n||r.start<a)break;let O=r.id>=h?4:0,f=r.start;for(r.next();r.pos>l;){if(r.size<0){if(-3!=r.size)break t;O+=4}else r.id>=h&&(O+=4);r.next()}s=f,i+=t,o+=O}return(e<0||i==t)&&(u.size=i,u.start=s,u.skip=o),u.size>4?u:void 0}(l.pos-e,d))){let e=new Uint16Array(S.size-S.skip),r=l.pos-S.size,i=e.length;for(;l.pos>r;)i=x(S.start,e,i);R=new g(e,v-S.start,s),q=S.start-t}else{let t=l.pos-X;l.next();let e=[],r=[],i=b>=h?b:-1,s=0,a=v;for(;l.pos>t;)i>=0&&l.id==i&&l.size>=0?(l.end<=a-n&&(P(e,r,k,s,l.end,a,i,w,y),s=e.length,a=l.end),l.next()):Q>2500?$(k,t,e,r):c(k,t,e,r,i,Q+1);if(i>=0&&s>0&&s<e.length&&P(e,r,k,s,k,a,i,w,y),e.reverse(),r.reverse(),i>-1&&s>0){let t=function(t,e){return(r,i,s)=>{let n,a,h=0,l=r.length-1;if(l>=0&&(n=r[l])instanceof p){if(!l&&n.type==t&&n.length==s)return n;(a=n.prop(o.lookAhead))&&(h=i[l]+n.length+a)}return m(t,r,i,s,h,e)}}(_,y);R=E(_,e,r,0,e.length,0,v-k,t,t)}else R=m(_,e,r,v-k,w-v,y)}r.push(R),i.push(q)}function $(t,e,r,i){let o=[],a=0,h=-1;for(;l.pos>e;){let{id:t,start:e,end:r,size:i}=l;if(i>4)l.next();else{if(h>-1&&e<h)break;h<0&&(h=r-n),o.push(t,e,r),a++,l.next()}}if(a){let e=new Uint16Array(4*a),n=o[o.length-2];for(let t=o.length-3,r=0;t>=0;t-=3)e[r++]=o[t],e[r++]=o[t+1]-n,e[r++]=o[t+2]-n,e[r++]=r;r.push(new g(e,o[2]-n,s)),i.push(n-t)}}function P(t,e,r,i,n,o,a,h,l){let u=[],O=[];for(;t.length>i;)u.push(t.pop()),O.push(e.pop()+r-n);t.push(m(s.types[a],u,O,o-n,h-o,l)),e.push(n-r)}function m(t,e,r,i,s,n,a){if(n){let t=[o.contextHash,n];a=a?[t].concat(a):[t]}if(s>25){let t=[o.lookAhead,s];a=a?[t].concat(a):[t]}return new p(t,e,r,i,a)}function x(t,e,r){let{id:i,start:s,end:n,size:o}=l;if(l.next(),o>=0&&i<h){let a=r;if(o>4){let i=l.pos-(o-4);for(;l.pos>i;)r=x(t,e,r)}e[--r]=a,e[--r]=n-t,e[--r]=s-t,e[--r]=i}else-3==o?O=i:-4==o&&(f=i);return r}let Q=[],b=[];for(;l.pos>0;)c(t.start||0,t.bufferStart||0,Q,b,-1,0);let k=null!==(e=t.length)&&void 0!==e?e:Q.length?b[0]+Q[0].length:0;return new p(u[t.topID],Q.reverse(),b.reverse(),k)}(t)}}p.empty=new p(l.none,[],[],0);class d{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new d(this.buffer,this.index)}}class g{constructor(t,e,r){this.buffer=t,this.length=e,this.set=r}get type(){return l.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],r=this.buffer[t+3],i=this.set.types[e],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),r==(t+=4))return s;let n=[];for(;t<r;)n.push(this.childString(t)),t=this.buffer[t+3];return s+"("+n.join(",")+")"}findChild(t,e,r,i,s){let{buffer:n}=this,o=-1;for(let a=t;a!=e&&!($(s,i,n[a+1],n[a+2])&&(o=a,r>0));a=n[a+3]);return o}slice(t,e,r){let i=this.buffer,s=new Uint16Array(e-t),n=0;for(let o=t,a=0;o<e;){s[a++]=i[o++],s[a++]=i[o++]-r;let e=s[a++]=i[o++]-r;s[a++]=i[o++]-t,n=Math.max(n,e)}return new g(s,n,this.set)}}function $(t,e,r,i){switch(t){case-2:return r<e;case-1:return i>=e&&r<e;case 0:return r<e&&i>e;case 1:return r<=e&&i>e;case 2:return i>e;case 4:return!0}}function P(t,e,r,i){for(var s;t.from==t.to||(r<1?t.from>=e:t.from>e)||(r>-1?t.to<=e:t.to<e);){let e=!i&&t instanceof x&&t.index<0?null:t.parent;if(!e)return t;t=e}let n=i?0:c.IgnoreOverlays;if(i)for(let i=t,o=i.parent;o;i=o,o=i.parent)i instanceof x&&i.index<0&&(null===(s=o.enter(e,r,n))||void 0===s?void 0:s.from)!=i.from&&(t=o);for(;;){let i=t.enter(e,r,n);if(!i)return t;t=i}}class m{cursor(t=0){return new y(this,t)}getChild(t,e=null,r=null){let i=Q(this,t,e,r);return i.length?i[0]:null}getChildren(t,e=null,r=null){return Q(this,t,e,r)}resolve(t,e=0){return P(this,t,e,!1)}resolveInner(t,e=0){return P(this,t,e,!0)}matchContext(t){return b(this.parent,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),r=this;for(;e;){let t=e.lastChild;if(!t||t.to!=e.to)break;t.type.isError&&t.from==t.to?(r=e,e=t.prevSibling):e=t}return r}get node(){return this}get next(){return this.parent}}class x extends m{constructor(t,e,r,i){super(),this._tree=t,this.from=e,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,e,r,i,s=0){for(let n=this;;){for(let{children:o,positions:h}=n._tree,l=e>0?o.length:-1;t!=l;t+=e){let l=o[t],u=h[t]+n.from;if($(i,r,u,u+l.length))if(l instanceof g){if(s&c.ExcludeBuffers)continue;let o=l.findChild(0,l.buffer.length,e,r-u,i);if(o>-1)return new v(new k(n,l,t,u),null,o)}else if(s&c.IncludeAnonymous||!l.type.isAnonymous||R(l)){let o;if(!(s&c.IgnoreMounts)&&(o=a.get(l))&&!o.overlay)return new x(o.tree,u,t,n);let h=new x(l,u,t,n);return s&c.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(e<0?l.children.length-1:0,e,r,i)}}if(s&c.IncludeAnonymous||!n.type.isAnonymous)return null;if(t=n.index>=0?n.index+e:e<0?-1:n._parent._tree.children.length,n=n._parent,!n)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,r=0){let i;if(!(r&c.IgnoreOverlays)&&(i=a.get(this._tree))&&i.overlay){let r=t-this.from;for(let{from:t,to:s}of i.overlay)if((e>0?t<=r:t<r)&&(e<0?s>=r:s>r))return new x(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,r)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Q(t,e,r,i){let s=t.cursor(),n=[];if(!s.firstChild())return n;if(null!=r)for(let t=!1;!t;)if(t=s.type.is(r),!s.nextSibling())return n;for(;;){if(null!=i&&s.type.is(i))return n;if(s.type.is(e)&&n.push(s.node),!s.nextSibling())return null==i?n:[]}}function b(t,e,r=e.length-1){for(let i=t;r>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[r]&&e[r]!=i.name)return!1;r--}}return!0}class k{constructor(t,e,r,i){this.parent=t,this.buffer=e,this.index=r,this.start=i}}class v extends m{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,r){super(),this.context=t,this._parent=e,this.index=r,this.type=t.buffer.set.types[t.buffer.buffer[r]]}child(t,e,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t,e-this.context.start,r);return s<0?null:new v(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,r=0){if(r&c.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return s<0?null:new v(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new v(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new v(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let n=r.buffer[this.index+1];t.push(r.slice(i,s,n)),e.push(0)}return new p(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function X(t){if(!t.length)return null;let e=0,r=t[0];for(let i=1;i<t.length;i++){let s=t[i];(s.from>r.from||s.to<r.to)&&(r=s,e=i)}let i=r instanceof x&&r.index<0?null:r.parent,s=t.slice();return i?s[e]=i:s.splice(e,1),new w(s,r)}class w{constructor(t,e){this.heads=t,this.node=e}get next(){return X(this.heads)}}class y{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof x)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:r,buffer:i}=this.buffer;return this.type=e||i.set.types[i.buffer[t]],this.from=r+i.buffer[t+1],this.to=r+i.buffer[t+2],!0}yield(t){return!!t&&(t instanceof x?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,r){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],t,e-this.buffer.start,r);return!(s<0)&&(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,r=this.mode){return this.buffer?!(r&c.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&c.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&c.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,r=this.stack.length-1;if(t<0){let t=r<0?0:this.stack[r]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(r<0?e.buffer.length:e.buffer[this.stack[r]+3]))return this.yieldBuf(t)}return r<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,r,{buffer:i}=this;if(i){if(t>0){if(this.index<i.buffer.buffer.length)return!1}else for(let t=0;t<this.index;t++)if(i.buffer.buffer[t+3]<this.index)return!1;({index:e,parent:r}=i)}else({index:e,_parent:r}=this._tree);for(;r;({index:e,_parent:r}=r))if(e>-1)for(let i=e+t,s=t<0?-1:r._tree.children.length;i!=s;i+=t){let t=r._tree.children[i];if(this.mode&c.IncludeAnonymous||t instanceof g||!t.type.isAnonymous||R(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,r=0;if(t&&t.context==this.buffer)t:for(let i=this.index,s=this.stack.length;s>=0;){for(let n=t;n;n=n._parent)if(n.index==i){if(i==this.index)return n;e=n,r=s+1;break t}i=this.stack[--s]}for(let t=r;t<this.stack.length;t++)e=new v(this.buffer,e,this.stack[t]);return this.bufferNode=new v(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let r=0;;){let i=!1;if(this.type.isAnonymous||!1!==t(this)){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&e&&e(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(t){if(!this.buffer)return b(this.node.parent,t);let{buffer:e}=this.buffer,{types:r}=e.set;for(let i=t.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return b(this._tree,t,i);let n=r[e.buffer[this.stack[s]]];if(!n.isAnonymous){if(t[i]&&t[i]!=n.name)return!1;i--}}return!0}}function R(t){return t.children.some((t=>t instanceof g||!t.type.isAnonymous||R(t)))}const S=new WeakMap;function _(t,e){if(!t.isAnonymous||e instanceof g||e.type!=t)return 1;let r=S.get(e);if(null==r){r=1;for(let i of e.children){if(i.type!=t||!(i instanceof p)){r=1;break}r+=_(t,i)}S.set(e,r)}return r}function E(t,e,r,i,s,n,o,a,h){let l=0;for(let r=i;r<s;r++)l+=_(t,e[r]);let u=Math.ceil(1.5*l/8),O=[],f=[];return function e(r,i,s,o,a){for(let l=s;l<o;){let s=l,c=i[l],p=_(t,r[l]);for(l++;l<o;l++){let e=_(t,r[l]);if(p+e>=u)break;p+=e}if(l==s+1){if(p>u){let t=r[s];e(t.children,t.positions,0,t.children.length,i[s]+a);continue}O.push(r[s])}else{let e=i[l-1]+r[l-1].length-c;O.push(E(t,r,i,s,l,c,e,null,h))}f.push(c+a-n)}}(e,r,i,s,0),(a||h)(O,f,o)}class q{startParse(t,e,r){return"string"==typeof t&&(t=new T(t)),r=r?r.length?r.map((t=>new n(t.from,t.to))):[new n(0,0)]:[new n(0,t.length)],this.createParse(t,e||[],r)}parse(t,e,r){let i=this.startParse(t,e,r);for(;;){let t=i.advance();if(t)return t}}}class T{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}new o({perNode:!0});class z{constructor(t,e,r,i,s,n,o,a,h,l=0,u){this.p=t,this.stack=e,this.state=r,this.reducePos=i,this.pos=s,this.score=n,this.buffer=o,this.bufferBase=a,this.curContext=h,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter(((t,e)=>e%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,r=0){let i=t.parser.context;return new z(t,[],e,r,r,0,[],0,i?new Z(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let r=t>>19,i=65535&t,{parser:s}=this.p,n=this.reducePos<this.pos-25;n&&this.setLookAhead(this.pos);let o=s.dynamicPrecedence(i);if(o&&(this.score+=o),0==r)return this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,n?8:4,!0),void this.reduceContext(i,this.reducePos);let a=this.stack.length-3*(r-1)-(262144&t?6:0),h=a?this.stack[a-2]:this.p.ranges[0].from,l=this.reducePos-h;l>=2e3&&!(null===(e=this.p.parser.nodeSet.types[i])||void 0===e?void 0:e.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSize<l&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=l));let u=a?this.stack[a-1]:0,O=this.bufferBase+this.buffer.length-u;if(i<s.minRepeatTerm||131072&t){let t=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,h,t,O+4,!0)}if(262144&t)this.state=this.stack[a];else{let t=this.stack[a-3];this.state=s.getGoto(t,i,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(i,h)}storeNode(t,e,r,i=4,s=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,i=this.buffer.length;if(0==i&&t.parent&&(i=t.bufferBase-t.parent.bufferBase,t=t.parent),i>0&&0==t.buffer[i-4]&&t.buffer[i-1]>-1){if(e==r)return;if(t.buffer[i-2]>=e)return void(t.buffer[i-2]=r)}}if(s&&this.pos!=r){let s=this.buffer.length;if(s>0&&0!=this.buffer[s-4]){let t=!1;for(let e=s;e>0&&this.buffer[e-2]>r;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4)}this.buffer[s]=t,this.buffer[s+1]=e,this.buffer[s+2]=r,this.buffer[s+3]=i}else this.buffer.push(t,e,r,i)}shift(t,e,r,i){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=i,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,i,4);else{let s=t,{parser:n}=this.p;(i>this.pos||e<=n.maxNode)&&(this.pos=i,n.stateFlag(s,1)||(this.reducePos=i)),this.pushState(s,r),this.shiftContext(e,r),e<=n.maxNode&&this.buffer.push(e,r,i,4)}}apply(t,e,r,i){65536&t?this.reduce(t):this.shift(t,e,r,i)}useNode(t,e){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=t)&&(this.p.reused.push(t),r++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let r=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new z(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let r=t<=this.p.parser.maxNode;r&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,r?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new A(this);;){let r=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==r)return!1;if(!(65536&r))return!0;e.reduce(r)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let r=[];for(let i,s=0;s<e.length;s+=2)(i=e[s+1])!=this.state&&this.p.parser.hasAction(i,t)&&r.push(e[s],i);if(this.stack.length<120)for(let t=0;r.length<8&&t<e.length;t+=2){let i=e[t+1];r.some(((t,e)=>1&e&&t==i))||r.push(e[t],i)}e=r}let r=[];for(let t=0;t<e.length&&r.length<4;t+=2){let i=e[t+1];if(i==this.state)continue;let s=this.split();s.pushState(i,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(e[t],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let r=e>>19,i=65535&e,s=this.stack.length-3*r;if(s<0||t.getGoto(this.stack[s],i,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],r=(i,s)=>{if(!e.includes(i))return e.push(i),t.allActions(i,(e=>{if(393216&e);else if(65536&e){let r=(e>>19)-s;if(r>1){let i=65535&e,s=this.stack.length-3*r;if(s>=0&&t.getGoto(this.stack[s],i,!1)>=0)return r<<19|65536|i}}else{let t=r(e,s+1);if(null!=t)return t}}))};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new Z(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Z{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class A{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,r=t>>19;0==r?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(r-1);let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class C{constructor(t,e,r){this.stack=t,this.pos=e,this.index=r,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new C(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new C(this.stack,this.pos,this.index)}}function j(t,e=Uint16Array){if("string"!=typeof t)return t;let r=null;for(let i=0,s=0;i<t.length;){let n=0;for(;;){let e=t.charCodeAt(i++),r=!1;if(126==e){n=65535;break}e>=92&&e--,e>=34&&e--;let s=e-32;if(s>=46&&(s-=46,r=!0),n+=s,r)break;n*=46}r?r[s++]=n:r=new e(n)}return r}class N{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const V=new N;class G{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=V,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let r=this.range,i=this.rangeIndex,s=this.pos+t;for(;s<r.from;){if(!i)return null;let t=this.ranges[--i];s-=r.from-t.to,r=t}for(;e<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let t=this.ranges[++i];s+=t.from-r.to,r=t}return s}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,r,i=this.chunkOff+t;if(i>=0&&i<this.chunk.length)e=this.pos+t,r=this.chunk.charCodeAt(i);else{let i=this.resolveOffset(t,1);if(null==i)return-1;if(e=i,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,i=this.range;for(;i.to<=e;)i=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>i.to&&(this.chunk2=this.chunk2.slice(0,i.to-e)),r=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),r}acceptToken(t,e=0){let r=e?this.resolveOffset(e,-1):this.pos;if(null==r||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=r}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=V,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let r="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(r+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return r}}class W{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:r}=e.p;!function(t,e,r,i,s,n){let o=0,a=1<<i,{dialect:h}=r.p.parser;t:for(;a&t[o];){let r=t[o+1];for(let i=o+3;i<r;i+=2)if((t[i+1]&a)>0){let r=t[i];if(h.allows(r)&&(-1==e.token.value||e.token.value==r||Y(r,e.token.value,s,n))){e.acceptToken(r);break}}let i=e.next,l=0,u=t[o+2];if(!(e.next<0&&u>l&&65535==t[r+3*u-3])){for(;l<u;){let s=l+u>>1,n=r+s+(s<<1),a=t[n],h=t[n+1]||65536;if(i<a)u=s;else{if(!(i>=h)){o=t[n+2],e.advance();continue t}l=s+1}}break}o=t[r+3*u-1]}}(this.data,t,e,this.id,r.data,r.tokenPrecTable)}}function U(t,e,r){for(let i,s=e;65535!=(i=t[s]);s++)if(i==r)return s-e;return-1}function Y(t,e,r,i){let s=U(r,i,e);return s<0||U(r,i,t)<s}W.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1,W.prototype.fallback=W.prototype.extend=!1;const D="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let L=null;function I(t,e,r){let i=t.cursor(c.IncludeAnonymous);for(i.moveTo(e);;)if(!(r<0?i.childBefore(e):i.childAfter(e)))for(;;){if((r<0?i.to<e:i.from>e)&&!i.type.isError)return r<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(r<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return r<0?0:t.length}}class F{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?I(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?I(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let r=this.trees[e],i=this.index[e];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],n=this.start[e]+r.positions[i];if(n>t)return this.nextStart=n,null;if(s instanceof p){if(n==t){if(n<this.safeFrom)return null;let t=n+s.length;if(t<=this.safeTo){let e=s.prop(o.lookAhead);if(!e||t+e<this.fragment.to)return s}}this.index[e]++,n+s.length>=Math.max(this.safeFrom,t)&&(this.trees.push(s),this.start.push(n),this.index.push(0))}else this.index[e]++,this.nextStart=n+s.length}}}class B{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((t=>new N))}getActions(t){let e=0,r=null,{parser:i}=t.p,{tokenizers:s}=i,n=i.stateSlot(t.state,3),o=t.curContext?t.curContext.hash:0,a=0;for(let i=0;i<s.length;i++){if(!(1<<i&n))continue;let h=s[i],l=this.tokens[i];if((!r||h.fallback)&&((h.contextual||l.start!=t.pos||l.mask!=n||l.context!=o)&&(this.updateCachedToken(l,h,t),l.mask=n,l.context=o),l.lookAhead>l.end+25&&(a=Math.max(l.lookAhead,a)),0!=l.value)){let i=e;if(l.extended>-1&&(e=this.addActions(t,l.extended,l.end,e)),e=this.addActions(t,l.value,l.end,e),!h.extend&&(r=l,e>i))break}}for(;this.actions.length>e;)this.actions.pop();return a&&t.setLookAhead(a),r||t.pos!=this.stream.end||(r=new N,r.value=t.p.parser.eofTerm,r.start=r.end=t.pos,e=this.addActions(t,r.value,r.end,e)),this.mainToken=r,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new N,{pos:r,p:i}=t;return e.start=r,e.end=Math.min(r+1,i.stream.end),e.value=r==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,r){let i=this.stream.clipPos(r.pos);if(e.token(this.stream.reset(i,t),r),t.value>-1){let{parser:e}=r.p;for(let i=0;i<e.specialized.length;i++)if(e.specialized[i]==t.value){let s=e.specializers[i](this.stream.read(t.start,t.end),r);if(s>=0&&r.p.parser.dialect.allows(s>>1)){1&s?t.extended=s>>1:t.value=s>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,r,i){for(let e=0;e<i;e+=3)if(this.actions[e]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=r,i}addActions(t,e,r,i){let{state:s}=t,{parser:n}=t.p,{data:o}=n;for(let t=0;t<2;t++)for(let a=n.stateSlot(s,t?2:1);;a+=3){if(65535==o[a]){if(1!=o[a+1]){0==i&&2==o[a+1]&&(i=this.putAction(tt(o,a+2),e,r,i));break}a=tt(o,a+2)}o[a]==e&&(i=this.putAction(tt(o,a+1),e,r,i))}return i}}class M{constructor(t,e,r,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new G(e,i),this.tokens=new B(t,this.stream),this.topTerm=t.top[1];let{from:s}=i[0];this.stacks=[z.start(this,t.top[0],s)],this.fragments=r.length&&this.stream.end-s>4*t.bufferLength?new F(r,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,r=this.stacks,i=this.minStackPos,s=this.stacks=[];if(this.bigReductionCount>300&&1==r.length){let[t]=r;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let n=0;n<r.length;n++){let o=r[n];for(;;){if(this.tokens.mainToken=null,o.pos>i)s.push(o);else{if(this.advanceStack(o,s,r))continue;{t||(t=[],e=[]),t.push(o);let r=this.tokens.getMainToken(o);e.push(r.value,r.end)}}break}}if(!s.length){let e=t&&function(t){let e=null;for(let r of t){let t=r.p.stoppedAt;(r.pos==r.p.stream.end||null!=t&&r.pos>t)&&r.p.parser.stateFlag(r.state,2)&&(!e||e.score<r.score)&&(e=r)}return e}(t);if(e)return D&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw D&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+i);this.recovering||(this.recovering=5)}if(this.recovering&&t){let r=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,s);if(r)return D&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(s.length>t)for(s.sort(((t,e)=>e.score-t.score));s.length>t;)s.pop();s.some((t=>t.reducePos>i))&&this.recovering--}else if(s.length>1){t:for(let t=0;t<s.length-1;t++){let e=s[t];for(let r=t+1;r<s.length;r++){let i=s[r];if(e.sameState(i)||e.buffer.length>500&&i.buffer.length>500){if(!((e.score-i.score||e.buffer.length-i.buffer.length)>0)){s.splice(t--,1);continue t}s.splice(r--,1)}}}s.length>12&&s.splice(12,s.length-12)}this.minStackPos=s[0].pos;for(let t=1;t<s.length;t++)s[t].pos<this.minStackPos&&(this.minStackPos=s[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,r){let i=t.pos,{parser:s}=this,n=D?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,r=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(i);a;){let i=this.parser.nodeSet.types[a.type.id]==a.type?s.getGoto(t.state,a.type.id):-1;if(i>-1&&a.length&&(!e||(a.prop(o.contextHash)||0)==r))return t.useNode(a,i),D&&console.log(n+this.stackID(t)+` (via reuse of ${s.getName(a.type.id)})`),!0;if(!(a instanceof p)||0==a.children.length||a.positions[0]>0)break;let h=a.children[0];if(!(h instanceof p&&0==a.positions[0]))break;a=h}}let a=s.stateSlot(t.state,4);if(a>0)return t.reduce(a),D&&console.log(n+this.stackID(t)+` (via always-reduce ${s.getName(65535&a)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let h=this.tokens.getActions(t);for(let o=0;o<h.length;){let a=h[o++],l=h[o++],u=h[o++],O=o==h.length||!r,f=O?t:t.split(),c=this.tokens.mainToken;if(f.apply(a,l,c?c.start:f.pos,u),D&&console.log(n+this.stackID(f)+` (via ${65536&a?`reduce of ${s.getName(65535&a)}`:"shift"} for ${s.getName(l)} @ ${i}${f==t?"":", split"})`),O)return!0;f.pos>i?e.push(f):r.push(f)}return!1}advanceFully(t,e){let r=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>r)return J(t,e),!0}}runRecovery(t,e,r){let i=null,s=!1;for(let n=0;n<t.length;n++){let o=t[n],a=e[n<<1],h=e[1+(n<<1)],l=D?this.stackID(o)+" -> ":"";if(o.deadEnd){if(s)continue;if(s=!0,o.restart(),D&&console.log(l+this.stackID(o)+" (restarted)"),this.advanceFully(o,r))continue}let u=o.split(),O=l;for(let t=0;u.forceReduce()&&t<10&&(D&&console.log(O+this.stackID(u)+" (via force-reduce)"),!this.advanceFully(u,r));t++)D&&(O=this.stackID(u)+" -> ");for(let t of o.recoverByInsert(a))D&&console.log(l+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,r);this.stream.end>o.pos?(h==o.pos&&(h++,a=0),o.recoverByDelete(a,h),D&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),J(o,r)):(!i||i.score<o.score)&&(i=o)}return i}stackToTree(t){return t.close(),p.build({buffer:C.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(L||(L=new WeakMap)).get(t);return e||L.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function J(t,e){for(let r=0;r<e.length;r++){let i=e[r];if(i.pos==t.pos&&i.sameState(t))return void(e[r].score<t.score&&(e[r]=t))}e.push(t)}class K{constructor(t,e,r){this.source=t,this.flags=e,this.disabled=r}allows(t){return!this.disabled||0==this.disabled[t]}}class H extends q{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let r=0;r<t.repeatNodeCount;r++)e.push("");let r=Object.keys(t.topRules).map((e=>t.topRules[e][1])),s=[];for(let t=0;t<e.length;t++)s.push([]);function n(t,e,r){s[t].push([e,e.deserialize(String(r))])}if(t.nodeProps)for(let e of t.nodeProps){let t=e[0];"string"==typeof t&&(t=o[t]);for(let r=1;r<e.length;){let i=e[r++];if(i>=0)n(i,t,e[r++]);else{let s=e[r+-i];for(let o=-i;o>0;o--)n(e[r++],t,s);r++}}}this.nodeSet=new u(e.map(((e,i)=>l.define({name:i>=this.minRepeatTerm?void 0:e,id:i,props:s[i],top:r.indexOf(i)>-1,error:0==i,skipped:t.skippedNodes&&t.skippedNodes.indexOf(i)>-1})))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=i;let a=j(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(et),this.states=j(t.states,Uint32Array),this.data=j(t.stateData),this.goto=j(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map((t=>"number"==typeof t?new W(a,t):t)),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,r){let i=new M(this,t,e,r);for(let s of this.wrappers)i=s(i,t,e,r);return i}getGoto(t,e,r=!1){let i=this.goto;if(e>=i[0])return-1;for(let s=i[e+1];;){let e=i[s++],n=1&e,o=i[s++];if(n&&r)return o;for(let r=s+(e>>1);s<r;s++)if(i[s]==t)return o;if(n)return-1}}hasAction(t,e){let r=this.data;for(let i=0;i<2;i++)for(let s,n=this.stateSlot(t,i?2:1);;n+=3){if(65535==(s=r[n])){if(1!=r[n+1]){if(2==r[n+1])return tt(r,n+2);break}s=r[n=tt(r,n+2)]}if(s==e||0==s)return tt(r,n+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,(t=>t==e||null))}allActions(t,e){let r=this.stateSlot(t,4),i=r?e(r):void 0;for(let r=this.stateSlot(t,1);null==i;r+=3){if(65535==this.data[r]){if(1!=this.data[r+1])break;r=tt(this.data,r+2)}i=e(tt(this.data,r+1))}return i}nextStates(t){let e=[];for(let r=this.stateSlot(t,1);;r+=3){if(65535==this.data[r]){if(1!=this.data[r+1])break;r=tt(this.data,r+2)}if(!(1&this.data[r+2])){let t=this.data[r+1];e.some(((e,r)=>1&r&&e==t))||e.push(this.data[r],t)}}return e}configure(t){let e=Object.assign(Object.create(H.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let r=this.topRules[t.top];if(!r)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=r}return t.tokenizers&&(e.tokenizers=this.tokenizers.map((e=>{let r=t.tokenizers.find((t=>t.from==e));return r?r.to:e}))),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map(((r,i)=>{let s=t.specializers.find((t=>t.from==r.external));if(!s)return r;let n=Object.assign(Object.assign({},r),{external:s.to});return e.specializers[i]=et(n),n}))),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),r=e.map((()=>!1));if(t)for(let i of t.split(" ")){let t=e.indexOf(i);t>=0&&(r[t]=!0)}let i=null;for(let t=0;t<e.length;t++)if(!r[t])for(let r,s=this.dialects[e[t]];65535!=(r=this.data[s++]);)(i||(i=new Uint8Array(this.maxTerm+1)))[r]=1;return new K(t,r,i)}static deserialize(t){return new H(t)}}function tt(t,e){return t[e]|t[e+1]<<16}function et(t){if(t.external){let e=t.extend?1:0;return(r,i)=>t.external(r,i)<<1|e}return t.get}const rt={json:1,logfmt:2,unpack:3,pattern:4,regexp:5,label_format:7,line_format:8,label_replace:9,vector:10,offset:11,bool:12,on:13,ignoring:14,group_left:15,group_right:16,unwrap:6,decolorize:17,drop:18,keep:19},it={by:20,without:21,and:22,or:23,unless:24,sum:25,avg:26,count:27,max:28,min:29,stddev:30,stdvar:31,bottomk:32,topk:33,sort:34,sort_desc:35},st={__proto__:null,ip:295,count_over_time:301,rate:303,rate_counter:305,bytes_over_time:307,bytes_rate:309,avg_over_time:311,sum_over_time:313,min_over_time:315,max_over_time:317,stddev_over_time:319,stdvar_over_time:321,quantile_over_time:323,first_over_time:325,last_over_time:327,absent_over_time:329,bytes:335,duration:337,duration_seconds:339},nt=H.deserialize({version:14,states:"EtOYQPOOO#cQPO'#DUOOQO'#ER'#ERO#hQPO'#ERO$}QPO'#DTOYQPO'#DTOOQO'#Ed'#EdO%[QPO'#EcOOQO'#FP'#FPO%aQPO'#FOQ%lQPOOO&mQPO'#F]O&rQPO'#F^OOQO'#Eb'#EbOOQO'#DS'#DSOOQO'#Ee'#EeOOQO'#Ef'#EfOOQO'#Eg'#EgOOQO'#Eh'#EhOOQO'#Ei'#EiOOQO'#Ej'#EjOOQO'#Ek'#EkOOQO'#El'#ElOOQO'#Em'#EmOOQO'#En'#EnOOQO'#Eo'#EoOOQO'#Ep'#EpOOQO'#Eq'#EqOOQO'#Er'#ErOOQO'#Es'#EsO&wQPO'#DWOOQO'#DV'#DVO'VQPO,59pOOQO,5:m,5:mOOQO'#Dc'#DcO'_QPO'#DbO'gQPO'#DaO)lQPO'#D`O*{QPO'#D`OOQO'#D_'#D_O+sQPO,59oO-}QPO,59oO.UQPO,5:|O.]QPO,5:}O.hQPO'#E|O0sQPO,5;jO0zQPO,5;jO1PQPO,5;lO1PQPO,5;lO1PQPO,5;lO1PQPO,5;lO1PQPO,5;lO1PQPO,5;lOYQPO,5;wO3cQPO,5;xO3hQPO,59rO#cQPO,59qOOQO1G/[1G/[OOQO'#Dh'#DhO3mQPO,59|O5^QPO,59|OOQO'#Di'#DiO5cQPO,59{OOQO,59{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Q!v{Q$O!uR%W$QS#|!t#}W$z#y#{%R%SQ%u$yQ%|%TR&Z%{Q%Q#|Q%u$zQ&]%|R&e&ZQ#{!tS$y#y%RQ%P#|Q%S#}S%x$}%QS&Y%z%|R&f&]R%q$xR%o$xQ!OXQ%V$PQ%[$VQ&^%}R&_&PR$S!xwXOT}!V!{#P#Q#R#S#T#U$U%]&r&s&t&u&v&wQ#P!PQ#Q!QQ#R!RQ#S!SQ#T!TQ#U!UQ&r&xQ&s&yQ&t&zQ&u&{Q&v&|R&w&}h!}!P!Q!R!S!T!U&x&y&z&{&|&}R$]#OQ$Z!|Q%b$[R&T%cR%_$YQ%`$YR&`&R",nodeNames:"⚠ Json Logfmt Unpack Pattern Regexp Unwrap LabelFormat LineFormat LabelReplace Vector Offset Bool On Ignoring GroupLeft GroupRight Decolorize Drop Keep By Without And Or Unless Sum Avg Count Max Min Stddev Stdvar Bottomk Topk Sort Sort_Desc LineComment LogQL Expr LogExpr Selector Matchers Matcher Identifier Eq String Neq Re Nre PipelineExpr PipelineStage LineFilters LineFilter Filter PipeExact PipeMatch PipePattern Npa FilterOp Ip OrFilter Pipe LogfmtParser LogfmtParserFlags ParserFlag LabelParser JsonExpressionParser LabelExtractionExpressionList LabelExtractionExpression LogfmtExpressionParser LabelFilter IpLabelFilter UnitFilter DurationFilter Gtr Duration Gte Lss Lte Eql BytesFilter Bytes NumberFilter LiteralExpr Number Add Sub LineFormatExpr LabelFormatExpr LabelsFormat LabelFormatMatcher DecolorizeExpr DropLabelsExpr DropLabels DropLabel KeepLabelsExpr KeepLabels KeepLabel MetricExpr RangeAggregationExpr RangeOp CountOverTime Rate RateCounter BytesOverTime BytesRate AvgOverTime SumOverTime MinOverTime MaxOverTime StddevOverTime StdvarOverTime QuantileOverTime FirstOverTime LastOverTime AbsentOverTime LogRangeExpr Range OffsetExpr UnwrapExpr ConvOp BytesConv DurationConv DurationSecondsConv Grouping Labels VectorAggregationExpr VectorOp BinOpExpr BinOpModifier OnOrIgno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c.R#g#h/X#i#j.^#k#l1T#m#n1{${$|.^~8tR!Q![8}!c!i8}#T#Z8}~9SR!v~!Q![8}!c!i8}#T#Z8}P9bT{P!Q![9]![!]9]!c!}9]#R#S9]#T#o9]~9vP!o~!_!`9y~:OO!p~~:TQ|~!_!`:Z#r#s:`~:`O!q~~:eO!P~~:jP!l~!_!`:m~:rO!n~R:yT{P#zQ!Q![:r![!]9]!c!}:r#R#S:r#T#o:r~;_O$k~~;dO$l~~;iO$O~~;lRO#S;i#S#T%`#T~;i~;zO$U~~<PR!_~!_!`<Y!`!a<_#r#s<d~<_O!W~~<dO!Y~~<iO!X~~<nO$W~",tokenizers:[0,1],topRules:{LogQL:[0,37]},specialized:[{term:43,get:(t,e)=>(t=>rt[t.toLowerCase()]||-1)(t)<<1},{term:43,get:(t,e)=>(t=>it[t.toLowerCase()]||-1)(t)<<1|1},{term:43,get:t=>st[t]||-1}],tokenPrec:0}),ot=1,at=2,ht=40,lt=42,ut=43,Ot=44,ft=45,ct=46,pt=47,dt=48,gt=52,$t=54,Pt=55,mt=56,xt=57,Qt=58,bt=60,kt=70,vt=74,Xt=75,wt=76,yt=77,Rt=78,St=81,_t=84,Et=98},2533:t=>{t.exports=JSON.parse('{"id":"grafana-lokiexplore-app"}')}},g={};function $(t){var e=g[t];if(void 0!==e)return e.exports;var r=g[t]={exports:{}};return d[t].call(r.exports,r,r.exports,$),r.exports}return $.m=d,$.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return $.d(e,{a:e}),e},f=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,$.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var r=Object.create(null);$.r(r);var i={};O=O||[null,f({}),f([]),f(f)];for(var s=2&e&&t;"object"==typeof s&&!~O.indexOf(s);s=f(s))Object.getOwnPropertyNames(s).forEach((e=>i[e]=()=>t[e]));return i.default=()=>t,$.d(r,i),r},$.d=(t,e)=>{for(var r in e)$.o(e,r)&&!$.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},$.f={},$.e=t=>Promise.all(Object.keys($.f).reduce(((e,r)=>($.f[r](t,e),e)),[])),$.u=t=>t+".js",$.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),$.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),c={},p="grafana-lokiexplore-app:",$.l=(t,e,r,i)=>{if(c[t])c[t].push(e);else{var s,n;if(void 0!==r)for(var o=document.getElementsByTagName("script"),a=0;a<o.length;a++){var h=o[a];if(h.getAttribute("src")==t||h.getAttribute("data-webpack")==p+r){s=h;break}}s||(n=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,$.nc&&s.setAttribute("nonce",$.nc),s.setAttribute("data-webpack",p+r),s.src=t),c[t]=[e];var l=(e,r)=>{s.onerror=s.onload=null,clearTimeout(u);var i=c[t];if(delete c[t],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((t=>t(r))),e)return e(r)},u=setTimeout(l.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=l.bind(null,s.onerror),s.onload=l.bind(null,s.onload),n&&document.head.appendChild(s)}},$.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},$.p="public/plugins/grafana-lokiexplore-app/",(()=>{$.b=document.baseURI||self.location.href;var t={231:0};$.f.j=(e,r)=>{var i=$.o(t,e)?t[e]:void 0;if(0!==i)if(i)r.push(i[2]);else{var s=new Promise(((r,s)=>i=t[e]=[r,s]));r.push(i[2]=s);var n=$.p+$.u(e),o=new Error;$.l(n,(r=>{if($.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var s=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;o.message="Loading chunk "+e+" failed.\n("+s+": "+n+")",o.name="ChunkLoadError",o.type=s,o.request=n,i[1](o)}}),"chunk-"+e,e)}};var e=(e,r)=>{var i,s,[n,o,a]=r,h=0;if(n.some((e=>0!==t[e]))){for(i in o)$.o(o,i)&&($.m[i]=o[i]);a&&a($)}for(e&&e(r);h<n.length;h++)s=n[h],$.o(t,s)&&t[s]&&t[s][0](),t[s]=0},r=self.webpackChunkgrafana_lokiexplore_app=self.webpackChunkgrafana_lokiexplore_app||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),$(9077)})()));
|
|
//# sourceMappingURL=module.js.map
|