{"version":3,"sources":["jsdelivr-header.js","/npm/glsl-token-scope@1.1.2/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACJA,SAAS,WAAW,GAClB,IAAI,EAAS,CAAC,GACV,EAAS,EAAM,GACf,EAAS,EAEb,IAAK,IAAW,EAAO,OAAQ,OAAO,EACtC,KAAM,UAAW,EAAO,IACtB,MAAM,IAAI,MAAM,kGAGlB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAO,OAAQ,IAAK,CACtC,IAAI,EAAQ,EAAO,GACf,EAAQ,EAAM,MAEd,EAAQ,EACV,EAAM,OAAO,GAEX,EAAQ,GACV,EAAM,QAAQ,EAAG,GAGnB,EAAM,MAAQ,EAAM,EAAM,OAAS,GACnC,EAAM,MAAQ,EAAM,QACpB,EAAS,EAAM,KACjB,CAEA,OAAO,CACT,CA7BA,OAAO,QAAU","file":"/npm/glsl-token-scope@1.1.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/glsl-token-scope@1.1.2/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","module.exports = tokenScope\n\nfunction tokenScope(tokens) {\n  var stack  = [0]\n  var inc    = stack[0]\n  var ldepth = 0\n\n  if (!tokens || !tokens.length) return tokens\n  if (!('depth' in tokens[0])) {\n    throw new Error('glsl-token-scope: No scope depth defined on tokens! Use glsl-token-depth on these tokens first')\n  }\n\n  for (var i = 0; i < tokens.length; i++) {\n    var token = tokens[i]\n    var depth = token.depth\n\n    if (depth > ldepth) {\n      stack.push(++inc)\n    } else\n    if (depth < ldepth) {\n      stack.splice(-1, 1)\n    }\n\n    token.scope = stack[stack.length - 1]\n    token.stack = stack.slice()\n    ldepth = token.depth\n  }\n\n  return tokens\n}\n"]}