var e=[`-type`,`-spec`,`-export_type`,`-opaque`],t=[`after`,`begin`,`catch`,`case`,`cond`,`end`,`fun`,`if`,`let`,`of`,`query`,`receive`,`try`,`when`],n=/[\->,;]/,r=[`->`,`;`,`,`],i=[`and`,`andalso`,`band`,`bnot`,`bor`,`bsl`,`bsr`,`bxor`,`div`,`not`,`or`,`orelse`,`rem`,`xor`],a=/[\+\-\*\/<>=\|:!]/,o=[`=`,`+`,`-`,`*`,`/`,`>`,`>=`,`<`,`=<`,`=:=`,`==`,`=/=`,`/=`,`||`,`<-`,`!`],s=/[<\(\[\{]/,c=[`<<`,`(`,`[`,`{`],l=/[>\)\]\}]/,u=[`}`,`]`,`)`,`>>`],d=`is_atom.is_binary.is_bitstring.is_boolean.is_float.is_function.is_integer.is_list.is_number.is_pid.is_port.is_record.is_reference.is_tuple.atom.binary.bitstring.boolean.function.integer.list.number.pid.port.record.reference.tuple`.split(`.`),f=`abs.adler32.adler32_combine.alive.apply.atom_to_binary.atom_to_list.binary_to_atom.binary_to_existing_atom.binary_to_list.binary_to_term.bit_size.bitstring_to_list.byte_size.check_process_code.contact_binary.crc32.crc32_combine.date.decode_packet.delete_module.disconnect_node.element.erase.exit.float.float_to_list.garbage_collect.get.get_keys.group_leader.halt.hd.integer_to_list.internal_bif.iolist_size.iolist_to_binary.is_alive.is_atom.is_binary.is_bitstring.is_boolean.is_float.is_function.is_integer.is_list.is_number.is_pid.is_port.is_process_alive.is_record.is_reference.is_tuple.length.link.list_to_atom.list_to_binary.list_to_bitstring.list_to_existing_atom.list_to_float.list_to_integer.list_to_pid.list_to_tuple.load_module.make_ref.module_loaded.monitor_node.node.node_link.node_unlink.nodes.notalive.now.open_port.pid_to_list.port_close.port_command.port_connect.port_control.pre_loaded.process_flag.process_info.processes.purge_module.put.register.registered.round.self.setelement.size.spawn.spawn_link.spawn_monitor.spawn_opt.split_binary.statistics.term_to_binary.time.throw.tl.trunc.tuple_size.tuple_to_list.unlink.unregister.whereis`.split(`.`),p=/[\w@Ø-ÞÀ-Öß-öø-ÿ]/,m=/[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;function h(h,b){if(b.in_string)return b.in_string=!v(h),C(b,h,`string`);if(b.in_atom)return b.in_atom=!y(h),C(b,h,`atom`);if(h.eatSpace())return C(b,h,`whitespace`);if(!D(b)&&h.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/))return S(h.current(),e)?C(b,h,`type`):C(b,h,`attribute`);var w=h.next();if(w==`%`)return h.skipToEnd(),C(b,h,`comment`);if(w==`:`)return C(b,h,`colon`);if(w==`?`)return h.eatSpace(),h.eatWhile(p),C(b,h,`macro`);if(w==`#`)return h.eatSpace(),h.eatWhile(p),C(b,h,`record`);if(w==`$`)return h.next()==`\\`&&!h.match(m)?C(b,h,`error`):C(b,h,`number`);if(w==`.`)return C(b,h,`dot`);if(w==`'`){if(!(b.in_atom=!y(h))){if(h.match(/\s*\/\s*[0-9]/,!1))return h.match(/\s*\/\s*[0-9]/,!0),C(b,h,`fun`);if(h.match(/\s*\(/,!1)||h.match(/\s*:/,!1))return C(b,h,`function`)}return C(b,h,`atom`)}if(w==`"`)return b.in_string=!v(h),C(b,h,`string`);if(/[A-Z_Ø-ÞÀ-Ö]/.test(w))return h.eatWhile(p),C(b,h,`variable`);if(/[a-z_ß-öø-ÿ]/.test(w)){if(h.eatWhile(p),h.match(/\s*\/\s*[0-9]/,!1))return h.match(/\s*\/\s*[0-9]/,!0),C(b,h,`fun`);var T=h.current();return S(T,t)?C(b,h,`keyword`):S(T,i)?C(b,h,`operator`):h.match(/\s*\(/,!1)?S(T,f)&&(D(b).token!=`:`||D(b,2).token==`erlang`)?C(b,h,`builtin`):S(T,d)?C(b,h,`guard`):C(b,h,`function`):x(h)==`:`?T==`erlang`?C(b,h,`builtin`):C(b,h,`function`):S(T,[`true`,`false`])?C(b,h,`boolean`):C(b,h,`atom`)}var E=/[0-9]/;return E.test(w)?(h.eatWhile(E),h.eat(`#`)?h.eatWhile(/[0-9a-zA-Z]/)||h.backUp(1):h.eat(`.`)&&(h.eatWhile(E)?h.eat(/[eE]/)&&(h.eat(/[-+]/)?h.eatWhile(E)||h.backUp(2):h.eatWhile(E)||h.backUp(1)):h.backUp(1)),C(b,h,`number`)):g(h,s,c)?C(b,h,`open_paren`):g(h,l,u)?C(b,h,`close_paren`):_(h,n,r)?C(b,h,`separator`):_(h,a,o)?C(b,h,`operator`):C(b,h,null)}function g(e,t,n){if(e.current().length==1&&t.test(e.current())){for(e.backUp(1);t.test(e.peek());)if(e.next(),S(e.current(),n))return!0;e.backUp(e.current().length-1)}return!1}function _(e,t,n){if(e.current().length==1&&t.test(e.current())){for(;t.test(e.peek());)e.next();for(;01&&e[t].type===`fun`&&e[t-1].token===`fun`)return e.slice(0,t-1);switch(e[t].token){case`}`:return j(e,{g:[`{`]});case`]`:return j(e,{i:[`[`]});case`)`:return j(e,{i:[`(`]});case`>>`:return j(e,{i:[`<<`]});case`end`:return j(e,{i:[`begin`,`case`,`fun`,`if`,`receive`,`try`]});case`,`:return j(e,{e:[`begin`,`try`,`when`,`->`,`,`,`(`,`[`,`{`,`<<`]});case`->`:return j(e,{r:[`when`],m:[`try`,`if`,`case`,`receive`]});case`;`:return j(e,{E:[`case`,`fun`,`if`,`receive`,`try`,`when`]});case`catch`:return j(e,{e:[`try`]});case`of`:return j(e,{e:[`case`]});case`after`:return j(e,{e:[`receive`,`try`]});default:return e}}function j(e,t){for(var n in t)for(var r=e.length-1,i=t[n],a=r-1;-1`?S(o.token,[`receive`,`case`,`if`,`try`])?o.column+n.unit+n.unit:o.column+n.unit:S(a.token,c)?a.column+a.token.length:(r=F(e),R(r)?r.column+n.unit:0):0}function N(e){var t=e.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);return R(t)&&t.index===0?t[0]:``}function P(e){var t=e.tokenStack.slice(0,-1),n=L(t,`type`,[`open_paren`]);return R(t[n])?t[n]:!1}function F(e){var t=e.tokenStack,n=L(t,`type`,[`open_paren`,`separator`,`keyword`]),r=L(t,`type`,[`operator`]);return R(n)&&R(r)&&n