var e,t=r(`abs.acos.aj.aj0.all.and.any.asc.asin.asof.atan.attr.avg.avgs.bin.by.ceiling.cols.cor.cos.count.cov.cross.csv.cut.delete.deltas.desc.dev.differ.distinct.div.do.each.ej.enlist.eval.except.exec.exit.exp.fby.fills.first.fkeys.flip.floor.from.get.getenv.group.gtime.hclose.hcount.hdel.hopen.hsym.iasc.idesc.if.ij.in.insert.inter.inv.key.keys.last.like.list.lj.load.log.lower.lsq.ltime.ltrim.mavg.max.maxs.mcount.md5.mdev.med.meta.min.mins.mmax.mmin.mmu.mod.msum.neg.next.not.null.or.over.parse.peach.pj.plist.prd.prds.prev.prior.rand.rank.ratios.raze.read0.read1.reciprocal.reverse.rload.rotate.rsave.rtrim.save.scan.select.set.setenv.show.signum.sin.sqrt.ss.ssr.string.sublist.sum.sums.sv.system.tables.tan.til.trim.txf.type.uj.ungroup.union.update.upper.upsert.value.var.view.views.vs.wavg.where.where.while.within.wj.wj1.wsum.xasc.xbar.xcol.xcols.xdesc.xexp.xgroup.xkey.xlog.xprev.xrank`.split(`.`)),n=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;function r(e){return RegExp(`^(`+e.join(`|`)+`)$`)}function i(r,o){var l=r.sol(),u=r.next();if(e=null,l){if(u==`/`)return(o.tokenize=a)(r,o);if(u==`\\`)return r.eol()||/\s/.test(r.peek())?(r.skipToEnd(),/^\\\s*$/.test(r.current())?(o.tokenize=s)(r):o.tokenize=i,`comment`):(o.tokenize=i,`builtin`)}if(/\s/.test(u))return r.peek()==`/`?(r.skipToEnd(),`comment`):`null`;if(u==`"`)return(o.tokenize=c)(r,o);if(u=="`")return r.eatWhile(/[A-Za-z\d_:\/.]/),`macroName`;if(u==`.`&&/\d/.test(r.peek())||/\d/.test(u)){var d=null;return r.backUp(1),r.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)||r.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)||r.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)||r.match(/^\d+[ptuv]{1}/)?d=`temporal`:(r.match(/^0[NwW]{1}/)||r.match(/^0x[\da-fA-F]*/)||r.match(/^[01]+[b]{1}/)||r.match(/^\d+[chijn]{1}/)||r.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))&&(d=`number`),d&&(!(u=r.peek())||n.test(u))?d:(r.next(),`error`)}return/[A-Za-z]|\./.test(u)?(r.eatWhile(/[A-Za-z._\d]/),t.test(r.current())?`keyword`:`variable`):/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(u)||/[{}\(\[\]\)]/.test(u)?null:`error`}function a(e,t){return e.skipToEnd(),/^\/\s*$/.test(e.current())?(t.tokenize=o)(e,t):t.tokenize=i,`comment`}function o(e,t){var n=e.sol()&&e.peek()==`\\`;return e.skipToEnd(),n&&/^\\\s*$/.test(e.current())&&(t.tokenize=i),`comment`}function s(e){return e.skipToEnd(),`comment`}function c(e,t){for(var n=!1,r,a=!1;r=e.next();){if(r==`"`&&!n){a=!0;break}n=!n&&r==`\\`}return a&&(t.tokenize=i),`string`}function l(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function u(e){e.indent=e.context.indent,e.context=e.context.prev}var d={name:`q`,startState:function(){return{tokenize:i,context:null,indent:0,col:0}},token:function(t,n){t.sol()&&(n.context&&n.context.align==null&&(n.context.align=!1),n.indent=t.indentation());var r=n.tokenize(t,n);if(r!=`comment`&&n.context&&n.context.align==null&&n.context.type!=`pattern`&&(n.context.align=!0),e==`(`)l(n,`)`,t.column());else if(e==`[`)l(n,`]`,t.column());else if(e==`{`)l(n,`}`,t.column());else if(/[\]\}\)]/.test(e)){for(;n.context&&n.context.type==`pattern`;)u(n);n.context&&e==n.context.type&&u(n)}else e==`.`&&n.context&&n.context.type==`pattern`?u(n):/atom|string|variable/.test(r)&&n.context&&(/[\}\]]/.test(n.context.type)?l(n,`pattern`,t.column()):n.context.type==`pattern`&&!n.context.align&&(n.context.align=!0,n.context.col=t.column()));return r},indent:function(e,t,n){var r=t&&t.charAt(0),i=e.context;if(/[\]\}]/.test(r))for(;i&&i.type==`pattern`;)i=i.prev;var a=i&&r==i.type;return i?i.type==`pattern`?i.col:i.align?i.col+(a?0:1):i.indent+(a?0:n.unit):0},languageData:{commentTokens:{line:`/`}}};export{d as q};
//# sourceMappingURL=q.DNLBZp3M.js.map