define(["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.findTokenInstances=function(e){var r=[];if(!e)return r;for(var t=/{\s*([^\{\}]*[^\s\{\}])\s*}/gm,n=t.exec(e);n;){var s=n[1],a=t.lastIndex,o=a-n[0].length;r.push({token:s,start:o,end:a}),n=t.exec(e)}return r},r.getTokenValueString=function(e,r){return void 0===r?"{"+e+"}":null===r?"":String(r)},r.replacePlaceholders=function(e,r,t){for(var n="",s=0,a=0,o=r;a<o.length;a++){var i=o[a],u=i.token;if(s>i.start){console.error("Invalid token data. Data must be supplied in order",r),n=e;break}s<i.start&&(n+=e.substring(s,i.start),s=i.start),n+=t[u],s=i.end}return{markdown:n+=e.substring(s)}}});