miniprogram-simulate
Version:
tools for miniprogram custom component unit test
444 lines (386 loc) • 1.88 MB
JavaScript
window["simulate"] =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 60);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(100);
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(98);
/***/ }),
/* 2 */
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || new Function("return this")();
} catch (e) {
// This works if the window reference is available
if (typeof window === "object") g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/* 3 */
/***/ (function(module, exports) {
// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
// backported and transplited with Babel, with backwards-compat fixes
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// resolves . and .. elements in a path array with directory names there
// must be no slashes, empty elements, or device names (c:\) in the array
// (so also no leading and trailing slashes - it does not distinguish
// relative and absolute paths)
function normalizeArray(parts, allowAboveRoot) {
// if the path tries to go above the root, `up` ends up > 0
var up = 0;
for (var i = parts.length - 1; i >= 0; i--) {
var last = parts[i];
if (last === '.') {
parts.splice(i, 1);
} else if (last === '..') {
parts.splice(i, 1);
up++;
} else if (up) {
parts.splice(i, 1);
up--;
}
}
// if the path is allowed to go above the root, restore leading ..s
if (allowAboveRoot) {
for (; up--; up) {
parts.unshift('..');
}
}
return parts;
}
// path.resolve([from ...], to)
// posix version
exports.resolve = function() {
var resolvedPath = '',
resolvedAbsolute = false;
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
var path = (i >= 0) ? arguments[i] : process.cwd();
// Skip empty and invalid entries
if (typeof path !== 'string') {
throw new TypeError('Arguments to path.resolve must be strings');
} else if (!path) {
continue;
}
resolvedPath = path + '/' + resolvedPath;
resolvedAbsolute = path.charAt(0) === '/';
}
// At this point the path should be resolved to a full absolute path, but
// handle relative paths to be safe (might happen when process.cwd() fails)
// Normalize the path
resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
return !!p;
}), !resolvedAbsolute).join('/');
return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
};
// path.normalize(path)
// posix version
exports.normalize = function(path) {
var isAbsolute = exports.isAbsolute(path),
trailingSlash = substr(path, -1) === '/';
// Normalize the path
path = normalizeArray(filter(path.split('/'), function(p) {
return !!p;
}), !isAbsolute).join('/');
if (!path && !isAbsolute) {
path = '.';
}
if (path && trailingSlash) {
path += '/';
}
return (isAbsolute ? '/' : '') + path;
};
// posix version
exports.isAbsolute = function(path) {
return path.charAt(0) === '/';
};
// posix version
exports.join = function() {
var paths = Array.prototype.slice.call(arguments, 0);
return exports.normalize(filter(paths, function(p, index) {
if (typeof p !== 'string') {
throw new TypeError('Arguments to path.join must be strings');
}
return p;
}).join('/'));
};
// path.relative(from, to)
// posix version
exports.relative = function(from, to) {
from = exports.resolve(from).substr(1);
to = exports.resolve(to).substr(1);
function trim(arr) {
var start = 0;
for (; start < arr.length; start++) {
if (arr[start] !== '') break;
}
var end = arr.length - 1;
for (; end >= 0; end--) {
if (arr[end] !== '') break;
}
if (start > end) return [];
return arr.slice(start, end - start + 1);
}
var fromParts = trim(from.split('/'));
var toParts = trim(to.split('/'));
var length = Math.min(fromParts.length, toParts.length);
var samePartsLength = length;
for (var i = 0; i < length; i++) {
if (fromParts[i] !== toParts[i]) {
samePartsLength = i;
break;
}
}
var outputParts = [];
for (var i = samePartsLength; i < fromParts.length; i++) {
outputParts.push('..');
}
outputParts = outputParts.concat(toParts.slice(samePartsLength));
return outputParts.join('/');
};
exports.sep = '/';
exports.delimiter = ':';
exports.dirname = function (path) {
if (typeof path !== 'string') path = path + '';
if (path.length === 0) return '.';
var code = path.charCodeAt(0);
var hasRoot = code === 47 /*/*/;
var end = -1;
var matchedSlash = true;
for (var i = path.length - 1; i >= 1; --i) {
code = path.charCodeAt(i);
if (code === 47 /*/*/) {
if (!matchedSlash) {
end = i;
break;
}
} else {
// We saw the first non-path separator
matchedSlash = false;
}
}
if (end === -1) return hasRoot ? '/' : '.';
if (hasRoot && end === 1) {
// return '//';
// Backwards-compat fix:
return '/';
}
return path.slice(0, end);
};
function basename(path) {
if (typeof path !== 'string') path = path + '';
var start = 0;
var end = -1;
var matchedSlash = true;
var i;
for (i = path.length - 1; i >= 0; --i) {
if (path.charCodeAt(i) === 47 /*/*/) {
// If we reached a path separator that was not part of a set of path
// separators at the end of the string, stop now
if (!matchedSlash) {
start = i + 1;
break;
}
} else if (end === -1) {
// We saw the first non-path separator, mark this as the end of our
// path component
matchedSlash = false;
end = i + 1;
}
}
if (end === -1) return '';
return path.slice(start, end);
}
// Uses a mixed approach for backwards-compatibility, as ext behavior changed
// in new Node.js versions, so only basename() above is backported here
exports.basename = function (path, ext) {
var f = basename(path);
if (ext && f.substr(-1 * ext.length) === ext) {
f = f.substr(0, f.length - ext.length);
}
return f;
};
exports.extname = function (path) {
if (typeof path !== 'string') path = path + '';
var startDot = -1;
var startPart = 0;
var end = -1;
var matchedSlash = true;
// Track the state of characters (if any) we see before our first dot and
// after any path separator we find
var preDotState = 0;
for (var i = path.length - 1; i >= 0; --i) {
var code = path.charCodeAt(i);
if (code === 47 /*/*/) {
// If we reached a path separator that was not part of a set of path
// separators at the end of the string, stop now
if (!matchedSlash) {
startPart = i + 1;
break;
}
continue;
}
if (end === -1) {
// We saw the first non-path separator, mark this as the end of our
// extension
matchedSlash = false;
end = i + 1;
}
if (code === 46 /*.*/) {
// If this is our first dot, mark it as the start of our extension
if (startDot === -1)
startDot = i;
else if (preDotState !== 1)
preDotState = 1;
} else if (startDot !== -1) {
// We saw a non-dot and non-path separator before our dot, so we should
// have a good chance at having a non-empty extension
preDotState = -1;
}
}
if (startDot === -1 || end === -1 ||
// We saw a non-dot character immediately before the dot
preDotState === 0 ||
// The (right-most) trimmed path component is exactly '..'
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
return '';
}
return path.slice(startDot, end);
};
function filter (xs, f) {
if (xs.filter) return xs.filter(f);
var res = [];
for (var i = 0; i < xs.length; i++) {
if (f(xs[i], i, xs)) res.push(xs[i]);
}
return res;
}
// String.prototype.substr - negative index don't work in IE8
var substr = 'ab'.substr(-1) === 'b'
? function (str, start, len) { return str.substr(start, len) }
: function (str, start, len) {
if (start < 0) start = str.length + start;
return str.substr(start, len);
}
;
/***/ }),
/* 4 */
/***/ (function(module, exports) {
module.exports=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var n=r(1),o=r(3),i=r(5),a=r(6),l=r(7),s=r(8),_=r(9),c=r(15),u=r(12),d=r(17),f=r(18),p=r(19),h=r(16),v=r(10),m=r(20),b=r(14),g=r(4),w=r(13),y=r(21);t.FreeTmpl=y,t.precompileTemplate=y.precompiler?y.precompiler.compile:null,t.precompiler=y.precompiler?y.precompiler:null,t.HtmlLLParser=y.htmlParser?y.htmlParser:null,t.LLParser=n,t.dataPath=l,t.dataUtils=i,t.Event=a,t.Element=_,t.TextNode=u,t.NativeNode=d,t.VirtualNode=f,t.ShadowRoot=p,t.Behavior=s,t.Component=c,t.Observer=v,t.DataGroup=h,t.ElementIterator=m,t.FakeDomElement=b,t.registerBehavior=s.create,t.registerElement=c.register,t.createElement=c.create,t.createTextNode=u.create,t.createVirtualNode=f.create,t.appendChild=_.appendChild,t.insertBefore=_.insertBefore,t.removeChild=_.removeChild,t.replaceChild=_.replaceChild,t.addListenerToElement=a.addListenerToElement,t.removeListenerFromElement=a.removeListenerFromElement,t.triggerEvent=a.triggerEvent,t.safeCallback=o.safeCallback,t.addGlobalErrorListener=o.addGlobalErrorListener,t.removeGlobalErrorListener=o.removeGlobalErrorListener,t.addGlobalWarningListener=o.addGlobalWarningListener,t.removeGlobalWarningListener=o.removeGlobalWarningListener,t.globalOptions=g,t.globalState=w,c._setDefaultTemplateEngine(y);var x=t.updateDefaultComponent=function(){delete c._list[""],c.register({is:"",options:{writeOnly:!0,allowInWriteOnly:!0,lazyRegistration:!1,classPrefix:"",addGlobalClass:!1,templateEngine:null,renderingMode:"full",multipleSlots:!1,reflectToAttributes:!1}})};x();var C=function(e){var t="";if(e instanceof exparser.Element&&(e.id&&(t+=' id="'+e.id+'"'),e.slot&&(t+=' slot="'+e.slot+'"'),e.__slotName&&(t+=' name="'+e.__slotName+'"'),e.classList&&(t+=' class="'+e.class+'"'),e.$$&&e.$$.getAttribute("style")&&(t+=' style="'+e.$$.getAttribute("style")+'"')),e instanceof exparser.VirtualNode)return t;if(e instanceof exparser.Component)return c.listPublicProperties(e).forEach(function(r){t+=" "+r+"="+JSON.stringify(e[r])}),t;for(var r=e.attributes,n=0;n<r.length;n++)t+=" "+r[n].name+'="'+r[n].value+'"';return t},O=t.dumpElementToString=function(e,t,r){var n=null;g.hasDOMBackend&&(n=window);var o=0;r=r||0;var i="";for(o=r;o;o--)i+=" ";var a="";if(e instanceof exparser.Element)a+=i+"<"+(e.$$?e.$$.tagName.toLowerCase()+":":"")+e.is+C(e)+">",a+=e instanceof exparser.VirtualNode?" [Exp-Virtual]":e instanceof exparser.NativeNode?" [Exp-Native]":" [Exp-Component]",a+="\n"+O(t?e.__wxSlotChildren:e.childNodes,t,r+1);else if(e instanceof exparser.TextNode)a+=i+e.textContent+" [Exp-Text]\n";else if(n&&n.HTMLElement&&e instanceof n.HTMLElement)a+=i+"<"+e.tagName.toLowerCase()+C(e)+"> [DOM-Element]",a+="\n"+O(t?e.__wxSlotChildren||e.childNodes:e.childNodes,t,r+1);else if(n&&n.Text&&e instanceof n.Text)a+=i+e.textContent+" [DOM-Text]\n";else if(void 0!==e.length)for(o=0;o<e.length;o++)a+=O(e[o],t,r);else a=i+"[unknown node]\n";return a};t.dumpElement=function(e,t){console.log(O(e,t))}},function(e,t,r){var n=null,o=16384,i=128,a=128,l=0,s=1,_=65536,c=function(){},u=c.stats={all:0,copyIn:0,parse:0,constructOut:0},d=function(e){var t=n.llparser_create_descriptor(e,1);return t},f=function(e,t){var r=n.llparser_create_descriptor(e,0),o=!1;"^"===t[0]&&(o=!0);for(var i=o?1:0;i<t.length;i++){var a=t.charCodeAt(i);if("-"===t[i+1]){var l=t.charCodeAt(i+2);a<=l?(n.llparser_descriptor_add_range(r,a,l),i+=2):n.llparser_descriptor_add_char(r,a)}else n.llparser_descriptor_add_char(r,a)}return o&&n.llparser_descriptor_revert(r),r};c.create=function(e,t,u){n||(n=r(2));var p=new c;u=u||o;var h=p._llp=n.llparser_create(u,i,a),v={},m={},b="";v.ALL=n.llparser_create_descriptor(h,0),n.llparser_descriptor_set_all(v.ALL),v.NULL=n.llparser_create_descriptor(h,0),n.llparser_descriptor_set_nil(v.NULL);for(b in e)v[b]=d(h);for(b in e)for(var g=e[b],w=v[b],y=0;y<g.length;y++){for(var x=g[y].id,C=g[y].states,O=[],S=0;S<C.length;S++){var E=C[S];v[E]||(v[E]=f(h,E)),O.push(v[E])}var N=l;"_raw"===x?N=s:"_jump"===x?N=_+0:"_blank"===x&&(N=_+1);var k=n.llparser_add_rule(h,N,w,O.length,O[0],O[1],O[2],O[3],O[4],O[5],O[6],O[7]);N===l&&(m[k]=t[x])}return n.llparser_prepare(h),p._inputPtr=n.llparser_get_input_buffer(h),p._resultPtr=n.llparser_get_result(h),p._stateIdMap=v,p._ruleCbMap=m,p._charCountLimit=u,p};var p=function(e,t,r,n,o){for(var i=[],a={i:0,r:0,n:!1,cc:-1,c:[]},l=a,s=o.pos,_=!1,c=!1,u=!1;;){var d=t[s],f=t[s+1];if(f<0?(c=!0,f=-f-1):c=!1,d>=0){u=!0;var p=r.slice(d,f);l.c.push(p),_=c}else{if(d===-1&&0===f)break;u=!1;var h=-d,v=f,m={i:l.c.length-(_?1:0),r:h,n:c,cc:v,c:[]};if(_){var b=l.c.length-1,g=l.c[b];m.c.push(g),l.c[b]=m}else l.c.push(m);i.push(l),l=m,_=!1}if(!u||!_)for(;l.c.length===l.cc;){_=l.n;var w=i.pop();if(w.c[l.i]=n[l.r].call(e,l.c),l=w,_)break}s+=2}return a.c[0]},h=function(e,t,r,n){for(var o=n>e.length?e.length:n,i=0;i<o;i++)t[r+i]=e.charCodeAt(i);t[r+o]=0};c.prototype.parse=function(e,t){var r=Date.now();h(t,new Uint16Array(n.memory.buffer),this._inputPtr>>1,this._charCountLimit),u.copyIn=u.copyIn+Date.now()-r,r=Date.now();var o=n.llparser_parse(this._llp,this._stateIdMap[e]);if(u.parse=u.parse+Date.now()-r,r=Date.now(),o)throw new Error("Parsing failed at character position "+(o-1)+' near "'+t.slice(o-20,o)+'"');var i=p(this,new Int32Array(n.memory.buffer),t,this._ruleCbMap,{pos:this._resultPtr>>2});return u.constructOut=u.constructOut+Date.now()-r,i},c.prototype.destroy=function(){n.llparser_destroy(this._llp)},e.exports=c},function(e,t){e.exports=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(t){return e[t]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,r){"use strict";function n(e,t,r){return m.llparser_create(e,t,r)}function o(e){m.llparser_destroy(e)}function i(e,t){return m.llparser_create_descriptor(e,t)}function a(e){m.llparser_descriptor_set_all(e)}function l(e){m.llparser_descriptor_set_nil(e)}function s(e,t){m.llparser_descriptor_add_char(e,t)}function _(e,t,r){m.llparser_descriptor_add_range(e,t,r)}function c(e){m.llparser_descriptor_revert(e)}function u(e,t,r,n,o,i,a,l,s,_,c,u){return m.llparser_add_rule(e,t,r,n,o,i,a,l,s,_,c,u)}function d(e){m.llparser_prepare(e)}function f(e,t){return m.llparser_parse(e,t)}function p(e){return m.llparser_get_input_buffer(e)}function h(e){return m.llparser_get_result(e)}function v(){m.wasm_main()}r.r(t),r.d(t,"llparser_create",function(){return n}),r.d(t,"llparser_destroy",function(){return o}),r.d(t,"llparser_create_descriptor",function(){return i}),r.d(t,"llparser_descriptor_set_all",function(){return a}),r.d(t,"llparser_descriptor_set_nil",function(){return l}),r.d(t,"llparser_descriptor_add_char",function(){return s}),r.d(t,"llparser_descriptor_add_range",function(){return _}),r.d(t,"llparser_descriptor_revert",function(){return c}),r.d(t,"llparser_add_rule",function(){return u}),r.d(t,"llparser_prepare",function(){return d}),r.d(t,"llparser_parse",function(){return f}),r.d(t,"llparser_get_input_buffer",function(){return p}),r.d(t,"llparser_get_result",function(){return h}),r.d(t,"wasm_main",function(){return v}),r.d(t,"memory",function(){return b});var m=r(1),b=m.memory;m.__wbindgen_start()},function(e,t,r){"use strict";r.r(t),r.d(t,"memory",function(){return i}),r.d(t,"rust_calloc",function(){return a}),r.d(t,"rust_free",function(){return l}),r.d(t,"llparser_create",function(){return s}),r.d(t,"llparser_destroy",function(){return _}),r.d(t,"llparser_create_descriptor",function(){return c}),r.d(t,"llparser_descriptor_set_all",function(){return u}),r.d(t,"llparser_descriptor_set_nil",function(){return d}),r.d(t,"llparser_descriptor_add_char",function(){return f}),r.d(t,"llparser_descriptor_add_range",function(){return p}),r.d(t,"llparser_descriptor_revert",function(){return h}),r.d(t,"llparser_add_rule",function(){return v}),r.d(t,"llparser_prepare",function(){return m}),r.d(t,"llparser_parse",function(){return b}),r.d(t,"llparser_get_input_buffer",function(){return g}),r.d(t,"llparser_get_result",function(){return w}),r.d(t,"wasm_main",function(){return y}),r.d(t,"__wbindgen_start",function(){return x});var n=new ArrayBuffer(1114112),o=function(e,t,r){function n(e){var t=0,r=0,n=0,o=0,i=0,a=0,_=0;r=(t=e+-8|0)+(e=-8&(o=m[e+-4>>2]))|0;e:{t:{r:{n:{o:if(!(1&o)){if(!(3&o))break n;if(e=(o=m[t>>2])+e|0,(0|(t=t-o|0))==m[262246]){if(3!=(3&m[r+4>>2]))break o;return m[262244]=e,m[r+4>>2]=-2&m[r+4>>2],m[t+4>>2]=1|e,void(m[e+t>>2]=e)}o>>>0>=256?s(t):(0|(n=m[t+8>>2]))==(0|(i=m[t+12>>2]))?(a=1048576,_=m[262144]&p(o>>>3),m[a>>2]=_):(m[n+12>>2]=i,m[i+8>>2]=n)}if(2&(o=m[r+4>>2]))m[r+4>>2]=-2&o,m[t+4>>2]=1|e,m[e+t>>2]=e;else{o:{if(m[262247]!=(0|r)){if((0|r)!=m[262246])break o;return m[262246]=t,e=m[262244]+e|0,m[262244]=e,m[t+4>>2]=1|e,void(m[e+t>>2]=e)}if(m[262247]=t,e=m[262245]+e|0,m[262245]=e,m[t+4>>2]=1|e,(0|t)==m[262246]&&(m[262244]=0,m[262246]=0),(r=m[262254])>>>0>=e>>>0)break n;if(!(e=m[262247]))break n;i:if(!((o=m[262245])>>>0<41))for(t=1049e3;;){if((n=m[t>>2])+m[t+4>>2]>>>0>e>>>0&&n>>>0<=e>>>0)break i;if(!(t=m[t+8>>2]))break}if(n=4095,e=m[262252]){for(t=0;t=t+1|0,e=m[e+8>>2];);n=t>>>0>4095?t:4095}if(m[262256]=n,o>>>0<=r>>>0)break n;return void(m[262254]=-1)}if(e=(n=-8&o)+e|0,n>>>0>=256?s(r):(0|(n=m[r+12>>2]))==(0|(r=m[r+8>>2]))?(a=1048576,_=m[262144]&p(o>>>3),m[a>>2]=_):(m[r+12>>2]=n,m[n+8>>2]=r),m[t+4>>2]=1|e,m[e+t>>2]=e,m[262246]==(0|t)){m[262244]=e;break n}}if(e>>>0<256)break r;if(l(t,e),e=m[262256]+-1|0,m[262256]=e,!e){if(e=m[262252])break t;e=4095;break e}}return}return e=1048584+((r=e>>>3)<<3)|0,o=m[262144],r=1<<(31&r),n=m[e+8>>2],o&r||(m[262144]=r|o,n=e),r=n,m[e+8>>2]=t,m[r+12>>2]=t,m[t+12>>2]=e,void(m[t+8>>2]=r)}for(t=0;t=t+1|0,e=m[e+8>>2];);e=t>>>0>4095?t:4095}m[262256]=e}function o(e,t,r,n,o,i,a,l,s,_,c,u){var d;return C=d=C+-64|0,m[d+60>>2]=e,m[d+56>>2]=t,m[d+52>>2]=r,m[d+48>>2]=n,m[d+44>>2]=o,m[d+40>>2]=i,m[d+36>>2]=a,m[d+32>>2]=l,m[d+28>>2]=s,m[d+24>>2]=_,m[d+20>>2]=c,m[d+16>>2]=u,t=m[m[d+60>>2]+28>>2],r=m[d+60>>2],e=m[r>>2],m[r>>2]=e+1,m[d+12>>2]=t+y(e,44),m[m[d+12>>2]>>2]=m[d+52>>2],m[m[d+12>>2]+4>>2]=m[d+48>>2],m[d+48>>2]>0&&(m[m[d+12>>2]+8>>2]=m[d+44>>2]),m[d+48>>2]>1&&(m[m[d+12>>2]+12>>2]=m[d+40>>2]),m[d+48>>2]>2&&(m[m[d+12>>2]+16>>2]=m[d+36>>2]),m[d+48>>2]>3&&(m[m[d+12>>2]+20>>2]=m[d+32>>2]),m[d+48>>2]>4&&(m[m[d+12>>2]+24>>2]=m[d+28>>2]),m[d+48>>2]>5&&(m[m[d+12>>2]+28>>2]=m[d+24>>2]),m[d+48>>2]>6&&(m[m[d+12>>2]+32>>2]=m[d+20>>2]),m[d+48>>2]>7&&(m[m[d+12>>2]+36>>2]=m[d+16>>2]),m[m[d+12>>2]+40>>2]=m[d+56>>2],m[d+48>>2]>0&&function(e,t,r){var n=0;m[28+(n=C-32|0)>>2]=e,m[n+24>>2]=t,m[n+20>>2]=r,m[n+16>>2]=(m[n+20>>2]-m[m[n+28>>2]+24>>2]|0)/140,1==m[m[n+20>>2]+4>>2]&&(t=m[m[n+28>>2]+40>>2],r=m[n+28>>2],e=m[r+8>>2],m[r+8>>2]=e+1,m[n+12>>2]=t+(e<<3),m[m[n+12>>2]>>2]=m[n+24>>2],m[m[n+12>>2]+4>>2]=m[m[n+20>>2]+136>>2],m[m[n+20>>2]+136>>2]=m[n+12>>2])}(m[d+60>>2],m[d+12>>2],m[d+52>>2]),C=d- -64|0,m[d+12>>2]}function i(e,t,r,n,o){var a;if(C=a=C-48|0,m[a+44>>2]=e,m[a+40>>2]=t,m[a+36>>2]=r,m[a+32>>2]=n,m[a+28>>2]=o,m[m[a+40>>2]>>2]!=m[a+36>>2])for(m[m[a+40>>2]>>2]=m[a+36>>2],m[a+24>>2]=m[m[a+40>>2]+136>>2],m[a+20>>2]=1&(0!=m[a+28>>2]^-1^-1);m[a+24>>2];){for(m[a+20>>2]||(m[a+28>>2]=m[a+24>>2]),m[a+16>>2]=m[m[m[a+24>>2]>>2]+8>>2],1==m[m[a+16>>2]+4>>2]&&i(m[a+44>>2],m[a+16>>2],m[a+36>>2],m[a+32>>2],m[a+28>>2]),m[a+12>>2]=0;!(m[a+12>>2]>=128);)b[m[a+12>>2]+(m[a+16>>2]+8|0)|0]&&(w[m[a+28>>2]>>2]>=w[m[a+32>>2]+(m[a+12>>2]<<2)>>2]&&m[m[a+32>>2]+(m[a+12>>2]<<2)>>2]||(m[m[a+32>>2]+(m[a+12>>2]<<2)>>2]=m[m[a+28>>2]>>2])),m[a+12>>2]=m[a+12>>2]+1;m[a+24>>2]=m[m[a+24>>2]+4>>2]}C=a+48|0}function a(e,t,r,n){var o;for(m[44+(o=C-48|0)>>2]=e,m[o+40>>2]=t,m[o+36>>2]=r,m[o+32>>2]=n,m[o+28>>2]=m[m[o+40>>2]+136>>2];m[o+28>>2];){if(m[o+24>>2]=m[m[m[o+28>>2]>>2]+8>>2],m[o+24>>2]==m[o+40>>2])for(m[o+20>>2]=m[m[m[o+28>>2]>>2]+12>>2],m[o+16>>2]=0;!(m[o+16>>2]>=128);){e:{if(1!=m[m[o+20>>2]+4>>2]){if(!b[m[o+16>>2]+(m[o+20>>2]+8|0)|0])break e}else if(m[o+12>>2]=m[m[o+44>>2]+32>>2]+((m[o+20>>2]-m[m[o+44>>2]+24>>2]|0)/140<<9),!m[m[o+12>>2]+(m[o+16>>2]<<2)>>2])break e;w[m[o+28>>2]>>2]>=w[m[o+32>>2]+(m[o+16>>2]<<2)>>2]&&m[m[o+32>>2]+(m[o+16>>2]<<2)>>2]||(m[m[o+32>>2]+(m[o+16>>2]<<2)>>2]=m[m[o+28>>2]>>2])}m[o+16>>2]=m[o+16>>2]+1}m[o+28>>2]=m[m[o+28>>2]+4>>2]}}function l(e,t){var r=0,n=0,o=0,i=0;m[e+16>>2]=0,m[e+20>>2]=0,o=e,r=0,(n=t>>>8)&&(r=31,t>>>0>16777215||(r=62+((t>>>(6-(n=x(n))&31)&1)-(n<<1)|0)|0)),m[o+28>>2]=r,o=1048848+(r<<2)|0;e:{t:{r:{n:{if((i=m[262145])&(n=1<<(31&r))){if(n=m[o>>2],(-8&m[n+4>>2])!=(0|t))break n;r=n;break r}m[262145]=n|i,m[o>>2]=e,m[e+24>>2]=o;break e}for(o=t<<(31==(0|r)?0:25-(r>>>1)&31);;){if(!(r=m[(i=16+((o>>>29&4)+n|0)|0)>>2]))break t;if(o<<=1,n=r,(-8&m[r+4>>2])==(0|t))break}}return t=m[r+8>>2],m[t+12>>2]=e,m[r+8>>2]=e,m[e+24>>2]=0,m[e+12>>2]=r,void(m[e+8>>2]=t)}m[i>>2]=e,m[e+24>>2]=n}m[e+12>>2]=e,m[e+8>>2]=e}function s(e){var t,r=0,n=0,o=0,i=0,a=0,l=0;t=m[e+24>>2];e:{t:{if((0|e)==(0|(r=m[e+12>>2]))){if(o=m[(r=e+20|0)>>2],n=m[(o?20:16)+e>>2])break t;r=0;break e}n=m[e+8>>2],m[n+12>>2]=r,m[r+8>>2]=n;break e}for(o=o?r:e+16|0;i=o,(n=m[(o=(r=n)+20|0)>>2])||(o=r+16|0,n=m[r+16>>2]),n;);m[i>>2]=0}e:if(t){n=1048848+(m[e+28>>2]<<2)|0;t:{if((0|e)==m[n>>2]){if(m[n>>2]=r,r)break t;return a=1048580,l=m[262145]&p(m[e+28>>2]),void(m[a>>2]=l)}if(m[(m[t+16>>2]==(0|e)?16:20)+t>>2]=r,!r)break e}m[r+24>>2]=t,(n=m[e+16>>2])&&(m[r+16>>2]=n,m[n+24>>2]=r),(e=m[e+20>>2])&&(m[r+20>>2]=e,m[e+24>>2]=r)}}function _(e,t){var r,n,o;return C=r=C-32|0,m[r+24>>2]=e,m[r+20>>2]=t,m[r+16>>2]=0,m[r+12>>2]=0,n=r,o=function e(t,r,n,o,i,a,l){var s,_=0,c=0;C=s=C-96|0,m[s+88>>2]=t,m[s+84>>2]=r,m[s+80>>2]=n,m[s+76>>2]=o,m[s+72>>2]=i,m[s+68>>2]=a,m[s+64>>2]=l,m[s+60>>2]=g[m[s+80>>2]+(m[m[s+76>>2]>>2]<<1)>>1],w[s+60>>2]>=128&&(m[s+60>>2]=1);e:if(m[m[s+72>>2]>>2]>(m[s+64>>2]-4|0))m[s+92>>2]=-1;else if(1==m[m[s+84>>2]+4>>2])if(m[s+56>>2]=m[m[s+76>>2]>>2],m[s+52>>2]=m[m[s+72>>2]>>2],m[s+48>>2]=0,m[s+44>>2]=0,m[s+40>>2]=m[m[s+88>>2]+32>>2]+((m[s+84>>2]-m[m[s+88>>2]+24>>2]|0)/140<<9),m[s+36>>2]=0,!m[m[s+40>>2]+(m[s+60>>2]<<2)>>2]|w[s+60>>2]<=0|w[s+60>>2]>=127?!m[s+60>>2]|!m[m[s+40>>2]+508>>2]?m[m[s+40>>2]>>2]&&(m[s+36>>2]=m[m[s+40>>2]>>2]):m[s+36>>2]=m[m[s+40>>2]+508>>2]:m[s+36>>2]=m[m[s+40>>2]+(m[s+60>>2]<<2)>>2],m[s+36>>2]){for(m[s+68>>2]||m[m[s+36>>2]+40>>2]||(m[s+48>>2]=m[m[s+72>>2]>>2],t=m[s+72>>2],m[t>>2]=m[t>>2]+2),m[s+32>>2]=0;m[s+32>>2]<m[m[s+36>>2]+4>>2];){if(m[s+28>>2]=m[s+68>>2],m[s+68>>2]||!m[m[s+36>>2]+40>>2]|m[m[s+36>>2]+40>>2]==(m[s+32>>2]+65536|0)||(m[s+28>>2]=1),_=s,c=e(m[s+88>>2],m[(m[s+36>>2]+8|0)+(m[s+32>>2]<<2)>>2],m[s+80>>2],m[s+76>>2],m[s+72>>2],m[s+28>>2],m[s+64>>2]),m[_+24>>2]=c,m[s+24>>2]<0){m[s+92>>2]=-1;break e}m[s+68>>2]|m[m[s+36>>2]+40>>2]!=(m[s+32>>2]+65536|0)||(m[s+44>>2]=m[s+24>>2]),m[s+32>>2]=m[s+32>>2]+1}for(m[s+68>>2]||(m[m[s+36>>2]+40>>2]?1==m[m[s+36>>2]+40>>2]&&(r=m[s+56>>2],n=m[m[s+88>>2]+48>>2],o=m[s+72>>2],t=m[o>>2],m[o>>2]=t+1,m[n+(t<<2)>>2]=r,m[s+44>>2]=m[m[s+72>>2]>>2],r=m[m[s+76>>2]>>2],n=m[m[s+88>>2]+48>>2],o=m[s+72>>2],t=m[o>>2],m[o>>2]=t+1,m[n+(t<<2)>>2]=r):(m[m[m[s+88>>2]+48>>2]+(m[s+48>>2]<<2)>>2]=0-m[s+36>>2],m[m[m[s+88>>2]+48>>2]+(m[s+48>>2]+1<<2)>>2]=m[m[s+36>>2]+4>>2],m[s+44>>2]=m[s+48>>2]+1));;){if(m[m[s+72>>2]>>2]>(m[s+64>>2]-4|0)){m[s+92>>2]=-1;break e}if(m[s+20>>2]=m[m[s+88>>2]+36>>2]+((m[s+84>>2]-m[m[s+88>>2]+24>>2]|0)/140<<9),m[s+16>>2]=0,m[s+60>>2]=g[m[s+80>>2]+(m[m[s+76>>2]>>2]<<1)>>1],w[s+60>>2]>=128&&(m[s+60>>2]=1),!m[m[s+20>>2]+(m[s+60>>2]<<2)>>2]|w[s+60>>2]<=0|w[s+60>>2]>=127?!m[s+60>>2]|!m[m[s+20>>2]+508>>2]||(m[s+16>>2]=m[m[s+20>>2]+508>>2]):m[s+16>>2]=m[m[s+20>>2]+(m[s+60>>2]<<2)>>2],!m[s+16>>2])break;for(m[s+68>>2]||(m[m[s+16>>2]+40>>2]?65536!=m[m[s+16>>2]+40>>2]&&(m[m[s+72>>2]>>2]=m[s+52>>2]):(m[m[m[s+88>>2]+48>>2]+(m[s+44>>2]<<2)>>2]=(0-m[m[m[s+88>>2]+48>>2]+(m[s+44>>2]<<2)>>2]|0)-1,m[s+48>>2]=m[m[s+72>>2]>>2],t=m[s+72>>2],m[t>>2]=m[t>>2]+2)),m[s+12>>2]=1;m[s+12>>2]<m[m[s+16>>2]+4>>2];){if(m[s+8>>2]=m[s+68>>2],m[s+68>>2]||!m[m[s+16>>2]+40>>2]|m[m[s+16>>2]+40>>2]==(m[s+12>>2]+65536|0)||(m[s+8>>2]=1),_=s,c=e(m[s+88>>2],m[(m[s+16>>2]+8|0)+(m[s+12>>2]<<2)>>2],m[s+80>>2],m[s+76>>2],m[s+72>>2],m[s+8>>2],m[s+64>>2]),m[_+4>>2]=c,m[s+4>>2]<0){m[s+92>>2]=-1;break e}m[s+68>>2]|m[m[s+16>>2]+40>>2]!=(m[s+12>>2]+65536|0)||(m[s+44>>2]=m[s+4>>2]),m[s+12>>2]=m[s+12>>2]+1}m[s+68>>2]||(m[m[s+16>>2]+40>>2]?1==m[m[s+16>>2]+40>>2]&&(r=m[s+56>>2],n=m[m[s+88>>2]+48>>2],o=m[s+72>>2],t=m[o>>2],m[o>>2]=t+1,m[n+(t<<2)>>2]=r,m[s+44>>2]=m[m[s+72>>2]>>2],r=m[m[s+76>>2]>>2],n=m[m[s+88>>2]+48>>2],o=m[s+72>>2],t=m[o>>2],m[o>>2]=t+1,m[n+(t<<2)>>2]=r):(m[m[m[s+88>>2]+48>>2]+(m[s+48>>2]<<2)>>2]=0-m[s+16>>2],m[m[m[s+88>>2]+48>>2]+(m[s+48>>2]+1<<2)>>2]=m[m[s+16>>2]+4>>2],m[s+44>>2]=m[s+48>>2]+1))}m[s+92>>2]=m[s+44>>2]}else m[s+92>>2]=-1;else{if(m[s+60>>2]&&(-1==m[m[s+84>>2]+4>>2]&&(t=m[s+76>>2],m[t>>2]=m[t>>2]+1),!m[m[s+84>>2]+4>>2])){if(!b[m[s+60>>2]+(m[s+84>>2]+8|0)|0]){m[s+92>>2]=-1;break e}t=m[s+76>>2],m[t>>2]=m[t>>2]+1}m[s+68>>2]||(r=m[m[s+76>>2]>>2],n=m[m[s+84>>2]+4>>2],o=m[m[s+88>>2]+48>>2],i=m[s+72>>2],t=m[i>>2],m[i>>2]=t+1,m[o+(t<<2)>>2]=r-(-2==(0|n)?0:1),r=m[m[s+76>>2]>>2],n=m[m[s+88>>2]+48>>2],o=m[s+72>>2],t=m[o>>2],m[o>>2]=t+1,m[n+(t<<2)>>2]=r),m[s+92>>2]=m[m[s+72>>2]>>2]-1}return C=s+96|0,m[s+92>>2]}(m[r+24>>2],m[r+20>>2],m[m[r+24>>2]+44>>2],r+12|0,r+16|0,0,m[m[r+24>>2]+12>>2]<<1),m[n+8>>2]=o,e=m[m[r+24>>2]+48>>2],t=m[r+16>>2],m[r+16>>2]=t+1,m[e+(t<<2)>>2]=-1,e=m[m[r+24>>2]+48>>2],t=m[r+16>>2],m[r+16>>2]=t+1,m[e+(t<<2)>>2]=0,g[m[m[r+24>>2]+44>>2]+(m[r+12>>2]<<1)>>1]|m[r+8>>2]<0?m[r+28>>2]=m[r+12>>2]+1:m[r+28>>2]=0,C=r+32|0,m[r+28>>2]}function c(e){var t;return!(t=function(e){var t=0,r=0,n=0,o=0,i=0,a=0,_=0,c=0,u=0,d=0,v=0;e:{t:{r:{if(e>>>0>=245){if(e>>>0>=4294901709)break t;if(o=-8&(e=e+11|0),!(c=m[262145]))break r;r=0-o|0,_=0,(e>>>=8)&&(_=31,o>>>0>16777215||(_=62+((o>>>(6-(e=x(e))&31)&1)-(e<<1)|0)|0));n:{o:{if(e=m[1048848+(_<<2)>>2]){for(i=o<<(31==(0|_)?0:25-(_>>>1)&31);;){if(!((a=-8&m[e+4>>2])>>>0<o>>>0||(a=a-o|0)>>>0>=r>>>0||(n=e,r=a))){r=0;break o}if(a=m[e+20>>2],e=m[16+((i>>>29&4)+e|0)>>2],t=a&&(0|a)!=(0|e)?a:t,i<<=1,!e)break}if(t){e=t;break o}if(n)break n}if(n=0,!(e=(0-(e=2<<(31&_))|e)&c))break r;if(!(e=m[1048848+(f(e&0-e)<<2)>>2]))break r}for(;n=(a=(i=(t=-8&m[e+4>>2])-o|0)>>>0<r>>>0&t>>>0>=o>>>0)?e:n,r=a?i:r,e=(t=m[e+16>>2])||m[e+20>>2];);if(!n)break r}if(r>>>0>=(e=m[262244])-o>>>0&&e>>>0>=o>>>0)break r;s(n);n:if(r>>>0>=16){if(m[n+4>>2]=3|o,m[4+(t=n+o|0)>>2]=1|r,m[t+r>>2]=r,r>>>0>=256){l(t,r);break n}e=1048584+((r>>>=3)<<3)|0,i=m[262144],r=1<<(31&r),_=m[e+8>>2],i&r||(m[262144]=r|i,_=e),r=_,m[e+8>>2]=t,m[r+12>>2]=t,m[t+12>>2]=e,m[t+8>>2]=r}else e=r+o|0,m[n+4>>2]=3|e,m[4+(e=e+n|0)>>2]=1|m[e+4>>2];return n+8|0}n:{o:{if(!(3&(e=(t=m[262144])>>>(n=31&(r=(o=e>>>0<11?16:e+11&-8)>>>3))))){if(o>>>0<=w[262244])break r;if(e)break o;if(!(e=m[262145]))break r;for(t=m[1048848+(f(e&0-e)<<2)>>2],r=(-8&m[t+4>>2])-o|0,i=t;;){if(!(e=m[t+16>>2])&&!(e=m[t+20>>2]))break n;r=(t=(n=(-8&m[e+4>>2])-o|0)>>>0<r>>>0)?n:r,i=t?e:i,t=e}}r=(e=m[1048592+(a=(n=r+(1&(-1^e))|0)<<3)>>2])+8|0,(0|(i=m[e+8>>2]))==(0|(a=a+1048584|0))?(d=1048576,v=p(n)&t,m[d>>2]=v):(m[i+12>>2]=a,m[a+8>>2]=i),t=n<<3,m[e+4>>2]=3|t,m[4+(e=e+t|0)>>2]=1|m[e+4>>2];break t}return n=f(0-(e=(r=e<<n)&(0-(e=2<<n)|e))&e),e=m[1048592+(i=n<<3)>>2],(0|(r=m[e+8>>2]))==(0|(i=i+1048584|0))?(d=1048576,v=p(n)&t,m[d>>2]=v):(m[r+12>>2]=i,m[i+8>>2]=r),i=e+8|0,m[e+4>>2]=3|o,r=(t=n<<3)-o|0,m[4+(a=e+o|0)>>2]=1|r,m[e+t>>2]=r,(e=m[262244])&&(e=1048584+((n=e>>>3)<<3)|0,t=m[262246],o=m[262144],n=1<<(31&n),_=m[e+8>>2],o&n||(m[262144]=n|o,_=e),n=_,m[e+8>>2]=t,m[n+12>>2]=t,m[t+12>>2]=e,m[t+8>>2]=n),m[262246]=a,m[262244]=r,i}return s(i),r>>>0>=16?(m[i+4>>2]=3|o,m[4+(a=o+i|0)>>2]=1|r,m[r+a>>2]=r,(e=m[262244])&&(e=1048584+((n=e>>>3)<<3)|0,t=m[262246],o=m[262144],n=1<<(31&n),_=m[e+8>>2],o&n||(m[262144]=n|o,_=e),n=_,m[e+8>>2]=t,m[n+12>>2]=t,m[t+12>>2]=e,m[t+8>>2]=n),m[262246]=a,m[262244]=r):(e=r+o|0,m[i+4>>2]=3|e,m[4+(e=e+i|0)>>2]=1|m[e+4>>2]),i+8|0}r:{n:{o:{i:{if((t=m[262244])>>>0<o>>>0){if((e=m[262245])>>>0>o>>>0)break e;if(r=0,-1==(0|(t=h((e=o+65583|0)>>>16))))break t;if(!(n=t<<16))break t;if(e=(i=-65536&e)+m[262248]|0,m[262248]=e,t=m[262249],m[262249]=t>>>0>e>>>0?t:e,!(r=m[262247]))break i;for(e=1049e3;;){if((0|n)==((t=m[e>>2])+(a=m[e+4>>2])|0))break o;if(!(e=m[e+8>>2]))break}break n}return e=m[262246],(n=t-o|0)>>>0<=15?(m[262246]=0,m[262244]=0,m[e+4>>2]=3|t,o=4+(t=e+t|0)|0,r=1|m[t+4>>2]):(m[262244]=n,r=e+o|0,m[262246]=r,m[r+4>>2]=1|n,m[e+t>>2]=n,r=3|o,o=e+4|0),m[o>>2]=r,e+8|0}for((e=m[262255])>>>0<=n>>>0&&e||(m[262255]=n),e=0,m[262256]=4095,m[262251]=i,m[262250]=n,m[262253]=0;t=e+1048584|0,m[e+1048592>>2]=t,m[e+1048596>>2]=t,256!=(0|(e=e+8|0)););m[262247]=n,e=i+-40|0,m[262245]=e,m[n+4>>2]=1|e,m[4+(e+n|0)>>2]=40,m[262254]=2097152;break r}if(!(m[e+12>>2]|n>>>0<=r>>>0|t>>>0>r>>>0)){m[e+4>>2]=i+a,t=(e=m[262247])+15&-8,m[262247]=t+-8,r=8+((n=i+m[262245]|0)+(e-t|0)|0)|0,m[262245]=r,m[t+-4>>2]=1|r,m[4+(e+n|0)>>2]=40,m[262254]=2097152;break r}}e=m[262255],m[262255]=e>>>0<n>>>0?e:n,t=n+i|0,e=1049e3;n:{for(;;){if((0|t)!=m[e>>2]){if(e=m[e+8>>2])continue;break n}break}if(!m[e+12>>2]){m[e>>2]=n,m[e+4>>2]=i+m[e+4>>2],m[n+4>>2]=3|o,i=n+o|0,o=(t-n|0)-o|0;o:{i:{if((0|t)!=m[262247]){if(m[262246]==(0|t))break i;if(1==(3&(e=m[t+4>>2]))&&((r=-8&e)>>>0>=256?s(t):(0|(a=m[t+12>>2]))==(0|(_=m[t+8>>2]))?(d=1048576,v=m[262144]&p(e>>>3),m[d>>2]=v):(m[_+12>>2]=a,m[a+8>>2]=_),o=r+o|0,t=t+r|0),m[t+4>>2]=-2&m[t+4>>2],m[i+4>>2]=1|o,m[o+i>>2]=o,o>>>0>=256){l(i,o);break o}e=1048584+((t=o>>>3)<<3)|0,r=m[262144],t=1<<(31&t),_=m[e+8>>2],r&t||(m[262144]=t|r,_=e),r=_,m[e+8>>2]=i,m[r+12>>2]=i,m[i+12>>2]=e,m[i+8>>2]=r;break o}m[262247]=i,e=m[262245]+o|0,m[262245]=e,m[i+4>>2]=1|e;break o}m[262246]=i,e=m[262244]+o|0,m[262244]=e,m[i+4>>2]=1|e,m[e+i>>2]=e}return n+8|0}}for(e=1049e3;!((t=m[e>>2])>>>0<=r>>>0&&(a=t+m[e+4>>2]|0)>>>0>r>>>0);)e=m[e+8>>2];for(m[262247]=n,e=i+-40|0,m[262245]=e,m[n+4>>2]=1|e,m[4+(e+n|0)>>2]=40,m[262254]=2097152,m[(t=(e=(a+-32&-8)-8|0)>>>0<r+16>>>0?r:e)+4>>2]=27,e=m[262250],_=m[262251],u=m[262253],m[(c=t+16|0)>>2]=m[262252],m[c+4>>2]=u,m[t+8>>2]=e,m[t+12>>2]=_,m[262251]=i,m[262250]=n,m[262252]=t+8,m[262253]=0,e=t+28|0;m[e>>2]=7,a>>>0>(e=e+4|0)>>>0;);(0|t)!=(0|r)&&(m[t+4>>2]=-2&m[t+4>>2],e=t-r|0,m[r+4>>2]=1|e,m[t>>2]=e,e>>>0>=256?l(r,e):(e=1048584+((t=e>>>3)<<3)|0,n=m[262144],t=1<<(31&t),_=m[e+8>>2],n&t||(m[262144]=t|n,_=e),t=_,m[e+8>>2]=r,m[t+12>>2]=r,m[r+12>>2]=e,m[r+8>>2]=t))}if(r=0,!((e=m[262245])>>>0<=o>>>0))break e}return r}return t=e-o|0,m[262245]=t,n=(e=m[262247])+o|0,m[262247]=n,m[n+4>>2]=1|t,m[e+4>>2]=3|o,e+8|0}(e))|!(3&b[t+-4|0])||function(e,t){if(t)for(;v[0|e]=0,e=e+1|0,t=t+-1|0;);}(t,e),t}function u(e,t){return 0|c(y(e|=0,t|=0))}function d(){}function f(e){return e?31-x(e+-1^e)|0:32}function p(e){var t;return(-1>>>(t=31&e)&-2)<<t|(-1<<(e=0-e&31)&-2)>>>e}function h(t){t|=0;var n=0|r.byteLength/65536,o=n+t|0;if(n<o&&o<65536){var i=new ArrayBuffer(y(o,65536)),a=new e.Int8Array(i);a.set(v),v=a,v=new e.Int8Array(i),new e.Int16Array(i),m=new e.Int32Array(i),b=new e.Uint8Array(i),g=new e.Uint16Array(i),w=new e.Uint32Array(i),new e.Float32Array(i),new e.Float64Array(i),r=i}return n}var v=new e.Int8Array(r),m=(new e.Int16Array(r),new e.Int32Array(r)),b=new e.Uint8Array(r),g=new e.Uint16Array(r),w=new e.Uint32Array(r),y=(new e.Float32Array(r),new e.Float64Array(r),e.Math.imul),x=(e.Math.fround,e.Math.abs,e.Math.clz32),C=(e.Math.min,e.Math.max,e.Math.floor,e.Math.ceil,e.Math.sqrt,t.abort,e.NaN,e.Infinity,1048576);return{memory:Object.create(Object.prototype,{grow:{value:h},buffer:{get:function(){return r}}}),rust_calloc:u,rust_free:function(e){n(e|=0)},llparser_create:function(e,t,r){return 0|function(e,t,r){var n,o,i;return C=n=C-32|0,m[n+28>>2]=e,m[n+24>>2]=t,m[n+20>>2]=r,e=n,t=m[n+28>>2]?m[n+28>>2]:256,m[e+28>>2]=t,e=n,t=m[n+24>>2]?m[n+24>>2]:256,m[e+24>>2]=t,e=n,t=m[n+20>>2]?m[n+20>>2]:256,m[e+20>>2]=t,o=n,i=u(((((((y(m[n+24>>2],140)+52|0)+y(m[n+20>>2],44)|0)+(m[n+24>>2]<<9)|0)+(m[n+24>>2]<<9)|0)+y(m[n+20>>2],m[n+24>>2]<<3)|0)+(m[n+28>>2]<<1)|0)+(m[n+28>>2]<<3)|0,1),m[o+16>>2]=i,m[m[n+16>>2]+12>>2]=m[n+28>>2],m[m[n+16>>2]+16>>2]=m[n+24>>2],m[m[n+16>>2]+20>>2]=m[n+20>>2],m[m[n+16>>2]+4>>2]=0,m[m[n+16>>2]>>2]=0,m[m[n+16>>2]+8>>2]=0,m[n+12>>2]=m[n+16>>2]+52,m[m[n+16>>2]+24>>2]=m[n+12>>2],m[n+12>>2]=m[n+12>>2]+y(m[n+24>>2],140),m[m[n+16>>2]+28>>2]=m[n+12>>2],m[n+12>>2]=m[n+12>>2]+y(m[n+20>>2],44),m[m[n+16>>2]+32>>2]=m[n+12>>2],m[n+12>>2]=m[n+12>>2]+(m[n+24>>2]<<9),m[m[n+16>>2]+36>>2]=m[n+12>>2],m[n+12>>2]=m[n+12>>2]+(m[n+24>>2]<<9),m[m[n+16>>2]+40>>2]=m[n+12>>2],m[n+12>>2]=m[n+12>>2]+y(m[n+20>>2],m[n+24>>2]<<3),m[m[n+16>>2]+44>>2]=m[n+12>>2],m[n+12>>2]=m[n+12>>2]+(m[n+28>>2]<<1),m[m[n+16>>2]+48>>2]=m[n+12>>2],C=n+32|0,m[n+16>>2]}(e|=0,t|=0,r|=0)},llparser_destroy:function(e){!function(e){var t;C=t=C-16|0,m[t+12>>2]=e,n(m[t+12>>2]),C=t+16|0}(e|=0)},llparser_create_descriptor:function(e,t){return 0|function(e,t){var r,n;return m[12+(r=C-16|0)>>2]=e,m[r+8>>2]=t,t=m[m[r+12>>2]+24>>2],n=m[r+12>>2],e=m[n+4>>2],m[n+4>>2]=e+1,m[r+4>>2]=t+y(e,140),m[m[r+4>>2]+4>>2]=m[r+8>>2]?1:0,m[r+4>>2]}(e|=0,t|=0)},llparser_descriptor_set_all:function(e){var t;e|=0,m[12+(t=C-16|0)>>2]=e,m[m[t+12>>2]+4>>2]=-1,v[m[t+12>>2]+135|0]=1},llparser_descriptor_set_nil:function(e){var t;e|=0,m[12+(t=C-16|0)>>2]=e,m[m[t+12>>2]+4>>2]=-2,v[m[t+12>>2]+8|0]=1},llparser_descriptor_add_char:function(e,t){!function(e,t){var r;m[12+(r=C-16|0)>>2]=e,m[r+8>>2]=t,v[m[r+8>>2]+(m[r+12>>2]+8|0)|0]=1}(e|=0,t|=0)},llparser_descriptor_add_range:function(e,t,r){!function(e,t,r){var n;for(m[12+(n=C-16|0)>>2]=e,m[n+8>>2]=t,m[n+4>>2]=r,m[n>>2]=m[n+8>>2];!(m[n>>2]>m[n+4>>2]);)v[m[n>>2]+(m[n+12>>2]+8|0)|0]=1,m[n>>2]=m[n>>2]+1}(e|=0,t|=0,r|=0)},llparser_descriptor_revert:function(e){!function(e){var t;for(m[12+(t=C-16|0)>>2]=e,m[t+8>>2]=1;!(m[t+8>>2]>=127);)v[m[t+8>>2]+(m[t+12>>2]+8|0)|0]=1&(0!=b[m[t+8>>2]+(m[t+12>>2]+8|0)|0]^-1),m[t+8>>2]=m[t+8>>2]+1}(e|=0)},llparser_add_rule:function(e,t,r,n,i,a,l,s,_,c,u,d){return 0|o(e|=0,t|=0,r|=0,n|=0,i|=0,a|=0,l|=0,s|=0,_|=0,c|=0,u|=0,d|=0)},llparser_prepare:function(e){!function(e){var t;for(C=t=C-32|0,m[t+28>>2]=e,m[t+24>>2]=0;!(m[t+24>>2]>=m[m[t+28>>2]+4>>2]);)m[t+20>>2]=m[m[t+28>>2]+24>>2]+y(m[t+24>>2],140),1==m[m[t+20>>2]+4>>2]&&i(m[t+28>>2],m[t+20>>2],m[t+20>>2],m[m[t+28>>2]+32>>2]+(m[t+24>>2]<<9)|0,0),m[t+24>>2]=m[t+24>>2]+1;for(m[t+16>>2]=0;!(m[t+16>>2]>=m[m[t+28>>2]+4>>2]);)m[t+12>>2]=m[m[t+28>>2]+24>>2]+y(m[t+16>>2],140),1==m[m[t+12>>2]+4>>2]&&(m[m[t+12>>2]>>2]=0,a(m[t+28>>2],m[t+12>>2],m[t+12>>2],m[m[t+28>>2]+36>>2]+(m[t+16>>2]<<9)|0)),m[t+16>>2]=m[t+16>>2]+1;C=t+32|0}(e|=0)},llparser_parse:function(e,t){return 0|_(e|=0,t|=0)},llparser_get_input_buffer:function(e){var t;return e|=0,m[12+(t=C-16|0)>>2]=e,m[m[t+12>>2]+44>>2]},llparser_get_result:function(e){var t;return e|=0,m[12+(t=C-16|0)>>2]=e,m[m[t+12>>2]+48>>2]},wasm_main:d,__wbindgen_start:d}}({Math:Math,Int8Array:Int8Array,Uint8Array:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0},{abort:function(){throw new Error("abort")}},n),i=o.memory,a=o.rust_calloc,l=o.rust_free,s=o.llparser_create,_=o.llparser_destroy,c=o.llparser_create_descriptor,u=o.llparser_descriptor_set_all,d=o.llparser_descriptor_set_nil,f=o.llparser_descriptor_add_char,p=o.llparser_descriptor_add_range,h=o.llparser_descriptor_revert,v=o.llparser_add_rule,m=o.llparser_prepare,b=o.llparser_parse,g=o.llparser_get_input_buffer,w=o.llparser_get_result,y=o.wasm_main,x=o.__wbindgen_start}])},function(e,t,r){var n=r(4),o=function(e){this.empty=!0,this._type=e,this._arr=[],this._index=0};o.create=function(e){return new o(e)},o.prototype.add=function(e){var t=this._index++;return this._arr.push({id:t,func:e}),this.empty=!1,t},o.prototype.remove=function(e){var t=this._arr,r=0;if("function"==typeof e)for(r=0;r<t.length;r++){var n=t[r].func;if(n===e)return t.splice(r,1),this.empty=!t.length,n}else for(r=0;r<t.length;r++)if(t[r].id===e){var o=t[r].func;return t.splice(r,1),this.empty=!t.length,o}return null},o.prototype.call=function(e,t,r){for(var n=this._arr,o=!1,i=0;i<n.length;i++){var l=a(this._type,n[i].func,e,t,r);l===!1&&(o=!0)}if(o)return!1};var i=function(e,t){if(!t.type||l.call(null,[e,t])!==!1){if(n.throwGlobalError)throw e;console.error(e.stack)}},a=o.safeCallback=function(e,t,r,n,o){try{return t.apply(r,n)}catch(l){var a="[Exparser] [Error] [Component] "+(e||"Error Listener")+" Error @ ";r&&r.is&&(a+=r.is),a+="#"+(t.name||"(anonymous)"),o&&o.triggerLifeTime("error",[l]),i(l,{message:a,type:e,element:r,method:t,args:n})}},l=o.create();o.addGlobalErrorListener=function(e){return l.add(e)},o.removeGlobalErrorListener=function(e){return l.remove(e)};var s=null;o.addGlobalWarningListener=function(e){return s=o.create(),s.add(e)},o.removeGlobalWarningListener=function(e){if(s){var t=s.remove(e);return s.empty&&(s=null),t}return null},o.hasGlobalWarningListeners=function(){return!!s},o.triggerWarning=function(e){var t="[Exparser] [Warning] [Component] "+e;s.call(null,[t],null)},e.exports=o},function(e,t){var r={lazyRegistration:!0,publicProperties:!1,availability:null,domain:"",writeOnly:!1,allowInWriteOnly:!1,classPrefix:null,addGlobalClass:!1,templateEngine:null,renderingMode:"full",multipleSlots:!1,reflectToAttributes:!1,writeFieldsToNode:!0,writeIdToDOM:!1,idPrefixGenerator:null,separateInnerData:!0,innerDataExclude:null,listenerChangeLifeTimes:!1,randomizeTagName:!1,virtualHost:!1,throwGlobalError:!1,writeExtraInfoToAttr:!1,documentBackend:"undefined"!=typeof window&&"undefined"!=typeof document?"dom":"none",hasDOMBackend:!("undefined"==typeof window||"undefined"==typeof document)};e.exports=r},function(e,t){var r=Object.prototype.hasOwnProperty,n=function(e,t){var o=typeof e;if("object"===o&&null!==e){var i=t?t.get(e):void 0;if(void 0!==i)return i;if(e instanceof Array){i=[],t&&t.set(e,i);for(var a=0;a<e.length;a++)i[a]=n(e[a],t)}else{i={},t&&t.set(e,i);for(var l in e)r.call(e,l)&&(i[l]=n(e[l],t))}return i}if("symbol"!==o)return e};t.deepCopy=function(e,t){var r=t&&"undefined"!=typeof WeakMap?new WeakMap:null;return n(e,r)}},function(e,t,r){var n=r(3),o=(Object.prototype.hasOwnProperty,function(){});o.prototype=Object.create(Object.prototype,{constructor:{value:o,writable:!0,configurable:!0}});var i=null;o._setElementSystem=function(e){i=e,o._setElementSystem=null};var a=null;o._setComponent=function(e){a=e,o._setComponent=null};var l=Date.now();o.setInitTimeStamp=function(e){return l=void 0===e?Date.now():e},o.getInitTimeStamp=function(e){return l},o.create=function(e,t,r){r=r||{};var n=r.originalEvent,i=r.extraFields||{},a=Date.now()-l,s=new o;s.currentTarget=null,s.type=e,s.timeStamp=a,s.mark=null,s.detail=t,s.bubbles=!!r.bubbles,s.composed=!!r.composed,s.__originalEvent=n,s.__hasCapture=!!r.capturePhase,s.__stopped=!1,s.__dispatched=!1;for(var _ in i)s[_]=i[_];return s},o.prototype.preventDefault=function(){this.__originalEvent&&!this.__originalEvent.__stopPreventDefault&&this.__originalEvent.preventDefault()},o.prototype.stopPropagation=function(){this.__stopped=!0},o.prototype.isStopped=function(){return!!this.__stopped;
};o.prototype.markMutated=function(){this.__mutatedMarked=!0},o.prototype.mutatedMarked=function(){return!!this.__mutatedMarked};var s=function(e,t,r,n){for(var o=e,a=e instanceof i?e.collectMarks():{},l=[],s=[],_=e;_;){if(o!==_&&(l.push(e),e=_,s.push(a),a=e instanceof i?e.collectMarks():{}),o=_.parentNode,n(_,e,a)===!1)return;if(_.__wxHost){if(r)break;e=l.pop()||_.__wxHost,a=s.pop()||(e instanceof i?e.collectMarks():{}),_=_.__wxHost,o=_}else{var c=!0;_ instanceof i&&(c=!1),_=c||r?_.parentNode:_.__wxSlotParent}}};o.dispatchEvent=function(e,t){if(!t.__dispatched){t.__dispatched=!0,e.__wxElement&&e.__wxHost!==e.__wxElement&&(e=e.__wxElement,e.shadowRoot instanceof i&&(e=e.shadowRoot)),t.target=e instanceof i?e.__methodCaller:e;var r=function(e,r,n){if(!(r&&r.length&&t.mutatedMarked())){var o=t.currentTarget=n instanceof i?n.__methodCaller:n,l=e.call(o,[t],n instanceof a?n:void 0);r&&r.length&&t.markMutated(),l===!1&&(t.__originalEvent&&!t.__originalEvent.__stopPreventDefault&&t.__originalEvent.preventDefault(),t.__stopped=!0)}},n=t.type,o=!t.composed;if(t.__hasCapture){var l=[];s(e,n,o,function(e,t,r){return e.__wxCaptureEvents&&e.__wxCaptureEvents[n]&&l.push([e,t,r]),!0});for(var _=l.length-1;_>=0;_--){var c=l[_],u=c[0],d=c[1];t.target=d instanceof i?d.__methodCaller:d,t.mark=c[2];var f=u.__wxCaptureMutated&&u.__wxCaptureMutated[n];if(r(u.__wxCaptureEvents[n],f,u),t.__stopped)break}}if(t.target=e instanceof i?e.__methodCaller:e,!t.__stopped){var p=!t.bubbles;s(e,n,o,function(e,o,a){t.target=o instanceof i?o.__methodCaller:o,t.mark=a;var l=e.__wxMutated&&e.__wxMutated[n];return e.__wxEvents&&e.__wxEvents[n]&&r(e.__wxEvents[n],l,e),!p&&!t.__stopped})}}},o.triggerEvent=function(e,t,r,n){var i=o.create(t,r,n);o.dispatchEvent(e,i)},o.addListenerToElement=function(e,t,r,o){var i=o&&o.mutated;if(i){var l=r;r=function(e){if(!e.mutatedMarked()){var t=Array.prototype.slice.call(arguments);return l.apply(this,t)}}}var s=void 0;return o&&(o.useCapture||o.capture)?(e.__wxCaptureEvents||(e.__wxCaptureEvents=Object.create(null)),e.__wxCaptureEvents[t]||(e.__wxCaptureEvents[t]=n.create("Event Listener")),s=e.__wxCaptureEvents[t].add(r),i&&(e.__wxCaptureMutated||(e.__wxCaptureMutated=Object.create(null)),e.__wxCaptureMutated[t]||(e.__wxCaptureMutated[t]=[]),e.__wxCaptureMutated[t].push(s))):(e.__wxEvents||(e.__wxEvents=Object.create(null)),e.__wxEvents[t]||(e.__wxEvents[t]=n.create("Event Listener")),s=e.__wxEvents[t].add(r),i&&(e.__wxMutated||(e.__wxMutated=Object.create(null)),e.__wxMutated[t]||(e.__wxMutated[t]=[]),e.__wxMutated[t].push(s))),e instanceof a&&e.__componentOptions.listenerChangeLifeTimes&&e.triggerLifeTime("listenerChanged",[!0,t,r,o]),s},o.removeListenerFromElement=function(e,t,r,n){var o=null;if(n&&(n.useCapture||n.capture)){if(e.__wxCaptureEvents&&e.__wxCaptureEvents[t]&&(o=e.__wxCaptureEvents[t].remove(r)),e.__wxCaptureMutated&&e.__wxCaptureMutated[t]){var i=e.__wxCaptureMutated[t].indexOf(r);i!==-1&&e.__wxCaptureMutated[t].splice(i,1)}}else if(e.__wxEvents&&e.__wxEvents[t]&&(o=e.__wxEvents[t].remove(r)),e.__wxMutated&&e.__wxMutated[t]){var i=e.__wxMutated[t].indexOf(r);i!==-1&&e.__wxMutated[t].splice(i,1)}o&&e instanceof a&&e.__componentOptions.listenerChangeLifeTimes&&e.triggerLifeTime("listenerChanged",[!1,t,o,n])},e.exports=o},function(e,t,r){var n=r(3),o=function(e){for(var t=e.str;e.cur<t.length;){var r=t[e.cur];if(" "!==r&&"\n"!==r&&"\r"!==r&&"\t"!==r&&"\f"!==r)break;e.cur+=1}return e.cur<t.length},i=function(e){for(var t=e.str,r="";e.cur<t.length;){var n=t[e.cur];if(!(n>="0"&&n<="9"))break;r+=n,e.cur+=1}if(!r)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (illegal index)"));return parseInt(r,10)},a=function(e){for(var t=e.str,r="";e.cur<t.length;){var n=t[e.cur];if("\\"===n)if(e.cur+1===t.length);else{var o=t[e.cur+1];r+=o,e.cur+=1}else if(/^[_a-zA-Z]$/.test(n))r+=n;else{if(!(n>="0"&&n<="9"))break;if(""===r)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (field name cannot start with digits)"));r+=n}e.cur+=1}return r},l=function(e){for(var t=e.str,r="";e.cur<t.length;){var n=t[e.cur];if("\\"===n)if(e.cur+1===t.length)r+="\\",e.cur+=1;else{var o=t[e.cur+1];"."===o||"["===o||"]"===o||"\\"===o?(r+=o,e.cur+=2):(r+="\\",e.cur+=1)}else{if("."===n||"["===n)break;r+=n,e.cur+=1}}return r},s=function(e){var t=e.str;if(o(e),"*"===t[e.cur]&&"*"===t[e.cur+1])return e.cur+=2,["**"];var r=a(e);if(!r)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (first field name illegal)"));for(var n=[r];e.cur<t.length&&o(e);){var l=t[e.cur];if("."===l){if(e.cur+=1,o(e),"*"===t[e.cur]&&"*"===t[e.cur+1]){n.push("**"),e.cur+=2;break}var s=a(e);if(!s