import {
  a as o,
  c as g
} from "./chunk-IO47FP3U.js";

// ../node_modules/highlight.js/lib/languages/routeros.js
var m = g((b, a) => {
  function d(e) {
    let r = "foreach do while for if from to step else on-error and or not in", l = "global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime", p = "add remove enable disable set get print export edit find run debug error info warning", i = "true false yes no nothing nil null", c = "traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw", n = {
      className: "variable",
      variants: [
        {
          begin: /\$[\w\d#@][\w\d_]*/
        },
        {
          begin: /\$\{(.*?)\}/
        }
      ]
    }, s = {
      className: "string",
      begin: /"/,
      end: /"/,
      contains: [
        e.BACKSLASH_ESCAPE,
        n,
        {
          className: "variable",
          begin: /\$\(/,
          end: /\)/,
          contains: [e.BACKSLASH_ESCAPE]
        }
      ]
    }, t = {
      className: "string",
      begin: /'/,
      end: /'/
    };
    return {
      name: "Microtik RouterOS script",
      aliases: [
        "mikrotik"
      ],
      case_insensitive: !0,
      keywords: {
        $pattern: /:?[\w-]+/,
        literal: i,
        keyword: r + " :" + r.split(" ").join(" :") + " :" + l.split(" ").join(" :")
      },
      contains: [
        {
          // illegal syntax
          variants: [
            {
              // -- comment
              begin: /\/\*/,
              end: /\*\//
            },
            {
              // Stan comment
              begin: /\/\//,
              end: /$/
            },
            {
              // HTML tags
              begin: /<\//,
              end: />/
            }
          ],
          illegal: /./
        },
        e.COMMENT("^#", "$"),
        s,
        t,
        n,
        // attribute=value
        {
          // > is to avoid matches with => in other grammars
          begin: /[\w-]+=([^\s{}[\]()>]+)/,
          relevance: 0,
          returnBegin: !0,
          contains: [
            {
              className: "attribute",
              begin: /[^=]+/
            },
            {
              begin: /=/,
              endsWithParent: !0,
              relevance: 0,
              contains: [
                s,
                t,
                n,
                {
                  className: "literal",
                  begin: "\\b(" + i.split(" ").join("|") + ")\\b"
                },
                {
                  // Do not format unclassified values. Needed to exclude highlighting of values as built_in.
                  begin: /("[^"]*"|[^\s{}[\]]+)/
                }
                /*
                {
                  // IPv4 addresses and subnets
                  className: 'number',
                  variants: [
                    {begin: IPADDR_wBITMASK+'(,'+IPADDR_wBITMASK+')*'}, //192.168.0.0/24,1.2.3.0/24
                    {begin: IPADDR+'-'+IPADDR},       // 192.168.0.1-192.168.0.3
                    {begin: IPADDR+'(,'+IPADDR+')*'}, // 192.168.0.1,192.168.0.34,192.168.24.1,192.168.0.1
                  ]
                },
                {
                  // MAC addresses and DHCP Client IDs
                  className: 'number',
                  begin: /\b(1:)?([0-9A-Fa-f]{1,2}[:-]){5}([0-9A-Fa-f]){1,2}\b/,
                },
                */
              ]
            }
          ]
        },
        {
          // HEX values
          className: "number",
          begin: /\*[0-9a-fA-F]+/
        },
        {
          begin: "\\b(" + p.split(" ").join("|") + ")([\\s[(\\]|])",
          returnBegin: !0,
          contains: [
            {
              className: "builtin-name",
              // 'function',
              begin: /\w+/
            }
          ]
        },
        {
          className: "built_in",
          variants: [
            {
              begin: "(\\.\\./|/|\\s)((" + c.split(" ").join("|") + ");?\\s)+"
            },
            {
              begin: /\.\./,
              relevance: 0
            }
          ]
        }
      ]
    };
  }
  o(d, "routeros");
  a.exports = d;
});

export {
  m as a
};
