Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
<!DOCTYPE html>
<html><head><title>SugarQSP</title></head><body>
<div id="qsp">
  <div class="qsp-col qsp-col1">
    <div id="qsp-main" class="qsp-frame">&zwnj;</div>
    <div id="qsp-acts" class="qsp-frame">&zwnj;</div>
    <input id="qsp-input" class="qsp-frame">
  </div>
  <div class="qsp-col qsp-col2">
    <div id="qsp-stat" class="qsp-frame">&zwnj;</div>
    <div id="qsp-objs" class="qsp-frame">&zwnj;</div>
  </div>
  <div class="qsp-col qsp-col3">
    <a id="qsp-btn-save"><img></a>
    <a id="qsp-btn-open"><img></a>
  </div>
</div>

<div id="qsp-dropdown">
</div>

<div id="qsp-image-container" class="center-on-screen">
  <img id="qsp-image">
</div>

<style id="qsp-style">
</style>
<style>
.qsp-frame {
    border: 1px solid black;
    overflow: auto;
    padding: 5px;
    box-sizing: border-box;
}

#qsp {
    position: absolute;
    display: flex;
    flex-flow: row;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.qsp-col {
    display: flex;
    flex-flow: column;
}

.qsp-col1 {
    flex: 7 7 70px;
}

.qsp-col2 {
    flex: 3 3 30px;
}

.qsp-col3 {
    flex: 0 0 40px;
}

#qsp-main {
    flex: 6 6 60px;
    background-repeat: no-repeat;
    background-position: right top;
    background-attachment: fixed;
}

#qsp-acts {
    flex: 4 4 40px;
}

#qsp-input {
}

#qsp-stat {
    flex: 5 5 50px;
}

#qsp-objs {
    flex: 5 5 50px;
}

.qsp-act {
    display: block;
    padding: 2px;
    font-size: large;
}

.qsp-act:hover {
    outline: #9E9E9E outset 3px
}

/* Dropdown */

#qsp-dropdown {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 160px;
  overflow: auto;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  margin: auto;
}

#qsp-dropdown a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

#qsp-dropdown a:hover {
    background-color: #ddd;
}

/* Buttons */

.qsp-col3 a, .qsp-col3 img {
    width: 50px;
    height: 50px;
}

#qsp-btn-save img {
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAACSklEQVRoge3ZPWgUQRjG8V/iRRFU/GoEQdSohSgWWqQSooVgK9iJFiKCnYV2BkFQsBRBQQwWVsHKIoWxEOzEwmhhogbRMhhFicTvYm+JCUlmZzabRLN/OPaWeZ+ZeW7feXf2lpqampqamnRaImKP4hA2VjCP27hbpoNGwbib2IPreB+IPYY7M7SvxWYM4QNO4QqWyQxVRgdeYnnB+K5A+wUcbB7z+O14hxPx08toLRDTgfv4mjrIJFrwwMS0HsABXMTxlE6LpNYqfE7pPJIBdOKhLM1uxIiLrpG5YtC4GSLMVGGkLdD+GpfxAuvxaVL7oCzN+jCG7iKDVmHkKS5hSSBuJ3bg6hRt+Zrpa553z8bEuoQrUVXk1exwKLBI1ZpPBnAL+0KBqanVim1Ykaifji+yNfIrVphipB1n8BgjCfqZ2IrTuIZXMcIUIydxFj8TtEW4JysW52JEKWtkVHUm4EdzjChSrkgLlmJXghb6m8ep9MN4K25XjvTF3sCaElrT6McS+0w2Mirb+JWhrH4CC/0+UpjUK7Ia5/86f4IeHMHeEvPJ+4km1chHE43k9KROpCyLPrViym8/vjW/b5Jt3acjL7/RzEX5bRg3sjKg+2fK7/PmZ9aZzdTqxwYzp06IBZFaDeHUCbFgUquy1Anx35TfRWXkd+WzCBOcQxEjQ7JH0PmiHW9CQUWM9Mr+Y+osO6ME8nF7Q4FFn8T2y14VDMt2vsFfqCRbZBvTdbLXFI9CgphHyjbsVu4+EcMInuH7HI1XU1NTU7OI+QMFe2N82rtssgAAAABJRU5ErkJggg==');
}

#qsp-btn-open img {
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAACCklEQVRoge3Yz6sNYRzH8deVexNxSaEoroWFUuomOceSPVnIwsbSxs6Psrgphf9AsrZR7kJWsroUlrZKKZRSl4USGouZk9Npzp1n5pm5x4/nXdNzpvP9Pp/v95nv82OGRCKRSCQS/w8zuIn3yGpe37CEQ6sedQk38BA7G/jO4BQ+YEebQZUxVfH/OxzGVSxX2D4o2mO4jmt4jpNFe6d5mPFkRbvQ0H9h6OqUtR33/xXr0celGn4/sYjXoQ5dJ3ILB7AOW2r4bcIj7GsrkEFpXWyrwwbaf15nXWqv6SqK1abuHDmPjV0EMobhBWIZt8cZVu0j2ZDNHF7gblRozdiO49g1zqDOEzmKJ7gcGVQTzmLDSgZ1Eunh2dD9aewpsXtctH3cwzn5ALysoVWlXZvhleMV5ovfU8J363mciAliRLsRg0Q244vfT3A/zgT2cQHbImIY1S4ldPk9Ii+NH8V9H08DfbfiY6BtiHYpoYmMBr4bbwN9YzfVoEELnew9+blpwBv5u0oI9wPtQrUbkWFaXqOzsZ01IFg7pLQOyp/A58igmhCsHZJInYndNsHa/0wiVWTy9/a5NjprQGvag0Qmwd462iGltdQ8lihqlVVIIn/9/CAvrajDWgTRB8VhMt1/aSljVr4RToc6hJTWioe1jujJD4rfQx2qRvuTyX1JuTIh3UQikUgkEhPnF+1xZ9hHnLjAAAAAAElFTkSuQmCC');
}

.center-on-screen {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-on-screen > * {
    pointer-events: auto;
}

#qsp-image-container {
    display: none;
}

/* misc */

.disable a {
  pointer-events: none;
  cursor: default;
}

