r.displayName = "cooklang";
r.aliases = [];
function r(n) {
  (function(o) {
    var t = /(?:(?!\s)[\d$+<=a-zA-Z\x80-\uFFFF])+/.source, e = /[^{}@#]+/.source, i = /\{[^}#@]*\}/.source, a = e + i, s = /(?:h|hours|hrs|m|min|minutes)/.source, u = {
      pattern: /\{[^{}]*\}/,
      inside: {
        amount: {
          pattern: /([\{|])[^{}|*%]+/,
          lookbehind: !0,
          alias: "number"
        },
        unit: {
          pattern: /(%)[^}]+/,
          lookbehind: !0,
          alias: "symbol"
        },
        "servings-scaler": {
          pattern: /\*/,
          alias: "operator"
        },
        "servings-alternative-separator": {
          pattern: /\|/,
          alias: "operator"
        },
        "unit-separator": {
          pattern: /(?:%|(\*)%)/,
          lookbehind: !0,
          alias: "operator"
        },
        punctuation: /[{}]/
      }
    };
    o.languages.cooklang = {
      comment: {
        // [- comment -]
        // -- comment
        pattern: /\[-[\s\S]*?-\]|--.*/,
        greedy: !0
      },
      meta: {
        // >> key: value
        pattern: />>.*:.*/,
        inside: {
          property: {
            // key:
            pattern: /(>>\s*)[^\s:](?:[^:]*[^\s:])?/,
            lookbehind: !0
          }
        }
      },
      "cookware-group": {
        // #...{...}, #...
        pattern: new RegExp(
          "#(?:" + a + "|" + t + ")"
        ),
        inside: {
          cookware: {
            pattern: new RegExp("(^#)(?:" + e + ")"),
            lookbehind: !0,
            alias: "variable"
          },
          "cookware-keyword": {
            pattern: /^#/,
            alias: "keyword"
          },
          "quantity-group": {
            pattern: new RegExp(/\{[^{}@#]*\}/),
            inside: {
              quantity: {
                pattern: new RegExp(/(^\{)/.source + e),
                lookbehind: !0,
                alias: "number"
              },
              punctuation: /[{}]/
            }
          }
        }
      },
      "ingredient-group": {
        // @...{...}, @...
        pattern: new RegExp(
          "@(?:" + a + "|" + t + ")"
        ),
        inside: {
          ingredient: {
            pattern: new RegExp("(^@)(?:" + e + ")"),
            lookbehind: !0,
            alias: "variable"
          },
          "ingredient-keyword": {
            pattern: /^@/,
            alias: "keyword"
          },
          "amount-group": u
        }
      },
      "timer-group": {
        // ~timer{...}
        // eslint-disable-next-line regexp/sort-alternatives
        pattern: /~(?!\s)[^@#~{}]*\{[^{}]*\}/,
        inside: {
          timer: {
            pattern: /(^~)[^{]+/,
            lookbehind: !0,
            alias: "variable"
          },
          "duration-group": {
            // {...}
            pattern: /\{[^{}]*\}/,
            inside: {
              punctuation: /[{}]/,
              unit: {
                pattern: new RegExp(
                  /(%\s*)/.source + s + /\b/.source
                ),
                lookbehind: !0,
                alias: "symbol"
              },
              operator: /%/,
              duration: {
                pattern: /\d+/,
                alias: "number"
              }
            }
          },
          "timer-keyword": {
            pattern: /^~/,
            alias: "keyword"
          }
        }
      }
    };
  })(n);
}
export {
  r as default
};
//# sourceMappingURL=cooklang.es.js.map
