{"html":"<p style=\"text-align:{{alignment}}; color:{{color}};\" class=\"heading\" data-target-resolver><\/p>","html_item":"'{{item.title}}',","js":"const resolver = {\n  resolve: function resolve(options, callback) {\n    \/\/ The string to resolve\n    const resolveString = options.resolveString || options.element.getAttribute('data-target-resolver');\n    const combinedOptions = Object.assign({}, options, { resolveString: resolveString });\n\n    function getRandomInteger(min, max) {\n      return Math.floor(Math.random() * (max - min + 1)) + min;\n    };\n\n    function randomCharacter(characters) {\n      return characters[getRandomInteger(0, characters.length - 1)];\n    };\n\n    function doRandomiserEffect(options, callback) {\n      const characters = options.characters;\n      const timeout = options.timeout;\n      const element = options.element;\n      const partialString = options.partialString;\n\n      let iterations = options.iterations;\n\n      setTimeout(() => {\n        if (iterations >= 0) {\n          const nextOptions = Object.assign({}, options, { iterations: iterations - 1 });\n\n          \/\/ Ensures partialString without the random character as the final state.\n          if (iterations === 0) {\n            element.textContent = partialString;\n          } else {\n            \/\/ Replaces the last character of partialString with a random character\n            element.textContent = partialString.substring(0, partialString.length - 1) + randomCharacter(characters);\n          }\n\n          doRandomiserEffect(nextOptions, callback);\n        } else if (typeof callback === \"function\") {\n          callback();\n        }\n      }, options.timeout);\n    };\n\n    function doResolverEffect(options, callback) {\n      const resolveString = options.resolveString;\n      const characters = options.characters;\n      const offset = options.offset;\n      const partialString = resolveString.substring(0, offset);\n      const combinedOptions = Object.assign({}, options, { partialString: partialString });\n\n      doRandomiserEffect(combinedOptions, () => {\n        const nextOptions = Object.assign({}, options, { offset: offset + 1 });\n\n        if (offset <= resolveString.length) {\n          doResolverEffect(nextOptions, callback);\n        } else if (typeof callback === \"function\") {\n          callback();\n        }\n      });\n    };\n\n\n    doResolverEffect(combinedOptions, callback);\n  }\n\n};\nconst strings = [\n  \n  \n{{put_items()}}\n \n  \n];\n\n\nlet counter = 0;\n\nconst options = {\n  \/\/ Initial position\n  offset: 0,\n  \/\/ Timeout between each random character\n  timeout: 5,\n  \/\/ Number of random characters to show\n  iterations: 10,\n  \/\/ Random characters to pick from\n  characters: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'x', 'y', 'x', '#', '%', '&', '-', '+', '_', '?', '\/', '\\\\', '='],\n  \/\/ String to resolve\n  resolveString: strings[counter],\n  \/\/ The element\n  element: document.querySelector('[data-target-resolver]')\n\n\n  \/\/ Callback function when resolve completes\n};function callback() {\n  setTimeout(() => {\n    counter++;\n\n\tif (counter >= strings.length) {\n\t  counter = 0;\n      {%if is_loop == \"false\" %}\n      return(false);\n      {%endif%}\n\t}\n\n    let nextOptions = Object.assign({}, options, { resolveString: strings[counter] });\n    resolver.resolve(nextOptions, callback);\n  }, 1000);\n}\n\nresolver.resolve(options, callback);"}