.qsp-objs li.qsp-obj-selected {
    background-color: blue;
}
</style><script>qsp_data = { qsp_vars : {  },
          qsp_objs : {  },
          qsp_currentLocation : null,
          qsp_startedAt : Date.now(),
          qsp_timerInterval : 500,
          qsp_timerObj : null,
          qsp_loadedGames : [],
          qsp_acts : {  },
          qsp_stateStash : {  },
          qsp_playing : {  },
          qsp_locals : [],
          qsp_games : [],
          qsp_mainGame : null,
          qsp_locs : {  }
        };
window.onload = function () {
    qsp_api_initDom();
    qsp_data.qsp_startedAt = Date.now();
    qsp_api_setTimer(qsp_data.qsp_timerInterval);
    qsp_api_runGame(Object.keys(qsp_data.qsp_games)[0]);
    __PS_MV_REG = [];
    return;
};

function qsp_api_makeActHtml(qsp_api_title, qsp_api_img) {
    return '<a class=\'qsp-act\' href=\'' + ('javascript:' + ('qsp_api_callAct' + '(\"' + qsp_api_title + '\");')) + '\' onmouseover=\'' + ('qsp_api_selectAct' + '(\"' + qsp_api_title + '\");') + '\'>' + (qsp_api_img ? '<img src=\'' + qsp_api_img + '\'>' : '') + qsp_api_title + '</a>';
};
function qsp_api_makeMenuItemHtml(qsp_api_num, qsp_api_title, qsp_api_img, qsp_api_loc) {
    return '<a href=\'' + ('javascript:' + ('qsp_api_finishMenu' + '(\"' + qsp_api_loc + '\");')) + '\'>' + (qsp_api_img ? '<img src=\'' + qsp_api_img + '\'>' : '') + qsp_api_title + '</a>';
};
function qsp_api_makeObj(qsp_api_title, qsp_api_img, qsp_api_selected) {
    return '<li onclick=\'' + ('qsp_api_selectObj' + '(\"' + qsp_api_title + '\", \"' + qsp_api_img + '\");') + '\'>' + '<a class=\'qsp-obj' + (qsp_api_selected ? ' qsp-obj-selected' : '') + '\'>' + (qsp_api_img ? '<img src=\'' + qsp_api_img + '\'>' : '') + qsp_api_title + '</a>';
};
function qsp_api_makeMenuDelimiter() {
    return '<hr>';
};
function qsp_api_reportError(qsp_api_text) {
    __PS_MV_REG = [];
    return alert(qsp_api_text);
};
function qsp_api_startSleeping() {
    return document.getElementById('qsp').classList.add('disable');
};
function qsp_api_finishSleeping() {
    return document.getElementById('qsp').classList.remove('disable');
};
function sleep(qsp_api_msec) {
    __PS_MV_REG = [];
    return new Promise(function (qsp_api_resolve) {
        qsp_api_startSleeping();
        var qsp_api_resume = function () {
            qsp_api_finishSleeping();
            __PS_MV_REG = [];
            return qsp_api_resolve();
        };
        __PS_MV_REG = [];
        return setTimeout(qsp_api_resume, qsp_api_msec);
    });
};
function qsp_api_initDom() {
    var qsp_api_btn = document.getElementById('qsp-btn-save');
    qsp_api_btn.onclick = qsp_api_savegame;
    qsp_api_btn.href = '#';
    var btn1433 = document.getElementById('qsp-btn-open');
    btn1433.onclick = qsp_api_opengame;
    btn1433.href = '#';
    document.getElementById('qsp-image-container').onclick = qsp_api_showImage;
    qsp_api_getFrame('input').qsp_api_onkeyup = qsp_api_onInputKey;
    __PS_MV_REG = [];
    return window.onclick = function (qsp_api_event) {
        window.qsp_api_mouse = [qsp_api_event.pageX, qsp_api_event.pageY];
        __PS_MV_REG = [];
        return qsp_api_finishMenu(null);
    };
};
function qsp_api_callServLoc(qsp_api_varName) {
    var qsp_api_args = Array.prototype.slice.call(arguments, 1);
    var qsp_api_locName = qsp_api_getGlobal(qsp_api_varName, 0);
    if (qsp_api_locName) {
        var qsp_api_loc = qsp_data.qsp_locs[qsp_api_locName];
        __PS_MV_REG = [];
        return qsp_api_loc ? qsp_api_callLoc(qsp_api_locName, qsp_api_args) : null;
    };
};
function qsp_api_filenameGame(qsp_api_filename) {
    var qsp_api_gameName = qsp_api_filename.match('(.*/)?([^.]+)(\\.[a-zA-Z]+)?')[2];
    return qsp_data.qsp_games[qsp_api_gameName];
};
function qsp_api_runGame(qsp_api_name) {
    var qsp_api_game = qsp_api_filenameGame(qsp_api_name);
    qsp_data.qsp_api_mainGame = qsp_api_name;
    qsp_data.qsp_locs = qsp_api_game;
    __PS_MV_REG = [];
    return qsp_api_game[Object.keys(qsp_api_game)[0]]([]);
};
function qsp_api_newline(qsp_api_key) {
    __PS_MV_REG = [];
    return qsp_api_appendId(qsp_api_keyToId(qsp_api_key), '<br>', true);
};
function qsp_api_clearId(qsp_api_id) {
    return document.getElementById(qsp_api_id).innerHTML = '';
};
function qsp_api_escapeHtml(qsp_api_text) {
    return qsp_api_text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;');
};
function qsp_api_prepareContents(qsp_api_s, qsp_api_forceHtml) {
    qsp_api_s = qsp_api_s.toString();
    __PS_MV_REG = [];
    return qsp_api_forceHtml || qsp_api_getGlobal('USEHTML', 0) ? qsp_api_s : qsp_api_escapeHtml(qsp_api_s);
};
function qsp_api_getId(qsp_api_id, qsp_api_forceHtml) {
    return document.getElementById(qsp_api_id).innerHTML;
};
function qsp_api_setId(qsp_api_id, qsp_api_contents, qsp_api_forceHtml) {
    __PS_MV_REG = [];
    return document.getElementById(qsp_api_id).innerHTML = qsp_api_prepareContents(qsp_api_contents, qsp_api_forceHtml);
};
function qsp_api_appendId(qsp_api_id, qsp_api_contents, qsp_api_forceHtml) {
    __PS_MV_REG = [];
    return qsp_api_contents ? (document.getElementById(qsp_api_id).innerHTML += qsp_api_prepareContents(qsp_api_contents, qsp_api_forceHtml)) : null;
};
function qsp_api_onInputKey(qsp_api_ev) {
    if (13 === qsp_api_ev.qsp_api_keyCode) {
        qsp_api_ev.qsp_api_preventDefault();
        __PS_MV_REG = [];
        return qsp_api_callServLoc('$USERCOM');
    };
};
function qsp_api_initArgs(qsp_api_args) {
    for (var qsp_api_i = 0; qsp_api_i < qsp_api_args.length; qsp_api_i += 1) {
        var qsp_api_arg = qsp_api_args[qsp_api_i];
        if (typeof qsp_api_arg === 'number') {
            qsp_api_setVar(qsp_api_args, qsp_api_i, 'num', qsp_api_arg);
        } else {
            qsp_api_setVar(qsp_api_args, qsp_api_i, 'str', qsp_api_arg);
        };
    };
};
function qsp_api_getResult() {
    __PS_MV_REG = [];
    return qsp_api_getGlobal('$RESULT', 0) || qsp_api_getGlobal('RESULT', 0);
};
function qsp_api_callLoc(qsp_api_name, qsp_api_args) {
    qsp_api_name = qsp_api_name.toUpperCase();
    qsp_api_pushLocalFrame();
    try {
        qsp_api_initArgs(qsp_api_args);
        qsp_data.qsp_locs[qsp_api_name]();
        __PS_MV_REG = [];
        return qsp_api_getResult();
    } finally {
        qsp_api_popLocalFrame();
    };
};
function qsp_api_callAct(qsp_api_title) {
    qsp_api_pushLocalFrame();
    try {
        __PS_MV_REG = [];
        return qsp_data.qsp_acts[qsp_api_title]['act']();
    } finally {
        qsp_api_popLocalFrame();
    };
};
function qsp_api_keyToId(qsp_api_key) {
    switch (qsp_api_key) {
    case 'all':
        return 'qsp';
    case 'main':
        return 'qsp-main';
    case 'stat':
        return 'qsp-stat';
    case 'objs':
        return 'qsp-objs';
    case 'acts':
        return 'qsp-acts';
    case 'input':
        return 'qsp-input';
    case 'image':
        return 'qsp-image';
    case 'dropdown':
        return 'qsp-dropdown';
    default:
        __PS_MV_REG = [];
        return qsp_api_reportError('Internal error!');
    };
};
function qsp_api_getFrame(qsp_api_key) {
    __PS_MV_REG = [];
    return document.getElementById(qsp_api_keyToId(qsp_api_key));
};
function qsp_api_addText(qsp_api_key, qsp_api_text) {
    __PS_MV_REG = [];
    return qsp_api_appendId(qsp_api_keyToId(qsp_api_key), qsp_api_text);
};
function qsp_api_getText(qsp_api_key) {
    __PS_MV_REG = [];
    return qsp_api_getId(qsp_api_keyToId(qsp_api_key));
};
function qsp_api_clearText(qsp_api_key) {
    __PS_MV_REG = [];
    return qsp_api_clearId(qsp_api_keyToId(qsp_api_key));
};
function qsp_api_enableFrame(qsp_api_key, qsp_api_enable) {
    var qsp_api_obj = qsp_api_getFrame(qsp_api_key);
    qsp_api_obj.style.display = qsp_api_enable ? 'block' : 'none';
};
function qsp_api_addAct(qsp_api_title, qsp_api_img, qsp_api_act) {
    qsp_data.qsp_acts[qsp_api_title] = { 'title' : qsp_api_title,
                                      'img' : qsp_api_img,
                                      'act' : qsp_api_act,
                                      'selected' : null
                                    };
    __PS_MV_REG = [];
    return qsp_api_updateActs();
};
function qsp_api_delAct(qsp_api_title) {
    delete qsp_data.qsp_acts[qsp_api_title];
    __PS_MV_REG = [];
    return qsp_api_updateActs();
};
function qsp_api_clearAct() {
    qsp_data.qsp_acts = {  };
    __PS_MV_REG = [];
    return qsp_api_updateActs();
};
function qsp_api_updateActs() {
    qsp_api_clearId('qsp-acts');
    var elt = document.getElementById('qsp-acts');
    for (var qsp_api_title in qsp_data.qsp_acts) {
        var qsp_api_obj = qsp_data.qsp_acts[qsp_api_title];
        elt.innerHTML += qsp_api_makeActHtml(qsp_api_title, qsp_api_obj['img']);
    };
};
function qsp_api_selectAct(qsp_api_title) {
    var _js1434 = qsp_data.qsp_acts;
    for (var qsp_api_k in _js1434) {
        var qsp_api_v = _js1434[qsp_api_k];
        qsp_api_v['selected'] = null;
    };
    qsp_data.qsp_acts[qsp_api_title]['selected'] = true;
    __PS_MV_REG = [];
    return qsp_api_callServLoc('$ONACTSEL');
};
function qsp_api_qspfor(qsp_api_name, qsp_api_index, qsp_api_from, qsp_api_to, step, body) {
    for (var qsp_api_i = qsp_api_from; qsp_api_i < qsp_api_to; qsp_api_i += step) {
        qsp_api_setVar(qsp_api_name, qsp_api_index, 'num', qsp_api_i);
        if (!await (body())) {
            __PS_MV_REG = [];
            return;
        };
    };
};
function qsp_api_newVar(qsp_api_index) {
    var qsp_api_v = [];
    if (qsp_api_index) {
        qsp_api_v[qsp_api_index] = '$' === qsp_api_slot[0] ? '' : 0;
    };
    qsp_api_v.qsp_api_indexes = {  };
    return qsp_api_v;
};
function qsp_api_setStrElement(qsp_api_slot, qsp_api_index, qsp_api_value) {
    if (qsp_api_slot['indexes'].hasOwnProperty(qsp_api_index)) {
        return qsp_api_slot[null][qsp_api_slot['indexes'][qsp_api_index]] = qsp_api_value;
    } else {
        qsp_api_slot.push(qsp_api_value);
        return qsp_api_slot[qsp_api_index] = qsp_api_slot.length;
    };
};
function qsp_api_setAnyElement(qsp_api_slot, qsp_api_index, qsp_api_value) {
    __PS_MV_REG = [];
    return typeof qsp_api_index === 'number' ? (qsp_api_slot[qsp_api_index] = qsp_api_value) : qsp_api_setStrElement(qsp_api_slot, qsp_api_index, qsp_api_value);
};
function qsp_api_getElement(qsp_api_slot, qsp_api_index) {
    return typeof qsp_api_index === 'number' ? qsp_api_slot[qsp_api_index] : qsp_api_slot[qsp_api_slot['indexes'][qsp_api_index]];
};
function qsp_api_getGlobal(qsp_api_name, qsp_api_index) {
    return qsp_data.qsp_vars[qsp_api_name][qsp_api_index];
};
function qsp_api_killVar(qsp_api_store, qsp_api_name, qsp_api_index) {
    qsp_api_name = qsp_api_name.toUpperCase();
    if (qsp_api_index && 0 !== qsp_api_index) {
        qsp_data.qsp_vars[qsp_api_name].qsp_api_kill(qsp_api_index);
    } else {
        delete qsp_data.qsp_vars[qsp_api_name];
    };
};
function qsp_api_arraySize(qsp_api_name) {
    __PS_MV_REG = [];
    return qsp_api_varRef(qsp_api_name)['values'].length;
};
function qsp_api_pushLocalFrame() {
    qsp_data.qsp_locals.push({  });
};
function qsp_api_popLocalFrame() {
    qsp_data.qsp_locals.pop();
};
function qsp_api_currentLocalFrame() {
    return qsp_data.qsp_locals[qsp_data.qsp_locals.length - 1];
};
function qsp_api_selectObj(qsp_api_title, qsp_api_img) {
    var _js1435 = qsp_data.qsp_objs;
    for (var qsp_api_k in _js1435) {
        var qsp_api_v = _js1435[qsp_api_k];
        qsp_api_v['selected'] = null;
    };
    qsp_data.qsp_objs[qsp_api_title]['selected'] = true;
    __PS_MV_REG = [];
    return qsp_api_callServLoc('$ONOBJSEL', qsp_api_title, qsp_api_img);
};
function qsp_api_updateObjs() {
    var elt = document.getElementById('qsp-objs');
    elt.innerHTML = '<ul>';
    var _js1436 = qsp_data.qsp_objs;
    for (var qsp_api_name in _js1436) {
        var qsp_api_obj = _js1436[qsp_api_name];
        elt.innerHTML += qsp_api_makeObj(qsp_api_name, qsp_api_obj['img'], qsp_api_obj['selected']);
    };
    __PS_MV_REG = [];
    return elt.innerHTML += '</ul>';
};
function qsp_api_openMenu(qsp_api_menuData) {
    var elt = qsp_api_getFrame('dropdown');
    var qsp_api_i = 0;
    var _js1438 = qsp_api_menuData.length;
    for (var _js1437 = 0; _js1437 < _js1438; _js1437 += 1) {
        var qsp_api_item = qsp_api_menuData[_js1437];
        ++qsp_api_i;
        elt.innerHTML += qsp_api_item === 'delimiter' ? qsp_api_makeMenuDelimiter(qsp_api_i) : qsp_api_makeMenuItemHtml(qsp_api_i, qsp_api_item['text'], qsp_api_item['icon'], qsp_api_item['loc']);
    };
    var mouse1439 = window.qsp_api_mouse;
    elt.style.left = mouse1439[0] + 'px';
    elt.style.top = mouse1439[1] + 'px';
    if (document.body.qsp_api_innerWidth > mouse1439[0] + elt.qsp_api_innerWidth) {
        elt.style.left += elt.qsp_api_innerWidth;
    };
    if (document.body.qsp_api_innerHeight > mouse1439[0] + elt.qsp_api_innerHeight) {
        elt.style.top += elt.qsp_api_innerHeight;
    };
    __PS_MV_REG = [];
    return elt.style.display = 'block';
};
function qsp_api_finishMenu(qsp_api_loc) {
    if (qsp_data.qsp_api_menuResume) {
        var elt = qsp_api_getFrame('dropdown');
        elt.innerHTML = '';
        elt.style.display = 'none';
        qsp_data.qsp_api_menuResume();
        qsp_data.qsp_api_menuResume = null;
        if (qsp_api_loc) {
            qsp_api_callLoc(qsp_api_loc);
        };
    };
};
function qsp_api_menu(qsp_api_menuData) {
    new Promise(function (qsp_api_resolve) {
        qsp_api_startSleeping();
        var qsp_api_resume = function () {
            qsp_api_finishSleeping();
            __PS_MV_REG = [];
            return qsp_api_resolve();
        };
        qsp_api_openMenu(qsp_api_menuData);
        __PS_MV_REG = [];
        return qsp_data.qsp_api_menuResume = qsp_api_resume;
    });
};
function qsp_api_cleanAudio() {
    var _js1440 = Object.keys(qsp_data.qsp_playing);
    var _js1442 = _js1440.length;
    for (var _js1441 = 0; _js1441 < _js1442; _js1441 += 1) {
        var qsp_api_k = _js1440[_js1441];
        var qsp_api_v = qsp_data.qsp_playing[qsp_api_k];
        if (qsp_api_v.qsp_api_ended) {
            delete qsp_data.qsp_playing.qsp_api_k;
        };
    };
};
function qsp_api_showImage(qsp_api_path) {
    var qsp_api_img = qsp_api_getFrame('image');
    if (qsp_api_path) {
        qsp_api_img.src = qsp_api_path;
        __PS_MV_REG = [];
        return qsp_api_img.style.display = 'flex';
    } else {
        qsp_api_img.src = '';
        __PS_MV_REG = [];
        return qsp_api_img.style.display = 'hidden';
    };
};
function qsp_api_showInlineImages(qsp_api_frameName, qsp_api_images) {
    var qsp_api_frame = qsp_api_getFrame(qsp_api_frameName);
    var qsp_api_text = '';
    qsp_api_text += '<div style=\'position:relative; display: inline-block\'>';
    qsp_api_text += '<img src=\'' + qsp_api_images[0] + '\'>';
    var _js1443 = qsp_api_images.slice(1);
    var _js1445 = _js1443.length;
    for (var _js1444 = 0; _js1444 < _js1445; _js1444 += 1) {
        var qsp_api_image = _js1443[_js1444];
        qsp_api_text += '<img style=\'position:absolute\' src=\'' + qsp_api_image + '\'>';
    };
    qsp_api_text += '</div>';
    __PS_MV_REG = [];
    return qsp_api_frame.innerHTML += qsp_api_text;
};
function qsp_api_rgbString(qsp_api_rgb) {
    var qsp_api_red = qsp_api_rgb >> 16;
    var qsp_api_green = qsp_api_rgb >> 8 & 255;
    var qsp_api_blue = qsp_api_rgb & 255;
    var qsp_api_rgbToHex = function (qsp_api_comp) {
        var qsp_api_hex = Number(qsp_api_comp).toString(16);
        __PS_MV_REG = [];
        return qsp_api_hex.length < 2 ? '0' + qsp_api_hex : qsp_api_hex;
    };
    __PS_MV_REG = [];
    return '#' + qsp_api_rgbToHex(qsp_api_red) + qsp_api_rgbToHex(qsp_api_green) + qsp_api_rgbToHex(qsp_api_red);
};
function qsp_api_opengame() {
    var qsp_api_element = document.createElement('input');
    qsp_api_element.setAttribute('type', 'file');
    qsp_api_element.setAttribute('id', 'qsp-opengame');
    qsp_api_element.setAttribute('tabindex', -1);
    qsp_api_element.setAttribute('aria-hidden', true);
    qsp_api_element.style.display = 'block';
    qsp_api_element.style.qsp_api_visibility = 'hidden';
    qsp_api_element.style.position = 'fixed';
    qsp_api_element.onchange = function (qsp_api_event) {
        var qsp_api_file = qsp_api_event.target.files[0];
        var qsp_api_reader = new FileReader();
        qsp_api_reader.onload = function (qsp_api_ev) {
            var target = qsp_api_ev.currentTarget;
            if (!target.result) {
                return null;
            };
            qsp_api_base64ToState(target.result);
            __PS_MV_REG = [];
            return qsp_api_unstashState();
        };
        __PS_MV_REG = [];
        return qsp_api_reader.readAsText(qsp_api_file);
    };
    document.body.appendChild(qsp_api_element);
    qsp_api_element.click();
    return document.body.removeChild(qsp_api_element);
};
function qsp_api_savegame() {
    var qsp_api_element = document.createElement('a');
    qsp_api_element.setAttribute('href', 'data:text/plain;charset=utf-8,' + qsp_api_stateToBase64());
    qsp_api_element.setAttribute('download', 'savegame.sav');
    qsp_api_element.style.display = 'none';
    document.body.appendChild(qsp_api_element);
    qsp_api_element.click();
    __PS_MV_REG = [];
    return document.body.removeChild(qsp_api_element);
};
function qsp_api_stashState(qsp_api_args) {
    qsp_api_callServLoc('$ONGSAVE');
    qsp_data.qsp_stateStash = JSON.stringify({ 'vars' : qsp_data.qsp_vars,
                                            'objs' : qsp_data.qsp_objs,
                                            'loc-args' : qsp_api_args,
                                            'msecs' : Date.now() - qsp_data.qsp_startedAt,
                                            'timer-interval' : qsp_data.qsp_timerInterval,
                                            'main-html' : qsp_api_getFrame('main').innerHTML,
                                            'stat-html' : qsp_api_getFrame('stat').innerHTML,
                                            'next-location' : qsp_data.qsp_currentLocation
                                          });
};
function qsp_api_unstashState() {
    var qsp_api_data = JSON.parse(qsp_data.qsp_stateStash);
    qsp_api_clearAct();
    qsp_data.qsp_vars = qsp_api_data['vars'];
    var _js1446 = Object.keys(qsp_data.qsp_vars);
    var _js1448 = _js1446.length;
    for (var _js1447 = 0; _js1447 < _js1448; _js1447 += 1) {
        var qsp_api_k = _js1446[_js1447];
        Object.setPrototypeOf(qsp_data.qsp_vars[qsp_api_k], qsp_api_Var.prototype);
    };
    qsp_data.qsp_startedAt = Date.now() - qsp_api_data['msecs'];
    qsp_data.qsp_objs = qsp_api_data['objs'];
    qsp_data.qsp_currentLocation = qsp_api_data['next-location'];
    qsp_api_getFrame('main').innerHTML = qsp_api_data['main-html'];
    qsp_api_getFrame('stat').innerHTML = qsp_api_data['stat-html'];
    qsp_api_updateObjs();
    qsp_api_setTimer(qsp_api_data['timer-interval']);
    qsp_api_callServLoc('$ONGLOAD');
    qsp_api_callLoc(qsp_data.qsp_currentLocation, qsp_api_data['loc-args']);
};
function qsp_api_stateToBase64() {
    __PS_MV_REG = [];
    return btoa(encodeURIComponent(qsp_data.qsp_stateStash));
};
function qsp_api_base64ToState(qsp_api_data) {
    __PS_MV_REG = [];
    return qsp_data.qsp_stateStash = decodeURIComponent(atob(qsp_api_data));
};
function qsp_api_setTimer(qsp_api_interval) {
    qsp_data.qsp_timerInterval = qsp_api_interval;
    clearInterval(qsp_data.qsp_timerObj);
    __PS_MV_REG = [];
    return qsp_data.qsp_timerObj = setInterval(function () {
        __PS_MV_REG = [];
        return qsp_api_callServLoc('$COUNTER');
    }, qsp_api_interval);
};
if ('undefined' === typeof qsp_api_servVars) {
    var qsp_api_servVars = {  };
};
qsp_api_servVars['BACKIMAGE'] = { 'name' : 'BACKIMAGE',
                               'slot' : 'str',
                               'body' : function (qsp_api_path) {
    __PS_MV_REG = [];
    return qsp_api_getFrame('main').style.qsp_api_backgroundImage = qsp_api_path;
}
                             };
