{"version":3,"sources":["jsdelivr-header.js","/npm/ascii-dance@1.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACCA,SAAS,OAAQ,GACb,OAAO,SAAU,GACb,IAAI,EAAO,EACP,EAAQ,EACR,EAA4B,iBAAX,GAAsB,GAAc,EACrD,IAAM,EAEN,EAAS,IAET,GAAQ,EAER,GADA,IAAmB,GACF,EAAM,OAAS,EAAK,EAAS,EAAM,OACpD,IAAM,EAAQ,GAGlB,MAAQ,GAER,IAAK,IAAI,EAAI,EAAO,IAAM,IAAK,GAAK,EAChC,MAAM,KAAK,EAAM,EAAI,EAAM,SAG/B,OAAO,MAAM,KAAK,IACtB,CACJ,CA9BA,OAAO,QAAU","file":"/npm/ascii-dance@1.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/ascii-dance@1.0.0/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 = dancer;\n\n/*\n * Create a dancer who knows an array of moves. The returned dancer is a function\n * that returns an ascii string cycling through a provided number of moves.\n * Negative lengths will cycle through the dance moves in reverse order.\n */\nfunction dancer (moves) {\n    return function (length) {\n        var step = 1,\n            begin = 0,\n            length = (typeof length === 'number' ? length || 0 : 0);\n            end = length;\n\n        if (length < 0) {\n            // go through moves backwards, always starting with last move\n            step = -1;\n            length = length * -1;\n            begin = length + moves.length - 1 - (length % moves.length);\n            end = begin - length;\n        }\n\n        dance = [];\n\n        for (var i = begin; i !== end; i += step) {\n            dance.push(moves[i % moves.length]);\n        }\n\n        return dance.join(' ');\n    }\n}\n"]}