/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/bigodon@2.5.0/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileExpression=exports.compile=exports.runExpression=exports.run=exports.parseExpression=exports.parse=void 0;const parser_1=require("./parser"),expression_1=require("./parser/expression"),runner_1=require("./runner"),execution_1=require("./runner/execution"),utils_1=require("./utils");class Bigodon{constructor(){this.helpers=new Map,this.parse=e=>((0,utils_1.ensure)("string"==typeof e,"Template must be a string"),parser_1.$template.parse(e)),this.parseExpression=e=>((0,utils_1.ensure)("string"==typeof e,"Expression must be a string"),expression_1.$expression.parse(e)),this.run=async(e,s,r)=>await(0,runner_1.run)(e,s,this.helpers,r),this.runExpression=async(e,s,r)=>{const t=execution_1.Execution.of(s,this.helpers,r);return await(0,runner_1.runStatement)(t,e)},this.compile=e=>{const s=this.parse(e);return(e,r)=>this.run(s,e,r)},this.compileExpression=e=>{const s=this.parseExpression(e);return(e,r)=>this.runExpression(s,e,r)},this.addHelper=(e,s)=>((0,utils_1.ensure)("string"==typeof e,"name must be a string"),(0,utils_1.ensure)("function"==typeof s,"helper must be a function"),this.helpers.set(e,s),this)}}const defaultBigodon=new Bigodon;exports.parse=defaultBigodon.parse,exports.parseExpression=defaultBigodon.parseExpression,exports.run=defaultBigodon.run,exports.runExpression=defaultBigodon.runExpression,exports.compile=defaultBigodon.compile,exports.compileExpression=defaultBigodon.compileExpression,exports.default=Bigodon;
//# sourceMappingURL=/sm/d1ed015e55915beb91c1f5cf1483ff9bedd6642f1c44d9e16983797e702dedc2.map