qsp_api_servVars['BCOLOR'] = { 'name' : 'BCOLOR',
                            'slot' : 'num',
                            'body' : function (qsp_api_color) {
    __PS_MV_REG = [];
    return qsp_api_getFrame('all').style.qsp_api_backgroundColor = qsp_api_rgbString(qsp_api_color);
}
                          };
qsp_api_servVars['FCOLOR'] = { 'name' : 'FCOLOR',
                            'slot' : 'num',
                            'body' : function (qsp_api_color) {
    __PS_MV_REG = [];
    return qsp_api_getFrame('all').style.qsp_api_color = qsp_api_rgbString(qsp_api_color);
}
                          };
qsp_api_servVars['LCOLOR'] = { 'name' : 'LCOLOR',
                            'slot' : 'num',
                            'body' : function (qsp_api_color) {
    __PS_MV_REG = [];
    return qsp_api_getFrame('style').qsp_api_innerText = 'a { color: ' + qsp_api_rgbString(qsp_api_color) + ';}';
}
                          };
qsp_api_servVars['FSIZE'] = { 'name' : 'FSIZE',
                           'slot' : 'num',
                           'body' : function (size) {
    __PS_MV_REG = [];
    return qsp_api_getFrame('all').style.qsp_api_fontSize = size;
}
                         };
qsp_api_servVars['FNAME'] = { 'name' : 'FNAME',
                           'slot' : 'str',
                           'body' : function (qsp_api_fontName) {
    __PS_MV_REG = [];
    return qsp_api_getFrame('all').style.qsp_api_fontFamily = qsp_api_fontName + ',serif';
}
                         };

function qsp_lib_goto(target, qsp_lib_args) {
    qsp_api_clearText('main');
    qsp_lib_xgoto(target, qsp_lib_args);
};
function qsp_lib_xgoto(target, qsp_lib_args) {
    qsp_lib_args = qsp_lib_args || [];
    qsp_api_clearAct();
    qsp_data.qsp_currentLocation = target.toUpperCase();
    qsp_api_stashState(qsp_lib_args);
    qsp_api_callLoc(qsp_data.qsp_currentLocation, qsp_lib_args);
    qsp_api_callServLoc('ONNEWLOC');
};
function qsp_lib_rand(qsp_lib_a, qsp_lib_b) {
    if (qsp_lib_b === undefined) {
        qsp_lib_b = 1;
    };
    var min1449 = Math.min(qsp_lib_a, qsp_lib_b);
    var max1450 = Math.max(qsp_lib_a, qsp_lib_b);
    __PS_MV_REG = [];
    return min1449 + qsp_lib_Math.random(max1450 - min1449);
};
function qsp_lib_copyarr(qsp_lib_to, qsp_lib_from, qsp_lib_start, count) {
    __PS_MV_REG = [];
    var qsp_lib_toName = qsp_api_varRealName(qsp_lib_to);
    var qsp_lib_toSlot = __PS_MV_REG[0];
    __PS_MV_REG = [];
    var qsp_lib_fromName = qsp_api_varRealName(qsp_lib_from);
    var qsp_lib_fromSlot = __PS_MV_REG[0];
    for (var qsp_lib_i = qsp_lib_start; qsp_lib_i < Math.min(qsp_api_arraySize(qsp_lib_fromName), qsp_lib_start + count); ++qsp_lib_i) {
        qsp_api_setVar(qsp_lib_toName, qsp_lib_start + qsp_lib_i, qsp_lib_toSlot, qsp_api_getVar(qsp_lib_fromName, qsp_lib_start + qsp_lib_i, qsp_lib_fromSlot));
    };
};
function qsp_lib_arrpos(qsp_lib_name, qsp_lib_value, qsp_lib_start) {
    if (qsp_lib_start === undefined) {
        qsp_lib_start = 0;
    };
    __PS_MV_REG = [];
    var qsp_lib_realName = qsp_api_varRealName(qsp_lib_name);
    var qsp_lib_slot = __PS_MV_REG[0];
    for (var qsp_lib_i = qsp_lib_start; qsp_lib_i < qsp_api_arraySize(qsp_lib_name); ++qsp_lib_i) {
        if (qsp_api_getVar(qsp_lib_realName, qsp_lib_i, qsp_lib_slot) === qsp_lib_value) {
            __PS_MV_REG = [];
            return qsp_lib_i;
        };
    };
    __PS_MV_REG = [];
    return -1;
};
function qsp_lib_arrcomp(qsp_lib_name, qsp_lib_pattern, qsp_lib_start) {
    if (qsp_lib_start === undefined) {
        qsp_lib_start = 0;
    };
    __PS_MV_REG = [];
    var qsp_lib_realName = qsp_api_varRealName(qsp_lib_name);
    var qsp_lib_slot = __PS_MV_REG[0];
    for (var qsp_lib_i = qsp_lib_start; qsp_lib_i < qsp_api_arraySize(qsp_lib_name); ++qsp_lib_i) {
        if (qsp_api_getVar(qsp_lib_realName, qsp_lib_i, qsp_lib_slot).match(qsp_lib_pattern)) {
            __PS_MV_REG = [];
            return qsp_lib_i;
        };
    };
    __PS_MV_REG = [];
    return -1;
};
function qsp_lib_instr(qsp_lib_s, qsp_lib_subs, qsp_lib_start) {
    if (qsp_lib_start === undefined) {
        qsp_lib_start = 1;
    };
    return qsp_lib_start + qsp_lib_s.qsp_lib_substring(qsp_lib_start - 1).search(qsp_lib_subs);
};
function qsp_lib_isnum(qsp_lib_s) {
    __PS_MV_REG = [];
    return qsp_lib_isNaN(qsp_lib_s) ? 0 : -1;
};
function qsp_lib_strcomp(qsp_lib_s, qsp_lib_pattern) {
    return qsp_lib_s.match(qsp_lib_pattern) ? -1 : 0;
};
function qsp_lib_strfind(qsp_lib_s, qsp_lib_pattern, qsp_lib_group) {
    var qsp_lib_re = new qsp_lib_RegExp(qsp_lib_pattern);
    var match = qsp_lib_re.qsp_lib_exec(qsp_lib_s);
    __PS_MV_REG = [];
    return match.qsp_lib_group(qsp_lib_group);
};
function qsp_lib_strpos(qsp_lib_s, qsp_lib_pattern, qsp_lib_group) {
    if (qsp_lib_group === undefined) {
        qsp_lib_group = 0;
    };
    var qsp_lib_re = new qsp_lib_RegExp(qsp_lib_pattern);
    var match = qsp_lib_re.qsp_lib_exec(qsp_lib_s);
    var qsp_lib_found = match.qsp_lib_group(qsp_lib_group);
    __PS_MV_REG = [];
    return qsp_lib_found ? qsp_lib_s.search(qsp_lib_found) : 0;
};
function qsp_lib_iif(qsp_lib_condExpr, qsp_lib_thenExpr, qsp_lib_elseExpr) {
    return qsp_lib_condExpr ? qsp_lib_thenExpr : qsp_lib_elseExpr;
};
function qsp_lib_gosub(target) {
    var qsp_lib_args = Array.prototype.slice.call(arguments, 1);
    qsp_api_callLoc(target, qsp_lib_args);
};
function qsp_lib_func(target) {
    var qsp_lib_args = Array.prototype.slice.call(arguments, 1);
    __PS_MV_REG = [];
    return qsp_api_callLoc(target, qsp_lib_args);
};
function qsp_lib_dynamic(block) {
    var qsp_lib_args = Array.prototype.slice.call(arguments, 1);
    if (typeof block === 'string') {
        qsp_api_reportError('DYNAMIC can\'t evaluate arbitrary strings.\\nUse {braces} to create blocks for DYNAMIC.');
    };
    qsp_api_initArgs(qsp_lib_args);
    block(qsp_lib_args);
    qsp_api_getResult();
};
function qsp_lib_dyneval(block) {
    var qsp_lib_args = Array.prototype.slice.call(arguments, 1);
    if (typeof block === 'string') {
        qsp_api_reportError('DYNEVAL can\'t evaluate arbitrary strings.\\nUse {braces} to create blocks for DYNEVAL.');
    };
    qsp_api_initArgs(qsp_lib_args);
    block(qsp_lib_args);
    __PS_MV_REG = [];
    return qsp_api_getResult();
};
function qsp_lib_mainP(qsp_lib_s) {
    qsp_api_addText('main', qsp_lib_s);
};
function qsp_lib_mainPl(qsp_lib_s) {
    qsp_api_addText('main', qsp_lib_s);
    qsp_api_newline('main');
};
function qsp_lib_mainNl(qsp_lib_s) {
    qsp_api_newline('main');
    qsp_api_addText('main', qsp_lib_s);
};
function qsp_lib_maintxt(qsp_lib_s) {
    qsp_api_getText('main');
};
function qsp_lib_desc(qsp_lib_s) {
    return '';
};
function qsp_lib_mainClear() {
    qsp_api_clearText('main');
};
function qsp_lib_statP(qsp_lib_s) {
    qsp_api_addText('stat', qsp_lib_s);
};
function qsp_lib_statPl(qsp_lib_s) {
    qsp_api_addText('stat', qsp_lib_s);
    qsp_api_newline('stat');
};
function qsp_lib_statNl(qsp_lib_s) {
    qsp_api_newline('stat');
    qsp_api_addText('stat', qsp_lib_s);
};
function qsp_lib_stattxt(qsp_lib_s) {
    qsp_api_getText('stat');
};
function qsp_lib_statClear() {
    qsp_api_clearText('stat');
};
function qsp_lib_cls() {
    qsp_lib_statClear();
    qsp_lib_mainClear();
    qsp_lib_cla();
    qsp_lib_cmdclear();
};
function qsp_lib_curacts() {
    var acts1451 = qsp_data.qsp_acts;
    return function () {
        qsp_data.qsp_acts = acts1451;
    };
};
function qsp_lib_addobj(qsp_lib_name, qsp_lib_img) {
    qsp_lib_img = qsp_lib_img || '';
    qsp_data.qsp_objs[qsp_lib_name] = { 'name' : qsp_lib_name,
                                     'img' : qsp_lib_img,
                                     'selected' : null
                                   };
    qsp_api_updateObjs();
    qsp_api_callServLoc('ONOBJADD', qsp_lib_name, qsp_lib_img);
};
function qsp_lib_delobj(qsp_lib_name) {
    delete qsp_data.qsp_objs[qsp_lib_name];
    qsp_api_callServLoc('ONOBJDEL', qsp_lib_name);
};
function qsp_lib_killobj(qsp_lib_num) {
    if (null === qsp_lib_num) {
        qsp_data.qsp_objs = {  };
    } else {
        qsp_lib_delobj(Object.keys(qsp_data.qsp_objs)[qsp_lib_num]);
    };
    qsp_api_updateObjs();
};
function qsp_lib_selobj() {
    var _js1452 = qsp_data.qsp_objs;
    for (var qsp_lib_k in _js1452) {
        var qsp_lib_v = _js1452[qsp_lib_k];
        if (qsp_lib_v['selected']) {
            return qsp_lib_v['name'];
        };
    };
};
function qsp_lib_menu(qsp_lib_menuName) {
    var qsp_lib_menuData = [];
    var _js1453 = qsp_api_getArray(qsp_api_varRealName(qsp_lib_menuName)).values;
    var _js1455 = _js1453.length;
    for (var _js1454 = 0; _js1454 < _js1455; _js1454 += 1) {
        var qsp_lib_itemObj = _js1453[_js1454];
        var qsp_lib_item = qsp_lib_itemObj['str'];
        if (qsp_lib_item === '') {
            break;
        } else if (qsp_lib_item === '-:-') {
            qsp_lib_menuData.push('delimiter');
        } else {
            var qsp_lib_tokens = qsp_lib_item.split(':');
            if (qsp_lib_tokens.length === 2) {
                qsp_lib_tokens.push('');
            };
            var qsp_lib_text = qsp_lib_tokens.splice(0, qsp_lib_tokens.length - 2).join(':');
            var qsp_lib_loc = qsp_lib_tokens[qsp_lib_tokens.length - 2];
            var qsp_lib_icon = qsp_lib_tokens[qsp_lib_tokens.length - 1];
            qsp_lib_menuData.push({ 'text' : qsp_lib_text,
                                    'loc' : qsp_lib_loc,
                                    'icon' : qsp_lib_icon
                                  });
        };
    };
    qsp_api_menu(qsp_lib_menuData);
};
function qsp_lib_play(qsp_lib_filename, qsp_lib_volume) {
    if (qsp_lib_volume === undefined) {
        qsp_lib_volume = 100;
    };
    var qsp_lib_audio = new qsp_lib_Audio(qsp_lib_filename);
    qsp_data.qsp_playing[qsp_lib_filename] = qsp_lib_audio;
    qsp_lib_audio.qsp_lib_volume = qsp_lib_volume * 0.01;
    __PS_MV_REG = [];
    return qsp_lib_audio.qsp_lib_play();
};
function close(qsp_lib_filename) {
    qsp_data.qsp_playing.qsp_lib_filename(qsp_lib_stop);
    delete qsp_data.qsp_playing.qsp_lib_filename;
};
function qsp_lib_closeall() {
    var _js1456 = Object.keys(qsp_data.qsp_playing);
    var _js1458 = _js1456.length;
    for (var _js1457 = 0; _js1457 < _js1458; _js1457 += 1) {
        var qsp_lib_k = _js1456[_js1457];
        var qsp_lib_v = qsp_data.qsp_playing[qsp_lib_k];
        qsp_lib_v(qsp_lib_stop);
    };
    return qsp_data.qsp_playing = {  };
};
function qsp_lib_refint() {
    return null;
};
function qsp_lib_usertxt() {
    var qsp_lib_input = document.getElementById('qsp-input');
    return qsp_lib_input.qsp_lib_value;
};
function qsp_lib_cmdclear() {
    var qsp_lib_input = document.getElementById('qsp-input');
    return qsp_lib_input.qsp_lib_value = '';
};
function qsp_lib_input(qsp_lib_text) {
    return window.prompt(qsp_lib_text);
};
function qsp_lib_msecscount() {
    return Date.now() - qsp_data.qsp_startedAt;
};
function qsp_lib_rgb(qsp_lib_red, qsp_lib_green, qsp_lib_blue) {
    return (qsp_lib_red << 16) + (qsp_lib_green << 8) + qsp_lib_blue;
};
function qsp_lib_openqst(qsp_lib_name) {
    __PS_MV_REG = [];
    return qsp_api_runGame(qsp_lib_name);
};
function qsp_lib_addqst(qsp_lib_name) {
    var qsp_lib_game = qsp_api_filenameGame(qsp_lib_name);
    __PS_MV_REG = [];
    return Object.assign(qsp_data.qsp_locs, qsp_data.qsp_games[qsp_lib_name]);
};
function qsp_lib_killqst() {
    var _js1459 = qsp_data.qsp_games;
    var _js1461 = _js1459.length;
    for (var _js1460 = 0; _js1460 < _js1461; _js1460 += 1) {
        var _db1462 = _js1459[_js1460];
        var qsp_lib_k = _db1462[0];
        var qsp_lib_v = _db1462[1];
        if (qsp_lib_k !== qsp_data.qsp_lib_mainGame) {
            delete qsp_data.qsp_locs[qsp_lib_k];
        };
    };
};

qsp_data.qsp_games['bench'] = {  };
Object.assign(qsp_data.qsp_vars, { 'LOOPTIME' : qsp_api_newVar(0),
                                   'START_TIME' : qsp_api_newVar(0),
                                   'I' : qsp_api_newVar(0),
                                   'USEHTML' : qsp_api_newVar(0),
                                   'RESULT' : qsp_api_newVar(0),
                                   '$RESULT' : qsp_api_newVar(''),
                                   '$ONGLOAD' : qsp_api_newVar(''),
                                   '$ONGSAVE' : qsp_api_newVar(''),
                                   '$ONOBJADD' : qsp_api_newVar(''),
                                   '$ONOBJDEL' : qsp_api_newVar(''),
                                   '$ONOBJSEL' : qsp_api_newVar(''),
                                   '$ONNEWLOC' : qsp_api_newVar(''),
                                   '$ONACTSEL' : qsp_api_newVar(''),
                                   '$COUNTER' : qsp_api_newVar(''),
                                   '$USERCOM' : qsp_api_newVar('')
                                 });
qsp_data.qsp_games['bench']['START'] = async function (qsp_lib_args) {
    qsp_api_addAct('Протестировать цикл на метках', '', async function (qsp_lib_args) {
        qsp_lib_gosub('test_jump');
    });
    qsp_api_addAct('Протестировать цикл for', '', async function (qsp_lib_args) {
        qsp_lib_gosub('test_for');
    });
};
qsp_data.qsp_games['bench']['TEST_JUMP'] = async function (qsp_lib_args) {
    var qsp_lib__labels = [];
    var qsp_locals = { 'LOOPTIME' : qsp_api_newVar(), 'START_TIME' : qsp_api_newVar() };
    qsp_lib__labels['_nil'] = async function () {
        qsp_lib_mainNl();
        qsp_data.qsp_vars['I'][0] = 0;
        qsp_locals['START_TIME'][0] = qsp_lib_msecscount();
        __PS_MV_REG = [];
        return 'LOOP';
    };
    qsp_lib__labels['LOOP'] = async function () {
        if (qsp_data.qsp_vars['I'][0] < 10000000) {
            qsp_data.qsp_vars['I'][0] += 1;
            if ((qsp_data.qsp_vars['I'][0] % 100000 + 100000) % 100000 === 0) {
                qsp_lib_mainP('.');
            };
            __PS_MV_REG = [];
            return 'LOOP';
        };
        qsp_locals['LOOPTIME'][0] = qsp_lib_msecscount() - qsp_locals['START_TIME'][0];
        qsp_lib_mainNl(''.concat('JUMP: Выполнено за ', qsp_locals['LOOPTIME'][0], ' миллисекунд'));
    };
    for (var qsp_lib__nextblock = '_nil'; qsp_lib__nextblock; qsp_lib__nextblock = await (qsp_lib__labels[qsp_lib__nextblock]())) {
    };
};
qsp_data.qsp_games['bench']['TEST_FOR'] = async function (qsp_lib_args) {
    var qsp_locals = { 'LOOPTIME' : qsp_api_newVar(), 'START_TIME' : qsp_api_newVar() };
    qsp_lib_mainNl();
    qsp_locals['START_TIME'][0] = qsp_lib_msecscount();
    qsp_api_qspfor('I', 0, 0, 10000000, 1, async function () {
        if ((qsp_data.qsp_vars['I'][0] % 100000 + 100000) % 100000 === 0) {
            qsp_lib_mainP('.');
        };
        __PS_MV_REG = [];
        return true;
    });
    qsp_locals['LOOPTIME'][0] = qsp_lib_msecscount() - qsp_locals['START_TIME'][0];
    qsp_lib_mainNl(''.concat('FOR: Выполнено за ', qsp_locals['LOOPTIME'][0], ' миллисекунд'));
};</script></body></html>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console