summaryrefslogtreecommitdiff
path: root/site/public/assets/js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-06-06 11:03:56 +0200
committerJules Laplace <julescarbon@gmail.com>2019-06-06 11:03:56 +0200
commit502dc0a961bd0b0680522f4dc383034983e88a64 (patch)
tree1519189a230f923e36f4cca72787665ad9eb6352 /site/public/assets/js
parent0388dca71c5ad20f936125549fe95918c5fe7544 (diff)
parentfe066d0b79a305731e9ad7286445f17073ef917d (diff)
Merge branch 'master' of github.com:adamhrv/megapixels_dev
Diffstat (limited to 'site/public/assets/js')
-rw-r--r--site/public/assets/js/app/face.js254
-rw-r--r--site/public/assets/js/app/prototypes.js1
-rw-r--r--site/public/assets/js/dist/index.js88
-rw-r--r--site/public/assets/js/vendor/draco/draco_decoder.js32
-rw-r--r--site/public/assets/js/vendor/draco/draco_decoder.wasmbin0 -> 331539 bytes
-rw-r--r--site/public/assets/js/vendor/draco/draco_decoder_gltf.js31
-rw-r--r--site/public/assets/js/vendor/draco/draco_decoder_gltf.wasmbin0 -> 228970 bytes
-rw-r--r--site/public/assets/js/vendor/draco/draco_encoder.js33
-rw-r--r--site/public/assets/js/vendor/draco/draco_wasm_wrapper.js119
-rw-r--r--site/public/assets/js/vendor/draco/draco_wasm_wrapper_gltf.js119
-rw-r--r--site/public/assets/js/vendor/oktween.js159
-rw-r--r--site/public/assets/js/vendor/three.meshline.js486
-rw-r--r--site/public/assets/js/vendor/three.min.js963
13 files changed, 2285 insertions, 0 deletions
diff --git a/site/public/assets/js/app/face.js b/site/public/assets/js/app/face.js
new file mode 100644
index 00000000..0a87d2b2
--- /dev/null
+++ b/site/public/assets/js/app/face.js
@@ -0,0 +1,254 @@
+/* eslint-disable */
+var faceInit = function () {
+ var container = document.querySelector("#face_container")
+ var camera, controls, scene, renderer
+ var mouse = new THREE.Vector2(0.5, 0.5)
+ var mouseTarget = new THREE.Vector2(0.5, 0.5)
+ var POINT_SCALE = 1.8
+ var FACE_POINT_COUNT = 68
+ var SWAP_TIME = 500
+ var cubesĀ = [], meshes = []
+ var currentFace = document.querySelector('.currentFace')
+ var introEl = document.querySelector('.intro')
+ var faceBuffer = (function () {
+ var a = new Array(FACE_POINT_COUNT)
+ for (let i = 0; i < FACE_POINT_COUNT; i++) {
+ a[i] = new THREE.Vector3()
+ }
+ return a
+ })()
+ var lastSprite
+ var last_t = 0, start_t = 0
+ var bgColor = 0x000000 // 0x191919
+ var colors = [
+ 0xff3333,
+ 0xff8833,
+ 0xffff33,
+ 0x338833,
+ 0x3388ff,
+ 0x3333ff,
+ 0x8833ff,
+ 0xff3388,
+ 0xffffff,
+ ]
+ var swapping = false, swap_count = 0, swapFrom, swapTo, face_names, faces
+ init()
+
+ function init() {
+ fetch("/assets/data/3dlm_0_10.json")
+ .then(req => req.json())
+ .then(data => {
+ face_names = Object.keys(data)
+ faces = face_names.map(name => recenter(data[name]))
+ setup()
+ build(faces[0])
+ updateFace(faces[0])
+ setCurrentFace(face_names[0])
+ swapTo = faces[0]
+ animate()
+ })
+ }
+ function setup() {
+ var w = window.innerWidth * 2/3
+ var h = Math.min(window.innerWidth / 2, window.innerHeight * 0.7)
+ camera = new THREE.PerspectiveCamera(70, w/h, 1, 10000)
+ camera.position.x = 0
+ camera.position.y = 0
+ camera.position.z = 200
+
+ scene = new THREE.Scene()
+ // scene.background = new THREE.Color(bgColor)
+
+ renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true })
+ renderer.setPixelRatio(window.devicePixelRatio)
+ renderer.setSize(w, h)
+ renderer.setClearColor(0x000000, 0);
+ container.appendChild(renderer.domElement)
+ document.body.addEventListener('mousemove', onMouseMove)
+ // renderer.domElement.addEventListener('mousedown', swap)
+ // oktween.add({
+ // obj: el.style,
+ // units: "px",
+ // from: { left: 0 },
+ // to: { left: 100 },
+ // duration: 1000,
+ // easing: oktween.easing.circ_out,
+ // update: function(obj){
+ // console.log(obj.left)
+ // }
+ // finished: function(){
+ // console.log("done")
+ // }
+ // })
+ swap()
+ }
+ function build(points) {
+ var matrix = new THREE.Matrix4()
+ var quaternion = new THREE.Quaternion()
+
+ for (var i = 0; i < FACE_POINT_COUNT; i++) {
+ var p = points[i]
+ var geometry = new THREE.BoxBufferGeometry()
+ var position = new THREE.Vector3(p[0], p[1], p[2])
+ var rotation = new THREE.Euler()
+ var scale = new THREE.Vector3()
+ var color = new THREE.Color()
+ scale.x = scale.y = scale.z = POINT_SCALE
+ quaternion.setFromEuler(rotation, false)
+ matrix.compose(position, quaternion, scale)
+ geometry.applyMatrix(matrix)
+ material = new THREE.MeshBasicMaterial({ color: color.setHex(0xffffff) })
+ cube = new THREE.Mesh(geometry, material)
+ scene.add(cube)
+ cubes.push(cube)
+ }
+
+ meshes = getLineGeometry(points).map((geometry, i) => {
+ var color = new THREE.Color()
+ var material = new MeshLineMaterial({
+ color: color.setHex(colors[i % colors.length]),
+ })
+ var line = new MeshLine()
+ line.setGeometry(geometry, _ => 1.5)
+ var mesh = new THREE.Mesh(line.geometry, material)
+ mesh.geometry.dynamic = true
+ scene.add(mesh)
+ return [line, mesh]
+ })
+ }
+ function lerpPoints(n, A, B, C) {
+ for (let i = 0, len = A.length; i < len; i++) {
+ lerpPoint(n, A[i], B[i], C[i])
+ }
+ }
+ function lerpPoint(n, A, B, C) {
+ C.x = lerp(n, A.x, B.x)
+ C.y = lerp(n, A.y, B.y)
+ C.z = lerp(n, A.z, B.z)
+ }
+ function lerp(n, a, b) {
+ return (b-a) * n + a
+ }
+ function swap(){
+ swap_count = (swap_count + 1) % faces.length
+ swapFrom = swapTo || faces[0]
+ swapTo = faces[swap_count]
+ setCurrentFace(face_names[swap_count])
+ oktween.add({
+ from: { n: 0 },
+ to: { n: 1 },
+ duration: 1000,
+ easing: oktween.easing.quad_in_out,
+ update: function(obj){
+ lerpPoints(obj.n, swapFrom, swapTo, faceBuffer)
+ updateFace(faceBuffer)
+ },
+ finished: function(){
+ setTimeout(swap, 2000)
+ }
+ })
+ }
+ function setCurrentFace(name) {
+ name = name.replace('.png', '').split('_').filter(s => !s.match(/\d+/)).join(' ')
+ currentFace.innerHTML = name
+ // if (lastSprite) {
+ // scene.remove(lastSprite)
+ // }
+ // var sprite = new THREE.TextSprite({
+ // textSize: 12,
+ // redrawInterval: 1000,
+ // material: {
+ // color: 0xcccccc,
+ // },
+ // texture: {
+ // text: name,
+ // fontFamily: '"Roboto", "Helvetica", sans-serif',
+ // },
+ // });
+ // sprite.position
+ // .setX(0)
+ // .setY(0)
+ // .setZ(0)
+ // scene.add(sprite);
+ // lastSprite = sprite
+ }
+ function updateFace(points) {
+ updateCubeGeometry(points)
+ updateLineGeometry(points)
+ }
+ function updateCubeGeometry(points) {
+ cubes.forEach((cube, i) => {
+ const p = points[i]
+ cube.position.set(p.x, p.y, p.z)
+ })
+ }
+ function updateLineGeometry(points) {
+ getLineGeometry(points).map((geometry, i) => {
+ var [line, mesh] = meshes[i]
+ line.setGeometry(geometry, _ => 1.5)
+ mesh.geometry.vertices = line.geometry.vertices
+ mesh.geometry.verticesNeedUpdate = true
+ })
+ }
+ function getLineGeometry(points) {
+ return [
+ points.slice(0, 17),
+ points.slice(17, 22),
+ points.slice(22, 27),
+ points.slice(27, 31),
+ points.slice(31, 36),
+ points.slice(36, 42),
+ points.slice(42, 48),
+ points.slice(48)
+ ].map((a, i) => {
+ var geometry = new THREE.Geometry()
+ a.forEach(p => geometry.vertices.push(p))
+ if (i > 4) {
+ geometry.vertices.push(a[0])
+ }
+ return geometry
+ })
+ }
+ function getBounds(obj) {
+ return obj.reduce((a, p) => {
+ return [
+ Math.min(a[0], p[0]),
+ Math.max(a[1], p[0]),
+ Math.min(a[2], p[1]),
+ Math.max(a[3], p[1]),
+ Math.min(a[4], p[2]),
+ Math.max(a[5], p[2]),
+ ]
+ }, [Infinity, -Infinity, Infinity, -Infinity, Infinity, -Infinity])
+ }
+ function recenter(obj) {
+ const bounds = getBounds(obj)
+ const x_width = (bounds[1] - bounds[0]) / 2
+ const y_width = (bounds[3] - bounds[2]) / -3
+ const z_width = (bounds[5] - bounds[4]) / 2
+ return obj.map(p => {
+ p[0] = p[0] - bounds[0] - x_width
+ p[1] = -p[1] + bounds[1] + y_width
+ p[2] = p[2] - bounds[2] + z_width
+ return new THREE.Vector3(p[0], p[1], p[2])
+ })
+ }
+ //
+ function onMouseMove(e) {
+ mouse.x = e.clientX / window.innerWidth
+ mouse.y = e.clientY / window.innerHeight
+ }
+ function animate(t) {
+ requestAnimationFrame(animate)
+ renderer.render(scene, camera)
+ // scene.rotation.y += 0.01 * Math.PI
+ mouseTarget.x += (mouse.x - mouseTarget.x) * 0.1
+ mouseTarget.y += (mouse.y - mouseTarget.y) * 0.1
+ scene.rotation.x = (mouseTarget.y - 0.5) * Math.PI / 2
+ scene.rotation.y = (mouseTarget.x - 0.5) * Math.PI
+ currentFace.style.transform = "translateZ(0) rotateY(" + (scene.rotation.y/2) + "rad)"
+ // scene.rotation.y += 0.01
+ last_t = t
+ }
+}
+faceInit() \ No newline at end of file
diff --git a/site/public/assets/js/app/prototypes.js b/site/public/assets/js/app/prototypes.js
new file mode 100644
index 00000000..a7da2e46
--- /dev/null
+++ b/site/public/assets/js/app/prototypes.js
@@ -0,0 +1 @@
+prototypes.js \ No newline at end of file
diff --git a/site/public/assets/js/dist/index.js b/site/public/assets/js/dist/index.js
new file mode 100644
index 00000000..a1c2304c
--- /dev/null
+++ b/site/public/assets/js/dist/index.js
@@ -0,0 +1,88 @@
+!function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=183)}([function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===t)return new Date(NaN);var n=e||{},c=null==n.additionalDigits?s:Object(i.a)(n.additionalDigits);if(2!==c&&1!==c&&0!==c)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))return new Date(t.getTime());if("number"==typeof t||"[object Number]"===Object.prototype.toString.call(t))return new Date(t);if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var h=function(t){var e,n={},i=t.split(l.dateTimeDelimeter);l.plainTime.test(i[0])?(n.date=null,e=i[0]):(n.date=i[0],e=i[1],l.timeZoneDelimeter.test(n.date)&&(n.date=t.split(l.timeZoneDelimeter)[0],e=t.substr(n.date.length,t.length)));if(e){var o=l.timezone.exec(e);o?(n.time=e.replace(o[1],""),n.timezone=o[1]):n.time=e}return n}(t),v=function(t,e){var n,i=l.YYY[e],o=l.YYYYY[e];if(n=l.YYYY.exec(t)||o.exec(t)){var r=n[1];return{year:parseInt(r,10),restDateString:t.slice(r.length)}}if(n=l.YY.exec(t)||i.exec(t)){var a=n[1];return{year:100*parseInt(a,10),restDateString:t.slice(a.length)}}return{year:null}}(h.date,c),y=v.year,b=function(t,e){if(null===e)return null;var n,i,o,r;if(0===t.length)return(i=new Date(0)).setUTCFullYear(e),i;if(n=l.MM.exec(t))return i=new Date(0),o=parseInt(n[1],10)-1,f(e,o)?(i.setUTCFullYear(e,o),i):new Date(NaN);if(n=l.DDD.exec(t)){i=new Date(0);var a=parseInt(n[1],10);return function(t,e){if(e<1)return!1;var n=d(t);if(n&&e>366)return!1;if(!n&&e>365)return!1;return!0}(e,a)?(i.setUTCFullYear(e,0,a),i):new Date(NaN)}if(n=l.MMDD.exec(t)){i=new Date(0),o=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return f(e,o,s)?(i.setUTCFullYear(e,o,s),i):new Date(NaN)}if(n=l.Www.exec(t))return r=parseInt(n[1],10)-1,p(e,r)?u(e,r):new Date(NaN);if(n=l.WwwD.exec(t)){r=parseInt(n[1],10)-1;var c=parseInt(n[2],10)-1;return p(e,r,c)?u(e,r,c):new Date(NaN)}return null}(v.restDateString,y);if(isNaN(b))return new Date(NaN);if(b){var w,_=b.getTime(),x=0;if(h.time&&(x=function(t){var e,n,i;if(e=l.HH.exec(t))return g(n=parseFloat(e[1].replace(",",".")))?n%24*r:NaN;if(e=l.HHMM.exec(t))return n=parseInt(e[1],10),i=parseFloat(e[2].replace(",",".")),g(n,i)?n%24*r+i*a:NaN;if(e=l.HHMMSS.exec(t)){n=parseInt(e[1],10),i=parseInt(e[2],10);var o=parseFloat(e[3].replace(",","."));return g(n,i,o)?n%24*r+i*a+1e3*o:NaN}return null}(h.time),isNaN(x)))return new Date(NaN);if(h.timezone){if(w=function(t){var e,n,i;if(e=l.timezoneZ.exec(t))return 0;if(e=l.timezoneHH.exec(t))return m(i=parseInt(e[2],10))?(n=i*r,"+"===e[1]?-n:n):NaN;if(e=l.timezoneHHMM.exec(t)){i=parseInt(e[2],10);var o=parseInt(e[3],10);return m(i,o)?(n=i*r+o*a,"+"===e[1]?-n:n):NaN}return 0}(h.timezone),isNaN(w))return new Date(NaN)}else w=Object(o.a)(new Date(_+x)),w=Object(o.a)(new Date(_+x+w));return new Date(_+x+w)}return new Date(NaN)};var i=n(1),o=n(19),r=36e5,a=6e4,s=2,l={dateTimeDelimeter:/[T ]/,plainTime:/:/,timeZoneDelimeter:/[Z ]/i,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function u(t,e,n){e=e||0,n=n||0;var i=new Date(0);i.setUTCFullYear(t,0,4);var o=7*e+n+1-(i.getUTCDay()||7);return i.setUTCDate(i.getUTCDate()+o),i}var c=[31,28,31,30,31,30,31,31,30,31,30,31],h=[31,29,31,30,31,30,31,31,30,31,30,31];function d(t){return t%400==0||t%4==0&&t%100!=0}function f(t,e,n){if(e<0||e>11)return!1;if(null!=n){if(n<1)return!1;var i=d(t);if(i&&n>h[e])return!1;if(!i&&n>c[e])return!1}return!0}function p(t,e,n){return!(e<0||e>52)&&(null==n||!(n<0||n>6))}function g(t,e,n){return(null==t||!(t<0||t>=25))&&((null==e||!(e<0||e>=60))&&(null==n||!(n<0||n>=60)))}function m(t,e){return null==e||!(e<0||e>59)}},function(t,e,n){"use strict";e.a=function(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);if(isNaN(e))return e;return e<0?Math.ceil(e):Math.floor(e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"version",function(){return a}),n.d(e,"DOM",function(){return P}),n.d(e,"Children",function(){return T}),n.d(e,"render",function(){return y}),n.d(e,"createClass",function(){return H}),n.d(e,"createPortal",function(){return x}),n.d(e,"createFactory",function(){return M}),n.d(e,"createElement",function(){return k}),n.d(e,"cloneElement",function(){return R}),n.d(e,"isValidElement",function(){return D}),n.d(e,"findDOMNode",function(){return I}),n.d(e,"unmountComponentAtNode",function(){return S}),n.d(e,"Component",function(){return Y}),n.d(e,"PureComponent",function(){return X}),n.d(e,"unstable_renderSubtreeIntoContainer",function(){return w}),n.d(e,"unstable_batchedUpdates",function(){return Z}),n.d(e,"__spread",function(){return z});var i=n(33),o=n.n(i);n.d(e,"PropTypes",function(){return o.a});var r=n(207),a="15.1.0",s="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),l="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,u="undefined"!=typeof Symbol&&Symbol.for?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",c={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},h=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,d={},f=!1;try{f=!1}catch(t){}function p(){return null}var g=Object(r.c)("a",null).constructor;g.prototype.$$typeof=l,g.prototype.preactCompatUpgraded=!1,g.prototype.preactCompatNormalized=!1,Object.defineProperty(g.prototype,"type",{get:function(){return this.nodeName},set:function(t){this.nodeName=t},configurable:!0}),Object.defineProperty(g.prototype,"props",{get:function(){return this.attributes},set:function(t){this.attributes=t},configurable:!0});var m=r.d.event;r.d.event=function(t){return m&&(t=m(t)),t.persist=Object,t.nativeEvent=t,t};var v=r.d.vnode;function y(t,e,n){var i=e&&e._preactCompatRendered&&e._preactCompatRendered.base;i&&i.parentNode!==e&&(i=null),!i&&e&&(i=e.firstElementChild);for(var o=e.childNodes.length;o--;)e.childNodes[o]!==i&&e.removeChild(e.childNodes[o]);var a=Object(r.e)(t,e,i);return e&&(e._preactCompatRendered=a&&(a._component||{base:a})),"function"==typeof n&&n(),a&&a._component||a}r.d.vnode=function(t){if(!t.preactCompatUpgraded){t.preactCompatUpgraded=!0;var e=t.nodeName,n=t.attributes=null==t.attributes?{}:z({},t.attributes);"function"==typeof e?(!0===e[u]||e.prototype&&"isReactComponent"in e.prototype)&&(t.children&&""===String(t.children)&&(t.children=void 0),t.children&&(n.children=t.children),t.preactCompatNormalized||O(t),function(t){var e=t.nodeName,n=t.attributes;t.attributes={},e.defaultProps&&z(t.attributes,e.defaultProps);n&&z(t.attributes,n)}(t)):(t.children&&""===String(t.children)&&(t.children=void 0),t.children&&(n.children=t.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),function(t,e){var n,i,o;if(e){for(o in e)if(n=h.test(o))break;if(n)for(o in i=t.attributes={},e)e.hasOwnProperty(o)&&(i[h.test(o)?o.replace(/([A-Z0-9])/,"-$1").toLowerCase():o]=e[o])}}(t,n))}v&&v(t)};var b=function(){};function w(t,e,n,i){var o=y(Object(r.c)(b,{context:t.context},e),n),a=o._component||o.base;return i&&i.call(a,o),a}function _(t){w(this,t.vnode,t.container)}function x(t,e){return Object(r.c)(_,{vnode:t,container:e})}function S(t){var e=t._preactCompatRendered&&t._preactCompatRendered.base;return!(!e||e.parentNode!==t)&&(Object(r.e)(Object(r.c)(p),t,e),!0)}b.prototype.getChildContext=function(){return this.props.context},b.prototype.render=function(t){return t.children[0]};var E,C=[],T={map:function(t,e,n){return null==t?null:(t=T.toArray(t),n&&n!==t&&(e=e.bind(n)),t.map(e))},forEach:function(t,e,n){if(null==t)return null;t=T.toArray(t),n&&n!==t&&(e=e.bind(n)),t.forEach(e)},count:function(t){return t&&t.length||0},only:function(t){if(1!==(t=T.toArray(t)).length)throw new Error("Children.only() expects only one child.");return t[0]},toArray:function(t){return null==t?[]:C.concat(t)}};function M(t){return k.bind(null,t)}for(var P={},L=s.length;L--;)P[s[L]]=M(s[L]);function A(t){var e=t[u];return e?!0===e?t:e:(e=function(t){return H({displayName:t.displayName||t.name,render:function(){return t(this.props,this.context)}})}(t),Object.defineProperty(e,u,{configurable:!0,value:!0}),e.displayName=t.displayName,e.propTypes=t.propTypes,e.defaultProps=t.defaultProps,Object.defineProperty(t,u,{configurable:!0,value:e}),e)}function k(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function t(e,n){for(var i=n||0;i<e.length;i++){var o=e[i];Array.isArray(o)?t(o):o&&"object"==typeof o&&!D(o)&&(o.props&&o.type||o.attributes&&o.nodeName||o.children)&&(e[i]=k(o.type||o.nodeName,o.props||o.attributes,o.children))}}(t,2),O(r.c.apply(void 0,t))}function O(t){t.preactCompatNormalized=!0,function(t){var e=t.attributes||(t.attributes={});j.enumerable="className"in e,e.className&&(e.class=e.className);Object.defineProperty(e,"className",j)}(t),function(t){return"function"==typeof t&&!(t.prototype&&t.prototype.render)}(t.nodeName)&&(t.nodeName=A(t.nodeName));var e=t.attributes.ref,n=e&&typeof e;return!E||"string"!==n&&"number"!==n||(t.attributes.ref=function(t,e){return e._refProxies[t]||(e._refProxies[t]=function(n){e&&e.refs&&(e.refs[t]=n,null===n&&(delete e._refProxies[t],e=null))})}(e,E)),function(t){var e=t.nodeName,n=t.attributes;if(!n||"string"!=typeof e)return;var i={};for(var o in n)i[o.toLowerCase()]=o;i.ondoubleclick&&(n.ondblclick=n[i.ondoubleclick],delete n[i.ondoubleclick]);if(i.onchange&&("textarea"===e||"input"===e.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var r=i.oninput||"oninput";n[r]||(n[r]=V([n[r],n[i.onchange]]),delete n[i.onchange])}}(t),t}function R(t,e){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];if(!D(t))return t;var o=t.attributes||t.props,a=[Object(r.c)(t.nodeName||t.type,z({},o),t.children||o&&o.children),e];return n&&n.length?a.push(n):e&&e.children&&a.push(e.children),O(r.b.apply(void 0,a))}function D(t){return t&&(t instanceof g||t.$$typeof===l)}var j={configurable:!0,get:function(){return this.class},set:function(t){this.class=t}};function z(t,e){for(var n=arguments,i=1,o=void 0;i<arguments.length;i++)if(o=n[i])for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r]);return t}function N(t,e){for(var n in t)if(!(n in e))return!0;for(var i in e)if(t[i]!==e[i])return!0;return!1}function I(t){return t&&(t.base||1===t.nodeType&&t)||null}function F(){}function H(t){function e(t,e){!function(t){for(var e in t){var n=t[e];"function"!=typeof n||n.__bound||c.hasOwnProperty(e)||((t[e]=n.bind(t)).__bound=!0)}}(this),Y.call(this,t,e,d),B.call(this,t,e)}return(t=z({constructor:e},t)).mixins&&function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=V(e[n].concat(t[n]||C),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}(t,function(t){for(var e={},n=0;n<t.length;n++){var i=t[n];for(var o in i)i.hasOwnProperty(o)&&"function"==typeof i[o]&&(e[o]||(e[o]=[])).push(i[o])}return e}(t.mixins)),t.statics&&z(e,t.statics),t.propTypes&&(e.propTypes=t.propTypes),t.defaultProps&&(e.defaultProps=t.defaultProps),t.getDefaultProps&&(e.defaultProps=t.getDefaultProps.call(e)),F.prototype=Y.prototype,e.prototype=z(new F,t),e.displayName=t.displayName||"Component",e}function G(t,e,n){if("string"==typeof e&&(e=t.constructor.prototype[e]),"function"==typeof e)return e.apply(t,n)}function V(t,e){return function(){for(var n,i=arguments,o=0;o<t.length;o++){var r=G(this,t[o],i);if(e&&null!=r)for(var a in n||(n={}),r)r.hasOwnProperty(a)&&(n[a]=r[a]);else void 0!==r&&(n=r)}return n}}function B(t,e){U.call(this,t,e),this.componentWillReceiveProps=V([U,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=V([U,W,this.render||"render",q])}function U(t,e){if(t){var n=t.children;if(n&&Array.isArray(n)&&1===n.length&&("string"==typeof n[0]||"function"==typeof n[0]||n[0]instanceof g)&&(t.children=n[0],t.children&&"object"==typeof t.children&&(t.children.length=1,t.children[0]=t.children)),f){var i="function"==typeof this?this:this.constructor,r=this.propTypes||i.propTypes,a=this.displayName||i.name;r&&o.a.checkPropTypes(r,t,"prop",a)}}}function W(t){E=this}function q(){E===this&&(E=null)}function Y(t,e,n){r.a.call(this,t,e),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==d&&B.call(this,t,e)}function X(t,e){Y.call(this,t,e)}function Z(t){t()}z(Y.prototype=new r.a,{constructor:Y,isReactComponent:{},replaceState:function(t,e){for(var n in this.setState(t,e),this.state)n in t||delete this.state[n]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),F.prototype=Y.prototype,X.prototype=new F,X.prototype.isPureReactComponent=!0,X.prototype.shouldComponentUpdate=function(t,e){return N(this.props,t)||N(this.state,e)};var Q={version:a,DOM:P,PropTypes:o.a,Children:T,render:y,createClass:H,createPortal:x,createFactory:M,createElement:k,cloneElement:R,isValidElement:D,findDOMNode:I,unmountComponentAtNode:S,Component:Y,PureComponent:X,unstable_renderSubtreeIntoContainer:w,unstable_batchedUpdates:Z,__spread:z};e.default=Q},function(t,e){var n=t.exports={version:"2.6.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(5),o=n(3),r=n(18),a=n(20),s=n(24),l=function(t,e,n){var u,c,h,d=t&l.F,f=t&l.G,p=t&l.S,g=t&l.P,m=t&l.B,v=t&l.W,y=f?o:o[e]||(o[e]={}),b=y.prototype,w=f?i:p?i[e]:(i[e]||{}).prototype;for(u in f&&(n=e),n)(c=!d&&w&&void 0!==w[u])&&s(y,u)||(h=c?w[u]:n[u],y[u]=f&&"function"!=typeof w[u]?n[u]:m&&c?r(h,i):v&&w[u]==h?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):g&&"function"==typeof h?r(Function.call,h):h,g&&((y.virtual||(y.virtual={}))[u]=h,t&l.R&&b&&!b[u]&&a(b,u,h)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var i=n(74)("wks"),o=n(54),r=n(5).Symbol,a="function"==typeof r;(t.exports=function(t){return i[t]||(i[t]=a&&r[t]||(a?r:o)("Symbol."+t))}).store=i},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(n(235));e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),(0,i.default)(t,o.key,o)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}()},function(t,e,n){var i=n(15),o=n(102),r=n(71),a=Object.defineProperty;e.f=n(16)?Object.defineProperty:function(t,e,n){if(i(t),e=r(e,!0),i(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.post=e.get=e.preloadImage=e.domainFromUrl=e.clamp=e.px=e.percent=e.timestamp=e.padSeconds=e.courtesyS=e.pad=e.formatName=e.widths=e.toTuples=e.choice=e.toArray=e.isFirefox=e.isDesktop=e.isMobile=e.isAndroid=e.isiPad=e.isiPhone=void 0;var i=r(n(228)),o=r(n(45));function r(t){return t&&t.__esModule?t:{default:t}}var a=e.isiPhone=!(!navigator.userAgent.match(/iPhone/i)&&!navigator.userAgent.match(/iPod/i)),s=e.isiPad=!!navigator.userAgent.match(/iPad/i),l=e.isAndroid=!!navigator.userAgent.match(/Android/i),u=e.isMobile=a||s||l,c=e.isDesktop=!u,h=e.isFirefox="undefined"!=typeof InstallTrigger,d=(e.toArray=function(t){return Array.prototype.slice.apply(t)},e.choice=function(t){return t[Math.floor(Math.random()*t.length)]},e.toTuples=function(t){return(0,o.default)(t).map(function(e){return[e,t[e]]})},document.body.parentNode.classList);d.add(c?"desktop":"mobile"),h&&d.add("firefox");e.widths={th:160,sm:320,md:640,lg:1280};var f="id url cc sa fp md5 sha256".split(" ").map(function(t){return"_"+t}),p=f.map(function(t){return t.toUpperCase()}),g=(e.formatName=function(t){return f.forEach(function(e,n){return t=t.replace(e,p[n])}),t.replace(/_/g," ")},e.pad=function(t,e){for(var n=String(t||0);n.length<e;)n="0"+n;return n},e.courtesyS=function(t,e){return t+" "+(1===t?e:e+"s")},e.padSeconds=function(t){return t<10?"0"+t:t});e.timestamp=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;t/=arguments.length>1&&void 0!==arguments[1]?arguments[1]:25;var e=g(Math.round(t)%60);return(t=Math.floor(t/60))>60?Math.floor(t/60)+":"+g(t%60)+":"+e:t%60+":"+e},e.percent=function(t){return(100*t).toFixed(1)+"%"},e.px=function(t,e){return Math.round(t*e)+"px"},e.clamp=function(t,e,n){return t<e?e:t<n?t:n},e.domainFromUrl=function(t){var e=t.split("/")[2].split(".");return e.length>2&&2==e[e.length-2].length?e.slice(-3).join("."):e.slice(-2).join(".")},e.preloadImage=function(t){var e=t.verified,n=t.hash,i=t.frame,o=t.url;n&&i&&(o=imageUrl(e,n,i,"md"));var r=new Image,a=!1;r.onload=function(){a||(a=!0,r.onload=null)},r.crossOrigin="anonymous",r.src=o,r.complete&&r.onload()},e.get=function(t,e){return fetch(t,{method:"GET",body:e,headers:{Accept:"application/json, application/xml, text/play, text/html, *.*"}}).then(function(t){return t.json()})},e.post=function(t,e){var n=void 0;return e instanceof FormData?n={Accept:"application/json, application/xml, text/play, text/html, *.*"}:(n={Accept:"application/json, application/xml, text/play, text/html, *.*","Content-Type":"application/json; charset=utf-8"},e=(0,i.default)(e)),fetch(t,{method:"POST",body:e,headers:n}).then(function(t){return t.json()})}},function(t,e,n){t.exports={default:n(233),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(n(56));e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,i.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){"use strict";e.__esModule=!0;var i=a(n(247)),o=a(n(251)),r=a(n(56));function a(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,r.default)(e)));t.prototype=(0,o.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(i.default?(0,i.default)(t,e):t.__proto__=e)}},function(t,e,n){var i=n(10);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(23)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(210),o=n(117),r=n(216);n.d(e,"Provider",function(){return i.b}),n.d(e,"createProvider",function(){return i.a}),n.d(e,"connectAdvanced",function(){return o.a}),n.d(e,"connect",function(){return r.a})},function(t,e,n){var i=n(40);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";e.a=function(t){var e=new Date(t.getTime()),n=e.getTimezoneOffset();e.setSeconds(0,0);var o=e.getTime()%i;return n*i+o};var i=6e4},function(t,e,n){var i=n(9),o=n(41);t.exports=n(16)?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"createStore",function(){return s}),n.d(e,"combineReducers",function(){return u}),n.d(e,"bindActionCreators",function(){return h}),n.d(e,"applyMiddleware",function(){return p}),n.d(e,"compose",function(){return f}),n.d(e,"__DO_NOT_USE__ActionTypes",function(){return r});var i=n(219),o=function(){return Math.random().toString(36).substring(7).split("").join(".")},r={INIT:"@@redux/INIT"+o(),REPLACE:"@@redux/REPLACE"+o(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+o()}};function a(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function s(t,e,n){var o;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function");if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var l=t,u=e,c=[],h=c,d=!1;function f(){h===c&&(h=c.slice())}function p(){if(d)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return u}function g(t){if("function"!=typeof t)throw new Error("Expected the listener to be a function.");if(d)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var e=!0;return f(),h.push(t),function(){if(e){if(d)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");e=!1,f();var n=h.indexOf(t);h.splice(n,1)}}}function m(t){if(!a(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(d)throw new Error("Reducers may not dispatch actions.");try{d=!0,u=l(u,t)}finally{d=!1}for(var e=c=h,n=0;n<e.length;n++){(0,e[n])()}return t}return m({type:r.INIT}),(o={dispatch:m,subscribe:g,getState:p,replaceReducer:function(t){if("function"!=typeof t)throw new Error("Expected the nextReducer to be a function.");l=t,m({type:r.REPLACE})}})[i.a]=function(){var t,e=g;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new TypeError("Expected the observer to be an object.");function n(){t.next&&t.next(p())}return n(),{unsubscribe:e(n)}}})[i.a]=function(){return this},t},o}function l(t,e){var n=e&&e.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function u(t){for(var e=Object.keys(t),n={},i=0;i<e.length;i++){var o=e[i];0,"function"==typeof t[o]&&(n[o]=t[o])}var a,s=Object.keys(n);try{!function(t){Object.keys(t).forEach(function(e){var n=t[e];if(void 0===n(void 0,{type:r.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:r.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+r.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(n)}catch(t){a=t}return function(t,e){if(void 0===t&&(t={}),a)throw a;for(var i=!1,o={},r=0;r<s.length;r++){var u=s[r],c=n[u],h=t[u],d=c(h,e);if(void 0===d){var f=l(u,e);throw new Error(f)}o[u]=d,i=i||d!==h}return i?o:t}}function c(t,e){return function(){return e(t.apply(this,arguments))}}function h(t,e){if("function"==typeof t)return c(t,e);if("object"!=typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(t),i={},o=0;o<n.length;o++){var r=n[o],a=t[r];"function"==typeof a&&(i[r]=c(a,e))}return i}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}function p(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),i=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},r=e.map(function(t){return t(o)});return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){d(t,e,n[e])})}return t}({},n,{dispatch:i=f.apply(void 0,r)(n.dispatch)})}}}},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,a=r&&r.options&&r.options.weekStartsOn,s=null==a?0:Object(i.a)(a),l=null==n.weekStartsOn?s:Object(i.a)(n.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Object(o.a)(t,n),c=u.getDay(),h=(c<l?7:0)+c-l;return u.setDate(u.getDate()-h),u.setHours(0,0,0,0),u};var i=n(1),o=n(0)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(i),r=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[n].concat(r).concat([o]).join("\n")}return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(i[r]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&i[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){var i={},o=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),r=function(t){var e={};return function(t){if("function"==typeof t)return t();if(void 0===e[t]){var n=function(t){return document.querySelector(t)}.call(this,t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),a=null,s=0,l=[],u=n(259);function c(t,e){for(var n=0;n<t.length;n++){var o=t[n],r=i[o.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](o.parts[a]);for(;a<o.parts.length;a++)r.parts.push(m(o.parts[a],e))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(m(o.parts[a],e));i[o.id]={id:o.id,refs:1,parts:s}}}}function h(t,e){for(var n=[],i={},o=0;o<t.length;o++){var r=t[o],a=e.base?r[0]+e.base:r[0],s={css:r[1],media:r[2],sourceMap:r[3]};i[a]?i[a].parts.push(s):n.push(i[a]={id:a,parts:[s]})}return n}function d(t,e){var n=r(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var i=l[l.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),l.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=r(t.insertInto+" "+t.insertAt.before);n.insertBefore(e,o)}}function f(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=l.indexOf(t);e>=0&&l.splice(e,1)}function p(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),g(e,t.attrs),d(t,e),e}function g(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function m(t,e){var n,i,o,r;if(e.transform&&t.css){if(!(r=e.transform(t.css)))return function(){};t.css=r}if(e.singleton){var l=s++;n=a||(a=p(e)),i=y.bind(null,n,l,!1),o=y.bind(null,n,l,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),d(t,e),e}(e),i=function(t,e,n){var i=n.css,o=n.sourceMap,r=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||r)&&(i=u(i));o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([i],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),o=function(){f(n),n.href&&URL.revokeObjectURL(n.href)}):(n=p(e),i=function(t,e){var n=e.css,i=e.media;i&&t.setAttribute("media",i);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){f(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return c(n,e),function(t){for(var o=[],r=0;r<n.length;r++){var a=n[r];(s=i[a.id]).refs--,o.push(s)}t&&c(h(t,e),e);for(r=0;r<o.length;r++){var s;if(0===(s=o[r]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete i[s.id]}}}};var v=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function y(t,e,n,i){var o=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=v(e,o);else{var r=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(o.a)(e);return n.weekStartsOn=1,Object(i.a)(t,n)};var i=n(22),o=n(35)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n),a=o.getTime()-r.getTime();return a<0?-1:a>0?1:a};var i=n(0)},function(t,e){t.exports={}},function(t,e,n){var i=n(67),o=n(68);t.exports=function(t){return i(o(t))}},function(t,e,n){var i=n(68);t.exports=function(t){return Object(i(t))}},function(t,e,n){"use strict";var i=n(192)(!0);n(69)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){t.exports=n(205)()},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),r=n.getFullYear(),a=new Date(0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);var s=Object(o.a)(a,e),l=new Date(0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);var u=Object(o.a)(l,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1};var i=n(0),o=n(27)},function(t,e,n){"use strict";e.a=function(t){t=t||{};var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(o.a)(t,n),s=Object(o.a)(e,n),l=a.getTime()-Object(i.a)(a),u=s.getTime()-Object(i.a)(s);return Math.round((l-u)/r)};var i=n(19),o=n(90),r=864e5},function(t,e,n){n(186);for(var i=n(5),o=n(20),r=n(29),a=n(6)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var u=s[l],c=i[u],h=c&&c.prototype;h&&!h[a]&&o(h,a,u),r[u]=r.Array}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=!0},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(104),o=n(75);t.exports=Object.keys||function(t){return i(t,o)}},function(t,e,n){var i=n(9).f,o=n(24),r=n(6)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,r)&&i(t,r,{configurable:!0,value:e})}},function(t,e,n){var i=n(18),o=n(107),r=n(108),a=n(15),s=n(53),l=n(76),u={},c={};(e=t.exports=function(t,e,n,h,d){var f,p,g,m,v=d?function(){return t}:l(t),y=i(n,h,e?2:1),b=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(r(v)){for(f=s(t.length);f>b;b++)if((m=e?y(a(p=t[b])[0],p[1]):y(t[b]))===u||m===c)return m}else for(g=v.call(t);!(p=g.next()).done;)if((m=o(g,y,p.value,e))===u||m===c)return m}).BREAK=u,e.RETURN=c},function(t,e,n){t.exports={default:n(230),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var i=n(2),o=n(2);e.clone=function(t){return JSON.parse(JSON.stringify(t))},e.isSameArray=function(t,e){var n=t.length;if(n!==e.length)return!1;for(;n--;)if(t[n]!==e[n])return!1;return!0},e.reactFormatter=function(t){return function(e,n,r){return r(function(){var n=e.getElement(),r=i.cloneElement(t,{cell:e});o.render(r,n.querySelector(".formatterCell"))}),'<div class="formatterCell"></div>'}}},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(o.a)(t,n),a=Object(i.a)(e);return r.setDate(r.getDate()+a),r};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(o.a)(t,n).getTime(),a=Object(i.a)(e);return new Date(r+a)};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),r=new Date(0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Object(o.a)(r,e)};var i=n(34),o=n(27)},function(t,e,n){"use strict";var i=n(311),o=n(312),r=n(314),a=n(315),s=n(317),l={formatDistance:i.a,formatLong:o.a,formatRelative:r.a,localize:a.a,match:s.a,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.a=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Video=e.DetectionBoxes=e.DetectionList=e.Classifier=e.TableCell=e.TableRow=e.TableTuples=e.TableArray=e.TableObject=e.Gate=e.UploadImage=e.Loader=e.Sidebar=void 0;var i=d(n(408)),o=d(n(409)),r=d(n(410)),a=d(n(411)),s=d(n(414)),l=d(n(430)),u=d(n(431)),c=d(n(436)),h=n(437);function d(t){return t&&t.__esModule?t:{default:t}}n(439),e.Sidebar=l.default,e.Loader=a.default,e.UploadImage=s.default,e.Gate=u.default,e.TableObject=h.TableObject,e.TableArray=h.TableArray,e.TableTuples=h.TableTuples,e.TableRow=h.TableRow,e.TableCell=h.TableCell,e.Classifier=i.default,e.DetectionList=r.default,e.DetectionBoxes=o.default,e.Video=c.default},function(t,e,n){var i=n(15),o=n(189),r=n(75),a=n(73)("IE_PROTO"),s=function(){},l=function(){var t,e=n(70)("iframe"),i=r.length;for(e.style.display="none",n(105).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;i--;)delete l.prototype[r[i]];return l()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=i(t),n=new s,s.prototype=null,n[a]=t):n=l(),void 0===e?n:o(n,e)}},function(t,e,n){var i=n(72),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e,n){var i=n(38),o=n(6)("toStringTag"),r="Arguments"==i(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:r?i(e):"Object"==(a=i(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){"use strict";e.__esModule=!0;var i=a(n(238)),o=a(n(240)),r="function"==typeof o.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":typeof t};function a(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof o.default&&"symbol"===r(i.default)?function(t){return void 0===t?"undefined":r(t)}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":void 0===t?"undefined":r(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(o.a)(t,n),s=Object(i.a)(e),l=a.getMonth()+s,u=new Date(0);u.setFullYear(a.getFullYear(),l,1),u.setHours(0,0,0,0);var c=Object(r.a)(u,n);return a.setMonth(l,Math.min(c,a.getDate())),a};var i=n(1),o=n(0),r=n(91)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=7*Object(i.a)(e);return Object(o.a)(t,r,n)};var i=n(1),o=n(47)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getTime()-r.getTime()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return n.setDate(1),n.setHours(0,0,0,0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getUTCDay(),r=(o<1?7:0)+o-1;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,a=r&&r.options&&r.options.weekStartsOn,s=null==a?0:Object(i.a)(a),l=null==n.weekStartsOn?s:Object(i.a)(n.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Object(o.a)(t,n),c=u.getUTCDay(),h=(c<l?7:0)+c-l;return u.setUTCDate(u.getUTCDate()-h),u.setUTCHours(0,0,0,0),u};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,-r,n)};var i=n(1),o=n(48)},function(t,e,n){"use strict";e.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(n(432));e.default=i.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}},function(t,e,n){"use strict";e.__esModule=!0;var i=r(n(184)),o=r(n(194));function r(t){return t&&t.__esModule?t:{default:t}}e.default=function(){return function(t,e){if(Array.isArray(t))return t;if((0,i.default)(Object(t)))return function(t,e){var n=[],i=!0,r=!1,a=void 0;try{for(var s,l=(0,o.default)(t);!(i=(s=l.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{!i&&l.return&&l.return()}finally{if(r)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(t,e,n){var i=n(38);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var i=n(39),o=n(4),r=n(103),a=n(20),s=n(29),l=n(188),u=n(43),c=n(106),h=n(6)("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(t,e,n,p,g,m,v){l(n,e,p);var y,b,w,_=function(t){if(!d&&t in C)return C[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",S="values"==g,E=!1,C=t.prototype,T=C[h]||C["@@iterator"]||g&&C[g],M=T||_(g),P=g?S?_("entries"):M:void 0,L="Array"==e&&C.entries||T;if(L&&(w=c(L.call(new t)))!==Object.prototype&&w.next&&(u(w,x,!0),i||"function"==typeof w[h]||a(w,h,f)),S&&T&&"values"!==T.name&&(E=!0,M=function(){return T.call(this)}),i&&!v||!d&&!E&&C[h]||a(C,h,M),s[e]=M,s[x]=f,g)if(y={values:S?M:_("values"),keys:m?M:_("keys"),entries:P},v)for(b in y)b in C||r(C,b,y[b]);else o(o.P+o.F*(d||E),e,y);return y}},function(t,e,n){var i=n(10),o=n(5).document,r=i(o)&&i(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},function(t,e,n){var i=n(10);t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(74)("keys"),o=n(54);t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var i=n(3),o=n(5),r=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:n(39)?"pure":"global",copyright:"Ā© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(55),o=n(6)("iterator"),r=n(29);t.exports=n(3).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||r[i(t)]}},function(t,e){},function(t,e){t.exports=function(t,e,n,i){if(!(t instanceof e)||void 0!==i&&i in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){"use strict";var i=n(40);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i}),this.resolve=i(e),this.reject=i(n)}(t)}},function(t,e,n){var i=n(20);t.exports=function(t,e,n){for(var o in e)n&&t[o]?t[o]=e[o]:i(t,o,e[o]);return t}},function(t,e,n){"use strict";e.a=function(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t);try{throw new Error(t)}catch(t){}}},function(t,e,n){"use strict";function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}e.a=i},function(t,e,n){"use strict";e.a=function(t,e){if(null==t)return{};var n,i,o={},r=Object.keys(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=0||(o[n]=t[n]);return o}},function(t,e,n){e.f=n(6)},function(t,e,n){var i=n(54)("meta"),o=n(10),r=n(24),a=n(9).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(23)(function(){return l(Object.preventExtensions({}))}),c=function(t){a(t,i,{value:{i:"O"+ ++s,w:{}}})},h=t.exports={KEY:i,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!r(t,i)){if(!l(t))return"F";if(!e)return"E";c(t)}return t[i].i},getWeak:function(t,e){if(!r(t,i)){if(!l(t))return!0;if(!e)return!1;c(t)}return t[i].w},onFreeze:function(t){return u&&h.NEED&&l(t)&&!r(t,i)&&c(t),t}}},function(t,e,n){var i=n(5),o=n(3),r=n(39),a=n(84),s=n(9).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){t.exports={default:n(265),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var i=n(128),o=n(285),r=n(286),a=n(46);t.exports={ReactTabulator:i.default,React15Tabulator:o.default,ReactTabulatorExample:r.default,reactFormatter:a.reactFormatter}},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return n.setHours(0,0,0,0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getFullYear(),r=n.getMonth(),a=new Date(0);return a.setFullYear(o,r+1,0),a.setHours(0,0,0,0),a.getDate()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(i.a)(t,n),s=Object(i.a)(e,n),l=Object(r.a)(a,s,n),u=Math.abs(Object(o.a)(a,s,n));a.setMonth(a.getMonth()-l*u);var c=Object(r.a)(a,s,n)===-l,h=l*(u-c);return 0===h?0:h};var i=n(0),o=n(140),r=n(28)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,e,n)/1e3;return o>0?Math.floor(o):Math.ceil(o)};var i=n(60)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},l=n.locale,u=l&&l.options&&l.options.weekStartsOn,c=null==u?0:Object(o.a)(u),h=null==n.weekStartsOn?c:Object(o.a)(n.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=t||{},f=Object(i.a)(d.start,e),p=Object(i.a)(d.end,e).getTime();if(!(f.getTime()<=p))throw new RangeError("Invalid interval");var g=Object(r.a)(d),m=[],v=0;for(;v++<g.length;){var y=g[v];Object(s.a)(y)&&(m.push(new Date(y)),Object(a.a)(y)&&(v+=5))}return m};var i=n(0),o=n(1),r=n(146),a=n(147),s=n(148)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getMonth();return n.setFullYear(n.getFullYear(),o+1,0),n.setHours(23,59,59,999),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=new Date(0);return o.setFullYear(n.getFullYear(),0,1),o.setHours(0,0,0,0),o};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(o.a)(t,e),a=n.getUTCFullYear(),s=e||{},l=s.locale,u=l&&l.options&&l.options.firstWeekContainsDate,c=null==u?1:Object(i.a)(u),h=null==s.firstWeekContainsDate?c:Object(i.a)(s.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=new Date(0);d.setUTCFullYear(a+1,0,h),d.setUTCHours(0,0,0,0);var f=Object(r.a)(d,e),p=new Date(0);p.setUTCFullYear(a,0,h),p.setUTCHours(0,0,0,0);var g=Object(r.a)(p,e);return n.getTime()>=f.getTime()?a+1:n.getTime()>=g.getTime()?a:a-1};var i=n(1),o=n(0),r=n(63)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},a=n.locale,s=a&&a.options&&a.options.firstWeekContainsDate,l=null==s?1:Object(i.a)(s),u=null==n.firstWeekContainsDate?l:Object(i.a)(n.firstWeekContainsDate),c=Object(o.a)(t,e),h=new Date(0);return h.setFullYear(c,0,u),h.setHours(0,0,0,0),Object(r.a)(h,e)};var i=n(1),o=n(165),r=n(22)},function(t,e,n){"use strict";function i(t){return t.map(t=>String.fromCharCode(t)).join("")}e.b=i,e.a=function(t){if(t.length>=8){const e=i(t.slice(0,8));if("ASCII\0\0\0"===e)return i(t.slice(8));if("JIS\0\0\0\0\0"===e)return"[JIS encoded text]";if("UNICODE\0"===e)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===e)return"[Undefined encoding]"}return"Undefined"}},function(t,e,n){"use strict";var i=n(442);function o(t,e){for(var n in e)r(e,n)&&(t[n]=e[n])}function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t){i(t)||(t={});for(var e=arguments.length,n=1;n<e;n++){var r=arguments[n];i(r)&&o(t,r)}return t}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports=!n(16)&&!n(23)(function(){return 7!=Object.defineProperty(n(70)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){t.exports=n(20)},function(t,e,n){var i=n(24),o=n(30),r=n(190)(!1),a=n(73)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),l=0,u=[];for(n in s)n!=a&&i(s,n)&&u.push(n);for(;e.length>l;)i(s,n=e[l++])&&(~r(u,n)||u.push(n));return u}},function(t,e,n){var i=n(5).document;t.exports=i&&i.documentElement},function(t,e,n){var i=n(24),o=n(31),r=n(73)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),i(t,r)?t[r]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var i=n(15);t.exports=function(t,e,n,o){try{return o?e(i(n)[0],n[1]):e(n)}catch(e){var r=t.return;throw void 0!==r&&i(r.call(t)),e}}},function(t,e,n){var i=n(29),o=n(6)("iterator"),r=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||r[o]===t)}},function(t,e,n){var i=n(15),o=n(40),r=n(6)("species");t.exports=function(t,e){var n,a=i(t).constructor;return void 0===a||void 0==(n=i(a)[r])?e:o(n)}},function(t,e,n){var i,o,r,a=n(18),s=n(200),l=n(105),u=n(70),c=n(5),h=c.process,d=c.setImmediate,f=c.clearImmediate,p=c.MessageChannel,g=c.Dispatch,m=0,v={},y=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},b=function(t){y.call(t.data)};d&&f||(d=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++m]=function(){s("function"==typeof t?t:Function(t),e)},i(m),m},f=function(t){delete v[t]},"process"==n(38)(h)?i=function(t){h.nextTick(a(y,t,1))}:g&&g.now?i=function(t){g.now(a(y,t,1))}:p?(r=(o=new p).port2,o.port1.onmessage=b,i=a(r.postMessage,r,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(i=function(t){c.postMessage(t+"","*")},c.addEventListener("message",b,!1)):i="onreadystatechange"in u("script")?function(t){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:d,clear:f}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var i=n(15),o=n(10),r=n(79);t.exports=function(t,e){if(i(t),o(e)&&e.constructor===t)return e;var n=r.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var i=n(5),o=n(3),r=n(9),a=n(16),s=n(6)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:i[t];a&&e&&!e[s]&&r.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){var i=n(6)("iterator"),o=!1;try{var r=[7][i]();r.return=function(){o=!0},Array.from(r,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var r=[7],a=r[i]();a.next=function(){return{done:n=!0}},r[i]=function(){return a},t(r)}catch(t){}return n}},function(t,e,n){"use strict";e.a=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return a});var i=n(33),o=n.n(i),r=o.a.shape({trySubscribe:o.a.func.isRequired,tryUnsubscribe:o.a.func.isRequired,notifyNestedSubs:o.a.func.isRequired,isSubscribed:o.a.func.isRequired}),a=o.a.shape({subscribe:o.a.func.isRequired,dispatch:o.a.func.isRequired,getState:o.a.func.isRequired})},function(t,e,n){"use strict";e.a=function(t,e){var n,s;void 0===e&&(e={});var u=e,y=u.getDisplayName,b=void 0===y?function(t){return"ConnectAdvanced("+t+")"}:y,w=u.methodName,_=void 0===w?"connectAdvanced":w,x=u.renderCountProp,S=void 0===x?void 0:x,E=u.shouldHandleStateChanges,C=void 0===E||E,T=u.storeKey,M=void 0===T?"store":T,P=u.withRef,L=void 0!==P&&P,A=Object(a.a)(u,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),k=M+"Subscription",O=g++,R=((n={})[M]=p.a,n[k]=p.b,n),D=((s={})[k]=p.b,s);return function(e){c()(Object(d.isValidElementType)(e),"You must pass a component to the function returned by "+_+". Instead received "+JSON.stringify(e));var n=e.displayName||e.name||"Component",a=b(n),s=Object(r.a)({},A,{getDisplayName:b,methodName:_,renderCountProp:S,shouldHandleStateChanges:C,storeKey:M,withRef:L,displayName:a,wrappedComponentName:n,WrappedComponent:e}),u=function(n){function l(t,e){var i;return(i=n.call(this,t,e)||this).version=O,i.state={},i.renderCount=0,i.store=t[M]||e[M],i.propsMode=Boolean(t[M]),i.setWrappedInstance=i.setWrappedInstance.bind(Object(o.a)(Object(o.a)(i))),c()(i.store,'Could not find "'+M+'" in either the context or props of "'+a+'". Either wrap the root component in a <Provider>, or explicitly pass "'+M+'" as a prop to "'+a+'".'),i.initSelector(),i.initSubscription(),i}Object(i.a)(l,n);var u=l.prototype;return u.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return(t={})[k]=e||this.context[k],t},u.componentDidMount=function(){C&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},u.componentWillReceiveProps=function(t){this.selector.run(t)},u.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},u.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=v,this.store=null,this.selector.run=v,this.selector.shouldComponentUpdate=!1},u.getWrappedInstance=function(){return c()(L,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+_+"() call."),this.wrappedInstance},u.setWrappedInstance=function(t){this.wrappedInstance=t},u.initSelector=function(){var e=t(this.store.dispatch,s);this.selector=function(t,e){var n={run:function(i){try{var o=t(e.getState(),i);(o!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=o,n.error=null)}catch(t){n.shouldComponentUpdate=!0,n.error=t}}};return n}(e,this.store),this.selector.run(this.props)},u.initSubscription=function(){if(C){var t=(this.propsMode?this.props:this.context)[k];this.subscription=new f.a(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},u.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(m)):this.notifyNestedSubs()},u.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},u.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},u.addExtraProps=function(t){if(!(L||S||this.propsMode&&this.subscription))return t;var e=Object(r.a)({},t);return L&&(e.ref=this.setWrappedInstance),S&&(e[S]=this.renderCount++),this.propsMode&&this.subscription&&(e[k]=this.subscription),e},u.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return Object(h.createElement)(e,this.addExtraProps(t.props))},l}(h.Component);return u.WrappedComponent=e,u.displayName=a,u.childContextTypes=D,u.contextTypes=R,u.propTypes=R,l()(u,e)}};var i=n(115),o=n(211),r=n(82),a=n(83),s=n(212),l=n.n(s),u=n(214),c=n.n(u),h=n(2),d=n(118),f=(n.n(d),n(215)),p=n(116),g=0,m={};function v(){}},function(t,e,n){"use strict";t.exports=n(213)},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";e.a=function(t){return function(e,n){var i=t(e,n);function o(){return i}return o.dependsOnOwnProps=!1,o}},e.b=function(t,e){return function(e,n){n.displayName;var o=function(t,e){return o.dependsOnOwnProps?o.mapToProps(t,e):o.mapToProps(t)};return o.dependsOnOwnProps=!0,o.mapToProps=function(e,n){o.mapToProps=t,o.dependsOnOwnProps=i(t);var r=o(e,n);return"function"==typeof r&&(o.mapToProps=r,o.dependsOnOwnProps=i(r),r=o(e,n)),r},o}};n(121);function i(t){return null!==t.dependsOnOwnProps&&void 0!==t.dependsOnOwnProps?Boolean(t.dependsOnOwnProps):1!==t.length}},function(t,e,n){"use strict";n(222),n(81)},function(t,e,n){var i=n(4),o=n(3),r=n(23);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),i(i.S+i.F*r(function(){n(1)}),"Object",a)}},function(t,e,n){var i=n(38);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){var i=n(104),o=n(75).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},function(t,e,n){var i=n(57),o=n(41),r=n(30),a=n(71),s=n(24),l=n(102),u=Object.getOwnPropertyDescriptor;e.f=n(16)?u:function(t,e){if(t=r(t),e=a(e,!0),l)try{return u(t,e)}catch(t){}if(s(t,e))return o(!i.f.call(t,e),t[e])}},function(t,e,n){"use strict";e.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(n(88));e.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return(0,i.default)(t)}},function(t,e,n){var i=n(10);t.exports=function(t,e){if(!i(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};e.__esModule=!0;var r=n(2),a=n(2),s=n(129),l=n(130),u=n(46),c=n(131),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={data:[]},e.ref=null,e.htmlProps=null,e.mainId="tabulator-"+ +new Date+"-"+Math.floor(9999999*Math.random()),e.table=null,e.pickValidHTMLProps=function(){e.htmlProps||(e.htmlProps=s.pickHTMLProps(e.props),delete e.htmlProps.data,delete e.htmlProps.columns)},e}return i(e,t),e.prototype.componentDidMount=function(){var t=a.findDOMNode(this.ref),e=this,n=this.props,i=n.columns,r=n.data,s=n.options,u=l.propsToOptions(this.props);new c(t,o({columns:i},u,{layout:"fitColumns",tableBuilding:function(){e.table=this,e.props.tableBuilding&&e.props.tableBuilding()},dataLoaded:function(){e.props.dataLoaded&&e.props.dataLoaded()}},s,{data:r})),r&&r.length>0&&this.setState({data:r})},e.prototype.componentWillUnmount=function(){this.table.destroy()},e.getDerivedStateFromProps=function(t,e){var n=!t.data||0===t.data.length;return!e&&n?null:e&&0===e.data.length&&0===t.data.length?null:e&&t.data&&!u.isSameArray(e.data,t.data)?o({},e,{data:t.data}):{}},e.prototype.componentDidUpdate=function(){this.table.setData(this.state.data)},e.prototype.render=function(){var t=this;this.pickValidHTMLProps();var e=this.props.className;return r.createElement("div",o({ref:function(e){return t.ref=e},"data-instance":this.mainId},this.htmlProps,{className:e}))},e}(r.Component);e.default=h},function(t,e){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pickSVGProps=e.pickHTMLProps=void 0;var i=r(n(1)),o=r(n(5));function r(t){return t&&t.__esModule?t:{default:t}}e.pickHTMLProps=i.default,e.pickSVGProps=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=a(n(2)),r=a(n(3));function a(t){return t&&t.__esModule?t:{default:t}}var s=i({},o.default,["about","datatype","defaultChecked","defaultValue","inlist","prefix","property","resource","typeof","vocab","autoCapitalize","autoCorrect","color","itemProp","itemScope","itemType","itemRef","itemID","security","unselectable","results","autoSave","allowtransparency","charSet","ismap","typemustmatch","onBlur","onChange","onClick","onContextMenu","onCopy","onCut","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onFocus","onInput","onKeyDown","onKeyPress","onKeyUp","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPaste","onScroll","onSubmit","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onWheel","onCompositionEnd","onCompositionStart","onCompositionUpdate","onInvalid","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onSelect","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onLoad","onError","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onToggle"].reduce(function(t,e){return t[e]=e,t},{}));e.default=(0,r.default)(function(t){return Boolean(s[t])||/^(data|aria)-/.test(t)})},function(t,e){
+/*!
+ * html-attributes
+ * https://github.com/alexmingoia/html-attributes
+ */
+"use strict";t.exports={abbr:"abbr",accept:"accept",acceptCharset:"accept-charset",accessKey:"accesskey",action:"action",allowFullScreen:"allowfullscreen",allowTransparency:"allowtransparency",alt:"alt",async:"async",autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",cellPadding:"cellpadding",cellSpacing:"cellspacing",challenge:"challenge",charset:"charset",checked:"checked",cite:"cite",class:"class",className:"class",cols:"cols",colSpan:"colspan",command:"command",content:"content",contentEditable:"contenteditable",contextMenu:"contextmenu",controls:"controls",coords:"coords",crossOrigin:"crossorigin",data:"data",dateTime:"datetime",default:"default",defer:"defer",dir:"dir",disabled:"disabled",download:"download",draggable:"draggable",dropzone:"dropzone",encType:"enctype",for:"for",form:"form",formAction:"formaction",formEncType:"formenctype",formMethod:"formmethod",formNoValidate:"formnovalidate",formTarget:"formtarget",frameBorder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hrefLang:"hreflang",htmlFor:"for",httpEquiv:"http-equiv",icon:"icon",id:"id",inputMode:"inputmode",isMap:"ismap",itemId:"itemid",itemProp:"itemprop",itemRef:"itemref",itemScope:"itemscope",itemType:"itemtype",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",manifest:"manifest",max:"max",maxLength:"maxlength",media:"media",mediaGroup:"mediagroup",method:"method",min:"min",minLength:"minlength",multiple:"multiple",muted:"muted",name:"name",noValidate:"novalidate",open:"open",optimum:"optimum",pattern:"pattern",ping:"ping",placeholder:"placeholder",poster:"poster",preload:"preload",radioGroup:"radiogroup",readOnly:"readonly",rel:"rel",required:"required",role:"role",rows:"rows",rowSpan:"rowspan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",sortable:"sortable",span:"span",spellCheck:"spellcheck",src:"src",srcDoc:"srcdoc",srcSet:"srcset",start:"start",step:"step",style:"style",tabIndex:"tabindex",target:"target",title:"title",translate:"translate",type:"type",typeMustMatch:"typemustmatch",useMap:"usemap",value:"value",width:"width",wmode:"wmode",wrap:"wrap"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(4));e.default=function(t){return function(e){if(!(0,i.default)(e))throw new Error("props should be a plain object");var n={};for(var o in e)e.hasOwnProperty(o)&&t(o)&&(n[o]=e[o]);return n}}},function(t,e){var n="[object Object]";var i=Function.prototype,o=Object.prototype,r=i.toString,a=o.hasOwnProperty,s=r.call(Object),l=o.toString,u=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);t.exports=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||l.call(t)!=n||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=u(t);if(null===e)return!0;var i=a.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&r.call(i)==s}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(3)),o=r(n(6));function r(t){return t&&t.__esModule?t:{default:t}}e.default=(0,i.default)(function(t){return Boolean(o.default[t])})},function(t,e){
+/*!
+ * svg-attributes
+ * https://github.com/alexmingoia/svg-attributes
+ */
+"use strict";t.exports={accentHeight:"accent-height",accumulate:"accumulate",additive:"additive",alphabetic:"alphabetic",amplitude:"amplitude",arabicForm:"arabic-form",ascent:"ascent",attributeName:"attributeName",attributeType:"attributeType",azimuth:"azimuth",baseFrequency:"baseFrequency",baseProfile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcMode:"calcMode",capHeight:"cap-height",class:"class",clipPathUnits:"clipPathUnits",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cx:"cx",cy:"cy",d:"d",descent:"descent",diffuseConstant:"diffuseConstant",divisor:"divisor",dur:"dur",dx:"dx",dy:"dy",edgeMode:"edgeMode",elevation:"elevation",end:"end",exponent:"exponent",externalResourcesRequired:"externalResourcesRequired",fill:"fill",filterRes:"filterRes",filterUnits:"filterUnits",fontFamily:"font-family",fontSize:"font-size",fontStretch:"font-stretch",fontStyle:"font-style",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphame:"glyph-name",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:"hanging",height:"height",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",id:"id",ideographic:"ideographic",in:"in",in2:"in2",intercept:"intercept",k:"k",k1:"k1",k2:"k2",k3:"k3",k4:"k4",kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lang:"lang",lengthAdjust:"lengthAdjust",limitingConeAngle:"limitingConeAngle",local:"local",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:"mathematical",max:"max",media:"media",method:"method",min:"min",mode:"mode",name:"name",numOctaves:"numOctaves",offset:"offset",onAbort:"onabort",onActivate:"onactivate",onBegin:"onbegin",onClick:"onclick",onEnd:"onend",onError:"onerror",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onLoad:"onload",onMouseDown:"onmousedown",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onRepeat:"onrepeat",onResize:"onresize",onScroll:"onscroll",onUnload:"onunload",onZoom:"onzoom",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overlinePosition:"overline-position",overlineThickness:"overline-thickness",panose1:"panose-1",path:"path",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",points:"points",pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:"r",radius:"radius",refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:"restart",result:"result",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",seed:"seed",slope:"slope",spacing:"spacing",specularConstant:"specularConstant",specularExponent:"specularExponent",spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchTiles:"stitchTiles",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:"string",style:"style",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",target:"target",targetX:"targetX",targetY:"targetY",textLength:"textLength",title:"title",to:"to",transform:"transform",type:"type",u1:"u1",u2:"u2",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:"unicode",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:"values",version:"version",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",width:"width",widths:"widths",x:"x",xHeight:"x-height",x1:"x1",x2:"x2",xChannelSelector:"xChannelSelector",xlink:"xlink",xml:"xml",y:"y",y1:"y1",y2:"y2",yChannelSelector:"yChannelSelector",z:"z",zoomAndPan:"zoomAndPan",alignmentBaseline:"alignment-baseline",baselineShift:"baseline-shift",clipPath:"clip-path",clipRule:"clip-rule",clip:"clip",colorInterpolationFilters:"color-interpolation-filters",colorInterpolation:"color-interpolation",colorProfile:"color-profile",colorRendering:"color-rendering",color:"color",cursor:"cursor",direction:"direction",display:"display",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:"filter",floodColor:"flood-color",floodOpacity:"flood-opacity",fontSizeAdjust:"font-size-adjust",fontVariant:"font-variant",fontWeight:"font-weight",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",imageRendering:"image-rendering",kerning:"kerning",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",mask:"mask",opacity:"opacity",overflow:"overflow",pointerEvents:"pointer-events",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",stroke:"stroke",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",unicodeBidi:"unicode-bidi",visibility:"visibility",wordSpacing:"word-spacing",writingMode:"writing-mode"}}])},function(t,e,n){"use strict";e.__esModule=!0;var i=n(283),o=function(){};e.propsToOptions=function(t){for(var e={},n=0,r=["height","layout","layoutColumnsOnNewData","columnMinWidth","columnVertAlign","resizableColumns","resizableRows","autoResize","tooltips","tooltipsHeader","tooltipGenerationMode","initialSort","initialFilter","footerElement","index","keybindings","clipboard","clipboardCopyStyled","clipboardCopySelector","clipboardCopyFormatter","clipboardCopyHeader","clipboardPasteParser","clipboardPasteAction","rowFormatter","placeholder"];n<r.length;n++){var a=r[n];void 0!==t[a]&&(e[a]=t[a])}for(var s=0,l=["tableBuilt","rowClick","rowDblClick","rowContext","rowTap","rowDblTap","rowTapHold","rowAdded","rowDeleted","rowMoved","rowUpdated","rowSelectionChanged","rowSelected","rowDeselected","rowResized","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellEditing","cellEdited","cellEditCancelled","columnMoved","columnResized","columnTitleChanged","columnVisibilityChanged","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","htmlImporting","htmlImported","dataLoading","dataLoaded","dataEdited","ajaxRequesting","ajaxResponse","ajaxError","dataFiltering","dataFiltered","dataSorting","dataSorted","renderStarted","renderComplete","pageLoaded","localized","dataGrouping","dataGrouped","groupVisibilityChanged","groupClick","groupDblClick","groupContext","groupTap","groupDblTap","groupTapHold","movableRowsSendingStart","movableRowsSent","movableRowsSentFailed","movableRowsSendingStop","movableRowsReceivingStart","movableRowsReceived","movableRowsReceivedFailed","movableRowsReceivingStop","validationFailed","clipboardCopied","clipboardPasted","clipboardPasteError","downloadDataFormatter","downloadReady","downloadComplete"];s<l.length;s++){var u=l[s];e[u]=t[u]||o}return"object"==typeof t.footerElement&&(e.footerElement=i.renderToString(t.footerElement)),e}},function(t,n,i){var o,r,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(e,s){"object"===a(n)&&void 0!==t?t.exports=s():void 0===(r="function"==typeof(o=s)?o.call(n,i,n,t):o)||(t.exports=r)}(0,function(){"use strict";Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],o=0;o<n;){var r=e[o];if(t.call(i,r,o,e))return o;o++}return-1}}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],o=0;o<n;){var r=e[o];if(t.call(i,r,o,e))return r;o++}}});var t=function(t){this.table=t,this.blockHozScrollEvent=!1,this.headersElement=this.createHeadersElement(),this.element=this.createHeaderElement(),this.rowManager=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.element.insertBefore(this.headersElement,this.element.firstChild)};t.prototype.createHeadersElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-headers"),t},t.prototype.createHeaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-header"),t},t.prototype.initialize=function(){var t=this;t.element.addEventListener("scroll",function(e){t.blockHozScrollEvent||t.table.rowManager.scrollHorizontal(t.element.scrollLeft)})},t.prototype.setRowManager=function(t){this.rowManager=t},t.prototype.getElement=function(){return this.element},t.prototype.getHeadersElement=function(){return this.headersElement},t.prototype.scrollHorizontal=function(t){var e=this,n=0,i=this.element.scrollWidth-this.table.element.clientWidth;clearTimeout(this.blockHozScrollEvent),this.blockHozScrollEvent=setTimeout(function(){e.blockHozScrollEvent=!1},10),this.element.scrollLeft=t,t>i?(n=t-i,this.element.style.marginLeft=-n+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},t.prototype.generateColumnsFromRowData=function(t){var e,n,i=[];if(t&&t.length){for(var o in e=t[0]){var r={field:o,title:o},s=e[o];switch(void 0===s?"undefined":a(s)){case"undefined":n="string";break;case"boolean":n="boolean";break;case"object":n=Array.isArray(s)?"array":"string";break;default:n=isNaN(s)||""===s?s.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}r.sorter=n,i.push(r)}this.table.options.columns=i,this.setColumns(this.table.options.columns)}},t.prototype.setColumns=function(t,e){for(var n=this;n.headersElement.firstChild;)n.headersElement.removeChild(n.headersElement.firstChild);n.columns=[],n.columnsByIndex=[],n.columnsByField={},n.table.modExists("frozenColumns")&&n.table.modules.frozenColumns.reset(),t.forEach(function(t,e){n._addColumn(t)}),n._reIndexColumns(),n.table.options.responsiveLayout&&n.table.modExists("responsiveLayout",!0)&&n.table.modules.responsiveLayout.initialize(),n.redraw(!0)},t.prototype._addColumn=function(t,e,n){var o=new i(t,this),r=o.getElement(),a=n?this.findColumnIndex(n):n;if(n&&a>-1){var s=this.columns.indexOf(n.getTopColumn()),l=n.getElement();e?(this.columns.splice(s,0,o),l.parentNode.insertBefore(r,l)):(this.columns.splice(s+1,0,o),l.parentNode.insertBefore(r,l.nextSibling))}else e?(this.columns.unshift(o),this.headersElement.insertBefore(o.getElement(),this.headersElement.firstChild)):(this.columns.push(o),this.headersElement.appendChild(o.getElement()));return o},t.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},t.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},t.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},t.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach(function(t){var n;t.clearVerticalAlign(),(n=t.getHeight())>e&&(e=n)}),t.columns.forEach(function(n){n.verticalAlign(t.table.options.columnVertAlign,e)}),t.rowManager.adjustTableSize()},t.prototype.findColumn=function(t){return"object"!=(void 0===t?"undefined":a(t))?this.columnsByField[t]||!1:t instanceof i?t:t instanceof n?t._getSelf()||!1:t instanceof HTMLElement&&this.columns.find(function(e){return e.element===t})||!1},t.prototype.getColumnByField=function(t){return this.columnsByField[t]},t.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},t.prototype.getFirstVisibileColumn=function(t){return(t=this.columnsByIndex.findIndex(function(t){return t.visible}))>-1&&this.columnsByIndex[t]},t.prototype.getColumns=function(){return this.columns},t.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},t.prototype.getRealColumns=function(){return this.columnsByIndex},t.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,n){t(e,n)})},t.prototype.getDefinitions=function(t){var e=[];return this.columnsByIndex.forEach(function(n){(!t||t&&n.visible)&&e.push(n.getDefinition())}),e},t.prototype.getDefinitionTree=function(){var t=[];return this.columns.forEach(function(e){t.push(e.getDefinition(!0))}),t},t.prototype.getComponents=function(t){var e=[];return(t?this.columns:this.columnsByIndex).forEach(function(t){e.push(t.getComponent())}),e},t.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},t.prototype.moveColumn=function(t,e,n){this._moveColumnInArray(this.columns,t,e,n),this._moveColumnInArray(this.columnsByIndex,t,e,n,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns")},t.prototype._moveColumnInArray=function(t,e,n,i,o){var r,a=t.indexOf(e);a>-1&&(t.splice(a,1),(r=t.indexOf(n))>-1?i&&(r+=1):r=a,t.splice(r,0,e),o&&this.table.rowManager.rows.forEach(function(t){if(t.cells.length){var e=t.cells.splice(a,1)[0];t.cells.splice(r,0,e)}}))},t.prototype.scrollToColumn=function(t,e,n){var i=this,o=0,r=0,a=0,s=t.getElement();return new Promise(function(l,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===n&&(n=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":a=-i.element.clientWidth/2;break;case"right":a=s.clientWidth-i.headersElement.clientWidth}if(!n&&(r=s.offsetLeft)>0&&r+s.offsetWidth<i.element.clientWidth)return!1;o=s.offsetLeft+i.element.scrollLeft+a,o=Math.max(Math.min(o,i.table.rowManager.element.scrollWidth-i.table.rowManager.element.clientWidth),0),i.table.rowManager.scrollHorizontal(o),i.scrollHorizontal(o),l()}else console.warn("Scroll Error - Column not visible"),u("Scroll Error - Column not visible")})},t.prototype.generateCells=function(t){var e=[];return this.columnsByIndex.forEach(function(n){e.push(n.generateCell(t))}),e},t.prototype.getFlexBaseWidth=function(){var t=this,e=t.table.element.clientWidth,n=0;return t.rowManager.element.scrollHeight>t.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var o,r,a;i.visible&&(o=i.definition.width||0,r=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),a="string"==typeof o?o.indexOf("%")>-1?e/100*parseInt(o):parseInt(o):o,n+=a>r?a:r)}),n},t.prototype.addColumn=function(t,e,n){var i=this._addColumn(t,e,n);this._reIndexColumns(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),this.redraw(),"fitColumns"!=this.table.modules.layout.getMode()&&i.reinitializeWidth(),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},t.prototype.deregisterColumn=function(t){var e,n=t.getField();n&&delete this.columnsByField[n],(e=this.columnsByIndex.indexOf(t))>-1&&this.columnsByIndex.splice(e,1),(e=this.columns.indexOf(t))>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.redraw()},t.prototype.redraw=function(t){t&&(h.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),"fitColumns"==this.table.modules.layout.getMode()?this.table.modules.layout.layout():t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var n=function(t){this._column=t,this.type="ColumnComponent"};n.prototype.getElement=function(){return this._column.getElement()},n.prototype.getDefinition=function(){return this._column.getDefinition()},n.prototype.getField=function(){return this._column.getField()},n.prototype.getCells=function(){var t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},n.prototype.getVisibility=function(){return this._column.visible},n.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},n.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},n.prototype.toggle=function(){this._column.visible?this.hide():this.show()},n.prototype.delete=function(){this._column.delete()},n.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},n.prototype.getParentColumn=function(){return this._column.parent instanceof i&&this._column.parent.getComponent()},n.prototype._getSelf=function(){return this._column},n.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},n.prototype.getTable=function(){return this._column.table},n.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},n.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},n.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)},n.prototype.getNextColumn=function(){return this._column.nextColumn().getComponent()},n.prototype.getPrevColumn=function(){return this._column.prevColumn().getComponent()};var i=function t(e,n){var i=this;this.table=n.table,this.definition=e,this.parent=n,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.setField(this.definition.field),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,e.columns?(this.isGroup=!0,e.columns.forEach(function(e,n){var o=new t(e,i);i.attachColumn(o)}),i.checkColumnVisibility()):n.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader()};i.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},i.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},i.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNesteData:this._setFlatData},i.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},i.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},i.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},i.prototype.setTooltip=function(){var t=this,e=t.definition,n=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;n?!0===n?e.field?t.table.modules.localize.bind("columns|"+e.field,function(n){t.element.setAttribute("title",n||e.title)}):t.element.setAttribute("title",e.title):("function"==typeof n&&!1===(n=n(t.getComponent()))&&(n=""),t.element.setAttribute("title",n)):t.element.setAttribute("title","")},i.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.element.addEventListener("mouseenter",function(e){t.setTooltip()})},i.prototype._bindEvents=function(){var t,e,n,i=this,o=i.definition;"function"==typeof o.headerClick&&i.element.addEventListener("click",function(t){o.headerClick(t,i.getComponent())}),"function"==typeof o.headerDblClick&&i.element.addEventListener("dblclick",function(t){o.headerDblClick(t,i.getComponent())}),"function"==typeof o.headerContext&&i.element.addEventListener("contextmenu",function(t){o.headerContext(t,i.getComponent())}),"function"==typeof o.headerTap&&(n=!1,i.element.addEventListener("touchstart",function(t){n=!0}),i.element.addEventListener("touchend",function(t){n&&o.headerTap(t,i.getComponent()),n=!1})),"function"==typeof o.headerDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,o.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof o.headerTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,n=!1,o.headerTapHold(t,i.getComponent())},1e3)}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof o.cellClick&&(i.cellEvents.cellClick=o.cellClick),"function"==typeof o.cellDblClick&&(i.cellEvents.cellDblClick=o.cellDblClick),"function"==typeof o.cellContext&&(i.cellEvents.cellContext=o.cellContext),"function"==typeof o.cellMouseEnter&&(i.cellEvents.cellMouseEnter=o.cellMouseEnter),"function"==typeof o.cellMouseLeave&&(i.cellEvents.cellMouseLeave=o.cellMouseLeave),"function"==typeof o.cellMouseOver&&(i.cellEvents.cellMouseOver=o.cellMouseOver),"function"==typeof o.cellMouseOut&&(i.cellEvents.cellMouseOut=o.cellMouseOut),"function"==typeof o.cellMouseMove&&(i.cellEvents.cellMouseMove=o.cellMouseMove),"function"==typeof o.cellTap&&(i.cellEvents.cellTap=o.cellTap),"function"==typeof o.cellDblTap&&(i.cellEvents.cellDblTap=o.cellDblTap),"function"==typeof o.cellTapHold&&(i.cellEvents.cellTapHold=o.cellTapHold),"function"==typeof o.cellEdited&&(i.cellEvents.cellEdited=o.cellEdited),"function"==typeof o.cellEditing&&(i.cellEvents.cellEditing=o.cellEditing),"function"==typeof o.cellEditCancelled&&(i.cellEvents.cellEditCancelled=o.cellEditCancelled)},i.prototype._buildColumnHeader=function(){var t=this,e=t.definition,n=t.table;(n.modExists("sort")&&n.modules.sort.initializeColumn(t,t.contentElement),n.modExists("format")&&n.modules.format.initializeColumn(t),void 0!==e.editor&&n.modExists("edit")&&n.modules.edit.initializeColumn(t),void 0!==e.validator&&n.modExists("validate")&&n.modules.validate.initializeColumn(t),n.modExists("mutator")&&n.modules.mutator.initializeColumn(t),n.modExists("accessor")&&n.modules.accessor.initializeColumn(t),a(n.options.responsiveLayout)&&n.modExists("responsiveLayout")&&n.modules.responsiveLayout.initializeColumn(t),void 0!==e.visible&&(e.visible?t.show(!0):t.hide(!0)),e.cssClass)&&e.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)});e.field&&this.element.setAttribute("tabulator-field",e.field),t.setMinWidth(void 0===e.minWidth?t.table.options.columnMinWidth:parseInt(e.minWidth)),t.reinitializeWidth(),t.tooltip=t.definition.tooltip||!1===t.definition.tooltip?t.definition.tooltip:t.table.options.tooltips,t.hozAlign=void 0===t.definition.align?"":t.definition.align},i.prototype._buildColumnHeaderContent=function(){this.definition,this.table;var t=document.createElement("div");return t.classList.add("tabulator-col-content"),t.appendChild(this._buildColumnHeaderTitle()),t},i.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,n=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var o=document.createElement("input");o.classList.add("tabulator-title-editor"),o.addEventListener("click",function(t){t.stopPropagation(),o.focus()}),o.addEventListener("change",function(){e.title=o.value,n.options.columnTitleChanged.call(t.table,t.getComponent())}),i.appendChild(o),e.field?n.modules.localize.bind("columns|"+e.field,function(t){o.value=t||e.title||"&nbsp"}):o.value=e.title||"&nbsp"}else e.field?n.modules.localize.bind("columns|"+e.field,function(n){t._formatColumnHeaderTitle(i,n||e.title||"&nbsp")}):t._formatColumnHeaderTitle(i,e.title||"&nbsp");return i},i.prototype._formatColumnHeaderTitle=function(t,e){var n,i,o,r;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(n=this.table.modules.format.getFormatter(this.definition.titleFormatter),r={getValue:function(){return e},getElement:function(){return t}},o="function"==typeof(o=this.definition.titleFormatterParams||{})?o():o,void 0===(i=n.call(this.table.modules.format,r,o))?"undefined":a(i)){case"object":i instanceof Node?this.element.appendChild(i):(this.element.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=i}else t.innerHTML=e},i.prototype._buildGroupHeader=function(){this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.element.appendChild(this.groupElement)},i.prototype._getFlatData=function(t){return t[this.field]},i.prototype._getNestedData=function(t){for(var e,n=t,i=this.fieldStructure,o=i.length,r=0;r<o&&(e=n=n[i[r]],n);r++);return e},i.prototype._setFlatData=function(t,e){this.field&&(t[this.field]=e)},i.prototype._setNesteData=function(t,e){for(var n=t,i=this.fieldStructure,o=i.length,r=0;r<o;r++)r==o-1?n[i[r]]=e:(n[i[r]]||(n[i[r]]={}),n=n[i[r]])},i.prototype.attachColumn=function(t){this.groupElement?(this.columns.push(t),this.groupElement.appendChild(t.getElement())):console.warn("Column Warning - Column being attached to another column instead of column group")},i.prototype.verticalAlign=function(t,e){var n=this.parent.isGroup?this.parent.getGroupElement().clientHeight:e||this.parent.getHeadersElement().clientHeight;this.element.style.height=n+"px",this.isGroup&&(this.groupElement.style.minHeight=n-this.contentElement.offsetHeight+"px"),this.isGroup||"top"===t||(this.element.style.paddingTop="bottom"===t?this.element.clientHeight-this.contentElement.offsetHeight+"px":(this.element.clientHeight-this.contentElement.offsetHeight)/2+"px"),this.columns.forEach(function(e){e.verticalAlign(t)})},i.prototype.clearVerticalAlign=function(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(t){t.clearVerticalAlign()})},i.prototype.getElement=function(){return this.element},i.prototype.getGroupElement=function(){return this.groupElement},i.prototype.getField=function(){return this.field},i.prototype.getFirstColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[0].getFirstColumn():this},i.prototype.getLastColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[this.columns.length-1].getLastColumn():this},i.prototype.getColumns=function(){return this.columns},i.prototype.getCells=function(){return this.cells},i.prototype.getTopColumn=function(){return this.parent.isGroup?this.parent.getTopColumn():this},i.prototype.getDefinition=function(t){var e=[];return this.isGroup&&t&&(this.columns.forEach(function(t){e.push(t.getDefinition(!0))}),this.definition.columns=e),this.definition},i.prototype.checkColumnVisibility=function(){var t=!1;this.columns.forEach(function(e){e.visible&&(t=!0)}),t?(this.show(),this.parent.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1)):this.hide()},i.prototype.show=function(t,e){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(t){t.show()}),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager._verticalAlignHeaders(),this.table.options.persistentLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.persistence.save("columns"),!e&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),t||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths())},i.prototype.hide=function(t,e){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager._verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(t){t.hide()}),this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns"),!e&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),t||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths())},i.prototype.matchChildWidths=function(){var t=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(e){e.visible&&(t+=e.getWidth())}),this.contentElement.style.maxWidth=t-1+"px")},i.prototype.setWidth=function(t){this.widthFixed=!0,this.setWidthActual(t)},i.prototype.setWidthActual=function(t){isNaN(t)&&(t=Math.floor(this.table.element.clientWidth/100*parseInt(t))),t=Math.max(this.minWidth,t),this.width=t,this.widthStyled=t?t+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},i.prototype.checkCellHeights=function(){var t=[];this.cells.forEach(function(e){e.row.heightInitialized&&(null!==e.row.getElement().offsetParent?(t.push(e.row),e.row.clearCellHeight()):e.row.heightInitialized=!1)}),t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()})},i.prototype.getWidth=function(){return this.width},i.prototype.getHeight=function(){return this.element.offsetHeight},i.prototype.setMinWidth=function(t){this.minWidth=t,this.minWidthStyled=t?t+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})},i.prototype.delete=function(){this.isGroup&&this.columns.forEach(function(t){t.delete()});for(var t=this.cells.length,e=0;e<t;e++)this.cells[0].delete();this.element.parentNode.removeChild(this.element),this.table.columnManager.deregisterColumn(this)},i.prototype.generateCell=function(t){var e=new u(this,t);return this.cells.push(e),e},i.prototype.nextColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this.table.columnManager.getColumnByIndex(t+1)},i.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this.table.columnManager.getColumnByIndex(t-1)},i.prototype.reinitializeWidth=function(t){this.widthFixed=!1,void 0===this.definition.width||t||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},i.prototype.fitToData=function(){this.widthFixed||(this.element.style.width="",this.cells.forEach(function(t){t.clearWidth()}));var t=this.element.offsetWidth;this.width&&this.widthFixed||(this.cells.forEach(function(e){var n=e.getWidth();n>t&&(t=n)}),t&&this.setWidthActual(t+1))},i.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},i.prototype.defaultOptionList=["title","field","visible","align","width","minWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter"],i.prototype.getComponent=function(){return new n(this)};var o=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="classic",this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]};o.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},o.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},o.prototype.getElement=function(){return this.element},o.prototype.getTableElement=function(){return this.tableElement},o.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},o.prototype.setColumnManager=function(t){this.columnManager=t},o.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e)),t.scrollLeft=e}),"virtual"===this.renderMode&&t.element.addEventListener("scroll",function(){var e=t.element.scrollTop,n=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(n),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e)):t.scrollTop=e})},o.prototype.findRow=function(t){var e=this;if("object"==(void 0===t?"undefined":a(t))){if(t instanceof s)return t;if(t instanceof r)return t._getSelf()||!1;if(t instanceof HTMLElement)return e.rows.find(function(e){return e.element===t})||!1}else{return void 0!==t&&null!==t&&(e.rows.find(function(n){return n.data[e.table.options.index]==t})||!1)}return!1},o.prototype.getRowFromDataObject=function(t){return this.rows.find(function(e){return e.data===t})||!1},o.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},o.prototype.scrollToRow=function(t,e,n){var i,o=this,r=this.getDisplayRows().indexOf(t),a=t.getElement(),s=0;return new Promise(function(t,l){if(r>-1){if(void 0===e&&(e=o.table.options.scrollToRowPosition),void 0===n&&(n=o.table.options.scrollToRowIfVisible),"nearest"===e)switch(o.renderMode){case"classic":i=h.prototype.helpers.elOffset(a).top,e=Math.abs(o.element.scrollTop-i)>Math.abs(o.element.scrollTop+o.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(o.vDomTop-r)>Math.abs(o.vDomBottom-r)?"bottom":"top"}if(!n&&h.prototype.helpers.elVisible(a)&&(s=h.prototype.helpers.elOffset(a).top-h.prototype.helpers.elOffset(o.element).top)>0&&s<o.element.clientHeight-a.offsetHeight)return!1;switch(o.renderMode){case"classic":o.element.scrollTop=h.prototype.helpers.elOffset(a).top-h.prototype.helpers.elOffset(o.element).top+o.element.scrollTop;break;case"virtual":o._virtualRenderFill(r,!0)}switch(e){case"middle":case"center":o.element.scrollTop=o.element.scrollTop-o.element.clientHeight/2;break;case"bottom":o.element.scrollTop=o.element.scrollTop-o.element.clientHeight+a.offsetHeight}t()}else console.warn("Scroll Error - Row not visible"),l("Scroll Error - Row not visible")})},o.prototype.setData=function(t,e){var n=this,i=this;return new Promise(function(o,r){e&&n.getDisplayRows().length?i.table.options.pagination?i._setDataActual(t,!0):n.reRenderInPosition(function(){i._setDataActual(t)}):(n.table.options.autoColumns&&n.table.columnManager.generateColumnsFromRowData(t),n.resetScroll(),n._setDataActual(t)),o()})},o.prototype._setDataActual=function(t,e){var n=this;n.table.options.dataLoading.call(this.table,t),n.rows.forEach(function(t){t.wipe()}),n.rows=[],this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.clear(),Array.isArray(t)?(this.table.modExists("selectRow")&&this.table.modules.selectRow.clearSelectionData(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchData(t),t.forEach(function(t,e){if(t&&"object"===(void 0===t?"undefined":a(t))){var i=new s(t,n);n.rows.push(i)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",t)}),n.table.options.dataLoaded.call(this.table,t),n.refreshActiveData(!1,!1,e)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",void 0===t?"undefined":a(t),"\nData: ",t)},o.prototype.deleteRow=function(t,e){var n=this.rows.indexOf(t),i=this.activeRows.indexOf(t);i>-1&&this.activeRows.splice(i,1),n>-1&&this.rows.splice(n,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(e){var n=e.indexOf(t);n>-1&&e.splice(n,1)}),e||this.reRenderInPosition(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},o.prototype.addRow=function(t,e,n,i){var o=this.addRowActual(t,e,n,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",o,{data:t,pos:e,index:n}),o},o.prototype.addRows=function(t,e,n){var i=this,o=this,r=[];return new Promise(function(a,s){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),t.length-1,(void 0===n&&e||void 0!==n&&!e)&&t.reverse(),t.forEach(function(t,i){var a=o.addRow(t,e,n,!0);r.push(a)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),a(r)})},o.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},o.prototype.addRowActual=function(t,e,n,i){var o,r=t instanceof s?t:new s(t||{},this),a=this.findAddRowPos(e);if(!n&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(o=this.getDisplayRows(),a?o.length?n=o[0]:this.activeRows.length&&(n=this.activeRows[this.activeRows.length-1],a=!1):o.length&&(n=o[o.length-1],a=!(o.length<this.table.modules.page.getPageSize()))),n&&(n=this.findRow(n)),this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.assignRowToGroup(r);var l=r.getGroup().rows;l.length>1&&(!n||n&&-1==l.indexOf(n)?a?l[0]!==r&&(n=l[0],this._moveRowInArray(r.getGroup().rows,r,n,a)):l[l.length-1]!==r&&(n=l[l.length-1],this._moveRowInArray(r.getGroup().rows,r,n,a)):this._moveRowInArray(r.getGroup().rows,r,n,a))}if(n){var u=this.rows.indexOf(n),c=this.activeRows.indexOf(n);this.displayRowIterator(function(t){var e=t.indexOf(n);e>-1&&t.splice(a?e:e+1,0,r)}),c>-1&&this.activeRows.splice(a?c:c+1,0,r),u>-1&&this.rows.splice(a?u:u+1,0,r)}else a?(this.displayRowIterator(function(t){t.unshift(r)}),this.activeRows.unshift(r),this.rows.unshift(r)):(this.displayRowIterator(function(t){t.push(r)}),this.activeRows.push(r),this.rows.push(r));return this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,r.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),i||this.reRenderInPosition(),r},o.prototype.moveRow=function(t,e,n){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{pos:this.getRowPosition(t),to:e,after:n}),this.moveRowActual(t,e,n),this.table.options.rowMoved.call(this.table,t.getComponent())},o.prototype.moveRowActual=function(t,e,n){var i=this;if(this._moveRowInArray(this.rows,t,e,n),this._moveRowInArray(this.activeRows,t,e,n),this.displayRowIterator(function(o){i._moveRowInArray(o,t,e,n)}),this.table.options.groupBy&&this.table.modExists("groupRows")){var o=e.getGroup(),r=t.getGroup();o===r?this._moveRowInArray(o.rows,t,e,n):(r&&r.removeRow(t),o.insertRow(t,e,n))}},o.prototype._moveRowInArray=function(t,e,n,i){var o,r,a;if(e!==n&&((o=t.indexOf(e))>-1&&(t.splice(o,1),(r=t.indexOf(n))>-1?i?t.splice(r+1,0,e):t.splice(r,0,e):t.splice(o,0,e)),t===this.getDisplayRows())){a=r>o?r:o+1;for(var s=o<r?o:r;s<=a;s++)t[s]&&this.styleRow(t[s],s)}},o.prototype.clearData=function(){this.setData([])},o.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},o.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},o.prototype.nextDisplayRow=function(t,e){var n=this.getDisplayRowIndex(t),i=!1;return!1!==n&&n<this.displayRowsCount-1&&(i=this.getDisplayRows()[n+1]),!i||i instanceof s&&"row"==i.type?i:this.nextDisplayRow(i,e)},o.prototype.prevDisplayRow=function(t,e){var n=this.getDisplayRowIndex(t),i=!1;return n&&(i=this.getDisplayRows()[n-1]),!i||i instanceof s&&"row"==i.type?i:this.prevDisplayRow(i,e)},o.prototype.findRowIndex=function(t,e){var n;return!!((t=this.findRow(t))&&(n=e.indexOf(t))>-1)&&n},o.prototype.getData=function(t,e){var n=[];return(t?this.activeRows:this.rows).forEach(function(t){n.push(t.getData(e||"data"))}),n},o.prototype.getHtml=function(t){var e=this.getData(t),n=[],i="",o="";return this.table.columnManager.getColumns().forEach(function(t){var e=t.getDefinition();t.visible&&!e.hideInHtml&&(i+="<th>"+(e.title||"")+"</th>",n.push(t))}),e.forEach(function(t){var e="";n.forEach(function(n){var i=n.getFieldValue(t);void 0!==i&&null!==i||(i=":"),e+="<td>"+i+"</td>"}),o+="<tr>"+e+"</tr>"}),"<table>\n\n\t\t\t<thead>\n\n\t\t\t<tr>"+i+"</tr>\n\n\t\t\t</thead>\n\n\t\t\t<tbody>"+o+"</tbody>\n\n\t\t\t</table>"},o.prototype.getComponents=function(t){var e=[];return(t?this.activeRows:this.rows).forEach(function(t){e.push(t.getComponent())}),e},o.prototype.getDataCount=function(t){return t?this.rows.length:this.activeRows.length},o.prototype._genRemoteRequest=function(){var t=this,e=t.table,n=e.options,i={};if(e.modExists("page")){if(n.ajaxSorting){var o=t.table.modules.sort.getSort();o.forEach(function(t){delete t.column}),i[t.table.modules.page.paginationDataSentNames.sorters]=o}if(n.ajaxFiltering){var r=t.table.modules.filter.getFilters(!0,!0);i[t.table.modules.page.paginationDataSentNames.filters]=r}t.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t.setData(e)}).catch(function(t){})},o.prototype.filterRefresh=function(){var t=this.table,e=t.options,n=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):e.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(n)},o.prototype.sorterRefresh=function(t){var e=this.table,n=this.table.options,i=this.scrollLeft;n.ajaxSorting?("remote"==n.pagination||n.progressiveLoad)&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):n.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(t?"filter":"sort"),this.scrollHorizontal(i)},o.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},o.prototype.refreshActiveData=function(t,e,n){var i,o=this.table;switch(this.table.modExists("edit")&&this.table.modules.edit.cancelEdit(),t||(t="all"),o.options.selectable&&!o.options.selectablePersistence&&o.modExists("selectRow")&&o.modules.selectRow.deselectRows(),t){case"all":case"filter":e?e=!1:o.modExists("filter")?this.setActiveRows(o.modules.filter.filter(this.rows)):this.setActiveRows(this.rows.slice(0));case"sort":e?e=!1:o.modExists("sort")&&o.modules.sort.sort(this.activeRows);case"display":this.resetDisplayRows();case"freeze":e?e=!1:this.table.modExists("frozenRows")&&o.modules.frozenRows.isFrozen()&&(o.modules.frozenRows.getDisplayIndex()||o.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=o.modules.frozenRows.getDisplayIndex(),!0!==(i=this.setDisplayRows(o.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&o.modules.frozenRows.setDisplayIndex(i));case"group":e?e=!1:o.options.groupBy&&o.modExists("groupRows")&&(o.modules.groupRows.getDisplayIndex()||o.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=o.modules.groupRows.getDisplayIndex(),!0!==(i=this.setDisplayRows(o.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&o.modules.groupRows.setDisplayIndex(i));case"tree":e?e=!1:o.options.dataTree&&o.modExists("dataTree")&&(o.modules.dataTree.getDisplayIndex()||o.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=o.modules.dataTree.getDisplayIndex(),!0!==(i=this.setDisplayRows(o.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&o.modules.dataTree.setDisplayIndex(i)),o.options.pagination&&o.modExists("page")&&!n&&"local"==o.modules.page.getMode()&&o.modules.page.reset();case"page":e?e=!1:o.options.pagination&&o.modExists("page")&&(o.modules.page.getDisplayIndex()||o.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=o.modules.page.getDisplayIndex(),"local"==o.modules.page.getMode()&&o.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=this.setDisplayRows(o.modules.page.getRows(this.getDisplayRows(i-1)),i))&&o.modules.page.setDisplayIndex(i))}h.prototype.helpers.elVisible(this.element)&&(n?this.reRenderInPosition():(this.renderTable(),o.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0))),o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(this.activeRows)},o.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},o.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},o.prototype.getNextDisplayIndex=function(){return this.displayRows.length},o.prototype.setDisplayRows=function(t,e){var n=!0;return e&&void 0!==this.displayRows[e]?(this.displayRows[e]=t,n=!0):(this.displayRows.push(t),n=e=this.displayRows.length-1),e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),n},o.prototype.getDisplayRows=function(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]},o.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},o.prototype.getRows=function(){return this.rows},o.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode()){for(var e=this.element.scrollTop,n=!1,i=!1,o=this.scrollLeft,r=this.getDisplayRows(),a=this.vDomTop;a<=this.vDomBottom;a++)if(r[a]){var s=e-r[a].getElement().offsetTop;if(!(!1===i||Math.abs(s)<i))break;i=s,n=a}t&&t(),this._virtualRenderFill(!1===n?this.displayRowsCount-1:n,!0,i||0),this.scrollHorizontal(o)}else this.renderTable(),t&&t()},o.prototype.setRenderMode=function(){(this.table.element.clientHeight||this.table.options.height)&&this.table.options.virtualDom?this.renderMode="virtual":this.renderMode="classic"},o.prototype.getRenderMode=function(){return this.renderMode},o.prototype.renderTable=function(){switch(this.table.options.renderStarted.call(this.table),this.element.scrollTop=0,this.renderMode){case"classic":this._simpleRender();break;case"virtual":this._virtualRenderFill()}this.firstRender&&(this.displayRowsCount?(this.firstRender=!1,this.table.modules.layout.layout()):this.renderEmptyScroll()),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.displayRowsCount||this.table.options.placeholder&&(this.renderMode&&this.table.options.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.table.options.placeholder)),this.table.options.renderComplete.call(this.table)},o.prototype._simpleRender=function(){this._clearVirtualDom(),this.displayRowsCount?this.checkClassicModeGroupHeaderWidth():this.renderEmptyScroll()},o.prototype.checkClassicModeGroupHeaderWidth=function(){var t=this,e=this.tableElement,n=!0;t.getDisplayRows().forEach(function(i,o){t.styleRow(i,o),e.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(n=!1)}),e.style.minWidth=n?t.table.columnManager.getWidth()+"px":""},o.prototype.renderEmptyScroll=function(){this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px",this.tableElement.style.minHeight="1px",this.tableElement.style.visibility="hidden"},o.prototype._clearVirtualDom=function(){var t=this.tableElement;for(this.table.options.placeholder&&this.table.options.placeholder.parentNode&&this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder);t.firstChild;)t.removeChild(t.firstChild);t.style.paddingTop="",t.style.paddingBottom="",t.style.minWidth="",t.style.minHeight="",t.style.visibility="",this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0},o.prototype.styleRow=function(t,e){var n=t.getElement();e%2?(n.classList.add("tabulator-row-even"),n.classList.remove("tabulator-row-odd")):(n.classList.add("tabulator-row-odd"),n.classList.remove("tabulator-row-even"))},o.prototype._virtualRenderFill=function(t,e,n){var i=this.tableElement,o=this.element,r=0,a=0,s=0,l=0,u=!0,c=this.getDisplayRows();if(t=t||0,n=n||0,t){for(;i.firstChild;)i.removeChild(i.firstChild);var d=(this.displayRowsCount-t+1)*this.vDomRowHeight;d<this.height&&(t-=Math.ceil((this.height-d)/this.vDomRowHeight))<0&&(t=0),t-=r=Math.min(Math.max(Math.floor(this.vDomWindowBuffer/this.vDomRowHeight),this.vDomWindowMinMarginRows),t)}else this._clearVirtualDom();if(this.displayRowsCount&&h.prototype.helpers.elVisible(this.element)){for(this.vDomTop=t,this.vDomBottom=t-1;(a<=this.height+this.vDomWindowBuffer||l<this.vDomWindowMinTotalRows)&&this.vDomBottom<this.displayRowsCount-1;){var f,p=this.vDomBottom+1,g=c[p];this.styleRow(g,p),i.appendChild(g.getElement()),g.initialized?g.heightInitialized||g.normalizeHeight(!0):g.initialize(!0),f=g.getHeight(),l<r?s+=f:a+=f,f>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*f),"group"!==g.type&&(u=!1),this.vDomBottom++,l++}t?(this.vDomTopPad=e?this.vDomRowHeight*this.vDomTop+n:this.scrollTop-s,this.vDomBottomPad=this.vDomBottom==this.displayRowsCount-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-a-s,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((a+s)/l),this.vDomBottomPad=this.vDomRowHeight*(this.displayRowsCount-this.vDomBottom-1),this.vDomScrollHeight=s+a+this.vDomBottomPad-this.height),i.style.paddingTop=this.vDomTopPad+"px",i.style.paddingBottom=this.vDomBottomPad+"px",e&&(this.scrollTop=this.vDomTopPad+s+n-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&e&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,o.scrollTop=this.scrollTop,i.style.minWidth=u?this.table.columnManager.getWidth()+"px":"",this.table.options.groupBy&&"fitDataFill"!=this.table.modules.layout.getMode()&&this.displayRowsCount==this.table.modules.groupRows.countGroups()&&(this.tableElement.style.minWidth=this.table.columnManager.getWidth())}else this.renderEmptyScroll()},o.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,n=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||n>i){var o=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(o)}else t?(e<0&&this._addTopRow(-e),n<0&&this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer&&this._removeBottomRow(-n)):(e>=0&&this.scrollTop>this.vDomWindowBuffer&&this._removeTopRow(e),n>=0&&this._addBottomRow(n))},o.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var o=this.vDomTop-1,r=i[o],a=r.getHeight()||this.vDomRowHeight;t>=a&&(this.styleRow(r,o),n.insertBefore(r.getElement(),n.firstChild),r.initialized&&r.heightInitialized||(this.vDomTopNewRows.push(r),r.heightInitialized||r.clearCellHeight()),r.initialize(),this.vDomTopPad-=a,this.vDomTopPad<0&&(this.vDomTopPad=o*this.vDomRowHeight),o||(this.vDomTopPad=0),n.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=a,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),r.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*r.getHeight()),e<this.vDomMaxRenderChain&&this.vDomTop&&t>=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},o.prototype._removeTopRow=function(t){var e=this.tableElement,n=this.getDisplayRows()[this.vDomTop],i=n.getHeight()||this.vDomRowHeight;if(t>=i){var o=n.getElement();o.parentNode.removeChild(o),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},o.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom<this.displayRowsCount-1){var o=this.vDomBottom+1,r=i[o],a=r.getHeight()||this.vDomRowHeight;t>=a&&(this.styleRow(r,o),n.appendChild(r.getElement()),r.initialized&&r.heightInitialized||(this.vDomBottomNewRows.push(r),r.heightInitialized||r.clearCellHeight()),r.initialize(),this.vDomBottomPad-=a,(this.vDomBottomPad<0||o==this.displayRowsCount-1)&&(this.vDomBottomPad=0),n.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=a,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,r.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*r.getHeight()),e<this.vDomMaxRenderChain&&this.vDomBottom<this.displayRowsCount-1&&t>=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},o.prototype._removeBottomRow=function(t){var e=this.tableElement,n=this.getDisplayRows()[this.vDomBottom],i=n.getHeight()||this.vDomRowHeight;if(t>=i){var o=n.getElement();o.parentNode&&o.parentNode.removeChild(o),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},o.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},o.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},o.prototype.adjustTableSize=function(){if("virtual"===this.renderMode){this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height;var t=this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0);this.element.style.minHeight="calc(100% - "+t+"px)",this.element.style.height="calc(100% - "+t+"px)",this.element.style.maxHeight="calc(100% - "+t+"px)"}},o.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize()})},o.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),t?this.renderTable():("classic"==self.renderMode?self.table.options.groupBy?self.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},o.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var r=function(t){this._row=t};r.prototype.getData=function(t){return this._row.getData(t)},r.prototype.getElement=function(){return this._row.getElement()},r.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(e){t.push(e.getComponent())}),t},r.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},r.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},r.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},r.prototype.delete=function(){return this._row.delete()},r.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},r.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},r.prototype.move=function(t,e){this._row.moveToRow(t,e)},r.prototype.update=function(t){return this._row.updateData(t)},r.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},r.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},r.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},r.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},r.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},r.prototype._getSelf=function(){return this._row},r.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},r.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},r.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},r.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},r.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},r.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},r.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row)},r.prototype.reformat=function(){return this._row.reinitialize()},r.prototype.getGroup=function(){return this._row.getGroup().getComponent()},r.prototype.getTable=function(){return this._row.table},r.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t},r.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var s=function(t,e){this.table=e.table,this.parent=e,this.data={},this.type="row",this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.setData(t),this.generateElement()};s.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.setAttribute("role","row"),t},s.prototype.getElement=function(){return this.element},s.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},s.prototype.generateElement=function(){var t,e,n,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(t){i.table.options.rowMouseEnter(t,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(t){i.table.options.rowMouseLeave(t,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(t){i.table.options.rowMouseOver(t,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(t){i.table.options.rowMouseOut(t,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(t){i.table.options.rowMouseMove(t,i.getComponent())}),i.table.options.rowTap&&(n=!1,i.element.addEventListener("touchstart",function(t){n=!0}),i.element.addEventListener("touchend",function(t){n&&i.table.options.rowTap(t,i.getComponent()),n=!1})),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,n=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null}))},s.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},s.prototype.initialize=function(t){var e=this;if(!e.initialized||t){for(e.deleteCells();e.element.firstChild;)e.element.removeChild(e.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),e.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&e.normalizeHeight(),e.table.options.dataTree&&e.table.modExists("dataTree")&&e.table.modules.dataTree.layoutRow(this),"collapse"===e.table.options.responsiveLayout&&e.table.modExists("responsiveLayout")&&e.table.modules.responsiveLayout.layoutRow(this),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent()),e.table.options.resizableRows&&e.table.modExists("resizeRows")&&e.table.modules.resizeRows.initializeRow(e),e.initialized=!0}},s.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},s.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),null!==this.element.offsetParent&&this.initialize(!0)},s.prototype.calcHeight=function(t){var e=0,n=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(t){var n=t.getHeight();n>e&&(e=n)}),this.height=t?Math.max(e,n):this.manualHeight?this.height:Math.max(e,n),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},s.prototype.setCellHeight=function(){this.cells.forEach(function(t){t.setHeight()}),this.heightInitialized=!0},s.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},s.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()},s.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.manualHeight=!0,this.height=t,this.heightStyled=t?t+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},s.prototype.getHeight=function(){return this.outerHeight},s.prototype.getWidth=function(){return this.element.offsetWidth},s.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},s.prototype.setData=function(t){this.table.modExists("mutator")&&(t=this.table.modules.mutator.transformRow(t,"data")),this.data=t,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},s.prototype.updateData=function(t){var e=this,n=this,i=h.prototype.helpers.elVisible(this.element);return new Promise(function(o,r){for(var a in"string"==typeof t&&(t=JSON.parse(t)),e.table.options.reactiveData&&e.table.modExists("reactiveData",!0)&&e.table.modules.reactiveData.block(),n.table.modExists("mutator")&&(t=n.table.modules.mutator.transformRow(t,"data",!0)),t)n.data[a]=t[a];for(var a in e.table.options.reactiveData&&e.table.modExists("reactiveData",!0)&&e.table.modules.reactiveData.unblock(),t){var s=e.getCell(a);s&&s.getValue()!=t[a]&&(s.setValueProcessData(t[a]),i&&s.cellRendered())}i?(n.normalizeHeight(),n.table.options.rowFormatter&&n.table.options.rowFormatter(n.getComponent())):(e.initialized=!1,e.height=0,e.heightStyled=""),!1!==n.table.options.dataTree&&n.table.modExists("dataTree")&&void 0!==t[e.table.modules.dataTree.getChildField()]&&(e.table.modules.dataTree.initializeRow(e),e.table.rowManager.refreshActiveData("tree",!1,!0)),n.table.options.rowUpdated.call(e.table,n.getComponent()),o()})},s.prototype.getData=function(t){return t?this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this.data,t):void 0:this.data},s.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},s.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},s.prototype.findNextEditableCell=function(t){var e=!1;if(t<this.cells.length-1)for(var n=t+1;n<this.cells.length;n++){var i=this.cells[n];if(i.column.modules.edit&&h.prototype.helpers.elVisible(i.getElement())){var o=!0;if("function"==typeof i.column.modules.edit.check&&(o=i.column.modules.edit.check(i.getComponent())),o){e=i;break}}}return e},s.prototype.findPrevEditableCell=function(t){var e=!1;if(t>0)for(var n=t-1;n>=0;n--){var i=this.cells[n],o=!0;if(i.column.modules.edit&&h.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(o=i.column.modules.edit.check(i.getComponent())),o)){e=i;break}}return e},s.prototype.getCells=function(){return this.cells},s.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},s.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},s.prototype.moveToRow=function(t,e){var n=this.table.rowManager.findRow(t);n?(this.table.rowManager.moveRowActual(this,n,!e),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",t)},s.prototype.delete=function(){var t=this;return new Promise(function(e,n){var i=t.table.rowManager.getRowIndex(t);t.deleteActual(),t.table.options.history&&t.table.modExists("history")&&(i&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),e()})},s.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.table.rowManager.deleteRow(this,t),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.modules.group&&this.modules.group.removeRow(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},s.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e<t;e++)this.cells[0].delete()},s.prototype.wipe=function(){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)},s.prototype.getGroup=function(){return this.modules.group||!1},s.prototype.getComponent=function(){return new r(this)};var l=function(t){this._cell=t};l.prototype.getValue=function(){return this._cell.getValue()},l.prototype.getOldValue=function(){return this._cell.getOldValue()},l.prototype.getElement=function(){return this._cell.getElement()},l.prototype.getRow=function(){return this._cell.row.getComponent()},l.prototype.getData=function(){return this._cell.row.getData()},l.prototype.getField=function(){return this._cell.column.getField()},l.prototype.getColumn=function(){return this._cell.column.getComponent()},l.prototype.setValue=function(t,e){void 0===e&&(e=!0),this._cell.setValue(t,e)},l.prototype.restoreOldValue=function(){this._cell.setValueActual(this._cell.getOldValue())},l.prototype.edit=function(t){return this._cell.edit(t)},l.prototype.cancelEdit=function(){this._cell.cancelEdit()},l.prototype.nav=function(){return this._cell.nav()},l.prototype.checkHeight=function(){this._cell.checkHeight()},l.prototype.getTable=function(){return this._cell.table},l.prototype._getSelf=function(){return this._cell};var u=function(t,e){this.table=t.table,this.column=t,this.row=e,this.element=null,this.value=null,this.oldValue=null,this.height=null,this.width=null,this.minWidth=null,this.build()};u.prototype.build=function(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data))},u.prototype.generateElement=function(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=this.element},u.prototype._configureCell=function(){var t=this,e=t.column.cellEvents,n=t.element,i=this.column.getField();(n.style.textAlign=t.column.hozAlign,i&&n.setAttribute("tabulator-field",i),t.column.definition.cssClass)&&t.column.definition.cssClass.split(" ").forEach(function(t){n.classList.add(t)});"hover"===this.table.options.tooltipGenerationMode&&n.addEventListener("mouseenter",function(e){t._generateTooltip()}),t._bindClickEvents(e),t._bindTouchEvents(e),t._bindMouseEvents(e),t.column.modules.edit&&t.table.modules.edit.bindEditor(t),t.column.definition.rowHandle&&!1!==t.table.options.movableRows&&t.table.modExists("moveRow")&&t.table.modules.moveRow.initializeCell(t),t.column.visible||t.hide()},u.prototype._bindClickEvents=function(t){var e=this,n=e.element;(t.cellClick||e.table.options.cellClick)&&n.addEventListener("click",function(n){var i=e.getComponent();t.cellClick&&t.cellClick.call(e.table,n,i),e.table.options.cellClick&&e.table.options.cellClick.call(e.table,n,i)}),(t.cellDblClick||this.table.options.cellDblClick)&&n.addEventListener("dblclick",function(n){var i=e.getComponent();t.cellDblClick&&t.cellDblClick.call(e.table,n,i),e.table.options.cellDblClick&&e.table.options.cellDblClick.call(e.table,n,i)}),(t.cellContext||this.table.options.cellContext)&&n.addEventListener("contextmenu",function(n){var i=e.getComponent();t.cellContext&&t.cellContext.call(e.table,n,i),e.table.options.cellContext&&e.table.options.cellContext.call(e.table,n,i)})},u.prototype._bindMouseEvents=function(t){var e=this,n=e.element;(t.cellMouseEnter||e.table.options.cellMouseEnter)&&n.addEventListener("mouseenter",function(n){var i=e.getComponent();t.cellMouseEnter&&t.cellMouseEnter.call(e.table,n,i),e.table.options.cellMouseEnter&&e.table.options.cellMouseEnter.call(e.table,n,i)}),(t.cellMouseLeave||e.table.options.cellMouseLeave)&&n.addEventListener("mouseleave",function(n){var i=e.getComponent();t.cellMouseLeave&&t.cellMouseLeave.call(e.table,n,i),e.table.options.cellMouseLeave&&e.table.options.cellMouseLeave.call(e.table,n,i)}),(t.cellMouseOver||e.table.options.cellMouseOver)&&n.addEventListener("mouseover",function(n){var i=e.getComponent();t.cellMouseOver&&t.cellMouseOver.call(e.table,n,i),e.table.options.cellMouseOver&&e.table.options.cellMouseOver.call(e.table,n,i)}),(t.cellMouseOut||e.table.options.cellMouseOut)&&n.addEventListener("mouseout",function(n){var i=e.getComponent();t.cellMouseOut&&t.cellMouseOut.call(e.table,n,i),e.table.options.cellMouseOut&&e.table.options.cellMouseOut.call(e.table,n,i)}),(t.cellMouseMove||e.table.options.cellMouseMove)&&n.addEventListener("mousemove",function(n){var i=e.getComponent();t.cellMouseMove&&t.cellMouseMove.call(e.table,n,i),e.table.options.cellMouseMove&&e.table.options.cellMouseMove.call(e.table,n,i)})},u.prototype._bindTouchEvents=function(t){var e,n,i,o=this,r=o.element;(t.cellTap||this.table.options.cellTap)&&(i=!1,r.addEventListener("touchstart",function(t){i=!0}),r.addEventListener("touchend",function(e){if(i){var n=o.getComponent();t.cellTap&&t.cellTap.call(o.table,e,n),o.table.options.cellTap&&o.table.options.cellTap.call(o.table,e,n)}i=!1})),(t.cellDblTap||this.table.options.cellDblTap)&&(e=null,r.addEventListener("touchend",function(n){if(e){clearTimeout(e),e=null;var i=o.getComponent();t.cellDblTap&&t.cellDblTap.call(o.table,n,i),o.table.options.cellDblTap&&o.table.options.cellDblTap.call(o.table,n,i)}else e=setTimeout(function(){clearTimeout(e),e=null},300)})),(t.cellTapHold||this.table.options.cellTapHold)&&(n=null,r.addEventListener("touchstart",function(e){clearTimeout(n),n=setTimeout(function(){clearTimeout(n),n=null,i=!1;var r=o.getComponent();t.cellTapHold&&t.cellTapHold.call(o.table,e,r),o.table.options.cellTapHold&&o.table.options.cellTapHold.call(o.table,e,r)},1e3)}),r.addEventListener("touchend",function(t){clearTimeout(n),n=null}))},u.prototype._generateContents=function(){var t;switch(void 0===(t=this.table.modExists("format")?this.table.modules.format.formatValue(this):this.element.innerHTML=this.value)?"undefined":a(t)){case"object":if(t instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(t)}else this.element.innerHTML="",null!=t&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",t);break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=t}},u.prototype.cellRendered=function(){this.table.modExists("format")&&this.table.modules.format.cellRendered&&this.table.modules.format.cellRendered(this)},u.prototype._generateTooltip=function(){var t=this.column.tooltip;t?(!0===t?t=this.value:"function"==typeof t&&!1===(t=t(this.getComponent()))&&(t=""),void 0===t&&(t=""),this.element.setAttribute("title",t)):this.element.setAttribute("title","")},u.prototype.getElement=function(){return this.element},u.prototype.getValue=function(){return this.value},u.prototype.getOldValue=function(){return this.oldValue},u.prototype.setValue=function(t,e){var n;this.setValueProcessData(t,e)&&(this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("cellEdit",this,{oldValue:this.oldValue,newValue:this.value}),n=this.getComponent(),this.column.cellEvents.cellEdited&&this.column.cellEvents.cellEdited.call(this.table,n),this.table.options.cellEdited.call(this.table,n),this.table.options.dataEdited.call(this.table,this.table.rowManager.getData()))},u.prototype.setValueProcessData=function(t,e){var n=!1;return this.value!=t&&(n=!0,e&&this.column.modules.mutate&&(t=this.table.modules.mutator.transformCell(this,t))),this.setValueActual(t),n&&this.table.modExists("columnCalcs")&&(this.column.definition.topCalc||this.column.definition.bottomCalc)&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this.row):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)),n},u.prototype.setValueActual=function(t){this.oldValue=this.value,this.value=t,this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.block(),this.column.setFieldValue(this.row.data,t),this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.unblock(),this._generateContents(),this._generateTooltip(),this.table.options.resizableColumns&&this.table.modExists("resizeColumns")&&this.table.modules.resizeColumns.initializeColumn("cell",this.column,this.element),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutElement(this.element,this.column)},u.prototype.setWidth=function(){this.width=this.column.width,this.element.style.width=this.column.widthStyled},u.prototype.clearWidth=function(){this.width="",this.element.style.width=""},u.prototype.getWidth=function(){return this.width||this.element.offsetWidth},u.prototype.setMinWidth=function(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled},u.prototype.checkHeight=function(){this.row.reinitializeHeight()},u.prototype.clearHeight=function(){this.element.style.height="",this.height=null},u.prototype.setHeight=function(){this.height=this.row.height,this.element.style.height=this.row.heightStyled},u.prototype.getHeight=function(){return this.height||this.element.offsetHeight},u.prototype.show=function(){this.element.style.display=""},u.prototype.hide=function(){this.element.style.display="none"},u.prototype.edit=function(t){if(this.table.modExists("edit",!0))return this.table.modules.edit.editCell(this,t)},u.prototype.cancelEdit=function(){if(this.table.modExists("edit",!0)){var t=this.table.modules.edit.getCurrentCell();t&&t._getSelf()===this?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}},u.prototype.delete=function(){this.element.parentNode.removeChild(this.element),this.column.deleteCell(this),this.row.deleteCell(this)},u.prototype.nav=function(){var t=this,e=!1,n=this.row.getCellIndex(this);return{next:function(){var e,n=this.right();return!!n||!(!(e=t.table.rowManager.nextDisplayRow(t.row,!0))||!(n=e.findNextEditableCell(-1)))&&(n.edit(),!0)},prev:function(){var e,n=this.left();return!!n||!(!(e=t.table.rowManager.prevDisplayRow(t.row,!0))||!(n=e.findPrevEditableCell(e.cells.length)))&&(n.edit(),!0)},left:function(){return!!(e=t.row.findPrevEditableCell(n))&&(e.edit(),!0)},right:function(){return!!(e=t.row.findNextEditableCell(n))&&(e.edit(),!0)},up:function(){var e=t.table.rowManager.prevDisplayRow(t.row,!0);e&&e.cells[n].edit()},down:function(){var e=t.table.rowManager.nextDisplayRow(t.row,!0);e&&e.cells[n].edit()}}},u.prototype.getIndex=function(){this.row.getCellIndex(this)},u.prototype.getComponent=function(){return new l(this)};var c=function(t){this.table=t,this.active=!1,this.element=this.createElement(),this.external=!1,this.links=[],this._initialize()};c.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-footer"),t},c.prototype._initialize=function(t){if(this.table.options.footerElement)switch(a(this.table.options.footerElement)){case"string":"<"===this.table.options.footerElement[0]?this.element.innerHTML=this.table.options.footerElement:(this.external=!0,this.element=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement}},c.prototype.getElement=function(){return this.element},c.prototype.append=function(t,e){this.activate(e),this.element.appendChild(t),this.table.rowManager.adjustTableSize()},c.prototype.prepend=function(t,e){this.activate(e),this.element.insertBefore(t,this.element.firstChild),this.table.rowManager.adjustTableSize()},c.prototype.remove=function(t){t.parentNode.removeChild(t),this.deactivate()},c.prototype.deactivate=function(t){this.element.firstChild&&!t||(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)},c.prototype.activate=function(t){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display="")),t&&this.links.push(t)},c.prototype.redraw=function(){this.links.forEach(function(t){t.footerRedraw()})};var h=function t(e,n){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.browser="",this.browserSlow=!1,this.modules={},this.initializeElement(e),this.initializeOptions(n||{}),this._create(),t.prototype.comms.register(this)};h.prototype.defaultOptions={height:!1,layout:"fitData",layoutColumnsOnNewData:!1,columnMinWidth:40,columnVertAlign:"top",resizableColumns:!0,resizableRows:!1,autoResize:!0,columns:[],data:[],autoColumns:!1,reactiveData:!1,nestedFieldSeparator:".",tooltips:!1,tooltipsHeader:!1,tooltipGenerationMode:"load",initialSort:!1,initialFilter:!1,initialHeaderFilter:!1,columnHeaderSortMulti:!0,sortOrderReverse:!1,footerElement:!1,index:"id",keybindings:[],clipboard:!1,clipboardCopyStyled:!0,clipboardCopySelector:"active",clipboardCopyFormatter:"table",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopyConfig:!1,clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(t,e){return e},downloadComplete:!1,downloadConfig:!1,dataTree:!1,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(t,e){return!0},headerFilterPlaceholder:!1,history:!1,locale:!1,langs:{},virtualDom:!0,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupHeader:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:function(){},ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationFailed:function(){},historyUndo:function(){},historyRedo:function(){}},h.prototype.initializeOptions=function(t){for(var e in this.defaultOptions)e in t?this.options[e]=t[e]:Array.isArray(this.defaultOptions[e])?this.options[e]=[]:"object"===a(this.defaultOptions[e])?this.options[e]={}:this.options[e]=this.defaultOptions[e]},h.prototype.initializeElement=function(t){return t instanceof HTMLElement?(this.element=t,!0):"string"==typeof t?(this.element=document.querySelector(t),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",t),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",t),!1)},h.prototype._mapDepricatedFunctionality=function(){},h.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new t(this),this.rowManager=new o(this),this.footerManager=new c(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this._buildElement(),this._loadInitialData()},h.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},h.prototype._buildElement=function(){var t=this,e=this.element,n=this.modules,i=this.options;for(i.tableBuilding.call(this),e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);for(var o in i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",e.style.height=i.height),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&n.layout.initialize(i.layout),!1!==i.headerFilterPlaceholder&&n.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder),i.langs)n.localize.installLang(o,i.langs[o]);if(n.localize.setLocale(i.locale),"string"==typeof i.placeholder){var r=document.createElement("div");r.classList.add("tabulator-placeholder");var a=document.createElement("span");a.innerHTML=i.placeholder,r.appendChild(a),i.placeholder=r}if(e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),(i.persistentLayout||i.persistentSort||i.persistentFilter)&&this.modExists("persistence",!0)&&n.persistence.initialize(i.persistenceMode,i.persistenceID),i.persistentLayout&&this.modExists("persistence",!0)&&(i.columns=n.persistence.load("columns",i.columns)),i.movableRows&&this.modExists("moveRow")&&n.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&n.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&n.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistentSort||i.initialSort)&&this.modExists("sort",!0)){var s=[];i.persistentSort&&this.modExists("persistence",!0)?!1===(s=n.persistence.load("sort"))&&i.initialSort&&(s=i.initialSort):i.initialSort&&(s=i.initialSort),n.sort.setSort(s)}if((i.persistentFilter||i.initialFilter)&&this.modExists("filter",!0)){var l=[];i.persistentFilter&&this.modExists("persistence",!0)?!1===(l=n.persistence.load("filter"))&&i.initialFilter&&(l=i.initialFilter):i.initialFilter&&(l=i.initialFilter),n.filter.setFilter(l)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach(function(e){var i=t.columnManager.findColumn(e.field);if(!i)return console.warn("Column Filter Error - No matching column found:",e.field),!1;n.filter.setHeaderFilterValue(i,e.value)}),this.modExists("ajax")&&n.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&n.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&n.groupRows.initialize(),this.modExists("keybindings")&&n.keybindings.initialize(),this.modExists("selectRow")&&n.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&n.resizeTable.initialize(),this.modExists("clipboard")&&n.clipboard.initialize(),i.tableBuilt.call(this)},h.prototype._loadInitialData=function(){this.options.pagination&&this.modExists("page")?(this.modules.page.reset(!0),"local"==this.options.pagination?this.options.data.length?this.rowManager.setData(this.options.data):(this.options.ajaxURL||this.options.ajaxURLGenerator)&&this.modExists("ajax")?this.modules.ajax.loadData().then(function(){}).catch(function(){}):this.rowManager.setData(this.options.data):this.options.ajaxURL?this.modules.page.setPage(1).then(function(){}).catch(function(){}):this.rowManager.setData([])):this.options.data.length?this.rowManager.setData(this.options.data):(this.options.ajaxURL||this.options.ajaxURLGenerator)&&this.modExists("ajax")?this.modules.ajax.loadData().then(function(){}).catch(function(){}):this.rowManager.setData(this.options.data)},h.prototype.destroy=function(){var t=this.element;for(h.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach(function(t){t.wipe()}),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();t.firstChild;)t.removeChild(t.firstChild);t.classList.remove("tabulator")},h.prototype._detectBrowser=function(){var t=navigator.userAgent;t.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1)},h.prototype.setDataFromLocalFile=function(t){var e=this;return new Promise(function(n,i){var o=document.createElement("input");o.type="file",o.accept=t||".json,application/json",o.addEventListener("change",function(t){var r,a=o.files[0],s=new FileReader;s.readAsText(a),s.onload=function(t){try{r=JSON.parse(s.result)}catch(t){return console.warn("File Load Error - File contents is invalid JSON",t),void i(t)}e._setData(r).then(function(t){n(t)}).catch(function(t){n(t)})},s.onerror=function(t){console.warn("File Load Error - Unable to read file"),i()}}),o.click()})},h.prototype.setData=function(t,e,n){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,n)},h.prototype._setData=function(t,e,n,i){return"string"!=typeof t?t?this.rowManager.setData(t,i):this.modExists("ajax")&&(this.modules.ajax.getUrl||this.options.ajaxURLGenerator)?"remote"==this.options.pagination&&this.modExists("page",!0)?(this.modules.page.reset(!0),this.modules.page.setPage(1)):this.modules.ajax.loadData(i):this.rowManager.setData([],i):0==t.indexOf("{")||0==t.indexOf("[")?this.rowManager.setData(JSON.parse(t),i):this.modExists("ajax",!0)?(e&&this.modules.ajax.setParams(e),n&&this.modules.ajax.setConfig(n),this.modules.ajax.setUrl(t),"remote"==this.options.pagination&&this.modExists("page",!0)?(this.modules.page.reset(!0),this.modules.page.setPage(1)):this.modules.ajax.loadData(i)):void 0},h.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},h.prototype.getData=function(t){return this.rowManager.getData(t)},h.prototype.getDataCount=function(t){return this.rowManager.getDataCount(t)},h.prototype.searchRows=function(t,e,n){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,n)},h.prototype.searchData=function(t,e,n){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,n)},h.prototype.getHtml=function(t){return this.rowManager.getHtml(t)},h.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},h.prototype.replaceData=function(t,e,n){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,n,!0)},h.prototype.updateData=function(t){var e=this,n=this,i=0;return new Promise(function(o,r){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=n.rowManager.findRow(t[n.options.index]);e&&(i++,e.updateData(t).then(function(){--i||o()}))}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})},h.prototype.addData=function(t,e,n){var i=this;return new Promise(function(o,r){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,n).then(function(t){var e=[];t.forEach(function(t){e.push(t.getComponent())}),o(e)}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})},h.prototype.updateOrAddData=function(t){var e=this,n=this,i=[],o=0;return new Promise(function(r,a){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=n.rowManager.findRow(t[n.options.index]);o++,e?e.updateData(t).then(function(){o--,i.push(e.getComponent()),o||r(i)}):n.rowManager.addRows(t).then(function(t){o--,i.push(t[0].getComponent()),o||r(i)})}):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))})},h.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},h.prototype.getRowFromPosition=function(t,e){var n=this.rowManager.getRowFromPosition(t,e);return n?n.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},h.prototype.deleteRow=function(t){var e=this;return new Promise(function(n,i){var o=e.rowManager.findRow(t);o?o.delete().then(function(){n()}).catch(function(t){i(t)}):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"))})},h.prototype.addRow=function(t,e,n){var i=this;return new Promise(function(o,r){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,n).then(function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),o(t[0].getComponent())})})},h.prototype.updateOrAddRow=function(t,e){var n=this;return new Promise(function(i,o){var r=n.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),r?r.updateData(e).then(function(){n.modExists("columnCalcs")&&n.modules.columnCalcs.recalc(n.rowManager.activeRows),i(r.getComponent())}).catch(function(t){o(t)}):r=n.rowManager.addRows(e).then(function(t){n.modExists("columnCalcs")&&n.modules.columnCalcs.recalc(n.rowManager.activeRows),i(t[0].getComponent())}).catch(function(t){o(t)})})},h.prototype.updateRow=function(t,e){var n=this;return new Promise(function(i,o){var r=n.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),r?r.updateData(e).then(function(){i(r.getComponent())}).catch(function(t){o(t)}):(console.warn("Update Error - No matching row found:",t),o("Update Error - No matching row found"))})},h.prototype.scrollToRow=function(t,e,n){var i=this;return new Promise(function(o,r){var a=i.rowManager.findRow(t);a?i.rowManager.scrollToRow(a,e,n).then(function(){o()}).catch(function(t){r(t)}):(console.warn("Scroll Error - No matching row found:",t),r("Scroll Error - No matching row found"))})},h.prototype.moveRow=function(t,e,n){var i=this.rowManager.findRow(t);i?i.moveToRow(e,n):console.warn("Move Error - No matching row found:",t)},h.prototype.getRows=function(t){return this.rowManager.getComponents(t)},h.prototype.getRowPosition=function(t,e){var n=this.rowManager.findRow(t);return n?this.rowManager.getRowPosition(n,e):(console.warn("Position Error - No matching row found:",t),!1)},h.prototype.copyToClipboard=function(t,e,n,i){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t,e,n,i)},h.prototype.setColumns=function(t){this.columnManager.setColumns(t)},h.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},h.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},h.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},h.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},h.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},h.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},h.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},h.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},h.prototype.addColumn=function(t,e,n){var i=this.columnManager.findColumn(n);this.columnManager.addColumn(t,e,i)},h.prototype.deleteColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Delete Error - No matching column found:",t),!1;e.delete()},h.prototype.scrollToColumn=function(t,e,n){var i=this;return new Promise(function(o,r){var a=i.columnManager.findColumn(t);a?i.columnManager.scrollToColumn(a,e,n).then(function(){o()}).catch(function(t){r(t)}):(console.warn("Scroll Error - No matching column found:",t),r("Scroll Error - No matching column found"))})},h.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},h.prototype.getLocale=function(){return this.modules.localize.getLocale()},h.prototype.getLang=function(t){return this.modules.localize.getLang(t)},h.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},h.prototype.setHeight=function(t){this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.redraw()},h.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},h.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},h.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},h.prototype.setFilter=function(t,e,n){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,n),this.rowManager.filterRefresh())},h.prototype.addFilter=function(t,e,n){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,n),this.rowManager.filterRefresh())},h.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},h.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},h.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var n=this.columnManager.findColumn(t);if(!n)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(n,e)}},h.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},h.prototype.removeFilter=function(t,e,n){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,n),this.rowManager.filterRefresh())},h.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},h.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},h.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.selectRows(t)},h.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},h.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},h.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},h.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},h.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},h.prototype.setPage=function(t){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(t):new Promise(function(t,e){e()})},h.prototype.setPageToRow=function(t){var e=this;return new Promise(function(n,i){e.options.pagination&&e.modExists("page")&&(t=e.rowManager.findRow(t))?e.modules.page.setPageToRow(t).then(function(){n()}).catch(function(){i()}):i()})},h.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1).then(function(){}).catch(function(){})},h.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},h.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},h.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},h.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},h.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},h.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display")},h.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData("group"):console.warn("Grouping Update - cant refresh view, no groups have been set")},h.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData("group"):console.warn("Grouping Update - cant refresh view, no groups have been set")},h.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},h.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},h.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},h.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().prev()},h.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().next()},h.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},h.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},h.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},h.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().dpwn())},h.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},h.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},h.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},h.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},h.prototype.download=function(t,e,n){this.modExists("download",!0)&&this.modules.download.download(t,e,n)},h.prototype.downloadToTab=function(t,e,n){this.modExists("download",!0)&&this.modules.download.download(t,e,n,!0)},h.prototype.tableComms=function(t,e,n,i){this.modules.comms.receive(t,e,n,i)},h.prototype.moduleBindings={},h.prototype.extendModule=function(t,e,n){if(h.prototype.moduleBindings[t]){var i=h.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===n?"undefined":a(n)))for(var o in n)i[o]=n[o];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},h.prototype.registerModule=function(t,e){h.prototype.moduleBindings[t]=e},h.prototype.bindModules=function(){for(var t in this.modules={},h.prototype.moduleBindings)this.modules[t]=new h.prototype.moduleBindings[t](this)},h.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},h.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Array.isArray(t)?[]:{};for(var n in t)null!=t[n]&&"object"===a(t[n])?t[n]instanceof Date?e[n]=new Date(t[n]):e[n]=this.deepClone(t[n]):e[n]=t[n];return e}},h.prototype.comms={tables:[],register:function(t){h.prototype.comms.tables.push(t)},deregister:function(t){var e=h.prototype.comms.tables.indexOf(t);e>-1&&h.prototype.comms.tables.splice(e,1)},lookupTable:function(t){var e,n,i=[];if("string"==typeof t){if((e=document.querySelectorAll(t)).length)for(var o=0;o<e.length;o++)(n=h.prototype.comms.matchElement(e[o]))&&i.push(n)}else t instanceof HTMLElement||t instanceof h?(n=h.prototype.comms.matchElement(t))&&i.push(n):Array.isArray(t)?t.forEach(function(t){i=i.concat(h.prototype.comms.lookupTable(t))}):console.warn("Table Connection Error - Invalid Selector",t);return i},matchElement:function(t){return h.prototype.comms.tables.find(function(e){return t instanceof h?e===t:e.element===t})}};var d=function(t){this.table=t,this.mode=null};d.prototype.initialize=function(t){this.modes[t]?this.mode=t:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+t),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)},d.prototype.getMode=function(){return this.mode},d.prototype.layout=function(){this.modes[this.mode].call(this,this.table.columnManager.columnsByIndex)},d.prototype.modes={fitData:function(t){t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataFill:function(t){t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(t){var e,n,i=this.table.element.clientWidth,o=0,r=0,a=0,s=[],l=[],u=0,c=0;function h(t){return"string"==typeof t?t.indexOf("%")>-1?i/100*parseInt(t):parseInt(t):t}function d(t,e,n,i){var o=[],r=0,a=0,s=0,l=0,u=0,c=[];function f(t){return n*(t.column.definition.widthGrow||1)}function p(t){return h(t.width)-n*(t.column.definition.widthShrink||0)}return t.forEach(function(t,e){var n=i?p(t):f(t);t.column.minWidth>=n?o.push(t):(c.push(t),u+=i?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),o.length?(o.forEach(function(t){r+=i?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),l=(a=e-r)-(s=u?Math.floor(a/u):a)*u,l+=d(c,a,s,i)):(l=u?e-Math.floor(e/u)*u:e,c.forEach(function(t){t.width=i?p(t):f(t)})),l}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(i-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach(function(t){var e,n,i;t.visible&&(e=t.definition.width,n=parseInt(t.minWidth),e?(i=h(e),o+=i>n?i:n,t.definition.widthShrink&&(l.push({column:t,width:i>n?i:n}),u+=t.definition.widthShrink)):(s.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),r=i-o,e=Math.floor(r/a);c=d(s,r,e,!1);s.length&&c>0&&(s[s.length-1].width+=+c),s.forEach(function(t){r-=t.width}),(n=Math.abs(c)+r)>0&&u&&(c=d(l,n,Math.floor(n/u),!0)),l.length&&(l[l.length-1].width-=c),s.forEach(function(t){t.column.setWidth(t.width)}),l.forEach(function(t){t.column.setWidth(t.width)})}},h.prototype.registerModule("layout",d);var f=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={}};f.prototype.setHeaderFilterPlaceholder=function(t){this.langs.default.headerFilters.default=t},f.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langs.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},f.prototype.installLang=function(t,e){this.langs[t]?this._setLangProp(this.langs[t],e):this.langs[t]=e},f.prototype._setLangProp=function(t,e){for(var n in e)t[n]&&"object"==a(t[n])?this._setLangProp(t[n],e[n]):t[n]=e[n]},f.prototype.setLocale=function(t){if(!0===(t=t||"default")&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!this.langs[t]){var e=t.split("-")[0];this.langs[e]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,e),t=e):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}this.locale=t,this.lang=h.prototype.helpers.deepClone(this.langs.default||{}),"default"!=t&&function t(e,n){for(var i in e)"object"==a(e[i])?(n[i]||(n[i]={}),t(e[i],n[i])):n[i]=e[i]}(this.langs[t],this.lang),this.table.options.localized.call(this.table,this.locale,this.lang),this._executeBindings()},f.prototype.getLocale=function(t){return self.locale},f.prototype.getLang=function(t){return t?this.langs[t]:this.lang},f.prototype.getText=function(t,e){var n=(t=e?t+"|"+e:t).split("|");return this._getLangElement(n,this.locale)||""},f.prototype._getLangElement=function(t,e){var n=this.lang;return t.forEach(function(t){var e;n&&(e=n[t],n=void 0!==e&&e)}),n},f.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},f.prototype._executeBindings=function(){var t=this,e=function(e){t.bindings[e].forEach(function(n){n(t.getText(e),t.lang)})};for(var n in t.bindings)e(n)},f.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page"},headerFilters:{default:"filter column...",columns:{}}}},h.prototype.registerModule("localize",f);var p=function(t){this.table=t};p.prototype.getConnections=function(t){var e=this,n=[];return h.prototype.comms.lookupTable(t).forEach(function(t){e.table!==t&&n.push(t)}),n},p.prototype.send=function(t,e,n,i){var o=this,r=this.getConnections(t);r.forEach(function(t){t.tableComms(o.table.element,e,n,i)}),!r.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},p.prototype.receive=function(t,e,n,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,n,i);console.warn("Inter-table Comms Error - no such module:",e)},h.prototype.registerModule("comms",p);var g=function(t){this.table=t,this.allowedTypes=["","data","download","clipboard"]};g.prototype.initializeColumn=function(t){var e=this,n=!1,i={};this.allowedTypes.forEach(function(o){var r,a="accessor"+(o.charAt(0).toUpperCase()+o.slice(1));t.definition[a]&&(r=e.lookupAccessor(t.definition[a]))&&(n=!0,i[a]={accessor:r,params:t.definition[a+"Params"]||{}})}),n&&(t.modules.accessor=i)},g.prototype.lookupAccessor=function(t){var e=!1;switch(void 0===t?"undefined":a(t)){case"string":this.accessors[t]?e=this.accessors[t]:console.warn("Accessor Error - No such accessor found, ignoring: ",t);break;case"function":e=t}return e},g.prototype.transformRow=function(t,e){var n="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),i=h.prototype.helpers.deepClone(t||{});return this.table.columnManager.traverse(function(t){var o,r,a,s;t.modules.accessor&&(r=t.modules.accessor[n]||t.modules.accessor.accessor||!1)&&"undefined"!=(o=t.getFieldValue(i))&&(s=t.getComponent(),a="function"==typeof r.params?r.params(o,i,e,s):r.params,t.setFieldValue(i,r.accessor(o,i,e,a,s)))}),i},g.prototype.accessors={},h.prototype.registerModule("accessor",g);var m=function(t){this.table=t,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};m.prototype.initialize=function(){var t;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?((t=document.createElement("template")).innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=t.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&(this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},m.prototype.createLoaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader"),t},m.prototype.createMsgElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader-msg"),t.setAttribute("role","alert"),t},m.prototype.setParams=function(t,e){if(e)for(var n in this.params=this.params||{},t)this.params[n]=t[n];else this.params=t},m.prototype.getParams=function(){return this.params||{}},m.prototype.setConfig=function(t){if(this._loadDefaultConfig(),"string"==typeof t)this.config.method=t;else for(var e in t)this.config[e]=t[e]},m.prototype._loadDefaultConfig=function(t){if(!this.config||t)for(var e in this.config={},this.defaultConfig)this.config[e]=this.defaultConfig[e]},m.prototype.setUrl=function(t){this.url=t},m.prototype.getUrl=function(){return this.url},m.prototype.loadData=function(t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(t)},m.prototype.nextPage=function(t){this.loading||t<(this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight)&&this.table.modules.page.nextPage().then(function(){}).catch(function(){})},m.prototype.blockActiveRequest=function(){this.requestOrder++},m.prototype._loadDataProgressive=function(){return this.table.rowManager.setData([]),this.table.modules.page.setPage(1)},m.prototype._loadDataStandard=function(t){var e=this;return new Promise(function(n,i){e.sendRequest(t).then(function(o){e.table.rowManager.setData(o,t).then(function(){n()}).catch(function(t){i(t)})}).catch(function(t){i(t)})})},m.prototype.generateParamsList=function(t,e){var n=this,i=[];if(e=e||"",Array.isArray(t))t.forEach(function(t,o){i=i.concat(n.generateParamsList(t,e?e+"["+o+"]":o))});else if("object"===(void 0===t?"undefined":a(t)))for(var o in t)i=i.concat(n.generateParamsList(t[o],e?e+"["+o+"]":o));else i.push({key:e,value:t});return i},m.prototype.serializeParams=function(t){var e=[];return this.generateParamsList(t).forEach(function(t){e.push(encodeURIComponent(t.key)+"="+encodeURIComponent(t.value))}),e.join("&")},m.prototype.sendRequest=function(t){var e,n=this,i=this,o=i.url;return i.requestOrder++,e=i.requestOrder,i._loadDefaultConfig(),new Promise(function(r,a){!1!==i.table.options.ajaxRequesting.call(n.table,i.url,i.params)?(i.loading=!0,t||i.showLoader(),n.loaderPromise(o,i.config,i.params).then(function(t){e===i.requestOrder?(i.table.options.ajaxResponse&&(t=i.table.options.ajaxResponse.call(i.table,i.url,i.params,t)),r(t)):console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made"),i.hideLoader(),i.loading=!1}).catch(function(t){console.error("Ajax Load Error: ",t),i.table.options.ajaxError.call(i.table,t),i.showError(),setTimeout(function(){i.hideLoader()},3e3),i.loading=!1,a()})):a()})},m.prototype.showLoader=function(){if("function"==typeof this.table.options.ajaxLoader?this.table.options.ajaxLoader():this.table.options.ajaxLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|loading"),this.table.element.appendChild(this.loaderElement)}},m.prototype.showError=function(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|error"),this.table.element.appendChild(this.loaderElement)},m.prototype.hideLoader=function(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)},m.prototype.defaultConfig={method:"GET"},m.prototype.defaultURLGenerator=function(t,e,n){return t&&n&&Object.keys(n).length&&(e.method&&"get"!=e.method.toLowerCase()||(e.method="get",t+="?"+this.serializeParams(n))),t},m.prototype.defaultLoaderPromise=function(t,e,n){var i,o=this;return new Promise(function(r,s){if(t=o.urlGenerator(t,e,n),"GET"!=e.method.toUpperCase())if(i="object"===a(o.table.options.ajaxContentType)?o.table.options.ajaxContentType:o.contentTypeFormatters[o.table.options.ajaxContentType]){for(var l in i.headers)e.headers||(e.headers={}),void 0===e.headers[l]&&(e.headers[l]=i.headers[l]);e.body=i.body.call(o,t,e,n)}else console.warn("Ajax Error - Invalid ajaxContentType value:",o.table.options.ajaxContentType);t?(void 0===e.headers&&(e.headers={}),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),void 0===e.headers["X-Requested-With"]&&(e.headers["X-Requested-With"]="XMLHttpRequest"),void 0===e.mode&&(e.mode="cors"),"cors"==e.mode?(void 0===e.headers["Access-Control-Allow-Origin"]&&(e.headers["Access-Control-Allow-Origin"]=window.location.origin),void 0===e.credentials&&(e.credentials="same-origin")):void 0===e.credentials&&(e.credentials="include"),fetch(t,e).then(function(t){t.ok?t.json().then(function(t){r(t)}).catch(function(t){s(t),console.warn("Ajax Load Error - Invalid JSON returned",t)}):(console.error("Ajax Load Error - Connection Error: "+t.status,t.statusText),s(t))}).catch(function(t){console.error("Ajax Load Error - Connection Error: ",t),s(t)})):(console.warn("Ajax Load Error - No URL Set"),r([]))})},m.prototype.contentTypeFormatters={json:{headers:{"Content-Type":"application/json"},body:function(t,e,n){return JSON.stringify(n)}},form:{headers:{},body:function(t,e,n){var i=this.generateParamsList(n),o=new FormData;return i.forEach(function(t){o.append(t.key,t.value)}),o}}},h.prototype.registerModule("ajax",m);var v=function(t){this.table=t,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};v.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-calcs-holder"),t},v.prototype.initialize=function(){this.genColumn=new i({field:"value"},this)},v.prototype.registerColumnField=function(){},v.prototype.initializeColumn=function(t){var e=t.definition,n={topCalcParams:e.topCalcParams||{},botCalcParams:e.bottomCalcParams||{}};if(e.topCalc){switch(a(e.topCalc)){case"string":this.calculations[e.topCalc]?n.topCalc=this.calculations[e.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.topCalc);break;case"function":n.topCalc=e.topCalc}n.topCalc&&(t.modules.columnCalcs=n,this.topCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(e.bottomCalc){switch(a(e.bottomCalc)){case"string":this.calculations[e.bottomCalc]?n.botCalc=this.calculations[e.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.bottomCalc);break;case"function":n.botCalc=e.bottomCalc}n.botCalc&&(t.modules.columnCalcs=n,this.botCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},v.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},v.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},v.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},v.prototype.scrollHorizontal=function(t){this.table.columnManager.getElement().scrollWidth,this.table.element.clientWidth;this.botInitialized&&(this.botRow.getElement().style.marginLeft=-t+"px")},v.prototype.recalc=function(t){var e;if(this.topInitialized||this.botInitialized){if(this.rowsToData(t),this.topInitialized){for(e=this.generateRow("top",this.rowsToData(t)),this.topRow=e;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(e.getElement()),e.initialize(!0)}if(this.botInitialized){for(e=this.generateRow("bottom",this.rowsToData(t)),this.botRow=e;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(e.getElement()),e.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},v.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))},v.prototype.recalcGroup=function(t){var e,n;t&&t.calcs&&(t.calcs.bottom&&(e=this.rowsToData(t.rows),n=this.generateRowData("bottom",e),t.calcs.bottom.updateData(n),t.calcs.bottom.reinitialize()),t.calcs.top&&(e=this.rowsToData(t.rows),n=this.generateRowData("top",e),t.calcs.top.updateData(n),t.calcs.top.reinitialize()))},v.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},v.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},v.prototype.rowsToData=function(t){var e=[];return t.forEach(function(t){e.push(t.getData())}),e},v.prototype.generateRow=function(t,e){var n,i=this,o=this.generateRowData(t,e);return i.table.modExists("mutator")&&i.table.modules.mutator.disable(),n=new s(o,this),i.table.modExists("mutator")&&i.table.modules.mutator.enable(),n.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),n.type="calc",n.generateCells=function(){var e=[];i.table.columnManager.columnsByIndex.forEach(function(o){if(o.visible){i.genColumn.setField(o.getField()),i.genColumn.hozAlign=o.hozAlign,o.definition[t+"CalcFormatter"]&&i.table.modExists("format")?i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter(o.definition[t+"CalcFormatter"]),params:o.definition[t+"CalcFormatterParams"]}:i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter("plaintext"),params:{}},i.genColumn.definition.cssClass=o.definition.cssClass;var r=new u(i.genColumn,n);r.column=o,r.setWidth(),o.cells.push(r),e.push(r)}}),this.cells=e},n},v.prototype.generateRowData=function(t,e){var n,i,o={},r="top"==t?this.topCalcs:this.botCalcs,a="top"==t?"topCalc":"botCalc";return r.forEach(function(t){var r=[];t.modules.columnCalcs&&t.modules.columnCalcs[a]&&(e.forEach(function(e){r.push(t.getFieldValue(e))}),i=a+"Params",n="function"==typeof t.modules.columnCalcs[i]?t.modules.columnCalcs[i](value,e):t.modules.columnCalcs[i],t.setFieldValue(o,t.modules.columnCalcs[a](r,e,n)))}),o},v.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},v.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},v.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},v.prototype.getResults=function(){var t=this,e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.getGroups(!0).forEach(function(n){e[n.getKey()]=t.getGroupResults(n)}):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e},v.prototype.getGroupResults=function(t){var e=this,n=t._getSelf(),i={};return t.getSubGroups().forEach(function(t){i[t.getKey()]=e.getGroupResults(t)}),{top:n.calcs.top?n.calcs.top.getData():{},bottom:n.calcs.bottom?n.calcs.bottom.getData():{},groups:i}},v.prototype.calculations={avg:function(t,e,n){var i=0,o=void 0!==n.precision?n.precision:2;return t.length&&(i=t.reduce(function(t,e){return t+(e=Number(e))}),i/=t.length,i=!1!==o?i.toFixed(o):i),parseFloat(i).toString()},max:function(t,e,n){var i=null,o=void 0!==n.precision&&n.precision;return t.forEach(function(t){((t=Number(t))>i||null===i)&&(i=t)}),null!==i?!1!==o?i.toFixed(o):i:""},min:function(t,e,n){var i=null,o=void 0!==n.precision&&n.precision;return t.forEach(function(t){((t=Number(t))<i||null===i)&&(i=t)}),null!==i?!1!==o?i.toFixed(o):i:""},sum:function(t,e,n){var i=0,o=void 0!==n.precision&&n.precision;return t.length&&t.forEach(function(t){t=Number(t),i+=isNaN(t)?0:Number(t)}),!1!==o?i.toFixed(o):i},concat:function(t,e,n){var i=0;return t.length&&(i=t.reduce(function(t,e){return String(t)+String(e)})),i},count:function(t,e,n){var i=0;return t.length&&t.forEach(function(t){t&&i++}),i}},h.prototype.registerModule("columnCalcs",v);var y=function(t){this.table=t,this.mode=!0,this.copySelector=!1,this.copySelectorParams={},this.copyFormatter=!1,this.copyFormatterParams={},this.pasteParser=function(){},this.pasteAction=function(){},this.htmlElement=!1,this.config={},this.blocked=!0};y.prototype.initialize=function(){var t=this;this.mode=this.table.options.clipboard,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",function(e){var n;t.processConfig(),t.blocked||(e.preventDefault(),n=t.generateContent(),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",n):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",n),t.htmlElement&&e.clipboardData.setData("text/html",t.htmlElement.outerHTML)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",n),t.htmlElement&&e.originalEvent.clipboardData.setData("text/html",t.htmlElement.outerHTML)),t.table.options.clipboardCopied.call(this.table,n),t.reset())}),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",function(e){t.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction)},y.prototype.processConfig=function(){var t={columnHeaders:"groups",rowGroups:!0,columnCalcs:!0};if(void 0!==this.table.options.clipboardCopyHeader&&(t.columnHeaders=this.table.options.clipboardCopyHeader,console.warn("DEPRECATION WANRING - clipboardCopyHeader option has been depricated, please use the columnHeaders property on the clipboardCopyConfig option")),this.table.options.clipboardCopyConfig)for(var e in this.table.options.clipboardCopyConfig)t[e]=this.table.options.clipboardCopyConfig[e];t.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),t.columnHeaders?"groups"!==t.columnHeaders&&!0!==t||this.table.columnManager.columns.length==this.table.columnManager.columnsByIndex.length?this.config.columnHeaders="columns":this.config.columnHeaders="groups":this.config.columnHeaders=!1,t.columnCalcs&&this.table.modExists("columnCalcs")&&(this.config.columnCalcs=!0)},y.prototype.reset=function(){this.blocked=!1,this.originalSelectionText=""},y.prototype.setPasteAction=function(t){switch(void 0===t?"undefined":a(t)){case"string":this.pasteAction=this.pasteActions[t],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",t);break;case"function":this.pasteAction=t}},y.prototype.setPasteParser=function(t){switch(void 0===t?"undefined":a(t)){case"string":this.pasteParser=this.pasteParsers[t],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",t);break;case"function":this.pasteParser=t}},y.prototype.paste=function(t){var e,n,i;this.checkPaseOrigin(t)&&(e=this.getPasteData(t),(n=this.pasteParser.call(this,e))?(t.preventDefault(),this.table.modExists("mutator")&&(n=this.mutateData(n)),i=this.pasteAction.call(this,n),this.table.options.clipboardPasted.call(this.table,e,n,i)):this.table.options.clipboardPasteError.call(this.table,e))},y.prototype.mutateData=function(t){var e=this,n=[];return Array.isArray(t)?t.forEach(function(t){n.push(e.table.modules.mutator.transformRow(t,"clipboard"))}):n=t,n},y.prototype.checkPaseOrigin=function(t){var e=!0;return("DIV"!=t.target.tagName||this.table.modules.edit.currentCell)&&(e=!1),e},y.prototype.getPasteData=function(t){var e;return window.clipboardData&&window.clipboardData.getData?e=window.clipboardData.getData("Text"):t.clipboardData&&t.clipboardData.getData?e=t.clipboardData.getData("text/plain"):t.originalEvent&&t.originalEvent.clipboardData.getData&&(e=t.originalEvent.clipboardData.getData("text/plain")),e},y.prototype.copy=function(t,e,n,i,o){var r,a;this.blocked=!1,!0!==this.mode&&"copy"!==this.mode||(void 0!==window.getSelection&&void 0!==document.createRange?((r=document.createRange()).selectNodeContents(this.table.element),(a=window.getSelection()).toString()&&o&&(t="userSelection",n="raw",e=a.toString()),a.removeAllRanges(),a.addRange(r)):void 0!==document.selection&&void 0!==document.body.createTextRange&&(textRange=document.body.createTextRange(),textRange.moveToElementText(this.table.element),textRange.select()),this.setSelector(t),this.copySelectorParams=void 0!==e&&null!=e?e:this.config.columnHeaders,this.setFormatter(n),this.copyFormatterParams=void 0!==i&&null!=i?i:{},document.execCommand("copy"),a&&a.removeAllRanges())},y.prototype.setSelector=function(t){switch(void 0===(t=t||this.table.options.clipboardCopySelector)?"undefined":a(t)){case"string":this.copySelectors[t]?this.copySelector=this.copySelectors[t]:console.warn("Clipboard Error - No such selector found:",t);break;case"function":this.copySelector=t}},y.prototype.setFormatter=function(t){switch(void 0===(t=t||this.table.options.clipboardCopyFormatter)?"undefined":a(t)){case"string":this.copyFormatters[t]?this.copyFormatter=this.copyFormatters[t]:console.warn("Clipboard Error - No such formatter found:",t);break;case"function":this.copyFormatter=t}},y.prototype.generateContent=function(){var t;return this.htmlElement=!1,t=this.copySelector.call(this,this.config,this.copySelectorParams),this.copyFormatter.call(this,t,this.config,this.copyFormatterParams)},y.prototype.generateSimpleHeaders=function(t){var e=[];return t.forEach(function(t){e.push(t.definition.title)}),e},y.prototype.generateColumnGroupHeaders=function(t){var e=this,n=[];return this.table.columnManager.columns.forEach(function(t){var i=e.processColumnGroup(t);i&&n.push(i)}),n},y.prototype.processColumnGroup=function(t){var e=this,n=t.columns,i={type:"group",title:t.definition.title,column:t};if(n.length){if(i.subGroups=[],i.width=0,n.forEach(function(t){var n=e.processColumnGroup(t);n&&(i.width+=n.width,i.subGroups.push(n))}),!i.width)return!1}else{if(!t.field||!t.visible)return!1;i.width=1}return i},y.prototype.groupHeadersToRows=function(t){var e=[];function n(t,i){void 0===e[i]&&(e[i]=[]),e[i].push(t.title),t.subGroups?t.subGroups.forEach(function(t){n(t,i+1)}):function(){var t=0;e.forEach(function(e){var n=e.length;n>t&&(t=n)}),e.forEach(function(e){var n=e.length;if(n<t)for(var i=n;i<t;i++)e.push("")})}()}return t.forEach(function(t){n(t,0)}),e},y.prototype.rowsToData=function(t,e,n){var i=this.table.columnManager.columnsByIndex,o=[];return t.forEach(function(t){var e=[],n=t instanceof r?t.getData("clipboard"):t;i.forEach(function(t){var i=t.getFieldValue(n);switch(void 0===i?"undefined":a(i)){case"object":i=JSON.stringify(i);break;case"undefined":case"null":i="";break;default:i=i}e.push(i)}),o.push(e)}),o},y.prototype.buildComplexRows=function(t){var e=this,n=[];return this.table.modules.groupRows.getGroups().forEach(function(t){n.push(e.processGroupData(t))}),n},y.prototype.processGroupData=function(t){var e=this,n=t.getSubGroups(),i={type:"group",key:t.key};return n.length?(i.subGroups=[],n.forEach(function(t){i.subGroups.push(e.processGroupData(t))})):i.rows=t.getRows(!0),i},y.prototype.getCalcRow=function(t,e,n){var i=t[e];return i&&(n&&(i=i[n]),Object.keys(i).length)?this.rowsToData([i]):[]},y.prototype.buildOutput=function(t,e,n){var i,o=this,r=[],a=this.table.columnManager.columnsByIndex;return e.columnHeaders&&("groups"==e.columnHeaders?(a=this.generateColumnGroupHeaders(this.table.columnManager.columns),r=r.concat(this.groupHeadersToRows(a))):r.push(this.generateSimpleHeaders(a))),this.config.columnCalcs&&(i=this.table.getCalcResults()),this.table.options.clipboardCopyStyled&&this.generateHTML(t,a,i,e,n),e.rowGroups?t.forEach(function(t){r=r.concat(o.parseRowGroupData(t,e,n,i||{}))}):(e.columnCalcs&&(r=r.concat(this.getCalcRow(i,"top"))),r=r.concat(this.rowsToData(t,e,n)),e.columnCalcs&&(r=r.concat(this.getCalcRow(i,"bottom")))),r},y.prototype.parseRowGroupData=function(t,e,n,i){var o=this,r=[];return r.push([t.key]),t.subGroups?t.subGroups.forEach(function(a){r=r.concat(o.parseRowGroupData(a,e,n,i[t.key]&&i[t.key].groups||{}))}):(e.columnCalcs&&(r=r.concat(this.getCalcRow(i,t.key,"top"))),r=r.concat(this.rowsToData(t.rows,e,n)),e.columnCalcs&&(r=r.concat(this.getCalcRow(i,t.key,"bottom")))),r},y.prototype.generateHTML=function(t,e,n,i,o){var s,l,u,c,h,d,f,p,g=this,m=[];function v(t,e,n){var i=t[e];i&&(n&&(i=i[n]),Object.keys(i).length&&y([i]))}function y(t){t.forEach(function(t,n){var i,o=document.createElement("tr"),f=h,p=!1;t instanceof r?i=t.getData("clipboard"):(i=t,p=!0),e.forEach(function(t,n){var r=document.createElement("td"),s=t.getFieldValue(i);switch(void 0===s?"undefined":a(s)){case"object":s=JSON.stringify(s);break;case"undefined":case"null":s="";break;default:s=s}r.innerHTML=s,t.definition.align&&(r.style.textAlign=t.definition.align),e.length,d&&g.mapElementStyles(d,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),o.appendChild(r)}),p?f=c:(n%2||!l||(f=l),n%2&&u&&(f=u)),f&&g.mapElementStyles(f,o,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),s.appendChild(o)})}this.htmlElement=document.createElement("table"),g.mapElementStyles(this.table.element,this.htmlElement,["border-top","border-left","border-right","border-bottom"]),i.columnHeaders&&("groups"==i.columnHeaders?(e.forEach(function(t){!function t(e,n){void 0===m[n]&&(m[n]=[]),m[n].push({title:e.title,width:e.width,height:1,children:!!e.subGroups,element:e.column.getElement()}),e.subGroups&&e.subGroups.forEach(function(e){t(e,n+1)})}(t,0)}),m.forEach(function(t,e){t.forEach(function(t){t.children||(t.height=m.length-e)})}),function(t){var e=document.createElement("thead");t.forEach(function(t){var n=document.createElement("tr");t.forEach(function(t){var e=document.createElement("th");t.width>1&&(e.colSpan=t.width),t.height>1&&(e.rowSpan=t.height),e.innerHTML=t.title,g.mapElementStyles(t.element,e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),n.appendChild(e)}),g.mapElementStyles(g.table.columnManager.getHeadersElement(),n,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.appendChild(n)}),g.htmlElement.appendChild(e)}(m)):function(){var t=document.createElement("tr");e.forEach(function(e){var n=document.createElement("th");n.innerHTML=e.definition.title,g.mapElementStyles(e.getElement(),n,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.appendChild(n)}),g.mapElementStyles(g.table.columnManager.getHeadersElement(),t,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),g.htmlElement.appendChild(document.createElement("thead").appendChild(t))}()),e=this.table.columnManager.columnsByIndex,s=document.createElement("tbody"),window.getComputedStyle&&(l=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),u=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),c=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),h=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),f=this.table.element.getElementsByClassName("tabulator-group")[0],h&&(p=h.getElementsByClassName("tabulator-cell"),d=p[0],p[p.length-1])),i.rowGroups?t.forEach(function(t){!function t(n,o){var r=document.createElement("tr"),a=document.createElement("td");a.colSpan=e.length,a.innerHTML=n.key,r.appendChild(a),s.appendChild(r),g.mapElementStyles(f,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.subGroups?n.subGroups.forEach(function(e){t(e,o[n.key]&&o[n.key].groups||{})}):(i.columnCalcs&&v(o,n.key,"top"),y(n.rows),i.columnCalcs&&v(o,n.key,"bottom"))}(t,n||{})}):(i.columnCalcs&&v(n,"top"),y(t),i.columnCalcs&&v(n,"bottom")),this.htmlElement.appendChild(s)},y.prototype.mapElementStyles=function(t,e,n){var i={"background-color":"backgroundColor",color:"fontColor","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom"};if(window.getComputedStyle){var o=window.getComputedStyle(t);n.forEach(function(t){e.style[i[t]]=o.getPropertyValue(t)})}},y.prototype.copySelectors={userSelection:function(t,e){return e},selected:function(t,e){var n=[];return this.table.modExists("selectRow",!0)&&(n=this.table.modules.selectRow.getSelectedRows()),t.rowGroups&&console.warn("Clipboard Warning - select coptSelector does not support row groups"),this.buildOutput(n,t,e)},table:function(t,e){return t.rowGroups&&console.warn("Clipboard Warning - table coptSelector does not support row groups"),this.buildOutput(this.table.rowManager.getComponents(),t,e)},active:function(t,e){var n;return n=t.rowGroups?this.buildComplexRows(t):this.table.rowManager.getComponents(!0),this.buildOutput(n,t,e)}},y.prototype.copyFormatters={raw:function(t,e){return t},table:function(t,e){var n=[];return t.forEach(function(t){t.forEach(function(t){void 0===t&&(t=""),(t=void 0===t||null===t?"":t.toString()).match(/\r|\n/)&&(t='"'+(t=t.split('"').join('""'))+'"')}),n.push(t.join("\t"))}),n.join("\n")}},y.prototype.pasteParsers={table:function(t){var e=[],n=!0,i=this.table.columnManager.columns,o=[],r=[];return(t=t.split("\n")).forEach(function(t){e.push(t.split("\t"))}),!(!e.length||1===e.length&&e[0].length<2)&&(!0,e[0].forEach(function(t){var e=i.find(function(e){return t&&e.definition.title&&t.trim()&&e.definition.title.trim()===t.trim()});e?o.push(e):n=!1}),n||(n=!0,o=[],e[0].forEach(function(t){var e=i.find(function(e){return t&&e.field&&t.trim()&&e.field.trim()===t.trim()});e?o.push(e):n=!1}),n||(o=this.table.columnManager.columnsByIndex)),n&&e.shift(),e.forEach(function(t){var e={};t.forEach(function(t,n){o[n]&&(e[o[n].field]=t)}),r.push(e)}),r)}},y.prototype.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},h.prototype.registerModule("clipboard",y);var b=function(t){this.table=t,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0};b.prototype.initialize=function(){var t=null,e=this.table.columnManager.getFirstVisibileColumn(),n=this.table.options;switch(this.field=n.dataTreeChildField,this.indent=n.dataTreeChildIndent,this.elementField=n.dataTreeElementColumn||!!e&&e.field,n.dataTreeBranchElement&&(!0===n.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof n.dataTreeBranchElement?((t=document.createElement("div")).innerHTML=n.dataTreeBranchElement,this.branchEl=t.firstChild):this.branchEl=n.dataTreeBranchElement),n.dataTreeCollapseElement?"string"==typeof n.dataTreeCollapseElement?((t=document.createElement("div")).innerHTML=n.dataTreeCollapseElement,this.collapseEl=t.firstChild):this.collapseEl=n.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),n.dataTreeExpandElement?"string"==typeof n.dataTreeExpandElement?((t=document.createElement("div")).innerHTML=n.dataTreeExpandElement,this.expandEl=t.firstChild):this.expandEl=n.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),a(n.dataTreeStartExpanded)){case"boolean":this.startOpen=function(t,e){return n.dataTreeStartExpanded};break;case"function":this.startOpen=n.dataTreeStartExpanded;break;default:this.startOpen=function(t,e){return n.dataTreeStartExpanded[e]}}},b.prototype.initializeRow=function(t){var e=t.getData()[this.field],n=Array.isArray(e),i=n||!n&&"object"===(void 0===e?"undefined":a(e))&&null!==e;t.modules.dataTree={index:0,open:!!i&&this.startOpen(t.getComponent(),0),controlEl:!1,branchEl:!1,parent:!1,children:i}},b.prototype.layoutRow=function(t){var e=(this.elementField?t.getCell(this.elementField):t.getCells()[0]).getElement(),n=t.modules.dataTree;n.branchEl&&n.branchEl.parentNode.removeChild(n.branchEl),this.generateControlElement(t,e),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),e.insertBefore(n.branchEl,e.firstChild),n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+n.index*this.indent+"px"):e.style.paddingLeft=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-left"))+n.index*this.indent+"px")},b.prototype.generateControlElement=function(t,e){var n=this,i=t.modules.dataTree,o=(e=e||t.getCells()[0].getElement(),i.controlEl);!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",function(e){e.stopPropagation(),n.collapseRow(t)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",function(e){e.stopPropagation(),n.expandRow(t)})),i.controlEl.addEventListener("mousedown",function(t){t.stopPropagation()}),o&&o.parentNode===e?o.parentNode.replaceChild(i.controlEl,o):e.insertBefore(i.controlEl,e.firstChild))},b.prototype.setDisplayIndex=function(t){this.displayIndex=t},b.prototype.getDisplayIndex=function(){return this.displayIndex},b.prototype.getRows=function(t){var e=this,n=[];return t.forEach(function(t,i){var o;n.push(t),t instanceof s&&((o=t.modules.dataTree.children).index||!1===o.children||e.getChildren(t).forEach(function(t){n.push(t)}))}),n},b.prototype.getChildren=function(t){var e=this,n=t.modules.dataTree,i=[],o=[];return!1!==n.children&&n.open&&(Array.isArray(n.children)||(n.children=this.generateChildren(t)),i=this.table.modExists("filter")?this.table.modules.filter.filter(n.children):n.children,this.table.modExists("sort")&&this.table.modules.sort.sort(i),i.forEach(function(t){o.push(t),e.getChildren(t).forEach(function(t){o.push(t)})})),o},b.prototype.generateChildren=function(t){var e=this,n=[],i=t.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(function(i){var o=new s(i||{},e.table.rowManager);o.modules.dataTree.index=t.modules.dataTree.index+1,o.modules.dataTree.parent=t,o.modules.dataTree.children&&(o.modules.dataTree.open=e.startOpen(o.getComponent(),o.modules.dataTree.index)),n.push(o)}),n},b.prototype.expandRow=function(t,e){var n=t.modules.dataTree;!1!==n.children&&(n.open=!0,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(t.getComponent(),t.modules.dataTree.index))},b.prototype.collapseRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open=!1,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(t.getComponent(),t.modules.dataTree.index))},b.prototype.toggleRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open?this.collapseRow(t):this.expandRow(t))},b.prototype.getTreeParent=function(t){return!!t.modules.dataTree.parent&&t.modules.dataTree.parent.getComponent()},b.prototype.getTreeChildren=function(t){var e=t.modules.dataTree,n=[];return e.children&&(Array.isArray(e.children)||(e.children=this.generateChildren(t)),e.children.forEach(function(t){t instanceof s&&n.push(t.getComponent())})),n},b.prototype.checkForRestyle=function(t){t.row.cells.indexOf(t)||!1!==t.row.modules.dataTree.children&&t.row.reinitialize()},b.prototype.getChildField=function(){return this.field},h.prototype.registerModule("dataTree",b);var w=function(t){this.table=t,this.fields={},this.columnsByIndex=[],this.columnsByField={},this.config={}};w.prototype.download=function(t,e,n,i){var o=this,r=!1;this.processConfig(),"function"==typeof t?r=t:o.downloaders[t]?r=o.downloaders[t]:console.warn("Download Error - No such download type found: ",t),this.processColumns(),r&&r.call(this,o.processDefinitions(),o.processData(),n||{},function(n,r){i?!0===i?o.triggerDownload(n,r,t,e,!0):i(n):o.triggerDownload(n,r,t,e)},this.config)},w.prototype.processConfig=function(){var t={columnGroups:!0,rowGroups:!0,columnCalcs:!0};if(this.table.options.downloadConfig)for(var e in this.table.options.downloadConfig)t[e]=this.table.options.downloadConfig[e];t.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),t.columnGroups&&this.table.columnManager.columns.length!=this.table.columnManager.columnsByIndex.length&&(this.config.columnGroups=!0),t.columnCalcs&&this.table.modExists("columnCalcs")&&(this.config.columnCalcs=!0)},w.prototype.processColumns=function(){var t=this;t.columnsByIndex=[],t.columnsByField={},t.table.columnManager.columnsByIndex.forEach(function(e){e.field&&!1!==e.definition.download&&(e.visible||!e.visible&&e.definition.download)&&(t.columnsByIndex.push(e),t.columnsByField[e.field]=e)})},w.prototype.processDefinitions=function(){var t=this,e=[];return this.config.columnGroups?t.table.columnManager.columns.forEach(function(n){var i=t.processColumnGroup(n);i&&e.push(i)}):t.columnsByIndex.forEach(function(n){!1!==n.download&&e.push(t.processDefinition(n))}),e},w.prototype.processColumnGroup=function(t){var e=this,n=t.columns,i=0,o={type:"group",title:t.definition.title,depth:1};if(n.length){if(o.subGroups=[],o.width=0,n.forEach(function(t){var n=e.processColumnGroup(t);n.depth>i&&(i=n.depth),n&&(o.width+=n.width,o.subGroups.push(n))}),o.depth+=i,!o.width)return!1}else{if(!t.field||!1===t.definition.download||!(t.visible||!t.visible&&t.definition.download))return!1;o.width=1,o.definition=this.processDefinition(t)}return o},w.prototype.processDefinition=function(t){var e={};for(var n in t.definition)e[n]=t.definition[n];return void 0!==t.definition.downloadTitle&&(e.title=t.definition.downloadTitle),e},w.prototype.processData=function(){var t=this,e=[],n={};return this.config.rowGroups?this.table.modules.groupRows.getGroups().forEach(function(n){e.push(t.processGroupData(n))}):e=this.table.rowManager.getData(!0,"download"),this.config.columnCalcs&&(n=this.table.getCalcResults(),e={calcs:n,data:e}),"function"==typeof this.table.options.downloadDataFormatter&&(e=this.table.options.downloadDataFormatter(e)),e},w.prototype.processGroupData=function(t){var e=this,n=t.getSubGroups(),i={type:"group",key:t.key};return n.length?(i.subGroups=[],n.forEach(function(t){i.subGroups.push(e.processGroupData(t))})):i.rows=t.getData(!0,"download"),i},w.prototype.triggerDownload=function(t,e,n,i,o){var r=document.createElement("a"),a=new Blob([t],{type:e});i=i||"Tabulator."+("function"==typeof n?"txt":n);(a=this.table.options.downloadReady.call(this.table,t,a))&&(o?window.open(window.URL.createObjectURL(a)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(a,i):(r.setAttribute("href",window.URL.createObjectURL(a)),r.setAttribute("download",i),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},w.prototype.getFieldValue=function(t,e){var n=this.columnsByField[t];return!!n&&n.getFieldValue(e)},w.prototype.commsReceived=function(t,e,n){switch(e){case"intercept":this.download(n.type,"",n.options,n.intercept)}},w.prototype.downloaders={csv:function(t,e,n,i,o){var r,s,l=this,u=[],c=[],h=n&&n.delimiter?n.delimiter:",";function d(t){t.forEach(function(t){var e=[];c.forEach(function(n){var i=l.getFieldValue(n,t);switch(void 0===i?"undefined":a(i)){case"object":i=JSON.stringify(i);break;case"undefined":case"null":i="";break;default:i=i}e.push('"'+String(i).split('"').join('""')+'"')}),r.push(e.join(h))})}o.columnGroups?(console.warn("Download Warning - CSV downloader cannot process column groups"),t.forEach(function(t){!function t(e,n){e.subGroups?e.subGroups.forEach(function(e){t(e,n+1)}):(u.push('"'+String(e.title).split('"').join('""')+'"'),c.push(e.definition.field))}(t,0)})):t.forEach(function(t){u.push('"'+String(t.title).split('"').join('""')+'"'),c.push(t.field)}),r=[u.join(h)],o.columnCalcs&&(console.warn("Download Warning - CSV downloader cannot process column calculations"),e=e.data),o.rowGroups?(console.warn("Download Warning - CSV downloader cannot process row groups"),e.forEach(function(t){!function t(e){e.subGroups?e.subGroups.forEach(function(e){t(e)}):d(e.rows)}(t)})):d(e),s=r.join("\n"),n.bom&&(s="\ufeff"+s),i(s,"text/csv")},json:function(t,e,n,i,o){o.columnCalcs&&(console.warn("Download Warning - CSV downloader cannot process column calculations"),e=e.data),i(JSON.stringify(e,null,"\t"),"application/json")},pdf:function(t,e,n,i,o){var r=this,s=[],l=[],u=[],c={},h=1,d={},f=n.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},p=n.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},g=n.jsPDF||{},m=n&&n.title?n.title:"";if(o.columnCalcs&&(c=e.calcs,e=e.data),g.orientation||(g.orientation=n.orientation||"landscape"),g.unit||(g.unit="pt"),o.columnGroups){t.forEach(function(t){t.depth>h&&(h=t.depth)});for(var v=0;v<h;v++)l.push([]);t.forEach(function(t){!function t(e,n){var i=e.width,o=1,r={content:e.title||""};if(e.subGroups?(e.subGroups.forEach(function(e){t(e,n+1)}),o=1):(s.push(e.definition.field),o=h-n),r.rowSpan=o,l[n].push(r),i--,o>1)for(var a=n+1;a<h;a++)l[a].push("");for(a=0;a<i;a++)l[n].push("")}(t,0)})}else t.forEach(function(t){t.field&&(l.push(t.title||""),s.push(t.field))}),l=[l];function y(t){switch(void 0===t?"undefined":a(t)){case"object":t=JSON.stringify(t);break;case"undefined":case"null":t="";break;default:t=t}return t}function b(t){t.forEach(function(t){u.push(w(t))})}function w(t,e){var n=[];return s.forEach(function(i){var o=r.getFieldValue(i,t);o=y(o),e?n.push({content:o,styles:e}):n.push(o)}),n}function _(t,e,n){var i=t[e];i&&(n&&(i=i[n]),Object.keys(i).length&&u.push(w(i,p)))}o.rowGroups?e.forEach(function(t){!function t(e,n){var i=[];i.push({content:y(e.key),colSpan:s.length,styles:f}),u.push(i),e.subGroups?e.subGroups.forEach(function(i){t(i,n[e.key]&&n[e.key].groups||{})}):(o.columnCalcs&&_(n,e.key,"top"),b(e.rows),o.columnCalcs&&_(n,e.key,"bottom"))}(t,c)}):(o.columnCalcs&&_(c,"top"),b(e),o.columnCalcs&&_(c,"bottom"));var x=new jsPDF(g);n&&n.autoTable&&(d="function"==typeof n.autoTable?n.autoTable(x)||{}:n.autoTable),m&&(d.addPageContent=function(t){x.text(m,40,30)}),d.head=l,d.body=u,x.autoTable(d),i(x.output("arraybuffer"),"application/pdf")},xlsx:function(t,e,n,i,o){var r=this,s=n.sheetName||"Sheet1",l={SheetNames:[],Sheets:{}},u={},c=[],h=[],d=[];function f(){var n=[],i=[],s=[];function l(t,e){void 0===n[e]&&(n[e]=[]),void 0===h[e]&&(h[e]=[]),t.width>1&&h[e].push({type:"hoz",start:n[e].length,end:n[e].length+t.width-1}),n[e].push(t.title),t.subGroups?t.subGroups.forEach(function(t){l(t,e+1)}):(i.push(t.definition.field),function(){var t=0;n.forEach(function(e){var n=e.length;n>t&&(t=n)}),n.forEach(function(e){var n=e.length;if(n<t)for(var i=n;i<t;i++)e.push("")})}(i.length),h[e].push({type:"vert",start:i.length-1}))}function f(t){t.forEach(function(t){s.push(p(t))})}function p(t){var e=[];return i.forEach(function(n){var i=r.getFieldValue(n,t);e.push(i instanceof Date||"object"!==(void 0===i?"undefined":a(i))?i:JSON.stringify(i))}),e}function g(t,e,n){var i=t[e];i&&(n&&(i=i[n]),Object.keys(i).length&&(d.push(s.length),s.push(p(i))))}return o.columnGroups?(t.forEach(function(t){l(t,0)}),n.forEach(function(t){s.push(t)})):(t.forEach(function(t){n.push(t.title),i.push(t.field)}),s.push(n)),o.rowGroups?e.forEach(function(t){!function t(e,n){var i=[];i.push(e.key),c.push(s.length),s.push(i),e.subGroups?e.subGroups.forEach(function(i){t(i,n[e.key]&&n[e.key].groups||{})}):(o.columnCalcs&&g(n,e.key,"top"),f(e.rows),o.columnCalcs&&g(n,e.key,"bottom"))}(t,u)}):(o.columnCalcs&&g(u,"top"),f(e),o.columnCalcs&&g(u,"bottom")),function(){var t={},e={s:{c:0,r:0},e:{c:i.length,r:s.length}};XLSX.utils.sheet_add_aoa(t,s),t["!ref"]=XLSX.utils.encode_range(e);var o=function(){var t=[];return c.forEach(function(e){t.push({s:{r:e,c:0},e:{r:e,c:i.length-1}})}),h.forEach(function(e,i){e.forEach(function(e){"hoz"===e.type?t.push({s:{r:i,c:e.start},e:{r:i,c:e.end}}):i!=n.length-1&&t.push({s:{r:i,c:e.start},e:{r:n.length-1,c:e.start}})})}),t}();return o.length&&(t["!merges"]=o),t}()}if(o.columnCalcs&&(u=e.calcs,e=e.data),n.sheetOnly)i(f());else{if(n.sheets)for(var p in n.sheets)!0===n.sheets[p]?(l.SheetNames.push(p),l.Sheets[p]=f()):(l.SheetNames.push(p),this.table.modules.comms.send(n.sheets[p],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},intercept:function(t){l.Sheets[p]=t}}));else l.SheetNames.push(s),l.Sheets[s]=f();i(function(t){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),i=0;i!=t.length;++i)n[i]=255&t.charCodeAt(i);return e}(XLSX.write(l,{bookType:"xlsx",bookSST:!0,type:"binary"})),"application/octet-stream")}}},h.prototype.registerModule("download",w);var _=function(t){this.table=t,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1};_.prototype.initializeColumn=function(t){var e={editor:!1,blocked:!1,check:t.definition.editable,params:t.definition.editorParams||{}};switch(a(t.definition.editor)){case"string":"tick"===t.definition.editor&&(t.definition.editor="tickCross",console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor")),this.editors[t.definition.editor]?e.editor=this.editors[t.definition.editor]:console.warn("Editor Error - No such editor found: ",t.definition.editor);break;case"function":e.editor=t.definition.editor;break;case"boolean":!0===t.definition.editor&&("function"!=typeof t.definition.formatter?("tick"===t.definition.formatter&&(t.definition.formatter="tickCross",console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor")),this.editors[t.definition.formatter]?e.editor=this.editors[t.definition.formatter]:e.editor=this.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter))}e.editor&&(t.modules.edit=e)},_.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},_.prototype.clearEditor=function(){var t,e=this.currentCell;if(this.invalidEdit=!1,e){for(this.currentCell=!1,(t=e.getElement()).classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);e.row.getElement().classList.remove("tabulator-row-editing")}},_.prototype.cancelEdit=function(){if(this.currentCell){var t=this.currentCell,e=this.currentCell.getComponent();this.clearEditor(),t.setValueActual(t.getValue()),t.column.cellEvents.cellEditCancelled&&t.column.cellEvents.cellEditCancelled.call(this.table,e),this.table.options.cellEditCancelled.call(this.table,e)}},_.prototype.bindEditor=function(t){var e=this,n=t.getElement();n.setAttribute("tabindex",0),n.addEventListener("click",function(t){n.classList.contains("tabulator-editing")||n.focus()}),n.addEventListener("mousedown",function(t){e.mouseClick=!0}),n.addEventListener("focus",function(n){e.recursionBlock||e.edit(t,n,!1)})},_.prototype.focusCellNoEvent=function(t){this.recursionBlock=!0,"ie"!==this.table.browser&&t.getElement().focus(),this.recursionBlock=!1},_.prototype.editCell=function(t,e){this.focusCellNoEvent(t),this.edit(t,!1,e)},_.prototype.edit=function(t,e,n){var i,o,r,s=this,l=!0,u=function(){},c=t.getElement();if(!this.currentCell){if(t.column.modules.edit.blocked)return this.mouseClick=!1,c.blur(),!1;switch(e&&e.stopPropagation(),a(t.column.modules.edit.check)){case"function":l=t.column.modules.edit.check(t.getComponent());break;case"boolean":l=t.column.modules.edit.check}if(l||n){if(s.cancelEdit(),s.currentCell=t,o=t.getComponent(),this.mouseClick&&(this.mouseClick=!1,t.column.cellEvents.cellClick&&t.column.cellEvents.cellClick.call(this.table,e,o)),t.column.cellEvents.cellEditing&&t.column.cellEvents.cellEditing.call(this.table,o),s.table.options.cellEditing.call(this.table,o),r="function"==typeof t.column.modules.edit.params?t.column.modules.edit.params(o):t.column.modules.edit.params,!1===(i=t.column.modules.edit.editor.call(s,o,function(t){u=t},function(e){if(s.currentCell===t){var n=!0;t.column.modules.validate&&s.table.modExists("validate")&&(n=s.table.modules.validate.validate(t.column.modules.validate,t.getComponent(),e)),!0===n?(s.clearEditor(),t.setValue(e,!0),s.table.options.dataTree&&s.table.modExists("dataTree")&&s.table.modules.dataTree.checkForRestyle(t)):(s.invalidEdit=!0,c.classList.add("tabulator-validation-fail"),s.focusCellNoEvent(t),u(),s.table.options.validationFailed.call(s.table,t.getComponent(),e,n))}},function(){s.currentCell===t&&(s.cancelEdit(),s.table.options.dataTree&&s.table.modExists("dataTree")&&s.table.modules.dataTree.checkForRestyle(t))},r)))return c.blur(),!1;if(!(i instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",i),c.blur(),!1;for(c.classList.add("tabulator-editing"),t.row.getElement().classList.add("tabulator-row-editing");c.firstChild;)c.removeChild(c.firstChild);c.appendChild(i),u();for(var h=c.children,d=0;d<h.length;d++)h[d].addEventListener("click",function(t){t.stopPropagation()});return!0}return this.mouseClick=!1,c.blur(),!1}this.invalidEdit||this.cancelEdit()},_.prototype.editors={input:function(t,e,n,i,o){var r=t.getValue(),a=document.createElement("input");function s(t){(null===r||void 0===r)&&""!==a.value||a.value!=r?n(a.value):i()}return a.setAttribute("type","text"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",a.value=void 0!==r?r:"",e(function(){a.focus(),a.style.height="100%"}),a.addEventListener("change",s),a.addEventListener("blur",s),a.addEventListener("keydown",function(t){switch(t.keyCode){case 13:n(a.value);break;case 27:i()}}),a},textarea:function(t,e,n,i,o){var r=t.getValue(),a=String(null!==r&&"undefined"!==r?r:""),s=((a.match(/(?:\r\n|\r|\n)/g)||[]).length,document.createElement("textarea")),l=0;function u(e){(null===r||void 0===r)&&""!==s.value||s.value!=r?(n(s.value),setTimeout(function(){t.getRow().normalizeHeight()},300)):i()}return s.style.display="block",s.style.padding="2px",s.style.height="100%",s.style.width="100%",s.style.boxSizing="border-box",s.style.whiteSpace="pre-wrap",s.style.resize="none",s.value=a,e(function(){s.focus(),s.style.height="100%"}),s.addEventListener("change",u),s.addEventListener("blur",u),s.addEventListener("keyup",function(){s.style.height="";var e=s.scrollHeight;s.style.height=e+"px",e!=l&&(l=e,t.getRow().normalizeHeight())}),s.addEventListener("keydown",function(t){27==t.keyCode&&i()}),s},number:function(t,e,n,i,o){var r=t.getValue(),a=document.createElement("input");function s(){var t=a.value;isNaN(t)||""===t||(t=Number(t)),t!=r?n(t):i()}return a.setAttribute("type","number"),void 0!==o.max&&a.setAttribute("max",o.max),void 0!==o.min&&a.setAttribute("min",o.min),void 0!==o.step&&a.setAttribute("step",o.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",a.value=r,e(function(){a.focus(),a.style.height="100%",a.addEventListener("blur",function(t){s()})}),a.addEventListener("keydown",function(t){switch(t.keyCode){case 13:case 9:s();break;case 27:i()}}),a},range:function(t,e,n,i,o){var r=t.getValue(),a=document.createElement("input");function s(){var t=a.value;isNaN(t)||""===t||(t=Number(t)),t!=r?n(t):i()}return a.setAttribute("type","range"),void 0!==o.max&&a.setAttribute("max",o.max),void 0!==o.min&&a.setAttribute("min",o.min),void 0!==o.step&&a.setAttribute("step",o.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",a.value=r,e(function(){a.focus(),a.style.height="100%"}),a.addEventListener("blur",function(t){s()}),a.addEventListener("keydown",function(t){switch(t.keyCode){case 13:case 9:s();break;case 27:i()}}),a},select:function(t,e,n,i,o){var r=this,s=t.getElement(),l=t.getValue(),u=document.createElement("input"),c=document.createElement("div"),d=[],f=[],p={},g=!0;function m(){var e={},n=t.getColumn()._getSelf();return r.table.getData().forEach(function(t){var i=n.getFieldValue(t);null!==i&&void 0!==i&&""!==i&&(e[i]=!0)}),e=o.sortValuesList?"asc"==o.sortValuesList?Object.keys(e).sort():Object.keys(e).sort().reverse():Object.keys(e)}function v(e,n){var i=[],r=[];function s(t){return(t={label:o.listItemFormatter?o.listItemFormatter(t.value,t.label):t.label,value:t.value,element:!1}).value!==n&&(isNaN(parseFloat(t.value))||isNaN(parseFloat(t.value))||parseFloat(t.value)!==parseFloat(n))||y(t),i.push(t),r.push(t),t}if("function"==typeof e&&(e=e(t)),Array.isArray(e))e.forEach(function(t){var e;"object"===(void 0===t?"undefined":a(t))?t.options?(e={label:t.label,group:!0,element:!1},r.push(e),t.options.forEach(function(t){s(t)})):s(t):((e={label:o.listItemFormatter?o.listItemFormatter(t,t):t,value:t,element:!1}).value!==n&&(isNaN(parseFloat(e.value))||isNaN(parseFloat(e.value))||parseFloat(e.value)!==parseFloat(n))||y(e),i.push(e),r.push(e))});else for(var l in e){var u={label:o.listItemFormatter?o.listItemFormatter(l,e[l]):e[l],value:l,element:!1};u.value!==n&&(isNaN(parseFloat(u.value))||isNaN(parseFloat(u.value))||parseFloat(u.value)!==parseFloat(n))||y(u),i.push(u),r.push(u)}d=i,f=r,function(){for(;c.firstChild;)c.removeChild(c.firstChild);f.forEach(function(t){var e=t.element;e||(t.group?((e=document.createElement("div")).classList.add("tabulator-edit-select-list-group"),e.tabIndex=0,e.innerHTML=""===t.label?"&nbsp;":t.label):((e=document.createElement("div")).classList.add("tabulator-edit-select-list-item"),e.tabIndex=0,e.innerHTML=""===t.label?"&nbsp;":t.label,e.addEventListener("click",function(){y(t),b()}),t===p&&e.classList.add("active")),e.addEventListener("mousedown",function(){g=!1,setTimeout(function(){g=!0},10)}),t.element=e),c.appendChild(e)})}()}function y(t){p&&p.element&&p.element.classList.remove("active"),p=t,u.value="&nbsp;"===t.label?"":t.label,t.element&&t.element.classList.add("active")}function b(){_(),l!==p.value?(l=p.value,n(p.value)):i()}function w(){_(),i()}function _(){c.parentNode&&c.parentNode.removeChild(c)}return(Array.isArray(o)||!Array.isArray(o)&&"object"===(void 0===o?"undefined":a(o))&&!o.values)&&(console.warn("DEPRECATION WANRING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),o={values:o}),u.setAttribute("type","text"),u.style.padding="4px",u.style.width="100%",u.style.boxSizing="border-box",u.readOnly=!0,u.value=l,!0===o.values?v(m(),l):v(o.values||[],l),u.addEventListener("keydown",function(t){var e;switch(t.keyCode){case 38:t.stopImmediatePropagation(),t.stopPropagation(),(e=d.indexOf(p))>0&&y(d[e-1]);break;case 40:t.stopImmediatePropagation(),t.stopPropagation(),(e=d.indexOf(p))<d.length-1&&y(-1==e?d[0]:d[e+1]);break;case 13:b();break;case 27:w()}}),u.addEventListener("blur",function(t){g&&w()}),u.addEventListener("focus",function(t){!function(){if(!c.parentNode){!0===o.values?v(m(),l):v(o.values||[],l);var t=h.prototype.helpers.elOffset(s);c.style.minWidth=s.offsetWidth+"px",c.style.top=t.top+s.offsetHeight+"px",c.style.left=t.left+"px",document.body.appendChild(c)}}()}),(c=document.createElement("div")).classList.add("tabulator-edit-select-list"),e(function(){u.style.height="100%",u.focus()}),u},autocomplete:function(t,e,n,i,o){var r=this,a=t.getElement(),s=t.getValue(),l=document.createElement("input"),u=document.createElement("div"),c=[],d=[],f=[],p={},g=!0;function m(t,e){var n=[];o.searchFunc?n=o.searchFunc(t,f):""===t?o.showListOnEmpty&&c.forEach(function(t){n.push(t)}):c.forEach(function(e){null===e.value&&void 0===e.value||(String(e.value).toLowerCase().indexOf(String(t).toLowerCase())>-1||String(e.title).toLowerCase().indexOf(String(t).toLowerCase())>-1)&&n.push(e)}),d=n,function(t){var e=!1;for(;u.firstChild;)u.removeChild(u.firstChild);d.forEach(function(n){var i=n.element;i||((i=document.createElement("div")).classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=n.title,i.addEventListener("click",function(){v(n),y()}),i.addEventListener("mousedown",function(){g=!1,setTimeout(function(){g=!0},10)}),n.element=i,t&&n.value==s&&(l.value=n.title,n.element.classList.add("active"),e=!0),n===p&&(n.element.classList.add("active"),e=!0)),u.appendChild(i)}),e||v(!1)}(e)}function v(t,e){p&&p.element&&p.element.classList.remove("active"),p=t,t&&t.element&&t.element.classList.add("active")}function y(){w(),p?s!==p.value?(s=p.value,l.value=p.value,n(l.value)):i():o.freetext?(s=l.value,n(l.value)):o.allowEmpty&&""===l.value?(s=l.value,n(l.value)):i()}function b(){if(!u.parentNode){for(;u.firstChild;)u.removeChild(u.firstChild);(function(t,e){var n=[];if(Array.isArray(t))t.forEach(function(t){var i={title:o.listItemFormatter?o.listItemFormatter(t,t):t,value:t,element:!1};i.value!==e&&(isNaN(parseFloat(i.value))||isNaN(parseFloat(i.value))||parseFloat(i.value)!==parseFloat(e))||v(i),n.push(i)});else for(var i in t){var r={title:o.listItemFormatter?o.listItemFormatter(i,t[i]):t[i],value:i,element:!1};r.value!==e&&(isNaN(parseFloat(r.value))||isNaN(parseFloat(r.value))||parseFloat(r.value)!==parseFloat(e))||v(r),n.push(r)}c=n})(f=!0===o.values?function(){var e={},n=t.getColumn()._getSelf();return r.table.getData().forEach(function(t){var i=n.getFieldValue(t);null!==i&&void 0!==i&&""!==i&&(e[i]=!0)}),e=o.sortValuesList?"asc"==o.sortValuesList?Object.keys(e).sort():Object.keys(e).sort().reverse():Object.keys(e)}():o.values||[],s);var e=h.prototype.helpers.elOffset(a);u.style.minWidth=a.offsetWidth+"px",u.style.top=e.top+a.offsetHeight+"px",u.style.left=e.left+"px",document.body.appendChild(u)}}function w(){u.parentNode&&u.parentNode.removeChild(u)}return l.setAttribute("type","search"),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",l.addEventListener("keydown",function(t){var e;switch(t.keyCode){case 38:t.stopImmediatePropagation(),t.stopPropagation(),v((e=d.indexOf(p))>0&&d[e-1]);break;case 40:t.stopImmediatePropagation(),t.stopPropagation(),(e=d.indexOf(p))<d.length-1&&v(-1==e?d[0]:d[e+1]);break;case 13:y();break;case 27:w(),i();break;case 36:case 35:t.stopImmediatePropagation()}}),l.addEventListener("keyup",function(t){switch(t.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:m(l.value)}}),l.addEventListener("search",function(t){m(l.value)}),l.addEventListener("blur",function(t){g&&y()}),l.addEventListener("focus",function(t){b(),l.value=s,m(s,!0)}),(u=document.createElement("div")).classList.add("tabulator-edit-select-list"),e(function(){l.style.height="100%",l.focus()}),l},star:function(t,e,n,i,o){var r=this,a=t.getElement(),s=t.getValue(),l=a.getElementsByTagName("svg").length||5,u=a.getElementsByTagName("svg")[0]?a.getElementsByTagName("svg")[0].getAttribute("width"):14,c=[],h=document.createElement("div"),d=document.createElementNS("http://www.w3.org/2000/svg","svg");function f(t){c.forEach(function(e,n){n<t?("ie"==r.table.browser?e.setAttribute("class","tabulator-star-active"):e.classList.replace("tabulator-star-inactive","tabulator-star-active"),e.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):("ie"==r.table.browser?e.setAttribute("class","tabulator-star-inactive"):e.classList.replace("tabulator-star-active","tabulator-star-inactive"),e.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function p(t){var e=document.createElement("span"),i=d.cloneNode(!0);c.push(i),e.addEventListener("mouseenter",function(e){e.stopPropagation(),e.stopImmediatePropagation(),f(t)}),e.addEventListener("mousemove",function(t){t.stopPropagation(),t.stopImmediatePropagation()}),e.addEventListener("click",function(e){e.stopPropagation(),e.stopImmediatePropagation(),n(t)}),e.appendChild(i),h.appendChild(e)}function g(t){s=t,f(t)}a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",h.style.verticalAlign="middle",h.style.display="inline-block",h.style.padding="4px",d.setAttribute("width",u),d.setAttribute("height",u),d.setAttribute("viewBox","0 0 512 512"),d.setAttribute("xml:space","preserve"),d.style.padding="0 1px";for(var m=1;m<=l;m++)p(m);return f(s=Math.min(parseInt(s),l)),h.addEventListener("mousemove",function(t){f(0)}),h.addEventListener("click",function(t){n(0)}),a.addEventListener("blur",function(t){i()}),a.addEventListener("keydown",function(t){switch(t.keyCode){case 39:g(s+1);break;case 37:g(s-1);break;case 13:n(s);break;case 27:i()}}),h},progress:function(t,e,n,i,o){var r,a,s=t.getElement(),l=void 0===o.max?s.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,u=void 0===o.min?s.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,c=(l-u)/100,h=t.getValue()||0,d=document.createElement("div"),f=document.createElement("div");function p(){var t=c*Math.round(f.offsetWidth/(s.clientWidth/100))+u;n(t),s.setAttribute("aria-valuenow",t),s.setAttribute("aria-label",h)}return d.style.position="absolute",d.style.right="0",d.style.top="0",d.style.bottom="0",d.style.width="5px",d.classList.add("tabulator-progress-handle"),f.style.display="inline-block",f.style.position="relative",f.style.height="100%",f.style.backgroundColor="#488CE9",f.style.maxWidth="100%",f.style.minWidth="0%",s.style.padding="4px 4px",h=Math.min(parseFloat(h),l),h=Math.max(parseFloat(h),u),h=Math.round((h-u)/c),f.style.width=h+"%",s.setAttribute("aria-valuemin",u),s.setAttribute("aria-valuemax",l),f.appendChild(d),d.addEventListener("mousedown",function(t){r=t.screenX,a=f.offsetWidth}),d.addEventListener("mouseover",function(){d.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(t){r&&(f.style.width=a+t.screenX-r+"px")}),s.addEventListener("mouseup",function(t){r&&(t.stopPropagation(),t.stopImmediatePropagation(),r=!1,a=!1,p())}),s.addEventListener("keydown",function(t){switch(t.keyCode){case 39:f.style.width=f.clientWidth+s.clientWidth/100+"px";break;case 37:f.style.width=f.clientWidth-s.clientWidth/100+"px";break;case 13:p();break;case 27:i()}}),s.addEventListener("blur",function(){i()}),f},tickCross:function(t,e,n,i,o){var r=t.getValue(),a=document.createElement("input"),s=o.tristate,l=void 0===o.indeterminateValue?null:o.indeterminateValue,u=!1;function c(t){return s?t?u?l:a.checked:a.checked&&!u?(a.checked=!1,a.indeterminate=!0,u=!0,l):(u=!1,a.checked):a.checked}return a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",a.value=r,!s||void 0!==r&&r!==l&&""!==r||(u=!0,a.indeterminate=!0),"firefox"!=this.table.browser&&e(function(){a.focus()}),a.checked=!0===r||"true"===r||"True"===r||1===r,a.addEventListener("change",function(t){n(c())}),a.addEventListener("blur",function(t){n(c(!0))}),a.addEventListener("keydown",function(t){13==t.keyCode&&n(c()),27==t.keyCode&&i()}),a}},h.prototype.registerModule("edit",_);var x=function(t){this.table=t,this.filterList=[],this.headerFilters={},this.headerFilterElements=[],this.headerFilterColumns=[],this.changed=!1};x.prototype.initializeColumn=function(t,e){var n,i=this,o=t.getField();t.modules.filter={success:function(e){var r,s="input"==t.modules.filter.tagType&&"text"==t.modules.filter.attrType||"textarea"==t.modules.filter.tagType?"partial":"match",l="";if(void 0===n||n!==e){if(n=e,t.modules.filter.emptyFunc(e))delete i.headerFilters[o];else{switch(t.modules.filter.value=e,a(t.definition.headerFilterFunc)){case"string":i.filters[t.definition.headerFilterFunc]?(l=t.definition.headerFilterFunc,r=function(n){var o=t.definition.headerFilterFuncParams||{},r=t.getFieldValue(n);return o="function"==typeof o?o(e,r,n):o,i.filters[t.definition.headerFilterFunc](e,r,n,o)}):console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc);break;case"function":l=r=function(n){var i=t.definition.headerFilterFuncParams||{},o=t.getFieldValue(n);return i="function"==typeof i?i(e,o,n):i,t.definition.headerFilterFunc(e,o,n,i)}}if(!r)switch(s){case"partial":r=function(n){return String(t.getFieldValue(n)).toLowerCase().indexOf(String(e).toLowerCase())>-1},l="like";break;default:r=function(n){return t.getFieldValue(n)==e},l="="}i.headerFilters[o]={value:e,func:r,type:l}}i.changed=!0,i.table.rowManager.filterRefresh()}},attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(t)},x.prototype.generateHeaderFilterElement=function(t,e){var n,i,o,r,s,l,u,c=this,h=t.modules.filter.success,d=t.getField();if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode){var f=t.modules.filter.headerElement.parentNode,p=c.headerFilterElements.indexOf(f);p>=0&&c.headerFilterElements.splice(p,1);var g=c.headerFilterColumns.indexOf(g);g>=0&&c.headerFilterColumns.splice(g,1),t.contentElement.removeChild(f)}if(d){switch(t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(t){return!t&&"0"!==t},(n=document.createElement("div")).classList.add("tabulator-header-filter"),a(t.definition.headerFilter)){case"string":c.table.modules.edit.editors[t.definition.headerFilter]?(i=c.table.modules.edit.editors[t.definition.headerFilter],"tick"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor);break;case"function":i=t.definition.headerFilter;break;case"boolean":t.modules.edit&&t.modules.edit.editor?i=t.modules.edit.editor:t.definition.formatter&&c.table.modules.edit.editors[t.definition.formatter]?(i=c.table.modules.edit.editors[t.definition.formatter],"tick"!==t.definition.formatter&&"tickCross"!==t.definition.formatter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):i=c.table.modules.edit.editors.input}if(i){if(r={getValue:function(){return void 0!==e?e:""},getField:function(){return t.definition.field},getElement:function(){return n},getColumn:function(){return t.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u="function"==typeof(u=t.definition.headerFilterParams||{})?u.call(c.table):u,!(o=i.call(this.table.modules.edit,r,function(){},h,function(){},u)))return void console.warn("Filter Error - Cannot add filter to "+d+" column, editor returned a value of false");if(!(o instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+d+" column, editor should return an instance of Node, the editor returned:",o);d?c.table.modules.localize.bind("headerFilters|columns|"+t.definition.field,function(t){o.setAttribute("placeholder",void 0!==t&&t?t:c.table.modules.localize.getText("headerFilters|default"))}):c.table.modules.localize.bind("headerFilters|default",function(t){o.setAttribute("placeholder",void 0!==c.column.definition.headerFilterPlaceholder&&c.column.definition.headerFilterPlaceholder?c.column.definition.headerFilterPlaceholder:t)}),o.addEventListener("click",function(t){t.stopPropagation(),o.focus()}),s=!1,l=function(t){s&&clearTimeout(s),s=setTimeout(function(){h(o.value)},300)},t.modules.filter.headerElement=o,t.modules.filter.attrType=o.hasAttribute("type")?o.getAttribute("type").toLowerCase():"",t.modules.filter.tagType=o.tagName.toLowerCase(),!1!==t.definition.headerFilterLiveFilter&&("autocomplete"===t.definition.headerFilter||"autocomplete"===t.definition.editor&&!0===t.definition.headerFilter||(o.addEventListener("keyup",l),o.addEventListener("search",l),"number"==t.modules.filter.attrType&&o.addEventListener("change",function(t){h(o.value)}),"text"==t.modules.filter.attrType&&"ie"!==this.table.browser&&o.setAttribute("type","search")),"input"!=t.modules.filter.tagType&&"select"!=t.modules.filter.tagType&&"textarea"!=t.modules.filter.tagType||o.addEventListener("mousedown",function(t){t.stopPropagation()})),n.appendChild(o),t.contentElement.appendChild(n),c.headerFilterElements.push(o),c.headerFilterColumns.push(t)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)},x.prototype.hideHeaderFilterElements=function(){this.headerFilterElements.forEach(function(t){t.style.display="none"})},x.prototype.showHeaderFilterElements=function(){this.headerFilterElements.forEach(function(t){t.style.display=""})},x.prototype.setHeaderFilterFocus=function(t){t.modules.filter&&t.modules.filter.headerElement?t.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",t.getField())},x.prototype.setHeaderFilterValue=function(t,e){t&&(t.modules.filter&&t.modules.filter.headerElement?(this.generateHeaderFilterElement(t,e),t.modules.filter.success(e)):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},x.prototype.reloadHeaderFilter=function(t){t&&(t.modules.filter&&t.modules.filter.headerElement?this.generateHeaderFilterElement(t,t.modules.filter.value):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},x.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},x.prototype.setFilter=function(t,e,n){this.filterList=[],Array.isArray(t)||(t=[{field:t,type:e,value:n}]),this.addFilter(t)},x.prototype.addFilter=function(t,e,n){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:n}]),t.forEach(function(t){(t=i.findFilter(t))&&(i.filterList.push(t),i.changed=!0)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},x.prototype.findFilter=function(t){var e,n=this;if(Array.isArray(t))return this.findSubFilters(t);var i=!1;return"function"==typeof t.field?i=function(e){return t.field(e,t.type||{})}:n.filters[t.type]?i=(e=n.table.columnManager.getColumnByField(t.field))?function(i){return n.filters[t.type](t.value,e.getFieldValue(i))}:function(e){return n.filters[t.type](t.value,e[t.field])}:console.warn("Filter Error - No such filter type found, ignoring: ",t.type),t.func=i,!!t.func&&t},x.prototype.findSubFilters=function(t){var e=this,n=[];return t.forEach(function(t){(t=e.findFilter(t))&&n.push(t)}),!!n.length&&n},x.prototype.getFilters=function(t,e){var n=[];return t&&(n=this.getHeaderFilters()),this.filterList.forEach(function(t){n.push({field:t.field,type:t.type,value:t.value})}),e&&n.forEach(function(t){"function"==typeof t.type&&(t.type="function")}),n},x.prototype.getHeaderFilters=function(){var t=[];for(var e in this.headerFilters)t.push({field:e,type:this.headerFilters[e].type,value:this.headerFilters[e].value});return t},x.prototype.removeFilter=function(t,e,n){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:n}]),t.forEach(function(t){var e=-1;(e="object"==a(t.field)?i.filterList.findIndex(function(e){return t===e}):i.filterList.findIndex(function(e){return t.field===e.field&&t.type===e.type&&t.value===e.value}))>-1?(i.filterList.splice(e,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},x.prototype.clearFilter=function(t){this.filterList=[],t&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},x.prototype.clearHeaderFilter=function(){var t=this;this.headerFilters={},this.headerFilterColumns.forEach(function(e){e.modules.filter.value=null,t.reloadHeaderFilter(e)}),this.changed=!0},x.prototype.search=function(t,e,n,i){var o=this,r=[],a=[];return Array.isArray(e)||(e=[{field:e,type:n,value:i}]),e.forEach(function(t){(t=o.findFilter(t))&&a.push(t)}),this.table.rowManager.rows.forEach(function(e){var n=!0;a.forEach(function(t){o.filterRecurse(t,e.getData())||(n=!1)}),n&&r.push("data"===t?e.getData("data"):e.getComponent())}),r},x.prototype.filter=function(t,e){var n=this,i=[],o=[];return n.table.options.dataFiltering&&n.table.options.dataFiltering.call(n.table,n.getFilters()),n.table.options.ajaxFiltering||!n.filterList.length&&!Object.keys(n.headerFilters).length?i=t.slice(0):t.forEach(function(t){n.filterRow(t)&&i.push(t)}),n.table.options.dataFiltered&&(i.forEach(function(t){o.push(t.getComponent())}),n.table.options.dataFiltered.call(n.table,n.getFilters(),o)),i},x.prototype.filterRow=function(t,e){var n=this,i=!0,o=t.getData();for(var r in n.filterList.forEach(function(t){n.filterRecurse(t,o)||(i=!1)}),n.headerFilters)n.headerFilters[r].func(o)||(i=!1);return i},x.prototype.filterRecurse=function(t,e){var n=this,i=!1;return Array.isArray(t)?t.forEach(function(t){n.filterRecurse(t,e)&&(i=!0)}):i=t.func(e),i},x.prototype.filters={"=":function(t,e,n,i){return e==t},"<":function(t,e,n,i){return e<t},"<=":function(t,e,n,i){return e<=t},">":function(t,e,n,i){return e>t},">=":function(t,e,n,i){return e>=t},"!=":function(t,e,n,i){return e!=t},regex:function(t,e,n,i){return"string"==typeof t&&(t=new RegExp(t)),t.test(e)},like:function(t,e,n,i){return null===t||void 0===t?e===t:void 0!==e&&null!==e&&String(e).toLowerCase().indexOf(t.toLowerCase())>-1},in:function(t,e,n,i){return Array.isArray(t)?t.indexOf(e)>-1:(console.warn("Filter Error - filter value is not an array:",t),!1)}},h.prototype.registerModule("filter",x);var S=function(t){this.table=t};S.prototype.initializeColumn=function(t){var e={params:t.definition.formatterParams||{}};switch(a(t.definition.formatter)){case"string":"tick"===t.definition.formatter&&(t.definition.formatter="tickCross",void 0===e.params.crossElement&&(e.params.crossElement=!1),console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[t.definition.formatter]?e.formatter=this.formatters[t.definition.formatter]:(console.warn("Formatter Error - No such formatter found: ",t.definition.formatter),e.formatter=this.formatters.plaintext);break;case"function":e.formatter=t.definition.formatter;break;default:e.formatter=this.formatters.plaintext}t.modules.format=e},S.prototype.cellRendered=function(t){t.column.modules.format.renderedCallback&&t.column.modules.format.renderedCallback()},S.prototype.formatValue=function(t){var e=t.getComponent(),n="function"==typeof t.column.modules.format.params?t.column.modules.format.params(e):t.column.modules.format.params;return t.column.modules.format.formatter.call(this,e,n,function(e){t.column.modules.format.renderedCallback=e})},S.prototype.sanitizeHTML=function(t){if(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}return t},S.prototype.emptyToSpace=function(t){return null===t||void 0===t?"&nbsp":t},S.prototype.getFormatter=function(t){switch(void 0===t?"undefined":a(t)){case"string":this.formatters[t]?t=this.formatters[t]:(console.warn("Formatter Error - No such formatter found: ",t),t=this.formatters.plaintext);break;case"function":t=t;break;default:t=this.formatters.plaintext}return t},S.prototype.formatters={plaintext:function(t,e,n){return this.emptyToSpace(this.sanitizeHTML(t.getValue()))},html:function(t,e,n){return t.getValue()},textarea:function(t,e,n){return t.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(t.getValue()))},money:function(t,e,n){var i,o,r,a,s=parseFloat(t.getValue()),l=e.decimal||".",u=e.thousand||",",c=e.symbol||"",h=!!e.symbolAfter,d=void 0!==e.precision?e.precision:2;if(isNaN(s))return this.emptyToSpace(this.sanitizeHTML(t.getValue()));for(i=!1!==d?s.toFixed(d):s,o=(i=String(i).split("."))[0],r=i.length>1?l+i[1]:"",a=/(\d+)(\d{3})/;a.test(o);)o=o.replace(a,"$1"+u+"$2");return h?o+r+c:c+o+r},link:function(t,e,n){var i=t.getValue(),o=e.urlPrefix||"",r=this.emptyToSpace(i),s=document.createElement("a");if(e.labelField&&(r=t.getData()[e.labelField]),e.label)switch(a(e.label)){case"string":r=e.label;break;case"function":r=e.label(t)}if(e.urlField&&(i=t.getData()[e.urlField]),e.url)switch(a(e.url)){case"string":i=e.url;break;case"function":i=e.url(t)}return s.setAttribute("href",o+i),e.target&&s.setAttribute("target",e.target),s.innerHTML=this.emptyToSpace(this.sanitizeHTML(r)),s},image:function(t,e,n){var i=document.createElement("img");switch(i.setAttribute("src",t.getValue()),a(e.height)){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height}switch(a(e.width)){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width}return i.addEventListener("load",function(){t.getRow().normalizeHeight()}),i},tickCross:function(t,e,n){var i=t.getValue(),o=t.getElement(),r=e.allowEmpty,a=e.allowTruthy,s=void 0!==e.tickElement?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',l=void 0!==e.crossElement?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return a&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(o.setAttribute("aria-checked",!0),s||""):!r||"null"!==i&&""!==i&&null!==i&&void 0!==i?(o.setAttribute("aria-checked",!1),l||""):(o.setAttribute("aria-checked","mixed"),"")},datetime:function(t,e,n){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",o=e.outputFormat||"DD/MM/YYYY hh:mm:ss",r=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",a=t.getValue(),s=moment(a,i);return s.isValid()?s.format(o):!0===r?a:"function"==typeof r?r(a):r},datetimediff:function(t,e,n){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",o=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",r=void 0!==e.suffix&&e.suffix,a=void 0!==e.unit?e.unit:void 0,s=void 0!==e.humanize&&e.humanize,l=void 0!==e.date?e.date:moment(),u=t.getValue(),c=moment(u,i);return c.isValid()?s?moment.duration(c.diff(l)).humanize(r):c.diff(l,a)+(r?" "+r:""):!0===o?u:"function"==typeof o?o(u):o},lookup:function(t,e,n){var i=t.getValue();return void 0===e[i]?(console.warn("Missing display value for "+i),i):e[i]},star:function(t,e,n){var i=t.getValue(),o=t.getElement(),r=e&&e.stars?e.stars:5,a=document.createElement("span"),s=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.verticalAlign="middle",s.setAttribute("width","14"),s.setAttribute("height","14"),s.setAttribute("viewBox","0 0 512 512"),s.setAttribute("xml:space","preserve"),s.style.padding="0 1px",i=parseInt(i)<r?parseInt(i):r;for(var l=1;l<=r;l++){var u=s.cloneNode(!0);u.innerHTML=l<=i?'<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>':'<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',a.appendChild(u)}return o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.setAttribute("aria-label",i),a},traffic:function(t,e,n){var i,o,r=this.sanitizeHTML(t.getValue())||0,s=document.createElement("span"),l=e&&e.max?e.max:100,u=e&&e.min?e.min:0,c=e&&void 0!==e.color?e.color:["red","orange","green"],h="#666666";if(!isNaN(r)&&void 0!==t.getValue()){switch(s.classList.add("tabulator-traffic-light"),o=parseFloat(r)<=l?parseFloat(r):l,o=parseFloat(o)>=u?parseFloat(o):u,i=(l-u)/100,o=Math.round((o-u)/i),void 0===c?"undefined":a(c)){case"string":h=c;break;case"function":h=c(r);break;case"object":if(Array.isArray(c)){var d=100/c.length,f=Math.floor(o/d);f=Math.min(f,c.length-1),h=c[f=Math.max(f,0)];break}}return s.style.backgroundColor=h,s}},progress:function(t,e,n){var i,o,r,s,l,u=this.sanitizeHTML(t.getValue())||0,c=t.getElement(),h=e&&e.max?e.max:100,d=e&&e.min?e.min:0,f=e&&e.legendAlign?e.legendAlign:"center";switch(o=parseFloat(u)<=h?parseFloat(u):h,o=parseFloat(o)>=d?parseFloat(o):d,i=(h-d)/100,o=Math.round((o-d)/i),a(e.color)){case"string":r=e.color;break;case"function":r=e.color(u);break;case"object":if(Array.isArray(e.color)){var p=100/e.color.length,g=Math.floor(o/p);g=Math.min(g,e.color.length-1),g=Math.max(g,0),r=e.color[g];break}default:r="#2DC214"}switch(a(e.legend)){case"string":s=e.legend;break;case"function":s=e.legend(u);break;case"boolean":s=u;break;default:s=!1}switch(a(e.legendColor)){case"string":l=e.legendColor;break;case"function":l=e.legendColor(u);break;case"object":if(Array.isArray(e.legendColor)){p=100/e.legendColor.length,g=Math.floor(o/p);g=Math.min(g,e.legendColor.length-1),g=Math.max(g,0),l=e.legendColor[g]}break;default:l="#000"}return c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",o),"<div style='position:realtive; height:100%;' data-max='"+h+"' data-min='"+d+"'><div style='position:relative; height:100%; width:calc("+o+"%); background-color:"+r+"; display:inline-block;'></div></div>"+(s?"<div style='position:absolute; top:4px; left:0; text-align:"+f+"; width:100%; color:"+l+";'>"+s+"</div>":"")},color:function(t,e,n){return t.getElement().style.backgroundColor=this.sanitizeHTML(t.getValue()),""},buttonTick:function(t,e,n){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'},buttonCross:function(t,e,n){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'},rownum:function(t,e,n){return this.table.rowManager.activeRows.indexOf(t.getRow()._getSelf())+1},handle:function(t,e,n){return t.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"},responsiveCollapse:function(t,e,n){var i=!1,o=document.createElement("div");function r(e){var n=t.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0];(i=e)?(o.classList.add("open"),n&&(n.style.display="")):(o.classList.remove("open"),n&&(n.style.display="none"))}return o.classList.add("tabulator-responsive-collapse-toggle"),o.innerHTML="<span class='tabulator-responsive-collapse-toggle-open'>+</span><span class='tabulator-responsive-collapse-toggle-close'>-</span>",t.getElement().classList.add("tabulator-row-handle"),this.table.options.responsiveLayoutCollapseStartOpen&&(i=!0),o.addEventListener("click",function(t){t.stopImmediatePropagation(),r(!i)}),r(i),o}},h.prototype.registerModule("format",S);var E=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.initializationMode="left",this.active=!1};E.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1},E.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.definition.frozen?t.parent.isGroup?console.warn("Frozen Column Error - Grouped columns cannot be frozen"):t.isGroup?console.warn("Frozen Column Error - Column Groups cannot be frozen"):(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right"},E.prototype.layout=function(){var t=this,e=(this.table.rowManager.element,0);t.active&&(t.leftMargin=t._calcSpace(t.leftColumns,t.leftColumns.length),t.table.columnManager.headersElement.style.marginLeft=t.leftMargin+"px",t.rightMargin=t._calcSpace(t.rightColumns,t.rightColumns.length),t.table.columnManager.element.style.paddingRight=t.rightMargin+"px",t.table.rowManager.activeRows.forEach(function(e){t.layoutRow(e)}),t.table.options.dataTree&&t.table.rowManager.getDisplayRows().forEach(function(e){t.layoutRow(e)}),t.table.modExists("columnCalcs")&&(t.table.modules.columnCalcs.topInitialized&&t.table.modules.columnCalcs.topRow&&t.layoutRow(t.table.modules.columnCalcs.topRow),t.table.modules.columnCalcs.botInitialized&&t.table.modules.columnCalcs.botRow&&t.layoutRow(t.table.modules.columnCalcs.botRow)),t.leftColumns.forEach(function(e,n){e.modules.frozen.margin=t._calcSpace(t.leftColumns,n)+t.table.columnManager.scrollLeft,n==t.leftColumns.length-1?e.modules.frozen.edge=!0:e.modules.frozen.edge=!1,t.layoutColumn(e)}),e=t.table.rowManager.element.clientWidth+t.table.columnManager.scrollLeft,t.rightColumns.forEach(function(n,i){n.modules.frozen.margin=e-t._calcSpace(t.rightColumns,i+1),i==t.rightColumns.length-1?n.modules.frozen.edge=!0:n.modules.frozen.edge=!1,t.layoutColumn(n)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin+"px")},E.prototype.layoutColumn=function(t){var e=this;e.layoutElement(t.getElement(),t),t.cells.forEach(function(n){e.layoutElement(n.getElement(),t)})},E.prototype.layoutRow=function(t){t.getElement().style.paddingLeft=this.leftMargin+"px"},E.prototype.layoutElement=function(t,e){e.modules.frozen&&(t.style.position="absolute",t.style.left=e.modules.frozen.margin+"px",t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))},E.prototype._calcSpace=function(t,e){for(var n=0,i=0;i<e;i++)t[i].visible&&(n+=t[i].getWidth());return n},h.prototype.registerModule("frozenColumns",E);var C=function(t){this.table=t,this.topElement=document.createElement("div"),this.rows=[],this.displayIndex=0};C.prototype.initialize=function(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)},C.prototype.setDisplayIndex=function(t){this.displayIndex=t},C.prototype.getDisplayIndex=function(){return this.displayIndex},C.prototype.isFrozen=function(){return!!this.rows.length},C.prototype.getRows=function(t){var e=t.slice(0);return this.rows.forEach(function(t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}),e},C.prototype.freezeRow=function(t){t.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(t.modules.frozen=!0,this.topElement.appendChild(t.getElement()),t.initialize(),t.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(t),this.table.rowManager.refreshActiveData("display"),this.styleRows())},C.prototype.unfreezeRow=function(t){var e=this.rows.indexOf(t);if(t.modules.frozen){t.modules.frozen=!1;var n=t.getElement();n.parentNode.removeChild(n),this.table.rowManager.adjustTableSize(),this.rows.splice(e,1),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()}else console.warn("Freeze Error - Row is already unfrozen")},C.prototype.styleRows=function(t){var e=this;this.rows.forEach(function(t,n){e.table.rowManager.styleRow(t,n)})},h.prototype.registerModule("frozenRows",C);var T=function(t){this._group=t,this.type="GroupComponent"};T.prototype.getKey=function(){return this._group.key},T.prototype.getElement=function(){return this._group.element},T.prototype.getRows=function(){return this._group.getRows(!0)},T.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},T.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},T.prototype.getVisibility=function(){return this._group.visible},T.prototype.show=function(){this._group.show()},T.prototype.hide=function(){this._group.hide()},T.prototype.toggle=function(){this._group.toggleVisibility()},T.prototype._getSelf=function(){return this._group},T.prototype.getTable=function(){return this._group.groupManager.table};var M=function(t,e,n,i,o,r,a){this.groupManager=t,this.parent=e,this.key=i,this.level=n,this.field=o,this.hasSubGroups=n<t.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=a,this.rows=[],this.groups=[],this.groupList=[],this.generator=r,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=a?a.visible:void 0!==t.startOpen[n]?t.startOpen[n]:t.startOpen[0],this.createElements(),this.addBindings(),this.createValueGroups()};M.prototype.createElements=function(){this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-arrow"),!1!==this.groupManager.table.options.movableRows&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)},M.prototype.createValueGroups=function(){var t=this,e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach(function(n){t._createGroup(n,e)})},M.prototype.addBindings=function(){var t,e,n,i=this;i.groupManager.table.options.groupClick&&i.element.addEventListener("click",function(t){i.groupManager.table.options.groupClick(t,i.getComponent())}),i.groupManager.table.options.groupDblClick&&i.element.addEventListener("dblclick",function(t){i.groupManager.table.options.groupDblClick(t,i.getComponent())}),i.groupManager.table.options.groupContext&&i.element.addEventListener("contextmenu",function(t){i.groupManager.table.options.groupContext(t,i.getComponent())}),i.groupManager.table.options.groupTap&&(n=!1,i.element.addEventListener("touchstart",function(t){n=!0}),i.element.addEventListener("touchend",function(t){n&&i.groupManager.table.options.groupTap(t,i.getComponent()),n=!1})),i.groupManager.table.options.groupDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,i.groupManager.table.options.groupDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.groupManager.table.options.groupTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,n=!1,i.groupManager.table.options.groupTapHold(t,i.getComponent())},1e3)}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),i.groupManager.table.options.groupToggleElement&&("arrow"==i.groupManager.table.options.groupToggleElement?i.arrowElement:i.element).addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),i.toggleVisibility()})},M.prototype._createGroup=function(t,e){var n=e+"_"+t,i=new M(this.groupManager,this,e,t,this.groupManager.groupIDLookups[e].field,this.groupManager.headerGenerator[e]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[n]);this.groups[n]=i,this.groupList.push(i)},M.prototype._addRowToGroup=function(t){var e=this.level+1;if(this.hasSubGroups){var n=this.groupManager.groupIDLookups[e].func(t.getData()),i=e+"_"+n;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]?this.groups[i]&&this.groups[i].addRow(t):(this.groups[i]||this._createGroup(n,e),this.groups[i].addRow(t))}},M.prototype._addRow=function(t){this.rows.push(t),t.modules.group=this},M.prototype.insertRow=function(t,e,n){var i=this.conformRowData({});t.updateData(i);var o=this.rows.indexOf(e);o>-1?n?this.rows.splice(o+1,0,t):this.rows.splice(o,0,t):n?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)},M.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t,this.groupList.forEach(function(e){e.scrollHeader(t)})},M.prototype.getRowIndex=function(t){},M.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},M.prototype.removeRow=function(t){var e=this.rows.indexOf(t);e>-1&&this.rows.splice(e,1),this.groupManager.table.options.groupValues||this.rows.length?(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},M.prototype.removeGroup=function(t){var e,n=t.level+"_"+t.key;this.groups[n]&&(delete this.groups[n],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},M.prototype.getHeadersAndRows=function(t){var e=[];return e.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(n){e=e.concat(n.getHeadersAndRows(t))}):(!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&this.calcs.top.detachElement(),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&this.calcs.bottom.detachElement(),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):!this.groupList.length&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.options.groupClosedShowCalcs&&this.groupManager.table.modExists("columnCalcs")&&(!t&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&this.calcs.top.detachElement(),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),!t&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&this.calcs.bottom.detachElement(),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e},M.prototype.getData=function(t,e){var n=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach(function(t){n.push(t.getData(e||"data"))}),n},M.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(e){t+=e.getRowCount()}):t=this.rows.length,t},M.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},M.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){t.detachElement()})}):this.rows.forEach(function(t){var e=t.getElement();e.parentNode.removeChild(e)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},M.prototype.show=function(){if(this.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var t=this.getElement();this.groupList.length?this.groupList.forEach(function(e){e.getHeadersAndRows().forEach(function(e){var n=e.getElement();t.parentNode.insertBefore(n,t.nextSibling),e.initialize(),t=n})}):this.rows.forEach(function(e){var n=e.getElement();t.parentNode.insertBefore(n,t.nextSibling),e.initialize(),t=n}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},M.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach(function(e){t.push(e.getData())}),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},M.prototype.getRowGroup=function(t){var e=!1;return this.groupList.length?this.groupList.forEach(function(n){var i=n.getRowGroup(t);i&&(e=i)}):this.rows.find(function(e){return e===t})&&(e=this),e},M.prototype.getSubGroups=function(t){var e=[];return this.groupList.forEach(function(n){e.push(t?n.getComponent():n)}),e},M.prototype.getRows=function(t){var e=[];return this.rows.forEach(function(n){e.push(t?n.getComponent():n)}),e},M.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach(function(e){t.push(e.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},M.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var t=0;t<this.element.childNodes.length;++t)this.element.childNodes[t].parentNode.removeChild(this.element.childNodes[t]);return this.generateGroupHeaderContents(),this.element},M.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},M.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)},M.prototype.initialize=function(t){this.initialized&&!t||(this.normalizeHeight(),this.initialized=!0)},M.prototype.reinitialize=function(){this.initialized=!1,this.height=0,h.prototype.helpers.elVisible(this.element)&&this.initialize(!0)},M.prototype.setHeight=function(t){this.height!=t&&(this.height=t,this.outerHeight=this.element.offsetHeight)},M.prototype.getHeight=function(){return this.outerHeight},M.prototype.getGroup=function(){return this},M.prototype.reinitializeHeight=function(){},M.prototype.calcHeight=function(){},M.prototype.setCellHeight=function(){},M.prototype.clearCellHeight=function(){},M.prototype.getComponent=function(){return new T(this)};var P=function(t){this.table=t,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayIndex=0};P.prototype.initialize=function(){var t=this,e=t.table.options.groupBy,n=t.table.options.groupStartOpen,i=t.table.options.groupHeader;(this.allowedValues=t.table.options.groupValues,t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",function(e,n){t.headerGenerator[0]=function(t,i,o){return(void 0===t?"":t)+"<span>("+i+" "+(1===i?e:n.groups.items)+")</span>"}}),this.groupIDLookups=[],Array.isArray(e)||e)?this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs():this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs&&this.table.columnManager.getRealColumns().forEach(function(e){e.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()});Array.isArray(e)||(e=[e]),e.forEach(function(e,n){var i,o;i="function"==typeof e?e:(o=t.table.columnManager.getColumnByField(e))?function(t){return o.getFieldValue(t)}:function(t){return t[e]},t.groupIDLookups.push({field:"function"!=typeof e&&e,func:i,values:!!t.allowedValues&&t.allowedValues[n]})}),n&&(Array.isArray(n)||(n=[n]),n.forEach(function(t){t="function"==typeof t?t:function(){return!0}}),t.startOpen=n),i&&(t.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},P.prototype.setDisplayIndex=function(t){this.displayIndex=t},P.prototype.getDisplayIndex=function(){return this.displayIndex},P.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},P.prototype.getGroups=function(t){var e=[];return this.groupList.forEach(function(n){e.push(t?n.getComponent():n)}),e},P.prototype.pullGroupListData=function(t){var e=this,n=[];return t.forEach(function(t){var i={level:0,rowCount:0,headerContent:""},o=[];t.hasSubGroups?(o=e.pullGroupListData(t.groupList),i.level=t.level,i.rowCount=o.length-t.groupList.length,i.headerContent=t.generator(t.key,i.rowCount,t.rows,t),n.push(i),n=n.concat(o)):(i.level=t.level,i.headerContent=t.generator(t.key,t.rows.length,t.rows,t),i.rowCount=t.getRows().length,n.push(i),t.getRows().forEach(function(t){n.push(t.getData("data"))}))}),n},P.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},P.prototype.getRowGroup=function(t){var e=!1;return this.groupList.forEach(function(n){var i=n.getRowGroup(t);i&&(e=i)}),e},P.prototype.countGroups=function(){return this.groupList.length},P.prototype.generateGroups=function(t){var e=this,n=e.groups;e.groups={},e.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(t){e.createGroup(t,0,n)}),t.forEach(function(t){e.assignRowToExistingGroup(t,n)})):t.forEach(function(t){e.assignRowToGroup(t,n)})},P.prototype.createGroup=function(t,e,n){var i,o=e+"_"+t;n=n||[],i=new M(this,!1,e,t,this.groupIDLookups[0].field,this.headerGenerator[0],n[o]),this.groups[o]=i,this.groupList.push(i)},P.prototype.assignRowToGroup=function(t,e){var n=this.groupIDLookups[0].func(t.getData()),i="0_"+n;this.groups[i]||this.createGroup(n,0,e),this.groups[i].addRow(t)},P.prototype.assignRowToExistingGroup=function(t,e){var n="0_"+this.groupIDLookups[0].func(t.getData());this.groups[n]&&this.groups[n].addRow(t)},P.prototype.assignRowToGroup=function(t,e){var n=this.groupIDLookups[0].func(t.getData()),i=!this.groups["0_"+n];return i&&this.createGroup(n,0,e),this.groups["0_"+n].addRow(t),!i},P.prototype.updateGroupRows=function(t){var e=[];if(this.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}),t){var n=this.table.rowManager.setDisplayRows(e,this.getDisplayIndex());!0!==n&&this.setDisplayIndex(n),this.table.rowManager.refreshActiveData("group",!0,!0)}return e},P.prototype.scrollHeaders=function(t){t+="px",this.groupList.forEach(function(e){e.scrollHeader(t)})},P.prototype.removeGroup=function(t){var e,n=t.level+"_"+t.key;this.groups[n]&&(delete this.groups[n],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1))},h.prototype.registerModule("groupRows",P);var L=function(t){this.table=t,this.history=[],this.index=-1};L.prototype.clear=function(){this.history=[],this.index=-1},L.prototype.action=function(t,e,n){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:e,data:n}),this.index++},L.prototype.getHistoryUndoSize=function(){return this.index+1},L.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},L.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},L.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},L.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,e)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},L.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,e)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},L.prototype._rebindRow=function(t,e){this.history.forEach(function(n){if(n.component instanceof s)n.component===t&&(n.component=e);else if(n.component instanceof u&&n.component.row===t){var i=n.component.column.getField();i&&(n.component=e.getCell(i))}})},h.prototype.registerModule("history",L);var A=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};A.prototype.parseTable=function(){var t=this.table.element,e=this.table.options,n=(e.columns,t.getElementsByTagName("th")),i=t.getElementsByTagName("tbody")[0],o=[];this.hasIndex=!1,this.table.options.htmlImporting.call(this.table),i=i?i.getElementsByTagName("tr"):[],this._extractOptions(t,e),n.length?this._extractHeaders(n,i):this._generateBlankHeaders(n,i);for(var r=0;r<i.length;r++){var s=i[r].getElementsByTagName("td"),l={};this.hasIndex||(l[e.index]=r);for(var u=0;u<s.length;u++){var c=s[u];void 0!==this.fieldIndex[u]&&(l[this.fieldIndex[u]]=c.innerHTML)}o.push(l)}var h=document.createElement("div"),d=t.attributes;for(var u in d)"object"==a(d[u])&&h.setAttribute(d[u].name,d[u].value);t.parentNode.replaceChild(h,t),e.data=o,this.table.options.htmlImported.call(this.table),this.table.element=h},A.prototype._extractOptions=function(t,e,n){var i=t.attributes,o=n?Object.assign([],n):Object.keys(e),r={};for(var s in o.forEach(function(t){r[t.toLowerCase()]=t}),i){var l,u=i[s];u&&"object"==(void 0===u?"undefined":a(u))&&u.name&&0===u.name.indexOf("tabulator-")&&(l=u.name.replace("tabulator-",""),void 0!==r[l]&&(e[r[l]]=this._attribValue(u.value)))}},A.prototype._attribValue=function(t){return"true"===t||"false"!==t&&t},A.prototype._findCol=function(t){return this.table.options.columns.find(function(e){return e.title===t})||!1},A.prototype._extractHeaders=function(t,e){for(var n=0;n<t.length;n++){var o,r,s=t[n],l=!1,u=this._findCol(s.textContent);for(var c in u?l=!0:u={title:s.textContent.trim()},u.field||(u.field=s.textContent.trim().toLowerCase().replace(" ","_")),(o=s.getAttribute("width"))&&!u.width&&(u.width=o),r=s.attributes,this._extractOptions(s,u,i.prototype.defaultOptionList),r){var h=r[c];h&&"object"==(void 0===h?"undefined":a(h))&&h.name&&0===h.name.indexOf("tabulator-")&&(u[h.name.replace("tabulator-","")]=this._attribValue(h.value))}this.fieldIndex[n]=u.field,u.field==this.table.options.index&&(this.hasIndex=!0),l||this.table.options.columns.push(u)}},A.prototype._generateBlankHeaders=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],o={title:"",field:"col"+n};this.fieldIndex[n]=o.field;var r=i.getAttribute("width");r&&(o.width=r),this.table.options.columns.push(o)}},h.prototype.registerModule("htmlTableImport",A);var k=function(t){this.table=t,this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1};k.prototype.initialize=function(){var t=this.table.options.keybindings,e={};if(this.watchKeys={},this.pressedKeys=[],!1!==t){for(var n in this.bindings)e[n]=this.bindings[n];if(Object.keys(t).length)for(var i in t)e[i]=t[i];this.mapBindings(e),this.bindEvents()}},k.prototype.mapBindings=function(t){var e=this,n=this,i=function(i){e.actions[i]?t[i]&&("object"!==a(t[i])&&(t[i]=[t[i]]),t[i].forEach(function(t){n.mapBinding(i,t)})):console.warn("Key Binding Error - no such action:",i)};for(var o in t)i(o)},k.prototype.mapBinding=function(t,e){var n=this,i={action:this.actions[t],keys:[],ctrl:!1,shift:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach(function(t){switch(t){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;default:t=parseInt(t),i.keys.push(t),n.watchKeys[t]||(n.watchKeys[t]=[]),n.watchKeys[t].push(i)}})},k.prototype.bindEvents=function(){var t=this;this.keyupBinding=function(e){var n=e.keyCode,i=t.watchKeys[n];i&&(t.pressedKeys.push(n),i.forEach(function(n){t.checkBinding(e,n)}))},this.keydownBinding=function(e){var n=e.keyCode;if(t.watchKeys[n]){var i=t.pressedKeys.indexOf(n);i>-1&&t.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},k.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},k.prototype.checkBinding=function(t,e){var n=this,i=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&(e.keys.forEach(function(t){-1==n.pressedKeys.indexOf(t)&&(i=!1)}),i&&e.action.call(n,t),!0)},k.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},k.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,n=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(n>=0?e.element.scrollTop=n:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,n=e.scrollTop+e.height,i=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(n<=i?e.element.scrollTop=n:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().next())},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(this.table.options.selectable&&"highlight"!=this.table.options.selectable?"selected":"active",null,null,null,!0)}},h.prototype.registerModule("keybindings",k);var O=function(t){this.table=t,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};O.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.classList.add("tabulator-col-placeholder"),t},O.prototype.initializeColumn=function(t){var e,n=this,i={};t.modules.frozen||(e=t.getElement(),i.mousemove=function(i){t.parent===n.moving.parent&&((n.touchMove?i.touches[0].pageX:i.pageX)-h.prototype.helpers.elOffset(e).left+n.table.columnManager.element.scrollLeft>t.getWidth()/2?n.toCol===t&&n.toColAfter||(e.parentNode.insertBefore(n.placeholderElement,e.nextSibling),n.moveColumn(t,!0)):(n.toCol!==t||n.toColAfter)&&(e.parentNode.insertBefore(n.placeholderElement,e),n.moveColumn(t,!1)))}.bind(n),e.addEventListener("mousedown",function(e){n.touchMove=!1,1===e.which&&(n.checkTimeout=setTimeout(function(){n.startMove(e,t)},n.checkPeriod))}),e.addEventListener("mouseup",function(t){1===t.which&&n.checkTimeout&&clearTimeout(n.checkTimeout)}),n.bindTouchEvents(t)),t.modules.moveColumn=i},O.prototype.bindTouchEvents=function(t){var e,n,i,o,r,a,s=this,l=t.getElement(),u=!1;l.addEventListener("touchstart",function(l){s.checkTimeout=setTimeout(function(){s.touchMove=!0,t,e=t.nextColumn(),i=e?e.getWidth()/2:0,n=t.prevColumn(),o=n?n.getWidth()/2:0,r=0,a=0,u=!1,s.startMove(l,t)},s.checkPeriod)}),l.addEventListener("touchmove",function(l){var c,h;s.moving&&(s.moveHover(l),u||(u=l.touches[0].pageX),(c=l.touches[0].pageX-u)>0?e&&c-r>i&&(h=e)!==t&&(u=l.touches[0].pageX,h.getElement().parentNode.insertBefore(s.placeholderElement,h.getElement().nextSibling),s.moveColumn(h,!0)):n&&-c-a>o&&(h=n)!==t&&(u=l.touches[0].pageX,h.getElement().parentNode.insertBefore(s.placeholderElement,h.getElement()),s.moveColumn(h,!1)),h&&(h,e=h.nextColumn(),r=i,i=e?e.getWidth()/2:0,n=h.prevColumn(),a=o,o=n?n.getWidth()/2:0))}),l.addEventListener("touchend",function(t){s.checkTimeout&&clearTimeout(s.checkTimeout),s.moving&&s.endMove(t)})},O.prototype.startMove=function(t,e){var n=e.getElement();this.moving=e,this.startX=(this.touchMove?t.touches[0].pageX:t.pageX)-h.prototype.helpers.elOffset(n).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",n.parentNode.insertBefore(this.placeholderElement,n),n.parentNode.removeChild(n),this.hoverElement=n.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(t)},O.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.modules.moveColumn.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveColumn.mousemove)})},O.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.modules.moveColumn.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveColumn.mousemove)})},O.prototype.moveColumn=function(t,e){var n=this.moving.getCells();this.toCol=t,this.toColAfter=e,e?t.getCells().forEach(function(t,e){var i=t.getElement();i.parentNode.insertBefore(n[e].getElement(),i.nextSibling)}):t.getCells().forEach(function(t,e){var i=t.getElement();i.parentNode.insertBefore(n[e].getElement(),i)})},O.prototype.endMove=function(t){(1===t.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumn(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},O.prototype.moveHover=function(t){var e,n=this,i=n.table.columnManager.getElement(),o=i.scrollLeft,r=(n.touchMove?t.touches[0].pageX:t.pageX)-h.prototype.helpers.elOffset(i).left+o;n.hoverElement.style.left=r-n.startX+"px",r-o<n.autoScrollMargin&&(n.autoScrollTimeout||(n.autoScrollTimeout=setTimeout(function(){e=Math.max(0,o-5),n.table.rowManager.getElement().scrollLeft=e,n.autoScrollTimeout=!1},1))),o+i.clientWidth-r<n.autoScrollMargin&&(n.autoScrollTimeout||(n.autoScrollTimeout=setTimeout(function(){e=Math.min(i.clientWidth,o+5),n.table.rowManager.getElement().scrollLeft=e,n.autoScrollTimeout=!1},1)))},h.prototype.registerModule("moveColumn",O);var R=function(t){this.table=t,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connections=[],this.connectedTable=!1,this.connectedRow=!1};R.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.classList.add("tabulator-row-placeholder"),t},R.prototype.initialize=function(t){this.connection=this.table.options.movableRowsConnectedTables},R.prototype.setHandle=function(t){this.hasHandle=t},R.prototype.initializeGroupHeader=function(t){var e=this,n={};n.mouseup=function(t){e.tableRowDrop(t,row)}.bind(e),n.mousemove=function(n){var i;n.pageY-h.prototype.helpers.elOffset(t.element).top+e.table.rowManager.element.scrollTop>t.getHeight()/2?e.toRow===t&&e.toRowAfter||((i=t.getElement()).parentNode.insertBefore(e.placeholderElement,i.nextSibling),e.moveRow(t,!0)):(e.toRow!==t||e.toRowAfter)&&(i=t.getElement()).previousSibling&&(i.parentNode.insertBefore(e.placeholderElement,i),e.moveRow(t,!1))}.bind(e),t.modules.moveRow=n},R.prototype.initializeRow=function(t){var e,n=this,i={};i.mouseup=function(e){n.tableRowDrop(e,t)}.bind(n),i.mousemove=function(e){var i;e.pageY-h.prototype.helpers.elOffset(t.element).top+n.table.rowManager.element.scrollTop>t.getHeight()/2?n.toRow===t&&n.toRowAfter||((i=t.getElement()).parentNode.insertBefore(n.placeholderElement,i.nextSibling),n.moveRow(t,!0)):(n.toRow!==t||n.toRowAfter)&&((i=t.getElement()).parentNode.insertBefore(n.placeholderElement,i),n.moveRow(t,!1))}.bind(n),this.hasHandle||((e=t.getElement()).addEventListener("mousedown",function(e){1===e.which&&(n.checkTimeout=setTimeout(function(){n.startMove(e,t)},n.checkPeriod))}),e.addEventListener("mouseup",function(t){1===t.which&&n.checkTimeout&&clearTimeout(n.checkTimeout)}),this.bindTouchEvents(t,t.getElement())),t.modules.moveRow=i},R.prototype.initializeCell=function(t){var e=this,n=t.getElement();n.addEventListener("mousedown",function(n){1===n.which&&(e.checkTimeout=setTimeout(function(){e.startMove(n,t.row)},e.checkPeriod))}),n.addEventListener("mouseup",function(t){1===t.which&&e.checkTimeout&&clearTimeout(e.checkTimeout)}),this.bindTouchEvents(t.row,t.getElement())},R.prototype.bindTouchEvents=function(t,e){var n,i,o,r,a,s,l=this,u=!1;e.addEventListener("touchstart",function(e){l.checkTimeout=setTimeout(function(){l.touchMove=!0,t,n=t.nextRow(),o=n?n.getHeight()/2:0,i=t.prevRow(),r=i?i.getHeight()/2:0,a=0,s=0,u=!1,l.startMove(e,t)},l.checkPeriod)}),this.moving,this.toRow,this.toRowAfter,e.addEventListener("touchmove",function(e){var c,h;l.moving&&(e.preventDefault(),l.moveHover(e),u||(u=e.touches[0].pageY),(c=e.touches[0].pageY-u)>0?n&&c-a>o&&(h=n)!==t&&(u=e.touches[0].pageY,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement().nextSibling),l.moveRow(h,!0)):i&&-c-s>r&&(h=i)!==t&&(u=e.touches[0].pageY,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement()),l.moveRow(h,!1)),h&&(h,n=h.nextRow(),a=o,o=n?n.getHeight()/2:0,i=h.prevRow(),s=r,r=i?i.getHeight()/2:0))}),e.addEventListener("touchend",function(t){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&(l.endMove(t),l.touchMove=!1)})},R.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(t){"row"!==t.type&&"group"!==t.type||!t.modules.moveRow.mousemove||t.getElement().addEventListener("mousemove",t.modules.moveRow.mousemove)})},R.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(t){"row"!==t.type&&"group"!==t.type||!t.modules.moveRow.mousemove||t.getElement().removeEventListener("mousemove",t.modules.moveRow.mousemove)})},R.prototype.startMove=function(t,e){var n=e.getElement();this.setStartPosition(t,e),this.moving=e,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(e)):(n.parentNode.insertBefore(this.placeholderElement,n),n.parentNode.removeChild(n)),this.hoverElement=n.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(t)},R.prototype.setStartPosition=function(t,e){var n,i,o=this.touchMove?t.touches[0].pageX:t.pageX,r=this.touchMove?t.touches[0].pageY:t.pageY;n=e.getElement(),this.connection?(i=n.getBoundingClientRect(),this.startX=i.left-o+window.scrollX,this.startY=i.top-r+window.scrollY):this.startY=r-n.getBoundingClientRect().top},R.prototype.endMove=function(t){t&&1!==t.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},R.prototype.moveRow=function(t,e){this.toRow=t,this.toRowAfter=e},R.prototype.moveHover=function(t){this.connection?this.moveHoverConnections.call(this,t):this.moveHoverTable.call(this,t)},R.prototype.moveHoverTable=function(t){var e=this.table.rowManager.getElement(),n=e.scrollTop,i=(this.touchMove?t.touches[0].pageY:t.pageY)-e.getBoundingClientRect().top+n;this.hoverElement.style.top=i-this.startY+"px"},R.prototype.moveHoverConnections=function(t){this.hoverElement.style.left=this.startX+(this.touchMove?t.touches[0].pageX:t.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?t.touches[0].pageY:t.pageY)+"px"},R.prototype.connectToTables=function(t){var e=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStart.call(this.table,e),this.table.modules.comms.send(this.connection,"moveRow","connect",{row:t})},R.prototype.disconnectFromTables=function(){var t=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStop.call(this.table,t),this.table.modules.comms.send(this.connection,"moveRow","disconnect")},R.prototype.connect=function(t,e){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=t,this.connectedRow=e,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().addEventListener("mouseup",t.modules.moveRow.mouseup)}),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,e,t),!0)},R.prototype.disconnect=function(t){t===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,t)):console.warn("Move Row Error - trying to disconnect from non connected table")},R.prototype.dropComplete=function(t,e,n){var i=!1;if(n){switch(a(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),e?e.getComponent():void 0,t):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t);this.endMove()},R.prototype.tableRowDrop=function(t,e){var n=!1,i=!1;switch(t.stopImmediatePropagation(),a(this.table.options.movableRowsReceiver)){case"string":n=this.receivers[this.table.options.movableRowsReceiver];break;case"function":n=this.table.options.movableRowsReceiver}n?i=n.call(this,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:e,success:i})},R.prototype.receivers={insert:function(t,e,n){return this.table.addRow(t.getData(),void 0,e),!0},add:function(t,e,n){return this.table.addRow(t.getData()),!0},update:function(t,e,n){return!!e&&(e.update(t.getData()),!0)},replace:function(t,e,n){return!!e&&(this.table.addRow(t.getData(),void 0,e),e.delete(),!0)}},R.prototype.senders={delete:function(t,e,n){t.delete()}},R.prototype.commsReceived=function(t,e,n){switch(e){case"connect":return this.connect(t,n.row);case"disconnect":return this.disconnect(t);case"dropcomplete":return this.dropComplete(t,n.row,n.success)}},h.prototype.registerModule("moveRow",R);var D=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};D.prototype.initializeColumn=function(t){var e=this,n=!1,i={};this.allowedTypes.forEach(function(o){var r,a="mutator"+(o.charAt(0).toUpperCase()+o.slice(1));t.definition[a]&&(r=e.lookupMutator(t.definition[a]))&&(n=!0,i[a]={mutator:r,params:t.definition[a+"Params"]||{}})}),n&&(t.modules.mutate=i)},D.prototype.lookupMutator=function(t){var e=!1;switch(void 0===t?"undefined":a(t)){case"string":this.mutators[t]?e=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":e=t}return e},D.prototype.transformRow=function(t,e,n){var i,o="mutator"+(e.charAt(0).toUpperCase()+e.slice(1));return this.enabled&&this.table.columnManager.traverse(function(r){var a,s,l;r.modules.mutate&&(a=r.modules.mutate[o]||r.modules.mutate.mutator||!1)&&(i=r.getFieldValue(t),(!n||n&&void 0!==i)&&(l=r.getComponent(),s="function"==typeof a.params?a.params(i,t,e,l):a.params,r.setFieldValue(t,a.mutator(i,t,e,s,l))))}),t},D.prototype.transformCell=function(t,e){var n=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1;return n?n.mutator(e,t.row.getData(),"edit",n.params,t.getComponent()):e},D.prototype.enable=function(){this.enabled=!0},D.prototype.disable=function(){this.enabled=!1},D.prototype.mutators={},h.prototype.registerModule("mutator",D);var j=function(t){this.table=t,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.pageSizes=[],this.createElements()};j.prototype.createElements=function(){var t;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),(t=document.createElement("button")).classList.add("tabulator-page"),t.setAttribute("type","button"),t.setAttribute("role","button"),t.setAttribute("aria-label",""),t.setAttribute("title",""),this.firstBut=t.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=t.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=t.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=t.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},j.prototype.generatePageSizeSelectList=function(){var t=this,e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,-1==this.pageSizes.indexOf(this.size)&&e.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){e=[];for(var n=1;n<5;n++)e.push(this.size*n);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach(function(e){var n=document.createElement("option");n.value=e,n.innerHTML=e,t.pageSizeSelect.appendChild(n)}),this.pageSizeSelect.value=this.size}},j.prototype.initialize=function(t){var e,n=this;for(var i in n.table.options.paginationDataSent)n.paginationDataSentNames[i]=n.table.options.paginationDataSent[i];for(var o in n.table.options.paginationDataReceived)n.paginationDataReceivedNames[o]=n.table.options.paginationDataReceived[o];n.table.modules.localize.bind("pagination|first",function(t){n.firstBut.innerHTML=t}),n.table.modules.localize.bind("pagination|first_title",function(t){n.firstBut.setAttribute("aria-label",t),n.firstBut.setAttribute("title",t)}),n.table.modules.localize.bind("pagination|prev",function(t){n.prevBut.innerHTML=t}),n.table.modules.localize.bind("pagination|prev_title",function(t){n.prevBut.setAttribute("aria-label",t),n.prevBut.setAttribute("title",t)}),n.table.modules.localize.bind("pagination|next",function(t){n.nextBut.innerHTML=t}),n.table.modules.localize.bind("pagination|next_title",function(t){n.nextBut.setAttribute("aria-label",t),n.nextBut.setAttribute("title",t)}),n.table.modules.localize.bind("pagination|last",function(t){n.lastBut.innerHTML=t}),n.table.modules.localize.bind("pagination|last_title",function(t){n.lastBut.setAttribute("aria-label",t),n.lastBut.setAttribute("title",t)}),n.firstBut.addEventListener("click",function(){n.setPage(1)}),n.prevBut.addEventListener("click",function(){n.previousPage()}),n.nextBut.addEventListener("click",function(){n.nextPage().then(function(){}).catch(function(){})}),n.lastBut.addEventListener("click",function(){n.setPage(n.max)}),n.table.options.paginationElement&&(n.element=n.table.options.paginationElement),this.pageSizeSelect&&(e=document.createElement("label"),n.table.modules.localize.bind("pagination|page_size",function(t){n.pageSizeSelect.setAttribute("aria-label",t),n.pageSizeSelect.setAttribute("title",t),e.innerHTML=t}),n.element.appendChild(e),n.element.appendChild(n.pageSizeSelect),n.pageSizeSelect.addEventListener("change",function(t){n.setPageSize(n.pageSizeSelect.value),n.setPage(1).then(function(){}).catch(function(){})})),n.element.appendChild(n.firstBut),n.element.appendChild(n.prevBut),n.element.appendChild(n.pagesElement),n.element.appendChild(n.nextBut),n.element.appendChild(n.lastBut),n.table.options.paginationElement||t||n.table.footerManager.append(n.element,n),n.mode=n.table.options.pagination,n.size=n.table.options.paginationSize||Math.floor(n.table.rowManager.getElement().clientHeight/24),n.count=n.table.options.paginationButtonCount,n.generatePageSizeSelectList()},j.prototype.initializeProgressive=function(t){this.initialize(!0),this.mode="progressive_"+t,this.progressiveLoad=!0},j.prototype.setDisplayIndex=function(t){this.displayIndex=t},j.prototype.getDisplayIndex=function(){return this.displayIndex},j.prototype.setMaxRows=function(t){this.max=t?Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},j.prototype.reset=function(t){return("local"==this.mode||t)&&(this.page=1),!0},j.prototype.setMaxPage=function(t){t=parseInt(t),this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},j.prototype.setPage=function(t){var e=this;return new Promise(function(n,i){(t=parseInt(t))>0&&t<=e.max?(e.page=t,e.trigger().then(function(){n()}).catch(function(){i()})):(console.warn("Pagination Error - Requested page is out of range of 1 - "+e.max+":",t),i())})},j.prototype.setPageToRow=function(t){var e=this;return new Promise(function(n,i){var o=e.table.rowManager.getDisplayRows(e.displayIndex-1).indexOf(t);if(o>-1){var r=Math.ceil((o+1)/e.size);e.setPage(r).then(function(){n()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},j.prototype.setPageSize=function(t){(t=parseInt(t))>0&&(this.size=t),this.pageSizeSelect&&this.generatePageSizeSelectList()},j.prototype._setPageButtons=function(){for(var t=Math.floor((this.count-1)/2),e=Math.ceil((this.count-1)/2),n=this.max-this.page+t+1<this.count?this.max-this.count+1:Math.max(this.page-t,1),i=this.page<=e?Math.min(this.count,this.max):Math.min(this.page+e,this.max);this.pagesElement.firstChild;)this.pagesElement.removeChild(this.pagesElement.firstChild);1==this.page?(this.firstBut.disabled=!0,this.prevBut.disabled=!0):(this.firstBut.disabled=!1,this.prevBut.disabled=!1),this.page==this.max?(this.lastBut.disabled=!0,this.nextBut.disabled=!0):(this.lastBut.disabled=!1,this.nextBut.disabled=!1);for(var o=n;o<=i;o++)o>0&&o<=this.max&&this.pagesElement.appendChild(this._generatePageButton(o));this.footerRedraw()},j.prototype._generatePageButton=function(t){var e=this,n=document.createElement("button");return n.classList.add("tabulator-page"),t==e.page&&n.classList.add("active"),n.setAttribute("type","button"),n.setAttribute("role","button"),n.setAttribute("aria-label","Show Page "+t),n.setAttribute("title","Show Page "+t),n.setAttribute("data-page",t),n.textContent=t,n.addEventListener("click",function(n){e.setPage(t)}),n},j.prototype.previousPage=function(){var t=this;return new Promise(function(e,n){t.page>1?(t.page--,t.trigger().then(function(){e()}).catch(function(){n()})):(console.warn("Pagination Error - Previous page would be less than page 1:",0),n())})},j.prototype.nextPage=function(){var t=this;return new Promise(function(e,n){t.page<t.max?(t.page++,t.trigger().then(function(){e()}).catch(function(){n()})):(t.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+t.max+":",t.max+1),n())})},j.prototype.getPage=function(){return this.page},j.prototype.getPageMax=function(){return this.max},j.prototype.getPageSize=function(t){return this.size},j.prototype.getMode=function(){return this.mode},j.prototype.getRows=function(t){var e,n,i;if("local"==this.mode){e=[],i=(n=this.size*(this.page-1))+parseInt(this.size),this._setPageButtons();for(var o=n;o<i;o++)t[o]&&e.push(t[o]);return e}return this._setPageButtons(),t.slice(0)},j.prototype.trigger=function(){var t,e=this;return new Promise(function(n,i){switch(e.mode){case"local":t=e.table.rowManager.scrollLeft,e.table.rowManager.refreshActiveData("page"),e.table.rowManager.scrollHorizontal(t),e.table.options.pageLoaded.call(e.table,e.getPage()),n();break;case"remote":case"progressive_load":case"progressive_scroll":e.table.modules.ajax.blockActiveRequest(),e._getRemotePage().then(function(){n()}).catch(function(){i()});break;default:console.warn("Pagination Error - no such pagination mode:",e.mode),i()}})},j.prototype._getRemotePage=function(){var t,e,n=this,i=this;return new Promise(function(o,r){if(i.table.modExists("ajax",!0)||r(),t=h.prototype.helpers.deepClone(i.table.modules.ajax.getParams()||{}),(e=i.table.modules.ajax.getParams())[n.paginationDataSentNames.page]=i.page,n.size&&(e[n.paginationDataSentNames.size]=n.size),n.table.options.ajaxSorting&&n.table.modExists("sort")){var a=i.table.modules.sort.getSort();a.forEach(function(t){delete t.column}),e[n.paginationDataSentNames.sorters]=a}if(n.table.options.ajaxFiltering&&n.table.modExists("filter")){var s=i.table.modules.filter.getFilters(!0,!0);e[n.paginationDataSentNames.filters]=s}i.table.modules.ajax.setParams(e),i.table.modules.ajax.sendRequest(n.progressiveLoad).then(function(t){i._parseRemoteData(t),o()}).catch(function(t){r()}),i.table.modules.ajax.setParams(t)})},j.prototype._parseRemoteData=function(t){var e,n,i=this;if(void 0===t[this.paginationDataReceivedNames.last_page]&&console.warn("Remote Pagination Error - Server response missing '"+this.paginationDataReceivedNames.last_page+"' property"),t[this.paginationDataReceivedNames.data])if(this.max=parseInt(t[this.paginationDataReceivedNames.last_page])||1,this.progressiveLoad)switch(this.mode){case"progressive_load":this.table.rowManager.addRows(t[this.paginationDataReceivedNames.data]),this.page<this.max&&setTimeout(function(){i.nextPage().then(function(){}).catch(function(){})},i.table.options.ajaxProgressiveLoadDelay);break;case"progressive_scroll":t=this.table.rowManager.getData().concat(t[this.paginationDataReceivedNames.data]),this.table.rowManager.setData(t,!0),n=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.element.clientHeight,i.table.rowManager.element.scrollHeight<=i.table.rowManager.element.clientHeight+n&&i.nextPage().then(function(){}).catch(function(){})}else e=this.table.rowManager.scrollLeft,this.table.rowManager.setData(t[this.paginationDataReceivedNames.data]),this.table.rowManager.scrollHorizontal(e),this.table.columnManager.scrollHorizontal(e),this.table.options.pageLoaded.call(this.table,this.getPage());else console.warn("Remote Pagination Error - Server response missing '"+this.paginationDataReceivedNames.data+"' property")},j.prototype.footerRedraw=function(){var t=this.table.footerManager.element;Math.ceil(t.clientWidth)-t.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(t.clientWidth)-t.scrollWidth<0&&(this.pagesElement.style.display="none"))},j.prototype.paginationDataSentNames={page:"page",size:"size",sorters:"sorters",filters:"filters"},j.prototype.paginationDataReceivedNames={current_page:"current_page",last_page:"last_page",data:"data"},h.prototype.registerModule("page",j);var z=function(t){this.table=t,this.mode="",this.id="",this.persistProps=["field","width","visible"]};z.prototype.initialize=function(t,e){this.mode=!0!==t?t:void 0!==window.localStorage?"local":"cookie",this.id="tabulator-"+(e||this.table.element.getAttribute("id")||"")},z.prototype.load=function(t,e){var n=this.retreiveData(t);return e&&(n=n?this.mergeDefinition(e,n):e),n},z.prototype.retreiveData=function(t){var e="",n=this.id+("columns"===t?"":"-"+t);switch(this.mode){case"local":e=localStorage.getItem(n);break;case"cookie":var i=document.cookie,o=i.indexOf(n+"="),r=void 0;o>-1&&((r=(i=i.substr(o)).indexOf(";"))>-1&&(i=i.substr(0,r)),e=i.replace(n+"=",""));break;default:console.warn("Persistance Load Error - invalid mode selected",this.mode)}return!!e&&JSON.parse(e)},z.prototype.mergeDefinition=function(t,e){var n=this,i=[];return(e=e||[]).forEach(function(e,o){var r=n._findColumn(t,e);r&&(r.width=e.width,r.visible=e.visible,r.columns&&(r.columns=n.mergeDefinition(r.columns,e.columns)),i.push(r))}),t.forEach(function(t,o){n._findColumn(e,t)||(i.length>o?i.splice(o,0,t):i.push(t))}),i},z.prototype._findColumn=function(t,e){var n=e.columns?"group":e.field?"field":"object";return t.find(function(t){switch(n){case"group":return t.title===e.title&&t.columns.length===e.columns.length;case"field":return t.field===e.field;case"object":return t===e}})},z.prototype.save=function(t){var e={};switch(t){case"columns":e=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":e=this.table.modules.filter.getFilters();break;case"sort":e=this.validateSorters(this.table.modules.sort.getSort())}var n=this.id+("columns"===t?"":"-"+t);this.saveData(n,e)},z.prototype.validateSorters=function(t){return t.forEach(function(t){t.column=t.field,delete t.field}),t},z.prototype.saveData=function(t,e){switch(e=JSON.stringify(e),this.mode){case"local":localStorage.setItem(t,e);break;case"cookie":var n=new Date;n.setDate(n.getDate()+1e4),document.cookie=t+"="+e+"; expires="+n.toUTCString();break;default:console.warn("Persistance Save Error - invalid mode selected",this.mode)}},z.prototype.parseColumns=function(t){var e=this,n=[];return t.forEach(function(t){var i={};t.isGroup?(i.title=t.getDefinition().title,i.columns=e.parseColumns(t.getColumns())):(i.title=t.getDefinition().title,i.field=t.getField(),i.width=t.getWidth(),i.visible=t.visible),n.push(i)}),n},h.prototype.registerModule("persistence",z);var N=function(t){this.table=t,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};N.prototype.watchData=function(t){var e,n=this;this.currentVersion++,e=this.currentVersion,n.unwatchData(),n.data=t,n.origFuncs.push=t.push,Object.defineProperty(n.data,"push",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return n.blocked||e!==n.currentVersion||i.forEach(function(t){n.table.rowManager.addRowActual(t,!1)}),n.origFuncs.push.apply(t,arguments)}}),n.origFuncs.unshift=t.unshift,Object.defineProperty(n.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return n.blocked||e!==n.currentVersion||i.forEach(function(t){n.table.rowManager.addRowActual(t,!0)}),n.origFuncs.unshift.apply(t,arguments)}}),n.origFuncs.shift=t.shift,Object.defineProperty(n.data,"shift",{enumerable:!1,configurable:!0,value:function(){var i;return n.blocked||e!==n.currentVersion||n.data.length&&(i=n.table.rowManager.getRowFromDataObject(n.data[0]))&&i.deleteActual(),n.origFuncs.shift.call(t)}}),n.origFuncs.pop=t.pop,Object.defineProperty(n.data,"pop",{enumerable:!1,configurable:!0,value:function(){var i;return n.blocked||e!==n.currentVersion||n.data.length&&(i=n.table.rowManager.getRowFromDataObject(n.data[n.data.length-1]))&&i.deleteActual(),n.origFuncs.pop.call(t)}}),n.origFuncs.splice=t.splice,Object.defineProperty(n.data,"splice",{enumerable:!1,configurable:!0,value:function(){var i,o=Array.from(arguments),r=o[0]<0?t.length+o[0]:o[0],a=o[1],s=!!o[2]&&o.slice(2);if(!n.blocked&&e===n.currentVersion){if(s&&((i=!!t[r]&&n.table.rowManager.getRowFromDataObject(t[r]))?s.forEach(function(t){n.table.rowManager.addRowActual(t,!0,i,!0)}):(s=s.slice().reverse()).forEach(function(t){n.table.rowManager.addRowActual(t,!0,!1,!0)})),0!==a)t.slice(r,void 0===o[1]?o[1]:r+a).forEach(function(t){var e=n.table.rowManager.getRowFromDataObject(t);e&&e.deleteActual(!0)});(s||0!==a)&&n.table.rowManager.reRenderInPosition()}return n.origFuncs.splice.apply(t,arguments)}})},N.prototype.unwatchData=function(){if(!1!==this.data)for(var t in this.origFuncs)Object.defineProperty(this.data,t,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},N.prototype.watchRow=function(t){var e=t.getData();for(var n in this.blocked=!0,e)this.watchKey(t,e,n);this.blocked=!1},N.prototype.watchKey=function(t,e,n){var i=this,o=Object.getOwnPropertyDescriptor(e,n),r=e[n],a=this.currentVersion;Object.defineProperty(e,n,{set:function(e){if(r=e,!i.blocked&&a===i.currentVersion){var s={};s[n]=e,t.updateData(s)}o.set&&o.set(e)},get:function(){return o.get&&o.get(),r}})},N.prototype.unwatchRow=function(t){var e=t.getData();for(var n in e)Object.defineProperty(e,n,{value:e[n]})},N.prototype.block=function(){this.blocked=!0},N.prototype.unblock=function(){this.blocked=!1},h.prototype.registerModule("reactiveData",N);var I=function(t){this.table=t,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};I.prototype.initializeColumn=function(t,e,n){var i=this,o=!1,r=this.table.options.resizableColumns;if("header"===t&&(o="textarea"==e.definition.formatter||e.definition.variableHeight,e.modules.resize={variableHeight:o}),!0===r||r==t){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var s=document.createElement("div");s.className="tabulator-col-resize-handle prev",a.addEventListener("click",function(t){t.stopPropagation()});var l=function(t){var n=e.getLastColumn();n&&i._checkResizability(n)&&(i.startColumn=e,i._mouseDown(t,n,a))};a.addEventListener("mousedown",l),a.addEventListener("touchstart",l),a.addEventListener("dblclick",function(t){i._checkResizability(e)&&e.reinitializeWidth(!0)}),s.addEventListener("click",function(t){t.stopPropagation()});var u=function(t){var n,o,r;(n=e.getFirstColumn())&&(r=(o=i.table.columnManager.findColumnIndex(n))>0&&i.table.columnManager.getColumnByIndex(o-1))&&i._checkResizability(r)&&(i.startColumn=e,i._mouseDown(t,r,s))};s.addEventListener("mousedown",u),s.addEventListener("touchstart",u),s.addEventListener("dblclick",function(t){var n,o,r;(n=e.getFirstColumn())&&(r=(o=i.table.columnManager.findColumnIndex(n))>0&&i.table.columnManager.getColumnByIndex(o-1))&&i._checkResizability(r)&&r.reinitializeWidth(!0)}),n.appendChild(a),n.appendChild(s)}},I.prototype._checkResizability=function(t){return void 0!==t.definition.resizable?t.definition.resizable:this.table.options.resizableColumns},I.prototype._mouseDown=function(t,e,n){var i=this;function o(t){e.setWidth(i.startWidth+((void 0===t.screenX?t.touches[0].screenX:t.screenX)-i.startX)),!i.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights()}function r(t){i.startColumn.modules.edit&&(i.startColumn.modules.edit.blocked=!1),i.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights(),document.body.removeEventListener("mouseup",r),document.body.removeEventListener("mousemove",o),n.removeEventListener("touchmove",o),n.removeEventListener("touchend",r),i.table.element.classList.remove("tabulator-block-select"),i.table.options.persistentLayout&&i.table.modExists("persistence",!0)&&i.table.modules.persistence.save("columns"),i.table.options.columnResized.call(i.table,e.getComponent())}i.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),i.startColumn.modules.edit&&(i.startColumn.modules.edit.blocked=!0),i.startX=void 0===t.screenX?t.touches[0].screenX:t.screenX,i.startWidth=e.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",r),n.addEventListener("touchmove",o),n.addEventListener("touchend",r)},h.prototype.registerModule("resizeColumns",I);var F=function(t){this.table=t,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};F.prototype.initializeRow=function(t){var e=this,n=t.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var o=document.createElement("div");o.className="tabulator-row-resize-handle prev",i.addEventListener("click",function(t){t.stopPropagation()});var r=function(n){e.startRow=t,e._mouseDown(n,t,i)};i.addEventListener("mousedown",r),i.addEventListener("touchstart",r),o.addEventListener("click",function(t){t.stopPropagation()});var a=function(n){var i=e.table.rowManager.prevDisplayRow(t);i&&(e.startRow=i,e._mouseDown(n,i,o))};o.addEventListener("mousedown",a),o.addEventListener("touchstart",a),n.appendChild(i),n.appendChild(o)},F.prototype._mouseDown=function(t,e,n){var i=this;function o(t){e.setHeight(i.startHeight+((void 0===t.screenY?t.touches[0].screenY:t.screenY)-i.startY))}function r(t){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),n.removeEventListener("touchmove",o),n.removeEventListener("touchend",r),i.table.element.classList.remove("tabulator-block-select"),i.table.options.rowResized.call(this.table,e.getComponent())}i.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),i.startY=void 0===t.screenY?t.touches[0].screenY:t.screenY,i.startHeight=e.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",r),n.addEventListener("touchmove",o),n.addEventListener("touchend",r)},h.prototype.registerModule("resizeRows",F);var H=function(t){this.table=t,this.binding=!1,this.observer=!1};H.prototype.initialize=function(t){var e=this.table;"undefined"!=typeof ResizeObserver&&"virtual"===e.rowManager.getRenderMode()?(this.observer=new ResizeObserver(function(t){e.redraw()}),this.observer.observe(e.element)):(this.binding=function(){e.redraw()},window.addEventListener("resize",this.binding))},H.prototype.clearBindings=function(t){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element)},h.prototype.registerModule("resizeTable",H);var G=function(t){this.table=t,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0};G.prototype.initialize=function(){var t=this,e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(n,i){n.modules.responsive&&n.modules.responsive.order&&n.modules.responsive.visible&&(n.modules.responsive.index=i,e.push(n),n.visible||"collapse"!==t.mode||t.hiddenColumns.push(n))}),e=(e=e.reverse()).sort(function(t,e){return e.modules.responsive.order-t.modules.responsive.order||e.modules.responsive.index-t.modules.responsive.index}),this.columns=e,"collapse"===this.mode&&this.generateCollapsedContent()},G.prototype.initializeColumn=function(t){var e=t.getDefinition();t.modules.responsive={order:void 0===e.responsive?1:e.responsive,visible:!1!==e.visible}},G.prototype.layoutRow=function(t){var e=t.getElement(),n=document.createElement("div");n.classList.add("tabulator-responsive-collapse"),e.classList.contains("tabulator-calcs")||(t.modules.responsiveLayout={element:n},this.collapseStartOpen||(n.style.display="none"),e.appendChild(n),this.generateCollapsedRowContent(t))},G.prototype.updateColumnVisibility=function(t,e){t.modules.responsive&&(t.modules.responsive.visible=e,this.initialize())},G.prototype.hideColumn=function(t){t.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(t),this.generateCollapsedContent())},G.prototype.showColumn=function(t){var e;t.show(!1,!0),t.setWidth(t.getWidth()),"collapse"===this.mode&&((e=this.hiddenColumns.indexOf(t))>-1&&this.hiddenColumns.splice(e,1),this.generateCollapsedContent())},G.prototype.update=function(){for(var t=!0;t;){var e="fitColumns"==this.table.modules.layout.getMode()?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),n=this.table.columnManager.element.clientWidth-e;if(n<0){var i=this.columns[this.index];i?(this.hideColumn(i),this.index++):t=!1}else{var o=this.columns[this.index-1];o&&n>0&&n>=o.getWidth()?(this.showColumn(o),this.index--):t=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}},G.prototype.generateCollapsedContent=function(){var t=this;this.table.rowManager.getDisplayRows().forEach(function(e){t.generateCollapsedRowContent(e)})},G.prototype.generateCollapsedRowContent=function(t){var e,n;if(t.modules.responsiveLayout){for(e=t.modules.responsiveLayout.element;e.firstChild;)e.removeChild(e.firstChild);(n=this.collapseFormatter(this.generateCollapsedRowData(t)))&&e.appendChild(n)}},G.prototype.generateCollapsedRowData=function(t){var e,n=this,i=t.getData(),o={};return this.hiddenColumns.forEach(function(r){var a=r.getFieldValue(i);r.definition.title&&r.field&&(r.modules.format&&n.table.options.responsiveLayoutCollapseUseFormatters?(e={value:!1,data:{},getValue:function(){return a},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return t.getComponent()},getColumn:function(){return r.getComponent()}},o[r.definition.title]=r.modules.format.formatter.call(n.table.modules.format,e,r.modules.format.params)):o[r.definition.title]=a)}),o},G.prototype.formatCollapsedData=function(t){var e=document.createElement("table"),n="";for(var i in t)n+="<tr><td><strong>"+i+"</strong></td><td>"+t[i]+"</td></tr>";return e.innerHTML=n,Object.keys(t).length?e:""},h.prototype.registerModule("responsiveLayout",G);var V=function(t){this.table=t,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[]};V.prototype.clearSelectionData=function(t){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t||this._rowSelectionChanged()},V.prototype.initializeRow=function(t){var e=this,n=t.getElement(),i=function t(){setTimeout(function(){e.selecting=!1},50),document.body.removeEventListener("mouseup",t)};t.modules.select={selected:!1},e.table.options.selectableCheck.call(this.table,t.getComponent())?(n.classList.add("tabulator-selectable"),n.classList.remove("tabulator-unselectable"),e.table.options.selectable&&"highlight"!=e.table.options.selectable&&(e.table.options.selectableRangeMode&&"click"===e.table.options.selectableRangeMode?n.addEventListener("click",function(n){if(n.shiftKey){e.lastClickedRow=e.lastClickedRow||t;var i=e.table.rowManager.getDisplayRowIndex(e.lastClickedRow),o=e.table.rowManager.getDisplayRowIndex(t),r=i<=o?i:o,a=i>=o?i:o,s=e.table.rowManager.getDisplayRows().slice(0).splice(r,a-r+1);n.ctrlKey?(s.forEach(function(t){t!==e.lastClickedRow&&e.toggleRow(t)}),e.lastClickedRow=t):(e.deselectRows(),e.selectRows(s))}else n.ctrlKey?(e.toggleRow(t),e.lastClickedRow=t):(e.deselectRows(),e.selectRows(t),e.lastClickedRow=t)}):(n.addEventListener("click",function(n){e.selecting||e.toggleRow(t)}),n.addEventListener("mousedown",function(n){if(n.shiftKey)return e.selecting=!0,e.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),e.toggleRow(t),!1}),n.addEventListener("mouseenter",function(n){e.selecting&&(e.toggleRow(t),e.selectPrev[1]==t&&e.toggleRow(e.selectPrev[0]))}),n.addEventListener("mouseout",function(n){e.selecting&&e.selectPrev.unshift(t)})))):(n.classList.add("tabulator-unselectable"),n.classList.remove("tabulator-selectable"))},V.prototype.toggleRow=function(t){this.table.options.selectableCheck.call(this.table,t.getComponent())&&(t.modules.select&&t.modules.select.selected?this._deselectRow(t):this._selectRow(t))},V.prototype.selectRows=function(t){var e=this;switch(void 0===t?"undefined":a(t)){case"undefined":e.table.rowManager.rows.forEach(function(t){e._selectRow(t,!0,!0)}),e._rowSelectionChanged();break;case"boolean":!0===t&&(e.table.rowManager.activeRows.forEach(function(t){e._selectRow(t,!0,!0)}),e._rowSelectionChanged());break;default:Array.isArray(t)?(t.forEach(function(t){e._selectRow(t,!0,!0)}),e._rowSelectionChanged()):e._selectRow(t,!1,!0)}},V.prototype._selectRow=function(t,e,n){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!n&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(t);i?-1==this.selectedRows.indexOf(i)&&(i.modules.select||(i.modules.select={}),i.modules.select.selected=!0,i.getElement().classList.add("tabulator-selected"),this.selectedRows.push(i),e||(this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged())):e||console.warn("Selection Error - No such row found, ignoring selection:"+t)},V.prototype.isRowSelected=function(t){return-1!==this.selectedRows.indexOf(t)},V.prototype.deselectRows=function(t){var e,n=this;if(void 0===t){e=n.selectedRows.length;for(var i=0;i<e;i++)n._deselectRow(n.selectedRows[0],!0);n._rowSelectionChanged()}else Array.isArray(t)?(t.forEach(function(t){n._deselectRow(t,!0)}),n._rowSelectionChanged()):n._deselectRow(t)},V.prototype._deselectRow=function(t,e){var n,i=this.table.rowManager.findRow(t);i?(n=this.selectedRows.findIndex(function(t){return t==i}))>-1&&(i.modules.select||(i.modules.select={}),i.modules.select.selected=!1,i.getElement().classList.remove("tabulator-selected"),this.selectedRows.splice(n,1),e||(this.table.options.rowDeselected.call(this.table,i.getComponent()),this._rowSelectionChanged())):e||console.warn("Deselection Error - No such row found, ignoring selection:"+t)},V.prototype.getSelectedData=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getData())}),t},V.prototype.getSelectedRows=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getComponent())}),t},V.prototype._rowSelectionChanged=function(){this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},h.prototype.registerModule("selectRow",V);var B=function(t){this.table=t,this.sortList=[],this.changed=!1};B.prototype.initializeColumn=function(t,e){var n,i,o=this,r=!1;switch(a(t.definition.sorter)){case"string":o.sorters[t.definition.sorter]?r=o.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":r=t.definition.sorter}t.modules.sort={sorter:r,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:t.definition.headerSortTristate},!1!==t.definition.headerSort&&((n=t.getElement()).classList.add("tabulator-sortable"),(i=document.createElement("div")).classList.add("tabulator-arrow"),e.appendChild(i),n.addEventListener("click",function(e){var n="",i=[],r=!1;if(t.modules.sort){if(t.modules.sort.tristate)n="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":n="desc";break;case"desc":n="asc";break;default:n=t.modules.sort.startingDir}o.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?((r=(i=o.getSort()).findIndex(function(e){return e.field===t.getField()}))>-1?(i[r].dir=n,r!=i.length-1&&(r=i.splice(r,1)[0],"none"!=n&&i.push(r))):"none"!=n&&i.push({column:t,dir:n}),o.setSort(i)):"none"==n?o.clear():o.setSort(t,n),o.table.rowManager.sorterRefresh(!o.sortList.length)}}))},B.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},B.prototype.getSort=function(){var t=[];return this.sortList.forEach(function(e){e.column&&t.push({column:e.column.getComponent(),field:e.column.getField(),dir:e.dir})}),t},B.prototype.setSort=function(t,e){var n=this,i=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;(e=n.table.columnManager.findColumn(t.column))?(t.column=e,i.push(t),n.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),n.sortList=i,this.table.options.persistentSort&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("sort")},B.prototype.clear=function(){this.setSort([])},B.prototype.findSorter=function(t){var e,n=this.table.rowManager.activeRows[0],i="string";if(n&&(n=n.getData(),t.getField()))switch(void 0===(e=t.getFieldValue(n))?"undefined":a(e)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},B.prototype.sort=function(t){var e,n=this;e=this.table.options.sortOrderReverse?n.sortList.slice().reverse():n.sortList,n.table.options.dataSorting&&n.table.options.dataSorting.call(n.table,n.getSort()),n.clearColumnHeaders(),n.table.options.ajaxSorting?e.forEach(function(t,e){n.setColumnHeader(t.column,t.dir)}):e.forEach(function(i,o){i.column&&i.column.modules.sort&&(i.column.modules.sort.sorter||(i.column.modules.sort.sorter=n.findSorter(i.column)),n._sortItem(t,i.column,i.dir,e,o)),n.setColumnHeader(i.column,i.dir)}),n.table.options.dataSorted&&n.table.options.dataSorted.call(n.table,n.getSort(),n.table.rowManager.getComponents(!0))},B.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},B.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},B.prototype._sortItem=function(t,e,n,i,o){var r=this,a="function"==typeof e.modules.sort.params?e.modules.sort.params(e.getComponent(),n):e.modules.sort.params;t.sort(function(t,s){var l=r._sortRow(t,s,e,n,a);if(0===l&&o)for(var u=o-1;u>=0&&0===(l=r._sortRow(t,s,i[u].column,i[u].dir,a));u--);return l})},B.prototype._sortRow=function(t,e,n,i,o){var r,a,s="asc"==i?t:e,l="asc"==i?e:t;return t=n.getFieldValue(s.getData()),e=n.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",r=s.getComponent(),a=l.getComponent(),n.modules.sort.sorter.call(this,t,e,r,a,n.getComponent(),i,o)},B.prototype.sorters={number:function(t,e,n,i,o,r,a){var s=a.alignEmptyValues,l=a.decimalSeparator||".",u=a.thousandSeparator||",",c=0;if(t=parseFloat(String(t).split(u).join("").split(l).join(".")),e=parseFloat(String(e).split(u).join("").split(l).join(".")),isNaN(t))c=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;c=1}return("top"===s&&"desc"===r||"bottom"===s&&"asc"===r)&&(c*=-1),c},string:function(t,e,n,i,o,r,s){var l,u=s.alignEmptyValues,c=0;if(t){if(e){switch(a(s.locale)){case"boolean":s.locale&&(l=this.table.modules.localize.getLocale());break;case"string":l=s.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),l)}c=1}else c=e?-1:0;return("top"===u&&"desc"===r||"bottom"===u&&"asc"===r)&&(c*=-1),c},date:function(t,e,n,i,o,r,a){return a.format||(a.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,n,i,o,r,a)},time:function(t,e,n,i,o,r,a){return a.format||(a.format="hh:mm"),this.sorters.datetime.call(this,t,e,n,i,o,r,a)},datetime:function(t,e,n,i,o,r,a){var s=a.format||"DD/MM/YYYY hh:mm:ss",l=a.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,s),e=moment(e,s),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===r||"bottom"===l&&"asc"===r)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,n,i,o,r,a){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,n,i,o,r,a){var s=a.type||"length",l=a.alignEmptyValues,u=0;function c(t){switch(s){case"length":return t.length;case"sum":return t.reduce(function(t,e){return t+e});case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce(function(t,e){return t+e})/t.length}}if(Array.isArray(t)){if(Array.isArray(e))return(t?c(t):0)-(e?c(e):0);l=1}else l=Array.isArray(e)?-1:0;return("top"===l&&"desc"===r||"bottom"===l&&"asc"===r)&&(u*=-1),u},exists:function(t,e,n,i,o,r,a){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,n,i,o,r,a){var s,l,u,c,h,d=0,f=/(\d+)|(\D+)/g,p=/\d/,g=a.alignEmptyValues,m=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if((s=String(t).toLowerCase())===(l=String(e).toLowerCase()))return 0;if(!p.test(s)||!p.test(l))return s>l?1:-1;for(s=s.match(f),l=l.match(f),h=s.length>l.length?l.length:s.length;d<h;)if((u=s[d])!==(c=l[d++]))return isFinite(u)&&isFinite(c)?("0"===u.charAt(0)&&(u="."+u),"0"===c.charAt(0)&&(c="."+c),u-c):u>c?1:-1;return s.length>l.length}m=1}else m=e||0===e?-1:0;return("top"===g&&"desc"===r||"bottom"===g&&"asc"===r)&&(m*=-1),m}},h.prototype.registerModule("sort",B);var U=function(t){this.table=t};return U.prototype.initializeColumn=function(t){var e,n=this,i=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(e=n._extractValidator(t))&&i.push(e)}):(e=this._extractValidator(t.definition.validator))&&i.push(e),t.modules.validate=!!i.length&&i)},U.prototype._extractValidator=function(t){var e,n,i;switch(void 0===t?"undefined":a(t)){case"string":return n=(e=t.split(":",2)).shift(),i=e[0],this._buildValidator(n,i);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},U.prototype._buildValidator=function(t,e){var n="function"==typeof t?t:this.validators[t];return n?{type:"function"==typeof t?"function":t,func:n,params:e}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},U.prototype.validate=function(t,e,n){var i=this,o=[];return t&&t.forEach(function(t){t.func.call(i,e,n,t.params)||o.push({type:t.type,parameters:t.params})}),!o.length||o},U.prototype.validators={integer:function(t,e,n){return""===e||null===e||void 0===e||"number"==typeof(e=Number(e))&&isFinite(e)&&Math.floor(e)===e},float:function(t,e,n){return""===e||null===e||void 0===e||"number"==typeof(e=Number(e))&&isFinite(e)&&e%1!=0},numeric:function(t,e,n){return""===e||null===e||void 0===e||!isNaN(e)},string:function(t,e,n){return""===e||null===e||void 0===e||isNaN(e)},max:function(t,e,n){return""===e||null===e||void 0===e||parseFloat(e)<=n},min:function(t,e,n){return""===e||null===e||void 0===e||parseFloat(e)>=n},minLength:function(t,e,n){return""===e||null===e||void 0===e||String(e).length>=n},maxLength:function(t,e,n){return""===e||null===e||void 0===e||String(e).length<=n},in:function(t,e,n){return""===e||null===e||void 0===e||("string"==typeof n&&(n=n.split("|")),""===e||n.indexOf(e)>-1)},regex:function(t,e,n){return""===e||null===e||void 0===e||new RegExp(n).test(e)},unique:function(t,e,n){if(""===e||null===e||void 0===e)return!0;var i=!0,o=t.getData(),r=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(t){var n=t.getData();n!==o&&e==r.getFieldValue(n)&&(i=!1)}),i},required:function(t,e,n){return""!==e&null!==e&&void 0!==e}},h.prototype.registerModule("validate",U),h})},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(i.a)(e);return Object(o.a)(t,a*r,n)};var i=n(1),o=n(48),r=36e5},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(i.a)(e);return Object(r.a)(t,Object(o.a)(t,n)+a,n)};var i=n(1),o=n(34),r=n(134)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var s=Object(o.a)(t,n),l=Object(i.a)(e),u=Object(a.a)(s,Object(r.a)(s,n),n),c=new Date(0);return c.setFullYear(l,0,4),c.setHours(0,0,0,0),(s=Object(r.a)(c,n)).setDate(s.getDate()+u),s};var i=n(1),o=n(0),r=n(49),a=n(36)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(i.a)(e);return Object(o.a)(t,a*r,n)};var i=n(1),o=n(48),r=6e4},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=3*Object(i.a)(e);return Object(o.a)(t,r,n)};var i=n(1),o=n(58)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,1e3*r,n)};var i=n(1),o=n(48)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,12*r,n)};var i=n(1),o=n(58)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return Object(i.a)(t,n)-Object(i.a)(e,n)};var i=n(34)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n),a=o.getFullYear()-r.getFullYear(),s=o.getMonth()-r.getMonth();return 12*a+s};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return Math.floor(n.getMonth()/3)+1};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(o.a)(t,n),s=Object(o.a)(e,n),l=a.getTime()-Object(i.a)(a),u=s.getTime()-Object(i.a)(s);return Math.round((l-u)/r)};var i=n(19),o=n(22),r=6048e5},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getFullYear()-r.getFullYear()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(i.a)(t,n),s=Object(i.a)(e,n),l=Object(r.a)(a,s,n),u=Math.abs(Object(o.a)(a,s,n));a.setDate(a.getDate()-l*u);var c=Object(r.a)(a,s,n)===-l,h=l*(u-c);return 0===h?0:h};var i=n(0),o=n(36),r=n(28)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,-r,n)};var i=n(1),o=n(133)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=t||{},o=Object(i.a)(n.start,e),r=Object(i.a)(n.end,e).getTime();if(!(o.getTime()<=r))throw new RangeError("Invalid interval");var a=[],s=o;s.setHours(0,0,0,0);for(;s.getTime()<=r;)a.push(Object(i.a)(s,e)),s.setDate(s.getDate()+1);return a};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 0===Object(i.a)(t,e).getDay()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e).getDay();return 0===n||6===n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getFullYear();return n.setFullYear(o+1,0,0),n.setHours(23,59,59,999),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return n.setHours(23,59,59,999),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,a=r&&r.options&&r.options.weekStartsOn,s=null==a?0:Object(i.a)(a),l=null==n.weekStartsOn?s:Object(i.a)(n.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Object(o.a)(t,n),c=u.getDay(),h=6+(c<l?-7:0)-(c-l);return u.setDate(u.getDate()+h),u.setHours(23,59,59,999),u};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var m=String(e),v=n||{},y=v.locale||s.a,b=y.options&&y.options.firstWeekContainsDate,w=null==b?1:Object(i.a)(b),_=null==v.firstWeekContainsDate?w:Object(i.a)(v.firstWeekContainsDate);if(!(_>=1&&_<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=y.options&&y.options.weekStartsOn,S=null==x?0:Object(i.a)(x),E=null==v.weekStartsOn?S:Object(i.a)(v.weekStartsOn);if(!(E>=0&&E<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!y.localize)throw new RangeError("locale must contain localize property");if(!y.formatLong)throw new RangeError("locale must contain formatLong property");var C=Object(r.a)(t,v);if(!Object(a.a)(C,v))return"Invalid Date";var T=Object(o.a)(C),M=Object(c.a)(C,T,v),P={firstWeekContainsDate:_,weekStartsOn:E,locale:y,_originalDate:C};return m.match(f).map(function(t){var e=t[0];if("p"===e||"P"===e){var n=u.a[e];return n(t,y.formatLong,P)}return t}).join("").match(d).map(function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return function(t){return t.match(p)[1].replace(g,"'")}(t);var n=l.a[e];return n?(!v.awareOfUnicodeTokens&&Object(h.a)(t)&&Object(h.b)(t),n(M,t,y.localize,P)):t}).join("")};var i=n(1),o=n(19),r=n(0),a=n(153),s=n(50),l=n(320),u=n(324),c=n(64),h=n(157),d=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,f=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,p=/^'(.*?)'?$/,g=/''/g},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return!isNaN(n)};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),s=Object(o.a)(n,e).getTime()-Object(r.a)(n,e).getTime();return Math.round(s/a)+1};var i=n(0),o=n(62),r=n(322),a=6048e5},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),r=n.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(r+1,0,4),a.setUTCHours(0,0,0,0);var s=Object(o.a)(a,e),l=new Date(0);l.setUTCFullYear(r,0,4),l.setUTCHours(0,0,0,0);var u=Object(o.a)(l,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1};var i=n(0),o=n(62)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),s=Object(o.a)(n,e).getTime()-Object(r.a)(n,e).getTime();return Math.round(s/a)+1};var i=n(0),o=n(63),r=n(323),a=6048e5},function(t,e,n){"use strict";e.a=function(t){return-1!==i.indexOf(t)},e.b=function(t){throw new RangeError("`options.awareOfUnicodeTokens` must be set to `true` to use `"+t+"` token; see: https://git.io/fxCyr")};var i=["D","DD","YY","YYYY"]},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Object(i.a)(t,e).getDate()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Object(i.a)(t,e).getDay()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e).getFullYear();return n%400==0||n%4==0&&n%100!=0};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e).getDay();0===n&&(n=7);return n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),s=Object(o.a)(n,e).getTime()-Object(r.a)(n,e).getTime();return Math.round(s/a)+1};var i=n(0),o=n(27),r=n(49),a=6048e5},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Object(i.a)(t,e).getTime()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),s=Object(o.a)(n,e).getTime()-Object(r.a)(n,e).getTime();return Math.round(s/a)+1};var i=n(0),o=n(22),r=n(98),a=6048e5},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(o.a)(t,e),a=n.getFullYear(),s=e||{},l=s.locale,u=l&&l.options&&l.options.firstWeekContainsDate,c=null==u?1:Object(i.a)(u),h=null==s.firstWeekContainsDate?c:Object(i.a)(s.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=new Date(0);d.setFullYear(a+1,0,h),d.setHours(0,0,0,0);var f=Object(r.a)(d,e),p=new Date(0);p.setFullYear(a,0,h),p.setHours(0,0,0,0);var g=Object(r.a)(p,e);return n.getTime()>=f.getTime()?a+1:n.getTime()>=g.getTime()?a:a-1};var i=n(1),o=n(0),r=n(22)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getMonth();return n.setFullYear(n.getFullYear(),o+1,0),n.setHours(0,0,0,0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return n.setMinutes(0,0,0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getTime()===r.getTime()};var i=n(22)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return n.setSeconds(0,0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getMonth(),r=o-o%3;return n.setMonth(r,1),n.setHours(0,0,0,0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return n.setMilliseconds(0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,a=r&&r.options&&r.options.weekStartsOn,s=null==a?0:Object(i.a)(a),l=null==n.weekStartsOn?s:Object(i.a)(n.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var u=Object(o.a)(t,e),c=u.getDay(),h=6+(c<l?-7:0)-(c-l);return u.setHours(0,0,0,0),u.setDate(u.getDate()+h),u};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(o.a)(t,n),s=Object(i.a)(e),l=a.getFullYear(),u=a.getDate(),c=new Date(0);c.setFullYear(l,s,15),c.setHours(0,0,0,0);var h=Object(r.a)(c,n);return a.setMonth(s,Math.min(u,h)),a};var i=n(1),o=n(0),r=n(91)},function(t,e,n){"use strict";e.a=function(t,e,n){const i=[];for(let o=0;o<n&&e+o<t.byteLength;o++)i.push(t.getUint8(e+o,!1));return function(t){return t.map(t=>String.fromCharCode(t))}(i).join("")}},function(t,e,n){"use strict";const i=18761,o=19789;e.a={BIG_ENDIAN:o,LITTLE_ENDIAN:i,getByteOrder:function(t,e){if(t.getUint16(e)===i)return i;if(t.getUint16(e)===o)return o;throw new Error("Illegal byte order value. Faulty image.")}}},function(t,e,n){"use strict";
+/*!
+ * parse-csv <https://github.com/jonschlinkert/parse-csv>
+ *
+ * Copyright (c) 2014-2016 Jon Schlinkert, contributors.
+ * Licensed under the MIT license.
+ */var i=n(100),o=n(443),r=n(450);function a(t,e,n){if("string"!=typeof e&&(n=e,e=t,t=null),"string"!=typeof e)throw new TypeError("expected csv to be a string");var a=i({renderer:"json"},n);t=t||a.renderer;var s=new r(n),l=new o(n),u=s.parse(e);return l.render(t,u)}t.exports=a,t.exports.toJSON=function(t,e,n){if("string"==typeof e&&!/^json/.test(t))throw new Error("a json* renderer must be specified with the .toJSON method");return JSON.parse(a.apply(null,arguments))},t.exports.Renderer=o,t.exports.Parser=r},function(t,e,n){"use strict";var i=n(446),o=n(449);function r(t,e){for(var n=arguments.length,i=0;++i<n;){var r=arguments[i];s(r)&&o(r,a,t)}return t}function a(t,e){if("__proto__"!==e){var n=this[e];s(t)&&s(n)?r(n,t):this[e]=t}}function s(t){return i(t)&&!Array.isArray(t)}t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=l(n(2)),a=l(n(33)),s=n(2);function l(t){return t&&t.__esModule?t:{default:t}}var u=void 0,c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default.Component),o(e,[{key:"componentDidMount",value:function(){u=n(456),this.updateChart(this.props)}},{key:"componentWillReceiveProps",value:function(t){this.updateChart(t)}},{key:"componentWillUnmount",value:function(){this.destroyChart()}},{key:"destroyChart",value:function(){try{this.chart=this.chart.destroy()}catch(t){throw new Error("Internal C3 error",t)}}},{key:"generateChart",value:function(t,e){var n=i({bindto:t},e);return u.generate(n)}},{key:"loadNewData",value:function(t){this.chart.load(t)}},{key:"unloadData",value:function(){this.chart.unload()}},{key:"updateChart",value:function(t){this.chart||(this.chart=this.generateChart((0,s.findDOMNode)(this),t)),t.unloadBeforeLoad&&this.unloadData(),this.loadNewData(t.data)}},{key:"render",value:function(){var t=this.props.className?" "+this.props.className:"",e=this.props.style?this.props.style:{};return r.default.createElement("div",{className:t,style:e})}}],[{key:"displayName",get:function(){return"C3Chart"}},{key:"propTypes",get:function(){return{data:a.default.object.isRequired,title:a.default.object,size:a.default.object,padding:a.default.object,color:a.default.object,interaction:a.default.object,transition:a.default.object,oninit:a.default.func,onrendered:a.default.func,onmouseover:a.default.func,onmouseout:a.default.func,onresize:a.default.func,onresized:a.default.func,axis:a.default.object,grid:a.default.object,regions:a.default.array,legend:a.default.object,tooltip:a.default.object,subchart:a.default.object,zoom:a.default.object,point:a.default.object,line:a.default.object,area:a.default.object,bar:a.default.object,pie:a.default.object,donut:a.default.object,gauge:a.default.object,className:a.default.string,style:a.default.object,unloadBeforeLoad:a.default.bool}}}]),e}();e.default=c},function(t,e,n){var i=n(458);"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(26)(i,o);i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(459);"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(26)(i,o);i.locals&&(t.exports=i.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.rainbow=["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],e.colorblindSafeRainbow=["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],e.institutionColors=["#f2f293","#3264f6","#f30000"],e.topCountryCount=10,e.otherCountriesLabel="Other Countries",e.initialInstitutionLookup={edu:0,company:0,gov:0},e.institutionOrder={edu:0,company:1,gov:2},e.institutionLabels={edu:"Academic",company:"Commercial",gov:"Military / Government",mil:"Military / Government"}},function(t,e,n){
+/* @preserve
+ * Leaflet 1.3.4, a JS library for interactive maps. http://leafletjs.com
+ * (c) 2010-2018 Vladimir Agafonkin, (c) 2010-2011 CloudMade
+ */
+!function(t,n){n(e)}(0,function(t){"use strict";var e=Object.freeze;function n(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}Object.freeze=function(t){return t};var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var r=0;function a(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function s(t,e,n){var i,o,r,a;return a=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(a,e),i=!0)}}function l(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function u(){return!1}function c(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return h(t).split(/\s+/)}function f(t,e){for(var n in t.hasOwnProperty("options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function p(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var g=/\{ *([\w_-]+) *\}/g;function m(t,e){return t.replace(g,function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i})}var v=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var b="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function w(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var _=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-_));return _=e+n,window.setTimeout(t,n)}var S=window.requestAnimationFrame||w("RequestAnimationFrame")||x,E=window.cancelAnimationFrame||w("CancelAnimationFrame")||w("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,e,n){if(!n||S!==x)return S.call(window,o(t,e));t.call(e)}function T(t){t&&E.call(window,t)}var M=(Object.freeze||Object)({freeze:e,extend:n,create:i,bind:o,lastId:r,stamp:a,throttle:s,wrapNum:l,falseFn:u,formatNum:c,trim:h,splitWords:d,setOptions:f,getParamString:p,template:m,isArray:v,indexOf:y,emptyImageUrl:b,requestFn:S,cancelFn:E,requestAnimFrame:C,cancelAnimFrame:T});function P(){}P.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=i(o);for(var a in r.constructor=e,e.prototype=r,this)this.hasOwnProperty(a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(!function(t){if("undefined"==typeof L||!L||!L.Mixin)return;t=v(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}(t.includes),n.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=n(i(r.options),t.options)),n(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},P.include=function(t){return n(this.prototype,t),this},P.mergeOptions=function(t){return n(this.prototype.options,t),this},P.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var A={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._off(t[o],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(i=[],this._events[t]=i),n===this&&(n=void 0);for(var o={fn:e,ctx:n},r=i,a=0,s=r.length;a<s;a++)if(r[a].fn===e&&r[a].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(o=0,r=i.length;o<r;o++){var a=i[o];if(a.ctx===n&&a.fn===e)return a.fn=u,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,r=i.length;o<r;o++)i[o].fn=u;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var a=0,s=r.length;a<s;a++){var l=r[a];l.fn.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var r=o(function(){this.off(t,e,n).off(t,r,n)},this);return this.on(t,e,n).on(t,r,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[a(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var k=P.extend(A);function O(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var R=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function D(t,e,n){return t instanceof O?t:v(t)?new O(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new O(t.x,t.y):new O(t,e,n)}function j(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function z(t,e){return!t||t instanceof j?t:new j(t,e)}function N(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function I(t,e){return t instanceof N?t:new N(t,e)}function F(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function H(t,e,n){return t instanceof F?t:v(t)&&"object"!=typeof t[0]?3===t.length?new F(t[0],t[1],t[2]):2===t.length?new F(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new F(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new F(t,e,n)}O.prototype={clone:function(){return new O(this.x,this.y)},add:function(t){return this.clone()._add(D(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(D(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new O(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new O(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=R(this.x),this.y=R(this.y),this},distanceTo:function(t){var e=(t=D(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=D(t)).x===this.x&&t.y===this.y},contains:function(t){return t=D(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},j.prototype={extend:function(t){return t=D(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new O((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new O(this.min.x,this.max.y)},getTopRight:function(){return new O(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof O?D(t):z(t))instanceof j?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=z(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,a=o.y>=e.y&&i.y<=n.y;return r&&a},overlaps:function(t){t=z(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.x<n.x,a=o.y>e.y&&i.y<n.y;return r&&a},isValid:function(){return!(!this.min||!this.max)}},N.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof F)e=t,n=t;else{if(!(t instanceof N))return t?this.extend(H(t)||I(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new F(e.lat,e.lng),this._northEast=new F(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new N(new F(e.lat-i,e.lng-o),new F(n.lat+i,n.lng+o))},getCenter:function(){return new F((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new F(this.getNorth(),this.getWest())},getSouthEast:function(){return new F(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof F||"lat"in t?H(t):I(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof N?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=I(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,a=o.lng>=e.lng&&i.lng<=n.lng;return r&&a},overlaps:function(t){t=I(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,a=o.lng>e.lng&&i.lng<n.lng;return r&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=I(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},F.prototype={equals:function(t,e){return!!t&&(t=H(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return V.distance(this,H(t))},wrap:function(){return V.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return I([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new F(this.lat,this.lng,this.alt)}};var G={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new j(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new F(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),a=t.getNorthEast();return new N(new F(r.lat-i,r.lng-o),new F(a.lat-i,a.lng-o))}},V=n({},G,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),a=Math.sin((e.lng-t.lng)*n/2),s=r*r+Math.cos(i)*Math.cos(o)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),B={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new O(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new F((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return new j([-t,-t],[t,t])}()};function U(t,e,n,i){if(v(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function W(t,e,n,i){return new U(t,e,n,i)}U.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new O((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var q=n({},V,{code:"EPSG:3857",projection:B,transformation:function(){var t=.5/(Math.PI*B.R);return W(t,.5,-t,.5)}()}),Y=n({},q,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Z(t,e){var n,i,o,r,a,s,l="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(a=t[n]).length;i<r;i++)s=a[i],l+=(i?"L":"M")+s.x+" "+s.y;l+=e?Tt?"z":"x":""}return l||"M0 0"}var Q=document.documentElement.style,K="ActiveXObject"in window,$=K&&!document.addEventListener,J="msLaunchUri"in navigator&&!("documentMode"in document),tt=Pt("webkit"),et=Pt("android"),nt=Pt("android 2")||Pt("android 3"),it=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ot=et&&Pt("Google")&&it<537&&!("AudioNode"in window),rt=!!window.opera,at=Pt("chrome"),st=Pt("gecko")&&!tt&&!rt&&!K,lt=!at&&Pt("safari"),ut=Pt("phantom"),ct="OTransition"in Q,ht=0===navigator.platform.indexOf("Win"),dt=K&&"transition"in Q,ft="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!nt,pt="MozPerspective"in Q,gt=!window.L_DISABLE_3D&&(dt||ft||pt)&&!ct&&!ut,mt="undefined"!=typeof orientation||Pt("mobile"),vt=mt&&tt,yt=mt&&ft,bt=!window.PointerEvent&&window.MSPointerEvent,wt=!(!window.PointerEvent&&!bt),_t=!window.L_NO_TOUCH&&(wt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),xt=mt&&rt,St=mt&&st,Et=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ct=!!document.createElement("canvas").getContext,Tt=!(!document.createElementNS||!X("svg").createSVGRect),Mt=!Tt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Pt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Lt=(Object.freeze||Object)({ie:K,ielt9:$,edge:J,webkit:tt,android:et,android23:nt,androidStock:ot,opera:rt,chrome:at,gecko:st,safari:lt,phantom:ut,opera12:ct,win:ht,ie3d:dt,webkit3d:ft,gecko3d:pt,any3d:gt,mobile:mt,mobileWebkit:vt,mobileWebkit3d:yt,msPointer:bt,pointer:wt,touch:_t,mobileOpera:xt,mobileGecko:St,retina:Et,canvas:Ct,svg:Tt,vml:Mt}),At=bt?"MSPointerDown":"pointerdown",kt=bt?"MSPointerMove":"pointermove",Ot=bt?"MSPointerUp":"pointerup",Rt=bt?"MSPointerCancel":"pointercancel",Dt=["INPUT","SELECT","OPTION"],jt={},zt=!1,Nt=0;function It(t,e,n,i){return"touchstart"===e?function(t,e,n){var i=o(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Dt.indexOf(t.target.tagName)<0))return;je(t)}Vt(t,e)});t["_leaflet_touchstart"+n]=i,t.addEventListener(At,i,!1),zt||(document.documentElement.addEventListener(At,Ft,!0),document.documentElement.addEventListener(kt,Ht,!0),document.documentElement.addEventListener(Ot,Gt,!0),document.documentElement.addEventListener(Rt,Gt,!0),zt=!0)}(t,n,i):"touchmove"===e?function(t,e,n){var i=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Vt(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(kt,i,!1)}(t,n,i):"touchend"===e&&function(t,e,n){var i=function(t){Vt(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Ot,i,!1),t.addEventListener(Rt,i,!1)}(t,n,i),this}function Ft(t){jt[t.pointerId]=t,Nt++}function Ht(t){jt[t.pointerId]&&(jt[t.pointerId]=t)}function Gt(t){delete jt[t.pointerId],Nt--}function Vt(t,e){for(var n in t.touches=[],jt)t.touches.push(jt[n]);t.changedTouches=[t],e(t)}var Bt=bt?"MSPointerDown":wt?"pointerdown":"touchstart",Ut=bt?"MSPointerUp":wt?"pointerup":"touchend",Wt="_leaflet_";function qt(t,e,n){var i,o,r=!1,a=250;function s(t){var e;if(wt){if(!J||"mouse"===t.pointerType)return;e=Nt}else e=t.touches.length;if(!(e>1)){var n=Date.now(),s=n-(i||n);o=t.touches?t.touches[0]:t,r=s>0&&s<=a,i=n}}function l(t){if(r&&!o.cancelBubble){if(wt){if(!J||"mouse"===t.pointerType)return;var n,a,s={};for(a in o)n=o[a],s[a]=n&&n.bind?n.bind(o):n;o=s}o.type="dblclick",e(o),i=null}}return t[Wt+Bt+n]=s,t[Wt+Ut+n]=l,t[Wt+"dblclick"+n]=e,t.addEventListener(Bt,s,!1),t.addEventListener(Ut,l,!1),t.addEventListener("dblclick",e,!1),this}function Yt(t,e){var n=t[Wt+Bt+e],i=t[Wt+Ut+e],o=t[Wt+"dblclick"+e];return t.removeEventListener(Bt,n,!1),t.removeEventListener(Ut,i,!1),J||t.removeEventListener("dblclick",o,!1),this}var Xt,Zt,Qt,Kt,$t,Jt=ge(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),te=ge(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ee="webkitTransition"===te||"OTransition"===te?te+"End":"transitionend";function ne(t){return"string"==typeof t?document.getElementById(t):t}function ie(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function oe(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function re(t){var e=t.parentNode;e&&e.removeChild(t)}function ae(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function se(t){var e=t.parentNode;e.lastChild!==t&&e.appendChild(t)}function le(t){var e=t.parentNode;e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ue(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=fe(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function ce(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!ue(t,e)){var r=fe(t);de(t,(r?r+" ":"")+e)}}function he(t,e){void 0!==t.classList?t.classList.remove(e):de(t,h((" "+fe(t)+" ").replace(" "+e+" "," ")))}function de(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function fe(t){return void 0===t.className.baseVal?t.className:t.className.baseVal}function pe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}(t,e)}function ge(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function me(t,e,n){var i=e||new O(0,0);t.style[Jt]=(dt?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function ve(t,e){t._leaflet_pos=e,gt?me(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ye(t){return t._leaflet_pos||new O(0,0)}if("onselectstart"in document)Xt=function(){Me(window,"selectstart",je)},Zt=function(){Le(window,"selectstart",je)};else{var be=ge(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Xt=function(){if(be){var t=document.documentElement.style;Qt=t[be],t[be]="none"}},Zt=function(){be&&(document.documentElement.style[be]=Qt,Qt=void 0)}}function we(){Me(window,"dragstart",je)}function _e(){Le(window,"dragstart",je)}function xe(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Se(),Kt=t,$t=t.style.outline,t.style.outline="none",Me(window,"keydown",Se))}function Se(){Kt&&(Kt.style.outline=$t,Kt=void 0,$t=void 0,Le(window,"keydown",Se))}function Ee(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ce(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Te=(Object.freeze||Object)({TRANSFORM:Jt,TRANSITION:te,TRANSITION_END:ee,get:ne,getStyle:ie,create:oe,remove:re,empty:ae,toFront:se,toBack:le,hasClass:ue,addClass:ce,removeClass:he,setClass:de,getClass:fe,setOpacity:pe,testProp:ge,setTransform:me,setPosition:ve,getPosition:ye,disableTextSelection:Xt,enableTextSelection:Zt,disableImageDrag:we,enableImageDrag:_e,preventOutline:xe,restoreOutline:Se,getSizedParentNode:Ee,getScale:Ce});function Me(t,e,n,i){if("object"==typeof e)for(var o in e)Ae(t,o,e[o],n);else for(var r=0,a=(e=d(e)).length;r<a;r++)Ae(t,e[r],n,i);return this}var Pe="_leaflet_events";function Le(t,e,n,i){if("object"==typeof e)for(var o in e)ke(t,o,e[o],n);else if(e)for(var r=0,a=(e=d(e)).length;r<a;r++)ke(t,e[r],n,i);else{for(var s in t[Pe])ke(t,s,t[Pe][s]);delete t[Pe]}return this}function Ae(t,e,n,i){var o=e+a(n)+(i?"_"+a(i):"");if(t[Pe]&&t[Pe][o])return this;var r=function(e){return n.call(i||t,e||window.event)},s=r;wt&&0===e.indexOf("touch")?It(t,e,r,o):!_t||"dblclick"!==e||!qt||wt&&at?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,Ue(t,e)&&s(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",r,!1)):("click"===e&&et&&(r=function(t){!function(t,e){var n=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,i=He&&n-He;if(i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated)return void ze(t);He=n,e(t)}(t,s)}),t.addEventListener(e,r,!1)):"attachEvent"in t&&t.attachEvent("on"+e,r):qt(t,r,o),t[Pe]=t[Pe]||{},t[Pe][o]=r}function ke(t,e,n,i){var o=e+a(n)+(i?"_"+a(i):""),r=t[Pe]&&t[Pe][o];if(!r)return this;wt&&0===e.indexOf("touch")?function(t,e,n){var i=t["_leaflet_"+e+n];"touchstart"===e?t.removeEventListener(At,i,!1):"touchmove"===e?t.removeEventListener(kt,i,!1):"touchend"===e&&(t.removeEventListener(Ot,i,!1),t.removeEventListener(Rt,i,!1))}(t,e,o):!_t||"dblclick"!==e||!Yt||wt&&at?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r):Yt(t,o),t[Pe][o]=null}function Oe(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Be(t),this}function Re(t){return Ae(t,"mousewheel",Oe),this}function De(t){return Me(t,"mousedown touchstart dblclick",Oe),Ae(t,"click",Ve),this}function je(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function ze(t){return je(t),Oe(t),this}function Ne(t,e){if(!e)return new O(t.clientX,t.clientY);var n=Ce(e),i=n.boundingClientRect;return new O((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ie=ht&&at?2*window.devicePixelRatio:st?window.devicePixelRatio:1;function Fe(t){return J?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ie:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var He,Ge={};function Ve(t){Ge[t.type]=!0}function Be(t){var e=Ge[t.type];return Ge[t.type]=!1,e}function Ue(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var We=(Object.freeze||Object)({on:Me,off:Le,stopPropagation:Oe,disableScrollPropagation:Re,disableClickPropagation:De,preventDefault:je,stop:ze,getMousePosition:Ne,getWheelDelta:Fe,fakeStop:Ve,skipped:Be,isExternalTarget:Ue,addListener:Me,removeListener:Le}),qe=k.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=ye(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),ve(this._el,n),this.fire("step")},_complete:function(){T(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ye=k.extend({options:{crs:q,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=f(this,e),this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(H(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=te&&gt&&!xt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Me(this._proxy,ee,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){if((e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(H(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i)&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(gt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(gt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof O?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),a=this.containerPointToLatLng(o.add(r));return this.setView(a,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():I(t);var n=D(e.paddingTopLeft||e.padding||[0,0]),i=D(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),a=this.project(t.getSouthWest(),o),s=this.project(t.getNorthEast(),o);return{center:this.unproject(a.add(s).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=I(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=D(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new qe,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ce(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!gt)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),a=this._zoom;t=H(t),e=void 0===e?a:e;var s=Math.max(r.x,r.y),l=s*this.getZoomScale(a,e),u=o.distanceTo(i)||1,c=1.42,h=c*c;function d(t){var e=(l*l-s*s+(t?-1:1)*h*h*u*u)/(2*(t?l:s)*h*u),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function f(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var g=d(0);function m(t){return s*(p(g)*function(t){return f(t)/p(t)}(g+c*t)-f(g))/h}var v=Date.now(),y=(d(1)-g)/c,b=n.duration?1e3*n.duration:1e3*y*.8;return this._moveStart(!0,n.noMoveStart),function n(){var r=(Date.now()-v)/b,l=function(t){return 1-Math.pow(1-t,1.5)}(r)*y;r<=1?(this._flyToFrame=C(n,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(m(l)/u)),a),this.getScaleZoom(s/function(t){return s*(p(g)/p(g+c*t))}(l),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=I(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,I(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),r=e.divideBy(2).round(),a=i.divideBy(2).round(),s=r.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new F(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(r[a]=t.coords[a]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),re(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(T(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)re(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=oe("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new N(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=I(t),n=D(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(n),u=z(this.project(s,i),this.project(a,i)).getSize(),c=gt?this.options.zoomSnap:1,h=l.x/u.x,d=l.y/u.y,f=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new j(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(H(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(D(t),e)},layerPointToLatLng:function(t){var e=D(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(H(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(H(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(I(t))},distance:function(t,e){return this.options.crs.distance(H(t),H(e))},containerPointToLayerPoint:function(t){return D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(H(t)))},mouseEventToContainerPoint:function(t){return Ne(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ne(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Me(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&gt,ce(t,"leaflet-container"+(_t?" leaflet-touch":"")+(Et?" leaflet-retina":"")+($?" leaflet-oldie":"")+(lt?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ie(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ve(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ce(t.markerPane,"leaflet-zoom-hide"),ce(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ve(this._mapPane,new O(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return T(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ve(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?Le:Me;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),gt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){T(this._resizeRequest),this._resizeRequest=C(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,s=!1;r;){if((n=this._targets[a(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(o&&!Ue(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||s||o||!Ue(r,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Be(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e||xe(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var r=i[0];"contextmenu"===e&&r.listens(e,!0)&&je(t);var a={originalEvent:t};if("keypress"!==t.type){var s=r.getLatLng&&(!r._radius||r._radius<=10);a.containerPoint=s?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?r.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l<i.length;l++)if(i[l].fire(e,a,!0),a.originalEvent._stopped||!1===i[l].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return ye(this._mapPane)||new O(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return z([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new j(i.subtract(o),i.add(o)),a=this._getBoundsOffset(r,n,e);return a.round().equals([0,0])?t:this.unproject(i.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new j(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=z(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new O(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=gt?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){he(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n))&&(this.panBy(n,e),!0)},_createAnimProxy:function(){var t=this._proxy=oe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=Jt,n=this._proxy.style[e];me(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();me(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){re(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o))&&(C(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ce(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&he(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),C(function(){this._moveEnd(!0)},this))}});var Xe=P.extend({options:{position:"topright"},initialize:function(t){f(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return ce(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this},remove:function(){return this._map?(re(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ze=function(t){return new Xe(t)};Ye.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=oe("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=oe("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)re(this._controlCorners[t]);re(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Qe=Xe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in f(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Xe.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ce(this._container,"leaflet-control-layers-expanded"),this._form.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._form.clientHeight?(ce(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=t+"px"):he(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return he(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=oe("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),De(e),Re(e);var i=this._form=oe("form",t+"-list");n&&(this._map.on("click",this.collapse,this),et||Me(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=oe("a",t+"-toggle",e);o.href="#",o.title="Layers",_t?(Me(o,"click",ze),Me(o,"click",this.expand,this)):Me(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=oe("div",t+"-base",i),this._separator=oe("div",t+"-separator",i),this._overlaysList=oe("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&a(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(o(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ae(this._baseLayersList),ae(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers",i),this._layerControlInputs.push(e),e.layerId=a(t.layer),Me(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Ke=Xe.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=oe("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var r=oe("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),De(r),Me(r,"click",ze),Me(r,"click",o,this),Me(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";he(this._zoomInButton,e),he(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&ce(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&ce(this._zoomInButton,e)}});Ye.mergeOptions({zoomControl:!0}),Ye.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ke,this.addControl(this.zoomControl))});var $e=Xe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=oe("div","leaflet-control-scale"),n=this.options;return this._addScales(n,"leaflet-control-scale-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=oe("div",e,n)),t.imperial&&(this._iScale=oe("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),Je=Xe.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=oe("div","leaflet-control-attribution"),De(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});Ye.mergeOptions({attributionControl:!0}),Ye.addInitHook(function(){this.options.attributionControl&&(new Je).addTo(this)});Xe.Layers=Qe,Xe.Zoom=Ke,Xe.Scale=$e,Xe.Attribution=Je,Ze.layers=function(t,e,n){return new Qe(t,e,n)},Ze.zoom=function(t){return new Ke(t)},Ze.scale=function(t){return new $e(t)},Ze.attribution=function(t){return new Je(t)};var tn=P.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});tn.addTo=function(t,e){return t.addHandler(e,this),this};var en,nn={Events:A},on=_t?"touchstart mousedown":"mousedown",rn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},an={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},sn=k.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){f(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Me(this._dragStartTarget,on,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(sn._dragging===this&&this.finishDrag(),Le(this._dragStartTarget,on,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!ue(this._element,"leaflet-zoom-anim")&&!(sn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(sn._dragging=this,this._preventOutline&&xe(this._element),we(),Xt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ee(this._element);this._startPoint=new O(e.clientX,e.clientY),this._parentScale=Ce(n),Me(document,an[t.type],this._onMove,this),Me(document,rn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new O(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,je(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=ye(this._element).subtract(n),ce(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ce(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,T(this._animRequest),this._lastEvent=t,this._animRequest=C(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ve(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in he(document.body,"leaflet-dragging"),this._lastTarget&&(he(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),an)Le(document,an[t],this._onMove,this),Le(document,rn[t],this._onUp,this);_e(),Zt(),this._moved&&this._moving&&(T(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,sn._dragging=!1}});function ln(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=function(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,function t(e,n,i,o,r){var a,s,l,u=0;for(s=o+1;s<=r-1;s++)(l=pn(e[s],e[o],e[r],!0))>u&&(a=s,u=l);u>i&&(n[a]=1,t(e,n,i,o,a),t(e,n,i,a,r))}(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}(t=function(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)fn(t[i],t[o])>e&&(n.push(t[i]),o=i);o<r-1&&n.push(t[r-1]);return n}(t,n),n)}function un(t,e,n){return Math.sqrt(pn(t,e,n,!0))}function cn(t,e,n,i,o){var r,a,s,l=i?en:dn(t,n),u=dn(e,n);for(en=u;;){if(!(l|u))return[t,e];if(l&u)return!1;s=dn(a=hn(t,e,r=l||u,n,o),n),r===l?(t=a,l=s):(e=a,u=s)}}function hn(t,e,n,i,o){var r,a,s=e.x-t.x,l=e.y-t.y,u=i.min,c=i.max;return 8&n?(r=t.x+s*(c.y-t.y)/l,a=c.y):4&n?(r=t.x+s*(u.y-t.y)/l,a=u.y):2&n?(r=c.x,a=t.y+l*(c.x-t.x)/s):1&n&&(r=u.x,a=t.y+l*(u.x-t.x)/s),new O(r,a,o)}function dn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function fn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function pn(t,e,n,i){var o,r=e.x,a=e.y,s=n.x-r,l=n.y-a,u=s*s+l*l;return u>0&&((o=((t.x-r)*s+(t.y-a)*l)/u)>1?(r=n.x,a=n.y):o>0&&(r+=s*o,a+=l*o)),s=t.x-r,l=t.y-a,i?s*s+l*l:new O(r,a)}function gn(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function mn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),gn(t)}var vn=(Object.freeze||Object)({simplify:ln,pointToSegmentDistance:un,closestPointOnSegment:function(t,e,n){return pn(t,e,n)},clipSegment:cn,_getEdgeIntersection:hn,_getBitCode:dn,_sqClosestPointOnSegment:pn,isFlat:gn,_flat:mn});function yn(t,e,n){var i,o,r,a,s,l,u,c,h,d=[1,4,2,8];for(o=0,u=t.length;o<u;o++)t[o]._code=dn(t[o],e);for(a=0;a<4;a++){for(c=d[a],i=[],o=0,r=(u=t.length)-1;o<u;r=o++)s=t[o],l=t[r],s._code&c?l._code&c||((h=hn(l,s,c,e,n))._code=dn(h,e),i.push(h)):(l._code&c&&((h=hn(l,s,c,e,n))._code=dn(h,e),i.push(h)),i.push(s));t=i}return t}var bn=(Object.freeze||Object)({clipPolygon:yn}),wn={project:function(t){return new O(t.lng,t.lat)},unproject:function(t){return new F(t.y,t.x)},bounds:new j([-180,-90],[180,90])},_n={R:6378137,R_MINOR:6356752.314245179,bounds:new j([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),a=r*Math.sin(i),s=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),r/2);return i=-n*Math.log(Math.max(s,1e-10)),new O(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),a=Math.exp(-t.y/i),s=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=r*Math.sin(s),e=Math.pow((1-e)/(1+e),r/2),s+=u=Math.PI/2-2*Math.atan(a*e)-s;return new F(s*n,t.x*n/i)}},xn=(Object.freeze||Object)({LonLat:wn,Mercator:_n,SphericalMercator:B}),Sn=n({},V,{code:"EPSG:3395",projection:_n,transformation:function(){var t=.5/(Math.PI*_n.R);return W(t,.5,-t,.5)}()}),En=n({},V,{code:"EPSG:4326",projection:wn,transformation:W(1/180,1,-1/180,.5)}),Cn=n({},G,{projection:wn,transformation:W(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});G.Earth=V,G.EPSG3395=Sn,G.EPSG3857=q,G.EPSG900913=Y,G.EPSG4326=En,G.Simple=Cn;var Tn=k.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",function(){e.off(n,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});Ye.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&a(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?v(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Mn=Tn.extend({initialize:function(t,e){var n,i;if(f(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return a(t)}}),Pn=Mn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Mn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Mn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new N;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Ln=P.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){f(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=D(i),r=D("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Et&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});var An=Ln.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return An.imagePath||(An.imagePath=this._detectIconPath()),(this.options.imagePath||An.imagePath)+Ln.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=oe("div","leaflet-default-icon-path",document.body),e=ie(t,"background-image")||ie(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),kn=tn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new sn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ce(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&he(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=ye(e._icon),a=n.getPixelBounds(),s=n.getPixelOrigin(),l=z(a.min._subtract(s).add(o),a.max._subtract(s).subtract(o));if(!l.contains(r)){var u=D((Math.max(l.max.x,r.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(i);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),ve(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(T(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=ye(e._icon),o=e._map.layerPointToLatLng(i);n&&ve(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){T(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),On=Tn.extend({options:{icon:new An,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){f(this,e),this._latlng=H(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=H(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),ce(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ce(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),re(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&re(this._shadow),this._shadow=null},_setPos:function(t){ve(this._icon,t),this._shadow&&ve(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(ce(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),kn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new kn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;pe(this._icon,t),this._shadow&&pe(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});var Rn=Tn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return f(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Dn=Rn.extend({options:{fill:!0,radius:10},initialize:function(t,e){f(this,e),this._latlng=H(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=H(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return Rn.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new j(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var jn=Dn.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),f(this,e),this._latlng=H(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Rn.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===V.distance){var o=Math.PI/180,r=this._mRadius/V.R/o,a=n.project([e+r,t]),s=n.project([e-r,t]),l=a.add(s).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(u*o))/(Math.cos(e*o)*Math.cos(u*o)))/o;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,t-c]).x,this._radiusY=l.y-a.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}});var zn=Rn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){f(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,o=null,r=pn,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],u=1,c=l.length;u<c;u++){var h=r(t,e=l[u-1],n=l[u],!0);h<i&&(i=h,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,a,s=this._rings[0],l=s.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,i=0;t<l-1;t++)if(o=s[t],r=s[t+1],(i+=n=o.distanceTo(r))>e)return a=(i-e)/n,this._map.layerPointToLatLng([r.x-a*(r.x-o.x),r.y-a*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=H(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return gn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=gn(t),i=0,o=t.length;i<o;i++)n?(e[i]=H(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new j;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),n=new O(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(n),t.max._add(n),this._pxBounds=t)},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof F,a=t.length;if(r){for(o=[],i=0;i<a;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<a;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,a,s,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(s=this._rings[e]).length;n<r-1;n++)(a=cn(s[n],s[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(a[0]),a[1]===s[n+1]&&n!==r-2||(l[i].push(a[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=ln(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(a=(s=this._parts[n]).length)-1;i<a;o=i++)if((e||0!==i)&&un(t,s[o],s[i])<=l)return!0;return!1}});zn._flat=mn;var Nn=zn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,a,s,l,u=this._rings[0],c=u.length;if(!c)return null;for(r=a=s=0,t=0,e=c-1;t<c;e=t++)n=u[t],i=u[e],o=n.y*i.x-i.y*n.x,a+=(n.x+i.x)*o,s+=(n.y+i.y)*o,r+=3*o;return l=0===r?u[0]:[a/r,s/r],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=zn.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof F&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){zn.prototype._setLatLngs.call(this,t),gn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return gn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new O(e,e);if(t=new j(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;o<r;o++)(i=yn(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,a,s,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,s=this._parts.length;o<s;o++)for(r=0,a=(l=(e=this._parts[o]).length)-1;r<l;a=r++)n=e[r],i=e[a],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||zn.prototype._containsPoint.call(this,t,!0)}});var In=Pn.extend({initialize:function(t,e){f(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=v(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var a=Fn(t,r);return a?(a.feature=Wn(t),a.defaultOptions=a.options,this.resetStyle(a),r.onEachFeature&&r.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}});function Fn(t,e){var n,i,o,r,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||Hn;if(!s&&!a)return null;switch(a.type){case"Point":return n=c(s),u?u(t,n):new On(n);case"MultiPoint":for(o=0,r=s.length;o<r;o++)n=c(s[o]),l.push(u?u(t,n):new On(n));return new Pn(l);case"LineString":case"MultiLineString":return i=Gn(s,"LineString"===a.type?0:1,c),new zn(i,e);case"Polygon":case"MultiPolygon":return i=Gn(s,"Polygon"===a.type?1:2,c),new Nn(i,e);case"GeometryCollection":for(o=0,r=a.geometries.length;o<r;o++){var h=Fn({geometry:a.geometries[o],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new Pn(l);default:throw new Error("Invalid GeoJSON object.")}}function Hn(t){return new F(t[1],t[0],t[2])}function Gn(t,e,n){for(var i,o=[],r=0,a=t.length;r<a;r++)i=e?Gn(t[r],e-1,n):(n||Hn)(t[r]),o.push(i);return o}function Vn(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function Bn(t,e,n,i){for(var o=[],r=0,a=t.length;r<a;r++)o.push(e?Bn(t[r],e-1,n,i):Vn(t[r],i));return!e&&n&&o.push(o[0]),o}function Un(t,e){return t.feature?n({},t.feature,{geometry:e}):Wn(e)}function Wn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var qn={toGeoJSON:function(t){return Un(this,{type:"Point",coordinates:Vn(this.getLatLng(),t)})}};function Yn(t,e){return new In(t,e)}On.include(qn),jn.include(qn),Dn.include(qn),zn.include({toGeoJSON:function(t){var e=!gn(this._latlngs),n=Bn(this._latlngs,e?1:0,!1,t);return Un(this,{type:(e?"Multi":"")+"LineString",coordinates:n})}}),Nn.include({toGeoJSON:function(t){var e=!gn(this._latlngs),n=e&&!gn(this._latlngs[0]),i=Bn(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),Un(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Mn.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(n){e.push(n.toGeoJSON(t).geometry.coordinates)}),Un(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer(function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=Wn(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}}),n?Un(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Xn=Yn,Zn=Tn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=I(e),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ce(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){re(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&se(this._image),this},bringToBack:function(){return this._map&&le(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=I(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:oe("img");ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;me(this._image,n,e)},_reset:function(){var t=this._image,e=new j(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();ve(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){pe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Qn=Zn.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:oe("video");if(ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],r=0;r<n.length;r++)i.push(n[r].src);this._url=n.length>0?i:[e.src]}else{v(this._url)||(this._url=[this._url]),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var a=0;a<this._url.length;a++){var s=oe("source");s.src=this._url[a],e.appendChild(s)}}}});var Kn=Tn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){f(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&pe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&pe(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(pe(this._container,0),this._removeTimeout=setTimeout(o(re,void 0,this._container),200)):re(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=H(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&se(this._container),this},bringToBack:function(){return this._map&&le(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=D(this.options.offset),n=this._getAnchor();this._zoomAnimated?ve(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),$n=Kn.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Kn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Rn||this._source.on("preclick",Oe))},onRemove:function(t){Kn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Rn||this._source.off("preclick",Oe))},getEvents:function(){var t=Kn.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=oe("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=oe("div",t+"-content-wrapper",e);if(this._contentNode=oe("div",t+"-content",n),De(n),Re(this._contentNode),Me(n,"contextmenu",Oe),this._tipContainer=oe("div",t+"-tip-container",e),this._tip=oe("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=oe("a",t+"-close-button",e);i.href="#close",i.innerHTML="&#215;",Me(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight;o&&i>o?(e.height=o+"px",ce(t,"leaflet-popup-scrolled")):he(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();ve(this._container,e.add(n))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,e=parseInt(ie(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new O(this._containerLeft,-n-this._containerBottom);o._add(ye(this._container));var r=t.layerPointToContainerPoint(o),a=D(this.options.autoPanPadding),s=D(this.options.autoPanPaddingTopLeft||a),l=D(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,h=0;r.x+i+l.x>u.x&&(c=r.x+i-u.x+l.x),r.x-c-s.x<0&&(c=r.x-s.x),r.y+n+l.y>u.y&&(h=r.y+n-u.y+l.y),r.y-h-s.y<0&&(h=r.y-s.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),ze(t)},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ye.mergeOptions({closePopupOnClick:!0}),Ye.include({openPopup:function(t,e,n){return t instanceof $n||(t=new $n(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Tn.include({bindPopup:function(t,e){return t instanceof $n?(f(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new $n(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof Tn||(e=t,t=this),t instanceof Pn)for(var n in this._layers){t=this._layers[n];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(ze(t),e instanceof Rn?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Jn=Kn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Kn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Kn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Kn.prototype.getEvents.call(this);return _t&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=oe("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,n=this._container,i=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),r=this.options.direction,a=n.offsetWidth,s=n.offsetHeight,l=D(this.options.offset),u=this._getAnchor();"top"===r?t=t.add(D(-a/2+l.x,-s+l.y+u.y,!0)):"bottom"===r?t=t.subtract(D(a/2-l.x,-l.y,!0)):"center"===r?t=t.subtract(D(a/2+l.x,s/2-u.y+l.y,!0)):"right"===r||"auto"===r&&o.x<i.x?(r="right",t=t.add(D(l.x+u.x,u.y-s/2+l.y,!0))):(r="left",t=t.subtract(D(a+u.x-l.x,s/2-u.y-l.y,!0))),he(n,"leaflet-tooltip-right"),he(n,"leaflet-tooltip-left"),he(n,"leaflet-tooltip-top"),he(n,"leaflet-tooltip-bottom"),ce(n,"leaflet-tooltip-"+r),ve(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&pe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ye.include({openTooltip:function(t,e,n){return t instanceof Jn||(t=new Jn(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Tn.include({bindTooltip:function(t,e){return t instanceof Jn?(f(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Jn(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),_t&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){if(t instanceof Tn||(e=t,t=this),t instanceof Pn)for(var n in this._layers){t=this._layers[n];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ce(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(he(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var ti=Ln.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=D(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Ln.Default=An;var ei=Tn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:mt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){f(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),re(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(se(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(le(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=s(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof O?t:new O(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!$){pe(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);pe(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(T(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=oe("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(re(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=oe("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),i.el.offsetWidth,this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)re(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),a=n-1,s=new O(+o,+r);s.z=+a;var l=this._tileCoordsToKey(s),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),a>i&&this._retainParent(o,r,a,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var a=new O(o,r);a.z=n+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,r,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var r=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();gt?me(t.el,o,i):ve(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new j(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),a=[],s=this.options.keepBuffer,l=new j(o.getBottomLeft().subtract([s,-s]),o.getTopRight().add([s,-s]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new O(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var h=o.min.y;h<=o.max.y;h++)for(var d=o.min.x;d<=o.max.x;d++){var f=new O(d,h);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:a.push(f)}}if(a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var g=document.createDocumentFragment();for(d=0;d<a.length;d++)this._addTile(a[d],g);this._level.el.appendChild(g)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return I(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new N(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new O(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(re(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ce(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,$&&this.options.opacity<1&&pe(t,this.options.opacity),et&&!nt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&C(o(this._tileReady,this,t,null,r)),ve(r,n),this._tiles[i]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(pe(n.el,0),T(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(ce(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),$||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new j(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var ni=ei.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=f(this,e)).detectRetina&&Et&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),et||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Me(n,"load",o(this._tileOnLoad,this,e,n)),Me(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Et?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return m(this._url,n(e,this.options))},_tileOnLoad:function(t,e){$?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,n=this.options.zoomReverse,i=this.options.zoomOffset;return n&&(t=e-t),t+i},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,e.complete||(e.src=b,re(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return ot||e.el.setAttribute("src",b),ei.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==b))return ei.prototype._tileReady.call(this,t,e,n)}});function ii(t,e){return new ni(t,e)}var oi=ni.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var r=(e=f(this,e)).detectRetina&&Et?2:1,a=this.getTileSize();i.width=a.x*r,i.height=a.y*r,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,ni.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=z(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,a=(this._wmsVersion>=1.3&&this._crs===En?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),s=ni.prototype.getTileUrl.call(this,t);return s+p(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});ni.WMS=oi,ii.wms=function(t,e){return new oi(t,e)};var ri=Tn.extend({options:{padding:.1,tolerance:0},initialize:function(t){f(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ce(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=ye(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),a=this._map.project(t,e).subtract(r),s=o.multiplyBy(-n).add(i).add(o).subtract(a);gt?me(this._container,s,n):ve(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new j(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ai=ri.extend({getEvents:function(){var t=ri.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ri.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Me(t,"mousemove",s(this._onMouseMove,32,this),this),Me(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Me(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){T(this._redrawRequest),delete this._ctx,re(this._container),Le(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},ri.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Et?2:1;ve(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Et&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ri.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[a(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete this._drawnLayers[t._leaflet_id],delete t._order,delete this._layers[a(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n=t.options.dashArray.split(/[, ]+/),i=[];for(e=0;e<n.length;e++)i.push(Number(n[e]));t.options._dashArray=i}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new j,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,a=t._parts,s=a.length,l=this._ctx;if(s){for(this._drawnLayers[t._leaflet_id]=t,l.beginPath(),n=0;n<s;n++){for(i=0,o=a[n].length;i<o;i++)r=a[n][i],l[i?"lineTo":"moveTo"](r.x,r.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;this._drawnLayers[t._leaflet_id]=t,1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&!this._map._draggableMoved(e)&&(n=e);n&&(Ve(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(he(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var n,i,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(ce(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order,n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))},_bringToBack:function(t){var e=t._order,n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}});function si(t){return Ct?new ai(t):null}var li=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),ui={_initContainer:function(){this._container=oe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ri.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=li("shape");ce(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=li("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;re(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=li("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=li("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){se(t._container)},_bringToBack:function(t){le(t._container)}},ci=Mt?li:X,hi=ri.extend({getEvents:function(){var t=ri.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=ci("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=ci("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){re(this._container),Le(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){ri.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),ve(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=ci("path");t.options.className&&ce(e,t.options.className),t.options.interactive&&ce(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){re(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Z(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){se(t._path)},_bringToBack:function(t){le(t._path)}});function di(t){return Tt||Mt?new hi(t):null}Mt&&hi.include(ui),Ye.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&si(t)||di(t)}});var fi=Nn.extend({initialize:function(t,e){Nn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=I(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});hi.create=ci,hi.pointsToPath=Z,In.geometryToLayer=Fn,In.coordsToLatLng=Hn,In.coordsToLatLngs=Gn,In.latLngToCoords=Vn,In.latLngsToCoords=Bn,In.getFeature=Un,In.asFeature=Wn,Ye.mergeOptions({boxZoom:!0});var pi=tn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Me(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Le(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){re(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Xt(),we(),this._startPoint=this._map.mouseEventToContainerPoint(t),Me(document,{contextmenu:ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=oe("div","leaflet-zoom-box",this._container),ce(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new j(this._point,this._startPoint),n=e.getSize();ve(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(re(this._box),he(this._container,"leaflet-crosshair")),Zt(),_e(),Le(document,{contextmenu:ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ye.addInitHook("addHandler","boxZoom",pi),Ye.mergeOptions({doubleClickZoom:!0});var gi=tn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});Ye.addInitHook("addHandler","doubleClickZoom",gi),Ye.mergeOptions({dragging:!0,inertia:!nt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var mi=tn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new sn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ce(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){he(this._map._container,"leaflet-grab"),he(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=I(this._map.options.maxBounds);this._offsetLimit=z(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,a=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=n.easeLinearity,s=o.multiplyBy(a/r),l=s.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=s.multiplyBy(u/l),h=u/(n.inertiaDeceleration*a),d=c.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),C(function(){e.panBy(d,{duration:h,easeLinearity:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});Ye.addInitHook("addHandler","dragging",mi),Ye.mergeOptions({keyboard:!0,keyboardPanDelta:80});var vi=tn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Me(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Le(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){Me(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Le(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=D(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}ze(t)}}});Ye.addInitHook("addHandler","keyboard",vi),Ye.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var yi=tn.extend({addHooks:function(){Me(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Le(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Fe(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),i),ze(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,r=n?Math.ceil(o/n)*n:o,a=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});Ye.addInitHook("addHandler","scrollWheelZoom",yi),Ye.mergeOptions({tap:!0,tapTolerance:15});var bi=tn.extend({addHooks:function(){Me(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Le(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(je(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new O(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&ce(n,"leaflet-active"),this._holdTimeout=setTimeout(o(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),Me(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Le(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&he(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new O(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});_t&&!wt&&Ye.addInitHook("addHandler","tap",bi),Ye.mergeOptions({touchZoom:_t&&!nt,bounceAtZoomLimits:!0});var wi=tn.extend({addHooks:function(){ce(this._map._container,"leaflet-touch-zoom"),Me(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){he(this._map._container,"leaflet-touch-zoom"),Le(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Me(document,"touchmove",this._onTouchMove,this),Me(document,"touchend",this._onTouchEnd,this),je(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var a=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),T(this._animRequest);var s=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=C(s,this,!0),je(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,T(this._animRequest),Le(document,"touchmove",this._onTouchMove),Le(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ye.addInitHook("addHandler","touchZoom",wi),Ye.BoxZoom=pi,Ye.DoubleClickZoom=gi,Ye.Drag=mi,Ye.Keyboard=vi,Ye.ScrollWheelZoom=yi,Ye.Tap=bi,Ye.TouchZoom=wi,Object.freeze=e,t.version="1.3.4",t.Control=Xe,t.control=Ze,t.Browser=Lt,t.Evented=k,t.Mixin=nn,t.Util=M,t.Class=P,t.Handler=tn,t.extend=n,t.bind=o,t.stamp=a,t.setOptions=f,t.DomEvent=We,t.DomUtil=Te,t.PosAnimation=qe,t.Draggable=sn,t.LineUtil=vn,t.PolyUtil=bn,t.Point=O,t.point=D,t.Bounds=j,t.bounds=z,t.Transformation=U,t.transformation=W,t.Projection=xn,t.LatLng=F,t.latLng=H,t.LatLngBounds=N,t.latLngBounds=I,t.CRS=G,t.GeoJSON=In,t.geoJSON=Yn,t.geoJson=Xn,t.Layer=Tn,t.LayerGroup=Mn,t.layerGroup=function(t,e){return new Mn(t,e)},t.FeatureGroup=Pn,t.featureGroup=function(t){return new Pn(t)},t.ImageOverlay=Zn,t.imageOverlay=function(t,e,n){return new Zn(t,e,n)},t.VideoOverlay=Qn,t.videoOverlay=function(t,e,n){return new Qn(t,e,n)},t.DivOverlay=Kn,t.Popup=$n,t.popup=function(t,e){return new $n(t,e)},t.Tooltip=Jn,t.tooltip=function(t,e){return new Jn(t,e)},t.Icon=Ln,t.icon=function(t){return new Ln(t)},t.DivIcon=ti,t.divIcon=function(t){return new ti(t)},t.Marker=On,t.marker=function(t,e){return new On(t,e)},t.TileLayer=ni,t.tileLayer=ii,t.GridLayer=ei,t.gridLayer=function(t){return new ei(t)},t.SVG=hi,t.svg=di,t.Renderer=ri,t.Canvas=ai,t.canvas=si,t.Path=Rn,t.CircleMarker=Dn,t.circleMarker=function(t,e){return new Dn(t,e)},t.Circle=jn,t.circle=function(t,e,n){return new jn(t,e,n)},t.Polyline=zn,t.polyline=function(t,e){return new zn(t,e)},t.Polygon=Nn,t.polygon=function(t,e){return new Nn(t,e)},t.Rectangle=fi,t.rectangle=function(t,e){return new fi(t,e)},t.Map=Ye,t.map=function(t,e){return new Ye(t,e)};var _i=window.L;t.noConflict=function(){return window.L=_i,this},window.L=t})},function(t,e,n){"use strict";var i=p(n(66)),o=p(n(197)),r=p(n(2)),a=p(n(2)),s=n(208),l=n(17);n(227);var u=n(11),c=p(n(232)),h=n(461),d=p(n(463)),f=n(468);function p(t){return t&&t.__esModule?t:{default:t}}function g(t,e){a.default.render(r.default.createElement(s.AppContainer,null,r.default.createElement(l.Provider,{store:h.store},r.default.createElement(c.default,{payload:e}))),t)}function m(t){t.forEach(function(t){var e=(0,i.default)(t,2),n=e[0],o=e[1];switch(n.parentNode.classList.add(o.cmd),o.cmd){case"citations":case"load_file":n.parentNode.classList.add("wide"),g(n,o),n.classList.add("loaded");break;case"map":n.parentNode.classList.add("wide"),(0,d.default)(n,o),n.classList.add("loaded");break;default:g(n,o),n.classList.add("loaded")}})}function v(){var t=(0,u.toArray)(document.querySelectorAll(".applet")).map(function(t){var e=void 0;try{e=JSON.parse(t.dataset.payload)}catch(t){return null}var n=e.command.split(" "),i=n.shift(),o=e.dataset||null,r=null,a=null;if(e.cmd=i,e.partz=n,"load_file"===e.cmd)return e.url="https://nyc3.digitaloceanspaces.com/megapixels/v1"+n.shift(),[t,e];if(e.partz.length&&(0===(a=e.partz.shift().trim()).indexOf("http")?(o=null,r=a):0===a.indexOf("assets")?o=null:(o=a,r=null)),"datasets"in e&&!o&&!r||window.location.pathname.match("datasets")){var s=window.location.pathname.split("/").filter(function(t){return!!t});if(!(s.length>1))return[t,e];"index.html"===(o=s.pop())&&(o=s.pop())}return e.dataset=o,e.url=r,[t,e]}).filter(function(t){return!!t}),e=t.map(function(t){return t[1].dataset?t[1]:null}).filter(function(t){return!!t});e.length?function(t){if("face_analysis"===t.command)return new o.default(function(t){return t()});if("info"===t.dataset)return new o.default(function(t){return t()});var e="https://megapixels.nyc3.digitaloceanspaces.com/v1/citations/verified/"+t.dataset+".json";return fetch(e,{mode:"cors"}).then(function(t){return t.json()})}(e[0]).then(function(n){e.forEach(function(t){return t.data=n}),m(t)}):m(t)}!function(){var t="",e=window.location.href;t=e.match("news")?"news":e.match("about")?"about":e.match("datasets")?"datasets":e,(0,u.toArray)(document.querySelectorAll("header .links a")).some(function(e){return!!e.href.match(t)&&(e.classList.add("active"),!0)}),v(),function(){var t=document.querySelector(".content section:nth-child(2)");t&&new Waypoint({element:t,handler:function(t){"down"===t?document.body.classList.add("scrolled"):document.body.classList.remove("scrolled")}})}(),function(){var t=document.createElement("div");document.body.appendChild(t),a.default.render(r.default.createElement(f.ModalImage,null),t)}()}()},function(t,e,n){t.exports={default:n(185),__esModule:!0}},function(t,e,n){n(37),n(32),t.exports=n(193)},function(t,e,n){"use strict";var i=n(187),o=n(101),r=n(29),a=n(30);t.exports=n(69)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(t,e){t.exports=function(){}},function(t,e,n){"use strict";var i=n(52),o=n(41),r=n(43),a={};n(20)(a,n(6)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(a,{next:o(1,n)}),r(t,e+" Iterator")}},function(t,e,n){var i=n(9),o=n(15),r=n(42);t.exports=n(16)?Object.defineProperties:function(t,e){o(t);for(var n,a=r(e),s=a.length,l=0;s>l;)i.f(t,n=a[l++],e[n]);return t}},function(t,e,n){var i=n(30),o=n(53),r=n(191);t.exports=function(t){return function(e,n,a){var s,l=i(e),u=o(l.length),c=r(a,u);if(t&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var i=n(72),o=Math.max,r=Math.min;t.exports=function(t,e){return(t=i(t))<0?o(t+e,0):r(t,e)}},function(t,e,n){var i=n(72),o=n(68);t.exports=function(t){return function(e,n){var r,a,s=String(o(e)),l=i(n),u=s.length;return l<0||l>=u?t?"":void 0:(r=s.charCodeAt(l))<55296||r>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):r:t?s.slice(l,l+2):a-56320+(r-55296<<10)+65536}}},function(t,e,n){var i=n(55),o=n(6)("iterator"),r=n(29);t.exports=n(3).isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||r.hasOwnProperty(i(e))}},function(t,e,n){t.exports={default:n(195),__esModule:!0}},function(t,e,n){n(37),n(32),t.exports=n(196)},function(t,e,n){var i=n(15),o=n(76);t.exports=n(3).getIterator=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return i(e.call(t))}},function(t,e,n){t.exports={default:n(198),__esModule:!0}},function(t,e,n){n(77),n(32),n(37),n(199),n(203),n(204),t.exports=n(3).Promise},function(t,e,n){"use strict";var i,o,r,a,s=n(39),l=n(5),u=n(18),c=n(55),h=n(4),d=n(10),f=n(40),p=n(78),g=n(44),m=n(109),v=n(110).set,y=n(201)(),b=n(79),w=n(111),_=n(202),x=n(112),S=l.TypeError,E=l.process,C=E&&E.versions,T=C&&C.v8||"",M=l.Promise,P="process"==c(E),L=function(){},A=o=b.f,k=!!function(){try{var t=M.resolve(1),e=(t.constructor={})[n(6)("species")]=function(t){t(L,L)};return(P||"function"==typeof PromiseRejectionEvent)&&t.then(L)instanceof e&&0!==T.indexOf("6.6")&&-1===_.indexOf("Chrome/66")}catch(t){}}(),O=function(t){var e;return!(!d(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;y(function(){for(var i=t._v,o=1==t._s,r=0,a=function(e){var n,r,a,s=o?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{s?(o||(2==t._h&&z(t),t._h=1),!0===s?n=i:(c&&c.enter(),n=s(i),c&&(c.exit(),a=!0)),n===e.promise?u(S("Promise-chain cycle")):(r=O(n))?r.call(n,l,u):l(n)):u(i)}catch(t){c&&!a&&c.exit(),u(t)}};n.length>r;)a(n[r++]);t._c=[],t._n=!1,e&&!t._h&&D(t)})}},D=function(t){v.call(l,function(){var e,n,i,o=t._v,r=j(t);if(r&&(e=w(function(){P?E.emit("unhandledRejection",o,t):(n=l.onunhandledrejection)?n({promise:t,reason:o}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",o)}),t._h=P||j(t)?2:1),t._a=void 0,r&&e.e)throw e.v})},j=function(t){return 1!==t._h&&0===(t._a||t._c).length},z=function(t){v.call(l,function(){var e;P?E.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})})},N=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},I=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=O(t))?y(function(){var i={_w:n,_d:!1};try{e.call(t,u(I,i,1),u(N,i,1))}catch(t){N.call(i,t)}}):(n._v=t,n._s=1,R(n,!1))}catch(t){N.call({_w:n,_d:!1},t)}}};k||(M=function(t){p(this,M,"Promise","_h"),f(t),i.call(this);try{t(u(I,this,1),u(N,this,1))}catch(t){N.call(this,t)}},(i=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(80)(M.prototype,{then:function(t,e){var n=A(m(this,M));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=P?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),r=function(){var t=new i;this.promise=t,this.resolve=u(I,t,1),this.reject=u(N,t,1)},b.f=A=function(t){return t===M||t===a?new r(t):o(t)}),h(h.G+h.W+h.F*!k,{Promise:M}),n(43)(M,"Promise"),n(113)("Promise"),a=n(3).Promise,h(h.S+h.F*!k,"Promise",{reject:function(t){var e=A(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(s||!k),"Promise",{resolve:function(t){return x(s&&this===a?M:this,t)}}),h(h.S+h.F*!(k&&n(114)(function(t){M.all(t).catch(L)})),"Promise",{all:function(t){var e=this,n=A(e),i=n.resolve,o=n.reject,r=w(function(){var n=[],r=0,a=1;g(t,!1,function(t){var s=r++,l=!1;n.push(void 0),a++,e.resolve(t).then(function(t){l||(l=!0,n[s]=t,--a||i(n))},o)}),--a||i(n)});return r.e&&o(r.v),n.promise},race:function(t){var e=this,n=A(e),i=n.reject,o=w(function(){g(t,!1,function(t){e.resolve(t).then(n.resolve,i)})});return o.e&&i(o.v),n.promise}})},function(t,e){t.exports=function(t,e,n){var i=void 0===n;switch(e.length){case 0:return i?t():t.call(n);case 1:return i?t(e[0]):t.call(n,e[0]);case 2:return i?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return i?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return i?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var i=n(5),o=n(110).set,r=i.MutationObserver||i.WebKitMutationObserver,a=i.process,s=i.Promise,l="process"==n(38)(a);t.exports=function(){var t,e,n,u=function(){var i,o;for(l&&(i=a.domain)&&i.exit();t;){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,i&&i.enter()};if(l)n=function(){a.nextTick(u)};else if(!r||i.navigator&&i.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(u)}}else n=function(){o.call(i,u)};else{var h=!0,d=document.createTextNode("");new r(u).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(i){var o={fn:i,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){var i=n(5).navigator;t.exports=i&&i.userAgent||""},function(t,e,n){"use strict";var i=n(4),o=n(3),r=n(5),a=n(109),s=n(112);i(i.P+i.R,"Promise",{finally:function(t){var e=a(this,o.Promise||r.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var i=n(4),o=n(79),r=n(111);i(i.S,"Promise",{try:function(t){var e=o.f(this),n=r(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){"use strict";var i=n(206);function o(){}t.exports=function(){function t(t,e,n,o,r,a){if(a!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=o,n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";n.d(e,"c",function(){return s}),n.d(e,"b",function(){return h}),n.d(e,"a",function(){return N}),n.d(e,"e",function(){return I}),n.d(e,"d",function(){return o});var i=function(){},o={},r=[],a=[];function s(t,e){var n,s,l,u,c=a;for(u=arguments.length;u-- >2;)r.push(arguments[u]);for(e&&null!=e.children&&(r.length||r.push(e.children),delete e.children);r.length;)if((s=r.pop())&&void 0!==s.pop)for(u=s.length;u--;)r.push(s[u]);else"boolean"==typeof s&&(s=null),(l="function"!=typeof t)&&(null==s?s="":"number"==typeof s?s=String(s):"string"!=typeof s&&(l=!1)),l&&n?c[c.length-1]+=s:c===a?c=[s]:c.push(s),n=l;var h=new i;return h.nodeName=t,h.children=c,h.attributes=null==e?void 0:e,h.key=null==e?void 0:e.key,void 0!==o.vnode&&o.vnode(h),h}function l(t,e){for(var n in e)t[n]=e[n];return t}function u(t,e){null!=t&&("function"==typeof t?t(e):t.current=e)}var c="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function h(t,e){return s(t.nodeName,l(l({},t.attributes),e),arguments.length>2?[].slice.call(arguments,2):t.children)}var d=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,f=[];function p(t){!t._dirty&&(t._dirty=!0)&&1==f.push(t)&&(o.debounceRendering||c)(g)}function g(){for(var t;t=f.pop();)t._dirty&&j(t)}function m(t,e,n){return"string"==typeof e||"number"==typeof e?void 0!==t.splitText:"string"==typeof e.nodeName?!t._componentConstructor&&v(t,e.nodeName):n||t._componentConstructor===e.nodeName}function v(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function y(t){var e=l({},t.attributes);e.children=t.children;var n=t.nodeName.defaultProps;if(void 0!==n)for(var i in n)void 0===e[i]&&(e[i]=n[i]);return e}function b(t){var e=t.parentNode;e&&e.removeChild(t)}function w(t,e,n,i,o){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)u(n,null),u(i,t);else if("class"!==e||o)if("style"===e){if(i&&"string"!=typeof i&&"string"!=typeof n||(t.style.cssText=i||""),i&&"object"==typeof i){if("string"!=typeof n)for(var r in n)r in i||(t.style[r]="");for(var r in i)t.style[r]="number"==typeof i[r]&&!1===d.test(r)?i[r]+"px":i[r]}}else if("dangerouslySetInnerHTML"===e)i&&(t.innerHTML=i.__html||"");else if("o"==e[0]&&"n"==e[1]){var a=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),i?n||t.addEventListener(e,_,a):t.removeEventListener(e,_,a),(t._listeners||(t._listeners={}))[e]=i}else if("list"!==e&&"type"!==e&&!o&&e in t){try{t[e]=null==i?"":i}catch(t){}null!=i&&!1!==i||"spellcheck"==e||t.removeAttribute(e)}else{var s=o&&e!==(e=e.replace(/^xlink:?/,""));null==i||!1===i?s?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!=typeof i&&(s?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),i):t.setAttribute(e,i))}else t.className=i||""}function _(t){return this._listeners[t.type](o.event&&o.event(t)||t)}var x=[],S=0,E=!1,C=!1;function T(){for(var t;t=x.shift();)o.afterMount&&o.afterMount(t),t.componentDidMount&&t.componentDidMount()}function M(t,e,n,i,o,r){S++||(E=null!=o&&void 0!==o.ownerSVGElement,C=null!=t&&!("__preactattr_"in t));var a=P(t,e,n,i,r);return o&&a.parentNode!==o&&o.appendChild(a),--S||(C=!1,r||T()),a}function P(t,e,n,i,o){var r=t,a=E;if(null!=e&&"boolean"!=typeof e||(e=""),"string"==typeof e||"number"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||o)?t.nodeValue!=e&&(t.nodeValue=e):(r=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(r,t),L(t,!0))),r.__preactattr_=!0,r;var s=e.nodeName;if("function"==typeof s)return function(t,e,n,i){var o=t&&t._component,r=o,a=t,s=o&&t._componentConstructor===e.nodeName,l=s,u=y(e);for(;o&&!l&&(o=o._parentComponent);)l=o.constructor===e.nodeName;o&&l&&(!i||o._component)?(D(o,u,3,n,i),t=o.base):(r&&!s&&(z(r),t=a=null),o=O(e.nodeName,u,n),t&&!o.nextBase&&(o.nextBase=t,a=null),D(o,u,1,n,i),t=o.base,a&&t!==a&&(a._component=null,L(a,!1)));return t}(t,e,n,i);if(E="svg"===s||"foreignObject"!==s&&E,s=String(s),(!t||!v(t,s))&&(r=function(t,e){var n=e?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t);return n.normalizedNodeName=t,n}(s,E),t)){for(;t.firstChild;)r.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(r,t),L(t,!0)}var l=r.firstChild,u=r.__preactattr_,c=e.children;if(null==u){u=r.__preactattr_={};for(var h=r.attributes,d=h.length;d--;)u[h[d].name]=h[d].value}return!C&&c&&1===c.length&&"string"==typeof c[0]&&null!=l&&void 0!==l.splitText&&null==l.nextSibling?l.nodeValue!=c[0]&&(l.nodeValue=c[0]):(c&&c.length||null!=l)&&function(t,e,n,i,o){var r,a,s,l,u,c=t.childNodes,h=[],d={},f=0,p=0,g=c.length,v=0,y=e?e.length:0;if(0!==g)for(var w=0;w<g;w++){var _=c[w],x=_.__preactattr_,S=y&&x?_._component?_._component.__key:x.key:null;null!=S?(f++,d[S]=_):(x||(void 0!==_.splitText?!o||_.nodeValue.trim():o))&&(h[v++]=_)}if(0!==y)for(var w=0;w<y;w++){l=e[w],u=null;var S=l.key;if(null!=S)f&&void 0!==d[S]&&(u=d[S],d[S]=void 0,f--);else if(p<v)for(r=p;r<v;r++)if(void 0!==h[r]&&m(a=h[r],l,o)){u=a,h[r]=void 0,r===v-1&&v--,r===p&&p++;break}u=P(u,l,n,i),s=c[w],u&&u!==t&&u!==s&&(null==s?t.appendChild(u):u===s.nextSibling?b(s):t.insertBefore(u,s))}if(f)for(var w in d)void 0!==d[w]&&L(d[w],!1);for(;p<=v;)void 0!==(u=h[v--])&&L(u,!1)}(r,c,n,i,C||null!=u.dangerouslySetInnerHTML),function(t,e,n){var i;for(i in n)e&&null!=e[i]||null==n[i]||w(t,i,n[i],n[i]=void 0,E);for(i in e)"children"===i||"innerHTML"===i||i in n&&e[i]===("value"===i||"checked"===i?t[i]:n[i])||w(t,i,n[i],n[i]=e[i],E)}(r,e.attributes,u),E=a,r}function L(t,e){var n=t._component;n?z(n):(null!=t.__preactattr_&&u(t.__preactattr_.ref,null),!1!==e&&null!=t.__preactattr_||b(t),A(t))}function A(t){for(t=t.lastChild;t;){var e=t.previousSibling;L(t,!0),t=e}}var k=[];function O(t,e,n){var i,o=k.length;for(t.prototype&&t.prototype.render?(i=new t(e,n),N.call(i,e,n)):((i=new N(e,n)).constructor=t,i.render=R);o--;)if(k[o].constructor===t)return i.nextBase=k[o].nextBase,k.splice(o,1),i;return i}function R(t,e,n){return this.constructor(t,n)}function D(t,e,n,i,r){t._disable||(t._disable=!0,t.__ref=e.ref,t.__key=e.key,delete e.ref,delete e.key,void 0===t.constructor.getDerivedStateFromProps&&(!t.base||r?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(e,i)),i&&i!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=i),t.prevProps||(t.prevProps=t.props),t.props=e,t._disable=!1,0!==n&&(1!==n&&!1===o.syncComponentUpdates&&t.base?p(t):j(t,1,r)),u(t.__ref,t))}function j(t,e,n,i){if(!t._disable){var r,a,s,u=t.props,c=t.state,h=t.context,d=t.prevProps||u,f=t.prevState||c,p=t.prevContext||h,g=t.base,m=t.nextBase,v=g||m,b=t._component,w=!1,_=p;if(t.constructor.getDerivedStateFromProps&&(c=l(l({},c),t.constructor.getDerivedStateFromProps(u,c)),t.state=c),g&&(t.props=d,t.state=f,t.context=p,2!==e&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(u,c,h)?w=!0:t.componentWillUpdate&&t.componentWillUpdate(u,c,h),t.props=u,t.state=c,t.context=h),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!w){r=t.render(u,c,h),t.getChildContext&&(h=l(l({},h),t.getChildContext())),g&&t.getSnapshotBeforeUpdate&&(_=t.getSnapshotBeforeUpdate(d,f));var E,C,P=r&&r.nodeName;if("function"==typeof P){var A=y(r);(a=b)&&a.constructor===P&&A.key==a.__key?D(a,A,1,h,!1):(E=a,t._component=a=O(P,A,h),a.nextBase=a.nextBase||m,a._parentComponent=t,D(a,A,0,h,!1),j(a,1,n,!0)),C=a.base}else s=v,(E=b)&&(s=t._component=null),(v||1===e)&&(s&&(s._component=null),C=M(s,r,h,n||!g,v&&v.parentNode,!0));if(v&&C!==v&&a!==b){var k=v.parentNode;k&&C!==k&&(k.replaceChild(C,v),E||(v._component=null,L(v,!1)))}if(E&&z(E),t.base=C,C&&!i){for(var R=t,N=t;N=N._parentComponent;)(R=N).base=C;C._component=R,C._componentConstructor=R.constructor}}for(!g||n?x.push(t):w||(t.componentDidUpdate&&t.componentDidUpdate(d,f,_),o.afterUpdate&&o.afterUpdate(t));t._renderCallbacks.length;)t._renderCallbacks.pop().call(t);S||i||T()}}function z(t){o.beforeUnmount&&o.beforeUnmount(t);var e=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var n=t._component;n?z(n):e&&(null!=e.__preactattr_&&u(e.__preactattr_.ref,null),t.nextBase=e,b(e),k.push(t),A(e)),u(t.__ref,null)}function N(t,e){this._dirty=!0,this.context=e,this.props=t,this.state=this.state||{},this._renderCallbacks=[]}function I(t,e,n){return M(n,t,{},!1,e,!1)}l(N.prototype,{setState:function(t,e){this.prevState||(this.prevState=this.state),this.state=l(l({},this.state),"function"==typeof t?t(this.state,this.props):t),e&&this._renderCallbacks.push(e),p(this)},forceUpdate:function(t){t&&this._renderCallbacks.push(t),j(this,2)},render:function(){}})},function(module,exports,__webpack_require__){"use strict";var evalAllowed=!1;try{eval("evalAllowed = true")}catch(t){}var platformSupported=!!Object.setPrototypeOf&&evalAllowed;module.exports=__webpack_require__(209)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(n(2)),o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},a=function(t){function e(){return o(this,e),r(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.render=function(){return i.Children.only(this.props.children)},e}(i.Component);e.AppContainer=a,e.hot=function(){return function(t){return t}},e.areComponentsEqual=function(t,e){return t===e},e.setConfig=function(){},e.cold=function(t){return t},e.configureComponent=function(){}},function(t,e,n){"use strict";e.a=l;var i=n(115),o=n(2),r=n(33),a=n.n(r),s=n(116);n(81);function l(t){var e;void 0===t&&(t="store");var n=t+"Subscription",r=function(e){Object(i.a)(a,e);var r=a.prototype;function a(n,i){var o;return(o=e.call(this,n,i)||this)[t]=n.store,o}return r.getChildContext=function(){var e;return(e={})[t]=this[t],e[n]=null,e},r.render=function(){return o.Children.only(this.props.children)},a}(o.Component);return r.propTypes={store:s.a.isRequired,children:a.a.element.isRequired},r.childContextTypes=((e={})[t]=s.a.isRequired,e[n]=s.b,e),r}e.b=l()},function(t,e,n){"use strict";e.a=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){"use strict";var i=n(118),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={};a[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var s=Object.defineProperty,l=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,i){if("string"!=typeof n){if(d){var f=h(n);f&&f!==d&&t(e,f,i)}var p=l(n);u&&(p=p.concat(u(n)));for(var g=a[e.$$typeof]||o,m=a[n.$$typeof]||o,v=0;v<p.length;++v){var y=p[v];if(!(r[y]||i&&i[y]||m&&m[y]||g&&g[y])){var b=c(n,y);try{s(e,y,b)}catch(t){}}}return e}return e}},function(t,e,n){"use strict";
+/** @license React v16.6.1
+ * react-is.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,r=i?Symbol.for("react.portal"):60106,a=i?Symbol.for("react.fragment"):60107,s=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,c=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.async_mode"):60111,d=i?Symbol.for("react.concurrent_mode"):60111,f=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,g=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116;function v(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case o:switch(t=t.type){case h:case d:case a:case l:case s:return t;default:switch(t=t&&t.$$typeof){case c:case f:case u:return t;default:return e}}case r:return e}}}function y(t){return v(t)===d}e.typeOf=v,e.AsyncMode=h,e.ConcurrentMode=d,e.ContextConsumer=c,e.ContextProvider=u,e.Element=o,e.ForwardRef=f,e.Fragment=a,e.Profiler=l,e.Portal=r,e.StrictMode=s,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===a||t===d||t===l||t===s||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===g||t.$$typeof===u||t.$$typeof===c||t.$$typeof===f)},e.isAsyncMode=function(t){return y(t)||v(t)===h},e.isConcurrentMode=y,e.isContextConsumer=function(t){return v(t)===c},e.isContextProvider=function(t){return v(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===o},e.isForwardRef=function(t){return v(t)===f},e.isFragment=function(t){return v(t)===a},e.isProfiler=function(t){return v(t)===l},e.isPortal=function(t){return v(t)===r},e.isStrictMode=function(t){return v(t)===s}},function(t,e,n){"use strict";t.exports=function(t,e,n,i,o,r,a,s){if(!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,i,o,r,a,s],c=0;(l=new Error(e.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=null,o={notify:function(){}};var r=function(){function t(t,e,n){this.store=t,this.parentSub=e,this.onStateChange=n,this.unsubscribe=null,this.listeners=o}var e=t.prototype;return e.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},e.notifyNestedSubs=function(){this.listeners.notify()},e.isSubscribed=function(){return Boolean(this.unsubscribe)},e.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=function(){var t=[],e=[];return{clear:function(){e=i,t=i},notify:function(){for(var n=t=e,i=0;i<n.length;i++)n[i]()},get:function(){return e},subscribe:function(n){var o=!0;return e===t&&(e=t.slice()),e.push(n),function(){o&&t!==i&&(o=!1,e===t&&(e=t.slice()),e.splice(e.indexOf(n),1))}}}}())},e.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=o)},t}()},function(t,e,n){"use strict";var i=n(82),o=n(83),r=n(117),a=n(217),s=n(218),l=n(223),u=n(224),c=n(225);function h(t,e,n){for(var i=e.length-1;i>=0;i--){var o=e[i](t);if(o)return o}return function(e,i){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function d(t,e){return t===e}e.a=function(t){var e=void 0===t?{}:t,n=e.connectHOC,f=void 0===n?r.a:n,p=e.mapStateToPropsFactories,g=void 0===p?l.a:p,m=e.mapDispatchToPropsFactories,v=void 0===m?s.a:m,y=e.mergePropsFactories,b=void 0===y?u.a:y,w=e.selectorFactory,_=void 0===w?c.a:w;return function(t,e,n,r){void 0===r&&(r={});var s=r,l=s.pure,u=void 0===l||l,c=s.areStatesEqual,p=void 0===c?d:c,m=s.areOwnPropsEqual,y=void 0===m?a.a:m,w=s.areStatePropsEqual,x=void 0===w?a.a:w,S=s.areMergedPropsEqual,E=void 0===S?a.a:S,C=Object(o.a)(s,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),T=h(t,g,"mapStateToProps"),M=h(e,v,"mapDispatchToProps"),P=h(n,b,"mergeProps");return f(_,Object(i.a)({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:T,initMapDispatchToProps:M,initMergeProps:P,pure:u,areStatesEqual:p,areOwnPropsEqual:y,areStatePropsEqual:x,areMergedPropsEqual:E},C))}}()},function(t,e,n){"use strict";e.a=function(t,e){if(o(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(e,n[a])||!o(t[n[a]],e[n[a]]))return!1;return!0};var i=Object.prototype.hasOwnProperty;function o(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var i=n(21),o=n(120);e.a=[function(t){return"function"==typeof t?Object(o.b)(t,"mapDispatchToProps"):void 0},function(t){return t?void 0:Object(o.a)(function(t){return{dispatch:t}})},function(t){return t&&"object"==typeof t?Object(o.a)(function(e){return Object(i.bindActionCreators)(t,e)}):void 0}]},function(t,e,n){"use strict";(function(t,i){var o,r=n(221);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:i;var a=Object(r.a)(o);e.a=a}).call(e,n(119),n(220)(t))},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";e.a=function(t){var e,n=t.Symbol;"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable";return e}},function(t,e,n){"use strict";e.a=function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var n=e;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return e===n}},function(t,e,n){"use strict";var i=n(120);e.a=[function(t){return"function"==typeof t?Object(i.b)(t,"mapStateToProps"):void 0},function(t){return t?void 0:Object(i.a)(function(){return{}})}]},function(t,e,n){"use strict";var i=n(82);n(121);function o(t,e,n){return Object(i.a)({},n,t,e)}e.a=[function(t){return"function"==typeof t?function(t){return function(e,n){n.displayName;var i,o=n.pure,r=n.areMergedPropsEqual,a=!1;return function(e,n,s){var l=t(e,n,s);return a?o&&r(l,i)||(i=l):(a=!0,i=l),i}}}(t):void 0},function(t){return t?void 0:function(){return o}}]},function(t,e,n){"use strict";e.a=function(t,e){var n=e.initMapStateToProps,a=e.initMapDispatchToProps,s=e.initMergeProps,l=Object(i.a)(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),u=n(t,l),c=a(t,l),h=s(t,l);0;return(l.pure?r:o)(u,c,h,t,l)};var i=n(83);n(226);function o(t,e,n,i){return function(o,r){return n(t(o,r),e(i,r),r)}}function r(t,e,n,i,o){var r,a,s,l,u,c=o.areStatesEqual,h=o.areOwnPropsEqual,d=o.areStatePropsEqual,f=!1;function p(o,f){var p=!h(f,a),g=!c(o,r);return r=o,a=f,p&&g?(s=t(r,a),e.dependsOnOwnProps&&(l=e(i,a)),u=n(s,l,a)):p?(t.dependsOnOwnProps&&(s=t(r,a)),e.dependsOnOwnProps&&(l=e(i,a)),u=n(s,l,a)):g?function(){var e=t(r,a),i=!d(e,s);return s=e,i&&(u=n(s,l,a)),u}():u}return function(o,c){return f?p(o,c):function(o,c){return s=t(r=o,a=c),l=e(i,a),u=n(s,l,a),f=!0,u}(o,c)}}},function(t,e,n){"use strict";n(81)},function(t,e){
+/*!
+Waypoints - 4.0.1
+Copyright Ā© 2011-2016 Caleb Troughton
+Licensed under the MIT license.
+https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
+*/
+!function(){"use strict";function t(i){if(!i)throw new Error("No options passed to Waypoint constructor");if(!i.element)throw new Error("No element option passed to Waypoint constructor");if(!i.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,i),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=i.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),n[this.key]=this,e+=1}var e=0,n={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete n[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var i in n)e.push(n[i]);for(var o=0,r=e.length;r>o;o++)e[o][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){for(var e in t.Context.refreshAll(),n)n[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=o.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+n,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,i[t.waypointContextKey]=this,n+=1,o.windowContext||(o.windowContext=!0,o.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var n=0,i={},o=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),n=this.element==this.element.window;t&&e&&!n&&(this.adapter.off(".waypoints"),delete i[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,o.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||o.isTouch)&&(e.didScroll=!0,o.requestAnimationFrame(t))})},e.prototype.handleResize=function(){o.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var n in e){var i=e[n],o=i.newScroll>i.oldScroll?i.forward:i.backward;for(var r in this.waypoints[n]){var a=this.waypoints[n][r];if(null!==a.triggerPoint){var s=i.oldScroll<a.triggerPoint,l=i.newScroll>=a.triggerPoint;(s&&l||!s&&!l)&&(a.queueTrigger(o),t[a.group.id]=a.group)}}}for(var u in t)t[u].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?o.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?o.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var n in this.waypoints[e])t.push(this.waypoints[e][n]);for(var i=0,o=t.length;o>i;i++)t[i].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,n=e?void 0:this.adapter.offset(),i={};for(var r in this.handleScroll(),t={horizontal:{contextOffset:e?0:n.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:n.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var a=t[r];for(var s in this.waypoints[r]){var l,u,c,h,d=this.waypoints[r][s],f=d.options.offset,p=d.triggerPoint,g=0,m=null==p;d.element!==d.element.window&&(g=d.adapter.offset()[a.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(a.contextDimension*f/100))),l=a.contextScroll-a.contextOffset,d.triggerPoint=Math.floor(g+l-f),u=p<a.oldScroll,c=d.triggerPoint>=a.oldScroll,h=!u&&!c,!m&&(u&&c)?(d.queueTrigger(a.backward),i[d.group.id]=d.group):!m&&h?(d.queueTrigger(a.forward),i[d.group.id]=d.group):m&&a.oldScroll>=d.triggerPoint&&(d.queueTrigger(a.forward),i[d.group.id]=d.group)}}return o.requestAnimationFrame(function(){for(var t in i)i[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in i)i[t].refresh()},e.findByElement=function(t){return i[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},o.requestAnimationFrame=function(e){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t).call(window,e)},o.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function n(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),i[this.axis][this.name]=this}var i={vertical:{},horizontal:{}},o=window.Waypoint;n.prototype.add=function(t){this.waypoints.push(t)},n.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},n.prototype.flushTriggers=function(){for(var n in this.triggerQueues){var i=this.triggerQueues[n],o="up"===n||"left"===n;i.sort(o?e:t);for(var r=0,a=i.length;a>r;r+=1){var s=i[r];(s.options.continuous||r===i.length-1)&&s.trigger([n])}}this.clearTriggerQueues()},n.prototype.next=function(e){this.waypoints.sort(t);var n=o.Adapter.inArray(e,this.waypoints);return n===this.waypoints.length-1?null:this.waypoints[n+1]},n.prototype.previous=function(e){this.waypoints.sort(t);var n=o.Adapter.inArray(e,this.waypoints);return n?this.waypoints[n-1]:null},n.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},n.prototype.remove=function(t){var e=o.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},n.prototype.first=function(){return this.waypoints[0]},n.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},n.findOrCreate=function(t){return i[t.axis][t.name]||new n(t)},o.Group=n}(),function(){"use strict";function t(t){return t===t.window}function e(e){return t(e)?e:e.defaultView}function n(t){this.element=t,this.handlers={}}var i=window.Waypoint;n.prototype.innerHeight=function(){return t(this.element)?this.element.innerHeight:this.element.clientHeight},n.prototype.innerWidth=function(){return t(this.element)?this.element.innerWidth:this.element.clientWidth},n.prototype.off=function(t,e){function n(t,e,n){for(var i=0,o=e.length-1;o>i;i++){var r=e[i];n&&n!==r||t.removeEventListener(r)}}var i=t.split("."),o=i[0],r=i[1],a=this.element;if(r&&this.handlers[r]&&o)n(a,this.handlers[r][o],e),this.handlers[r][o]=[];else if(o)for(var s in this.handlers)n(a,this.handlers[s][o]||[],e),this.handlers[s][o]=[];else if(r&&this.handlers[r]){for(var l in this.handlers[r])n(a,this.handlers[r][l],e);this.handlers[r]={}}},n.prototype.offset=function(){if(!this.element.ownerDocument)return null;var t=this.element.ownerDocument.documentElement,n=e(this.element.ownerDocument),i={top:0,left:0};return this.element.getBoundingClientRect&&(i=this.element.getBoundingClientRect()),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}},n.prototype.on=function(t,e){var n=t.split("."),i=n[0],o=n[1]||"__default",r=this.handlers[o]=this.handlers[o]||{};(r[i]=r[i]||[]).push(e),this.element.addEventListener(i,e)},n.prototype.outerHeight=function(e){var n,i=this.innerHeight();return e&&!t(this.element)&&(n=window.getComputedStyle(this.element),i+=parseInt(n.marginTop,10),i+=parseInt(n.marginBottom,10)),i},n.prototype.outerWidth=function(e){var n,i=this.innerWidth();return e&&!t(this.element)&&(n=window.getComputedStyle(this.element),i+=parseInt(n.marginLeft,10),i+=parseInt(n.marginRight,10)),i},n.prototype.scrollLeft=function(){var t=e(this.element);return t?t.pageXOffset:this.element.scrollLeft},n.prototype.scrollTop=function(){var t=e(this.element);return t?t.pageYOffset:this.element.scrollTop},n.extend=function(){function t(t,e){if("object"==typeof t&&"object"==typeof e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}for(var e=Array.prototype.slice.call(arguments),n=1,i=e.length;i>n;n++)t(e[0],e[n]);return e[0]},n.inArray=function(t,e,n){return null==e?-1:e.indexOf(t,n)},n.isEmptyObject=function(t){for(var e in t)return!1;return!0},i.adapters.push({name:"noframework",Adapter:n}),i.Adapter=n}()},function(t,e,n){t.exports={default:n(229),__esModule:!0}},function(t,e,n){var i=n(3),o=i.JSON||(i.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,n){n(231),t.exports=n(3).Object.keys},function(t,e,n){var i=n(31),o=n(42);n(122)("keys",function(){return function(t){return o(i(t))}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=f(n(12)),o=f(n(7)),r=f(n(8)),a=f(n(13)),s=f(n(14)),l=n(2),u=f(l),c=n(254),h=n(256),d=n(454);function f(t){return t&&t.__esModule?t:{default:t}}var p=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(e.__proto__||(0,i.default)(e)).apply(this,arguments))}return(0,s.default)(e,t),(0,r.default)(e,[{key:"render",value:function(){switch(this.props.payload.cmd){case"dataset_list":return u.default.createElement(c.Container,this.props);case"chart":return u.default.createElement(d.CountriesByYear,this.props);case"piechart":return u.default.createElement(d.PieCharts,this.props);case"citations":return u.default.createElement(h.CitationsTable,this.props);case"load_file":return u.default.createElement(h.FileTable,this.props);default:return u.default.createElement("pre",{style:{color:"#0f0"}},"Megapixels")}}}]),e}(l.Component);e.default=p},function(t,e,n){n(234),t.exports=n(3).Object.getPrototypeOf},function(t,e,n){var i=n(31),o=n(106);n(122)("getPrototypeOf",function(){return function(t){return o(i(t))}})},function(t,e,n){t.exports={default:n(236),__esModule:!0}},function(t,e,n){n(237);var i=n(3).Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}},function(t,e,n){var i=n(4);i(i.S+i.F*!n(16),"Object",{defineProperty:n(9).f})},function(t,e,n){t.exports={default:n(239),__esModule:!0}},function(t,e,n){n(32),n(37),t.exports=n(84).f("iterator")},function(t,e,n){t.exports={default:n(241),__esModule:!0}},function(t,e,n){n(242),n(77),n(245),n(246),t.exports=n(3).Symbol},function(t,e,n){"use strict";var i=n(5),o=n(24),r=n(16),a=n(4),s=n(103),l=n(85).KEY,u=n(23),c=n(74),h=n(43),d=n(54),f=n(6),p=n(84),g=n(86),m=n(243),v=n(123),y=n(15),b=n(10),w=n(30),_=n(71),x=n(41),S=n(52),E=n(244),C=n(125),T=n(9),M=n(42),P=C.f,L=T.f,A=E.f,k=i.Symbol,O=i.JSON,R=O&&O.stringify,D=f("_hidden"),j=f("toPrimitive"),z={}.propertyIsEnumerable,N=c("symbol-registry"),I=c("symbols"),F=c("op-symbols"),H=Object.prototype,G="function"==typeof k,V=i.QObject,B=!V||!V.prototype||!V.prototype.findChild,U=r&&u(function(){return 7!=S(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=P(H,e);i&&delete H[e],L(t,e,n),i&&t!==H&&L(H,e,i)}:L,W=function(t){var e=I[t]=S(k.prototype);return e._k=t,e},q=G&&"symbol"==typeof k.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof k},Y=function(t,e,n){return t===H&&Y(F,e,n),y(t),e=_(e,!0),y(n),o(I,e)?(n.enumerable?(o(t,D)&&t[D][e]&&(t[D][e]=!1),n=S(n,{enumerable:x(0,!1)})):(o(t,D)||L(t,D,x(1,{})),t[D][e]=!0),U(t,e,n)):L(t,e,n)},X=function(t,e){y(t);for(var n,i=m(e=w(e)),o=0,r=i.length;r>o;)Y(t,n=i[o++],e[n]);return t},Z=function(t){var e=z.call(this,t=_(t,!0));return!(this===H&&o(I,t)&&!o(F,t))&&(!(e||!o(this,t)||!o(I,t)||o(this,D)&&this[D][t])||e)},Q=function(t,e){if(t=w(t),e=_(e,!0),t!==H||!o(I,e)||o(F,e)){var n=P(t,e);return!n||!o(I,e)||o(t,D)&&t[D][e]||(n.enumerable=!0),n}},K=function(t){for(var e,n=A(w(t)),i=[],r=0;n.length>r;)o(I,e=n[r++])||e==D||e==l||i.push(e);return i},$=function(t){for(var e,n=t===H,i=A(n?F:w(t)),r=[],a=0;i.length>a;)!o(I,e=i[a++])||n&&!o(H,e)||r.push(I[e]);return r};G||(s((k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var t=d(arguments.length>0?arguments[0]:void 0),e=function(n){this===H&&e.call(F,n),o(this,D)&&o(this[D],t)&&(this[D][t]=!1),U(this,t,x(1,n))};return r&&B&&U(H,t,{configurable:!0,set:e}),W(t)}).prototype,"toString",function(){return this._k}),C.f=Q,T.f=Y,n(124).f=E.f=K,n(57).f=Z,n(87).f=$,r&&!n(39)&&s(H,"propertyIsEnumerable",Z,!0),p.f=function(t){return W(f(t))}),a(a.G+a.W+a.F*!G,{Symbol:k});for(var J="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;J.length>tt;)f(J[tt++]);for(var et=M(f.store),nt=0;et.length>nt;)g(et[nt++]);a(a.S+a.F*!G,"Symbol",{for:function(t){return o(N,t+="")?N[t]:N[t]=k(t)},keyFor:function(t){if(!q(t))throw TypeError(t+" is not a symbol!");for(var e in N)if(N[e]===t)return e},useSetter:function(){B=!0},useSimple:function(){B=!1}}),a(a.S+a.F*!G,"Object",{create:function(t,e){return void 0===e?S(t):X(S(t),e)},defineProperty:Y,defineProperties:X,getOwnPropertyDescriptor:Q,getOwnPropertyNames:K,getOwnPropertySymbols:$}),O&&a(a.S+a.F*(!G||u(function(){var t=k();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){for(var e,n,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=e=i[1],(b(e)||void 0!==t)&&!q(t))return v(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!q(e))return e}),i[1]=e,R.apply(O,i)}}),k.prototype[j]||n(20)(k.prototype,j,k.prototype.valueOf),h(k,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},function(t,e,n){var i=n(42),o=n(87),r=n(57);t.exports=function(t){var e=i(t),n=o.f;if(n)for(var a,s=n(t),l=r.f,u=0;s.length>u;)l.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){var i=n(30),o=n(124).f,r={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==r.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(i(t))}},function(t,e,n){n(86)("asyncIterator")},function(t,e,n){n(86)("observable")},function(t,e,n){t.exports={default:n(248),__esModule:!0}},function(t,e,n){n(249),t.exports=n(3).Object.setPrototypeOf},function(t,e,n){var i=n(4);i(i.S,"Object",{setPrototypeOf:n(250).set})},function(t,e,n){var i=n(10),o=n(15),r=function(t,e){if(o(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{(i=n(18)(Function.call,n(125).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return r(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void 0),check:r}},function(t,e,n){t.exports={default:n(252),__esModule:!0}},function(t,e,n){n(253);var i=n(3).Object;t.exports=function(t,e){return i.create(t,e)}},function(t,e,n){var i=n(4);i(i.S,"Object",{create:n(52)})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;var i=function(t){return t&&t.__esModule?t:{default:t}}(n(255));e.Container=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=h(n(12)),o=h(n(7)),r=h(n(8)),a=h(n(13)),s=h(n(14)),l=n(2),u=h(l),c=(n(21),n(17),n(11));function h(t){return t&&t.__esModule?t:{default:t}}var d={string:function(t){return t.toLowerCase()},number:function(t){return parseInt((t||"0").replace(/,/g,"").trim())}},f={string:function(t,e){return t[0].localeCompare(e[0])},number:function(t,e){return t[0]-e[0]}},p=[{field:"title",title:"Name",type:"string"},{field:"year",title:"Year",type:"number"},{field:"purpose",title:"Purpose",type:"string"}],g=function(t){function e(){(0,o.default)(this,e);var t=(0,a.default)(this,(e.__proto__||(0,i.default)(e)).call(this));t.state={sort:p[0],reversed:!1,displayField:"year"};var n=document.querySelector(".dataset-intro .dataset-list");return t.parent=n,t.els=(0,c.toArray)(n.children),t}return(0,s.default)(e,t),(0,r.default)(e,[{key:"sortBy",value:function(t){var e=this,n=this.state,i=n.sort,o=n.reversed,r=n.displayField;o=i===t?!o:!!t.reversed;var a=d[t.type],s=f[t.type],l=this.els.map(function(e){return[a(e.querySelector("."+t.field).innerText),e]}).sort(s);l=l.map(function(t){return t[1]}),o&&l.reverse(),"title"===t.field||(r=t.field),l.forEach(function(t){e.parent.removeChild(t),e.parent.appendChild(t);var n=t.querySelector(".visible");n&&n.classList.remove("visible"),t.querySelector("."+r).classList.add("visible")}),this.setState({sort:t,reversed:o,displayField:r})}},{key:"render",value:function(){var t=this;this.props.payload;return u.default.createElement("div",{className:"dataset-list"},u.default.createElement("ul",{className:"sort-options"},p.map(function(e){return u.default.createElement("li",{key:e.field,className:e.field===t.state.sort.field?"active":"",onClick:function(){return t.sortBy(e)}},e.title)})))}}]),e}(l.Component);e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileTable=e.CitationsTable=void 0,n(257),n(260),n(262);var i=r(n(264)),o=r(n(441));function r(t){return t&&t.__esModule?t:{default:t}}e.CitationsTable=i.default,e.FileTable=o.default},function(t,e,n){var i=n(258);"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(26)(i,o);i.locals&&(t.exports=i.locals)},function(t,e,n){(t.exports=n(25)(!1)).push([t.i,".multi-value-formatter-content span {\n padding: 2px 4px;\n border-radius: 2px;\n border: 1px solid lightgrey;\n margin-right: 4px;\n}\n\n/* --------- customized react-tags styles */\n.react-tags {\n padding: 0px 0 0 6px !important;\n border: none !important;\n}\n.react-tags__selected-tag:after {\n /* TODO: for now, don't show the delete icon \"X\" for react-tags */\n display: none !important;\n}\n.react-tags__selected-tag {\n padding: 2px 4px !important;\n}\n\n/* --------- default react-tags styles */\n.react-tags__search input {\n width: 100% !important;\n}\n\n.react-tags {\n position: relative;\n padding: 6px 0 0 6px;\n border: 1px solid #D1D1D1;\n border-radius: 1px;\n\n /* shared font styles */\n font-size: 1em;\n line-height: 1.2;\n\n /* clicking anywhere will focus the input */\n cursor: text;\n}\n\n.react-tags.is-focused {\n border-color: #B1B1B1;\n}\n\n.react-tags__selected {\n display: inline;\n}\n\n.react-tags__selected-tag {\n display: inline-block;\n box-sizing: border-box;\n margin: 0 6px 6px 0;\n padding: 6px 8px;\n border: 1px solid #D1D1D1;\n border-radius: 2px;\n background: #F1F1F1;\n\n /* match the font styles */\n font-size: inherit;\n line-height: inherit;\n}\n\n.react-tags__selected-tag:after {\n content: '\\2715';\n color: #AAA;\n margin-left: 8px;\n}\n\n.react-tags__selected-tag:hover,\n.react-tags__selected-tag:focus {\n border-color: #B1B1B1;\n}\n\n.react-tags__search {\n display: inline-block;\n\n /* match tag layout */\n padding: 7px 2px;\n margin-bottom: 6px;\n\n /* prevent autoresize overflowing the container */\n max-width: 100%;\n}\n\n@media screen and (min-width: 30em) {\n\n .react-tags__search {\n /* this will become the offsetParent for suggestions */\n position: relative;\n }\n\n}\n\n.react-tags__search input {\n /* prevent autoresize overflowing the container */\n max-width: 100%;\n\n /* remove styles and layout from this element */\n margin: 0;\n padding: 0;\n border: 0;\n outline: none;\n\n /* match the font styles */\n font-size: inherit;\n line-height: inherit;\n}\n\n.react-tags__search input::-ms-clear {\n display: none;\n}\n\n.react-tags__suggestions {\n position: absolute;\n top: 100%;\n left: 0;\n width: 100%;\n}\n\n@media screen and (min-width: 30em) {\n\n .react-tags__suggestions {\n width: 240px;\n }\n\n}\n\n.react-tags__suggestions ul {\n margin: 4px -1px;\n padding: 0;\n list-style: none;\n background: white;\n border: 1px solid #D1D1D1;\n border-radius: 2px;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);\n}\n\n.react-tags__suggestions li {\n border-bottom: 1px solid #ddd;\n padding: 6px 8px;\n}\n\n.react-tags__suggestions li mark {\n text-decoration: underline;\n background: none;\n font-weight: 600;\n}\n\n.react-tags__suggestions li:hover {\n cursor: pointer;\n background: #eee;\n}\n\n.react-tags__suggestions li.is-active {\n background: #b7cfe0;\n}\n\n.react-tags__suggestions li.is-disabled {\n opacity: 0.5;\n cursor: auto;\n}",""])},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,i=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var o,r=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?t:(o=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:i+r.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(t,e,n){var i=n(261);"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(26)(i,o);i.locals&&(t.exports=i.locals)},function(t,e,n){(t.exports=n(25)(!1)).push([t.i,'/* Tabulator v4.2.3 (c) Oliver Folkerd */\n.tabulator {\n position: relative;\n border: 1px solid #333;\n background-color: #222;\n overflow: hidden;\n font-size: 14px;\n text-align: left;\n -ms-transform: translatez(0);\n transform: translatez(0);\n}\n\n.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 1px solid #999;\n background-color: #333;\n color: #fff;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n border-right: 1px solid #aaa;\n background-color: #333;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #999;\n background: #1a1a1a;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 4px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #444;\n color: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n display: inline-block;\n position: absolute;\n top: 9px;\n right: 8px;\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #aaa;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.ui-sortable-helper {\n position: absolute;\n background-color: #1a1a1a !important;\n border: 1px solid #aaa;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input, .tabulator .tabulator-header .tabulator-col .tabulator-header-filter select {\n border: 1px solid #999;\n background: #444;\n color: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #1a1a1a;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -webkit-writing-mode: vertical-rl;\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow {\n right: calc(50% - 6px);\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #888;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #888;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n min-width: 400%;\n background: #1a1a1a !important;\n border-top: 1px solid #888;\n border-bottom: 1px solid #aaa;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: #1a1a1a !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 400%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #eee;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n background-color: #666;\n white-space: nowrap;\n overflow: visible;\n color: #fff;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: #373737 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #888;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #888;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 5px 10px;\n border-top: 1px solid #999;\n background-color: #333;\n text-align: right;\n color: #333;\n font-weight: bold;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -5px -10px 5px -10px;\n text-align: left;\n background: #262626 !important;\n border-bottom: 1px solid #888;\n border-top: 1px solid #888;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n background: #262626 !important;\n color: #fff;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -5px;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-paginator label {\n color: #fff;\n}\n\n.tabulator .tabulator-footer .tabulator-page-size {\n display: inline-block;\n margin: 0 5px;\n padding: 2px 5px;\n border: 1px solid #aaa;\n border-radius: 3px;\n}\n\n.tabulator .tabulator-footer .tabulator-pages {\n margin: 0 7px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0 2px;\n padding: 2px 5px;\n border: 1px solid #aaa;\n border-radius: 3px;\n background: rgba(255, 255, 255, 0.2);\n color: #333;\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n color: #fff;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n opacity: .5;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n color: #fff;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 22px;\n background-color: #666;\n}\n\n.tabulator-row:nth-child(even) {\n background-color: #444;\n}\n\n.tabulator-row.tabulator-selectable:hover {\n background-color: #999;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #000;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #888;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #888;\n border-bottom: 1px solid #888;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #888;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #888;\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid #888;\n border-bottom: 1px solid #888;\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 14px;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 4px;\n border-right: 1px solid #888;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #999;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #dd0000;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #dd0000;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #888;\n border-bottom: 2px solid #888;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #fff;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: "";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #fff;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #fff;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: "";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #fff;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #fff;\n color: #666;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-traffic-light {\n display: inline-block;\n height: 14px;\n width: 14px;\n border-radius: 14px;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #888;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #ccc;\n font-weight: bold;\n color: #333;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 {\n padding-left: 30px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 {\n padding-left: 50px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 {\n padding-left: 70px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 {\n padding-left: 90px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 {\n padding-left: 110px;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: #fff;\n border: 1px solid #888;\n font-size: 14px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n color: #666;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: #999;\n background: #444;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: #999;\n background: #666;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid #888;\n padding: 4px;\n padding-top: 6px;\n color: #fff;\n font-weight: bold;\n}\n',""])},function(t,e,n){var i=n(263);"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(26)(i,o);i.locals&&(t.exports=i.locals)},function(t,e,n){(t.exports=n(25)(!1)).push([t.i,".tabulator {\n border-left: 1px solid #333;\n border-bottom: 1px solid #333;\n}\n.tabulator-row.tabulator-row-odd {\n background-color: #222;\n}\n.tabulator-row.tabulator-row-even {\n background-color: #333;\n}\n.desktop .tabulator-row.tabulator-selectable.tabulator-row-even:hover {\n cursor: arrow;\n background-color: #333;\n}\n.desktop .tabulator-row.tabulator-selectable.tabulator-row-odd:hover {\n cursor: arrow;\n background-color: #222;\n}\n.tabulator-row .tabulator-cell {\n border-right: 1px solid #444;\n padding: 8px;\n}\n.tabulator .tabulator-header {\n border-bottom: 0;\n}\n.tabulator .tabulator-header .tabulator-col {\n border-right: 1px solid #444;\n}\n.tabulator .tabulator-tableHolder .tabulator-table {\n background-color: #333;\n}\n.multi-value-formatter-content span {\n border: 0;\n padding: 0 5px 0 0;\n}\n\n.citationBrowser {\n}\n.citationBrowser .q {\n max-width: 400px;\n margin-bottom: 10px;\n background-image: url(/assets/img/icon-search.png);\n background-position: 380px center;\n background-repeat: no-repeat;\n box-shadow: 0px 2px 4px rgba(0,0,0,0.2);\n border: 0;\n}\n\n.citationHeader {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n}\nspan.download {\n display: block;\n font-size: 13px;\n color: #ddd;\n cursor: pointer;\n background: #333;\n padding: 5px 8px;\n border-radius: 5px;\n transition: all 0.2s;\n}\n.desktop span.download:hover {\n color: #fff;\n background: #666;\n}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.citationsColumns=void 0;var i=y(n(126)),o=y(n(56)),r=y(n(268)),a=y(n(88)),s=y(n(12)),l=y(n(7)),u=y(n(8)),c=y(n(13)),h=y(n(14)),d=n(2),f=y(d),p=(n(21),n(17),n(89)),g=n(407),m=n(51),v=n(11);function y(t){return t&&t.__esModule?t:{default:t}}var b=e.citationsColumns=[{title:"Title",field:"title",sorter:"string"},{title:"Institution",field:"institution",sorter:"string"},{title:"Country",field:"country",sorter:"string",width:140},{title:"Year",field:"year",sorter:"number",width:70},{title:"PDF",field:"pdf_text",formatter:"link",formatterParams:{target:"_blank",urlField:"pdf_link"},sorter:"string",width:100}],w=function(t){function e(){var t,n,i,o;(0,l.default)(this,e);for(var r=arguments.length,a=Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=i=(0,c.default)(this,(t=e.__proto__||(0,s.default)(e)).call.apply(t,[this].concat(a))),i.state={q:"",formattedCitations:[],filteredCitations:[]},o=n,(0,c.default)(i,o)}return(0,h.default)(e,t),(0,u.default)(e,[{key:"componentDidMount",value:function(){this.updateCitations()}},{key:"componentDidUpdate",value:function(t){this.props.payload.data.citations!==t.payload.data.citations&&this.updateCitations()}},{key:"updateCitations",value:function(){var t=this.props.payload.data,e=(t.paper,t.citations);e.length||this.setState({formattedCitations:[]});var n=e.sort(function(t,e){return t.title.localeCompare(e.title)}).map(function(t){var e=t.pdf&&t.pdf.length?t.pdf[0]:t.doi&&t.doi.length?t.doi[0]:"https://www.semanticscholar.org/paper/"+t.id,n=(0,v.domainFromUrl)(e);return{title:t.title,institution:t.addresses.map(function(t){return t.name}).sort().join("; "),country:(0,a.default)(new r.default(t.addresses.map(function(t){return t.country}))).sort().join("; "),year:t.year,pdf_link:e,pdf_text:n}});this.setState({formattedCitations:n,filteredCitations:n})}},{key:"updateFilter",value:function(t){var e=this.state.formattedCitations;if(t.length){var n=new RegExp("("+t.replace(/\s+/g," ").trim().replace(" ","|")+")","gi"),i=e.filter(function(t){return t.title.match(n)||t.institution.match(n)||t.country.match(n)});this.setState({q:t,filteredCitations:i})}else this.setState({q:t,filteredCitations:e})}},{key:"download",value:function(){var t=this.state.formattedCitations,e=this.props.payload.data.paper.key+".csv",n=b.map(function(t){return t.title}),r=b.map(function(t){return t.formatterParams?t.formatterParams.urlField:t.field}),a=t.map(function(t){return r.map(function(e){return t[e]}).map(function(t){switch(void 0===t?"undefined":(0,o.default)(t)){case"number":return String(t);default:return'"'+String(t)+'"'}}).join(",")}),s=new Blob([[n.join(",")].concat((0,i.default)(a)).join("\n")],{type:"text/csv;charset=utf-8"});(0,g.saveAs)(s,e)}},{key:"render",value:function(){var t=this,e=this.state,n=e.formattedCitations,i=e.filteredCitations;return n.length?f.default.createElement("div",{className:"citationBrowser"},f.default.createElement("div",{className:"citationHeader"},f.default.createElement("input",{type:"text",value:this.state.q,onChange:function(e){return t.updateFilter(e.target.value)},className:"q",placeholder:"Enter text to search citations..."}),f.default.createElement("span",{className:"download",onClick:function(){return t.download()}},"Download CSV")),f.default.createElement(p.ReactTabulator,{columns:b,data:i,options:{height:Math.max(104,Math.min(37*n.length+29,311)),layout:"fitColumns",placeholder:n.length?"":"Nothing matches your query"}})):f.default.createElement(m.Loader,null)}}]),e}(d.Component);e.default=w},function(t,e,n){n(32),n(266),t.exports=n(3).Array.from},function(t,e,n){"use strict";var i=n(18),o=n(4),r=n(31),a=n(107),s=n(108),l=n(53),u=n(267),c=n(76);o(o.S+o.F*!n(114)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,h,d=r(t),f="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,m=void 0!==g,v=0,y=c(d);if(m&&(g=i(g,p>2?arguments[2]:void 0,2)),void 0==y||f==Array&&s(y))for(n=new f(e=l(d.length));e>v;v++)u(n,v,m?g(d[v],v):d[v]);else for(h=y.call(d),n=new f;!(o=h.next()).done;v++)u(n,v,m?a(h,g,[o.value,v],!0):o.value);return n.length=v,n}})},function(t,e,n){"use strict";var i=n(9),o=n(41);t.exports=function(t,e,n){e in t?i.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){t.exports={default:n(269),__esModule:!0}},function(t,e,n){n(77),n(32),n(37),n(270),n(276),n(279),n(281),t.exports=n(3).Set},function(t,e,n){"use strict";var i=n(271),o=n(127);t.exports=n(272)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return i.def(o(this,"Set"),t=0===t?0:t,t)}},i)},function(t,e,n){"use strict";var i=n(9).f,o=n(52),r=n(80),a=n(18),s=n(78),l=n(44),u=n(69),c=n(101),h=n(113),d=n(16),f=n(85).fastKey,p=n(127),g=d?"_s":"size",m=function(t,e){var n,i=f(e);if("F"!==i)return t._i[i];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,u){var c=t(function(t,i){s(t,c,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[g]=0,void 0!=i&&l(i,n,t[u],t)});return r(c.prototype,{clear:function(){for(var t=p(this,e),n=t._i,i=t._f;i;i=i.n)i.r=!0,i.p&&(i.p=i.p.n=void 0),delete n[i.i];t._f=t._l=void 0,t[g]=0},delete:function(t){var n=p(this,e),i=m(n,t);if(i){var o=i.n,r=i.p;delete n._i[i.i],i.r=!0,r&&(r.n=o),o&&(o.p=r),n._f==i&&(n._f=o),n._l==i&&(n._l=r),n[g]--}return!!i},forEach:function(t){p(this,e);for(var n,i=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(i(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!m(p(this,e),t)}}),d&&i(c.prototype,"size",{get:function(){return p(this,e)[g]}}),c},def:function(t,e,n){var i,o,r=m(t,e);return r?r.v=n:(t._l=r={i:o=f(e,!0),k:e,v:n,p:i=t._l,n:void 0,r:!1},t._f||(t._f=r),i&&(i.n=r),t[g]++,"F"!==o&&(t._i[o]=r)),t},getEntry:m,setStrong:function(t,e,n){u(t,e,function(t,n){this._t=p(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?c(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,c(1))},n?"entries":"values",!n,!0),h(e)}}},function(t,e,n){"use strict";var i=n(5),o=n(4),r=n(85),a=n(23),s=n(20),l=n(80),u=n(44),c=n(78),h=n(10),d=n(43),f=n(9).f,p=n(273)(0),g=n(16);t.exports=function(t,e,n,m,v,y){var b=i[t],w=b,_=v?"set":"add",x=w&&w.prototype,S={};return g&&"function"==typeof w&&(y||x.forEach&&!a(function(){(new w).entries().next()}))?(w=e(function(e,n){c(e,w,t,"_c"),e._c=new b,void 0!=n&&u(n,v,e[_],e)}),p("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(t){var e="add"==t||"set"==t;t in x&&(!y||"clear"!=t)&&s(w.prototype,t,function(n,i){if(c(this,w,t),!e&&y&&!h(n))return"get"==t&&void 0;var o=this._c[t](0===n?0:n,i);return e?this:o})}),y||f(w.prototype,"size",{get:function(){return this._c.size}})):(w=m.getConstructor(e,t,v,_),l(w.prototype,n),r.NEED=!0),d(w,t),S[t]=w,o(o.G+o.W+o.F,S),y||m.setStrong(w,t,v),w}},function(t,e,n){var i=n(18),o=n(67),r=n(31),a=n(53),s=n(274);t.exports=function(t,e){var n=1==t,l=2==t,u=3==t,c=4==t,h=6==t,d=5==t||h,f=e||s;return function(e,s,p){for(var g,m,v=r(e),y=o(v),b=i(s,p,3),w=a(y.length),_=0,x=n?f(e,w):l?f(e,0):void 0;w>_;_++)if((d||_ in y)&&(m=b(g=y[_],_,v),t))if(n)x[_]=m;else if(m)switch(t){case 3:return!0;case 5:return g;case 6:return _;case 2:x.push(g)}else if(c)return!1;return h?-1:u||c?c:x}}},function(t,e,n){var i=n(275);t.exports=function(t,e){return new(i(t))(e)}},function(t,e,n){var i=n(10),o=n(123),r=n(6)("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)||(e=void 0),i(e)&&null===(e=e[r])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){var i=n(4);i(i.P+i.R,"Set",{toJSON:n(277)("Set")})},function(t,e,n){var i=n(55),o=n(278);t.exports=function(t){return function(){if(i(this)!=t)throw TypeError(t+"#toJSON isn't generic");return o(this)}}},function(t,e,n){var i=n(44);t.exports=function(t,e){var n=[];return i(t,!1,n.push,n,e),n}},function(t,e,n){n(280)("Set")},function(t,e,n){"use strict";var i=n(4);t.exports=function(t){i(i.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){n(282)("Set")},function(t,e,n){"use strict";var i=n(4),o=n(40),r=n(18),a=n(44);t.exports=function(t){i(i.S,t,{from:function(t){var e,n,i,s,l=arguments[1];return o(this),(e=void 0!==l)&&o(l),void 0==t?new this:(n=[],e?(i=0,s=r(l,arguments[2],2),a(t,!1,function(t){n.push(s(t,i++))})):a(t,!1,n.push,n),new this(n))}})}},function(t,e,n){var i=function(t){return t.default||t}(n(284));t.exports={renderToString:i,renderToStaticMarkup:i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"render",function(){return g}),n.d(e,"renderToString",function(){return g}),n.d(e,"shallowRender",function(){return p});var i=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,o=Object.keys||function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e},r=function(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},a=function(t,e){return String(t).replace(/(\n+)/g,"$1"+(e||"\t"))},s=function(t,e,n){return String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},l={};function u(t){var e="";for(var n in t){var o=t[n];null!=o&&(e&&(e+=" "),e+=l[n]||(l[n]=n.replace(/([A-Z])/g,"-$1").toLowerCase()),e+=": ",e+=o,"number"==typeof o&&!1===i.test(n)&&(e+="px"),e+=";")}return e||void 0}function c(t,e){for(var n in e)t[n]=e[n];return t}var h={shallow:!0},d=[],f=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;g.render=g;var p=function(t,e){return g(t,e,h)};function g(t,e,n,i,l){if(null==t||"boolean"==typeof t)return"";var h=t.nodeName,p=t.attributes,m=!1;e=e||{};var v,y=(n=n||{}).pretty,b="string"==typeof y?y:"\t";if("object"!=typeof t&&!h)return r(t);if("function"==typeof h){if(m=!0,!n.shallow||!i&&!1!==n.renderRootComponent){var w,_=function(t){var e=c({},t.attributes);e.children=t.children;var n=t.nodeName.defaultProps;if(void 0!==n)for(var i in n)void 0===e[i]&&(e[i]=n[i]);return e}(t);if(h.prototype&&"function"==typeof h.prototype.render){var x=new h(_,e);x._disable=x.__x=!0,x.props=_,x.context=e,x.componentWillMount&&x.componentWillMount(),w=x.render(x.props,x.state,x.context),x.getChildContext&&(e=c(c({},e),x.getChildContext()))}else w=h(_,e);return g(w,e,n,!1!==n.shallowHighOrder)}h=(v=h).displayName||v!==Function&&v.name||function(t){var e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){for(var n=-1,i=d.length;i--;)if(d[i]===t){n=i;break}n<0&&(n=d.push(t)-1),e="UnnamedComponent"+n}return e}(v)}var S,E="";if(p){var C=o(p);n&&!0===n.sortAttributes&&C.sort();for(var T=0;T<C.length;T++){var M=C[T],P=p[M];if("children"!==M&&!M.match(/[\s\n\\/='"\0<>]/)&&(n&&n.allAttributes||"key"!==M&&"ref"!==M)){if("className"===M){if(p.class)continue;M="class"}else l&&M.match(/^xlink:?./)&&(M=M.toLowerCase().replace(/^xlink:?/,"xlink:"));"style"===M&&P&&"object"==typeof P&&(P=u(P));var L=n.attributeHook&&n.attributeHook(M,P,e,n,m);if(L||""===L)E+=L;else if("dangerouslySetInnerHTML"===M)S=P&&P.__html;else if((P||0===P||""===P)&&"function"!=typeof P){if(!(!0!==P&&""!==P||(P=M,n&&n.xml))){E+=" "+M;continue}E+=" "+M+'="'+r(P)+'"'}}}}var A=E.replace(/^\n\s*/," ");if(A===E||~A.indexOf("\n")?y&&~E.indexOf("\n")&&(E+="\n"):E=A,E="<"+h+E+">",String(h).match(/[\s\n\\/='"\0<>]/))throw E;var k=String(h).match(f);k&&(E=E.replace(/>$/," />"));var O=[];if(S)y&&s(S)&&(S="\n"+b+a(S,b)),E+=S;else if(t.children){for(var R=~E.indexOf("\n"),D=0;D<t.children.length;D++){var j=t.children[D];if(null!=j&&!1!==j){var z=g(j,e,n,!0,"svg"===h||"foreignObject"!==h&&l);!R&&y&&s(z)&&(R=!0),z&&O.push(z)}}if(y&&R)for(var N=O.length;N--;)O[N]="\n"+b+a(O[N],b)}if(O.length)E+=O.join("");else if(n&&n.xml)return E.substring(0,E.length-1)+" />";return k||(y&&~E.indexOf("\n")&&(E+="\n"),E+="</"+h+">"),E}g.shallowRender=p,e.default=g},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};e.__esModule=!0;var r=n(2),a=n(2),s=n(129),l=n(130),u=n(46),c=n(131),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={data:[]},e.ref=null,e.htmlProps=null,e.mainId="tabulator-"+ +new Date+"-"+Math.floor(9999999*Math.random()),e.table=null,e.pickValidHTMLProps=function(){e.htmlProps||(e.htmlProps=s.pickHTMLProps(e.props),delete e.htmlProps.data,delete e.htmlProps.columns)},e}return i(e,t),e.prototype.componentDidMount=function(){var t=a.findDOMNode(this.ref),e=this,n=this.props,i=n.columns,r=n.data,s=n.options,u=l.propsToOptions(this.props);new c(t,o({columns:i},u,{layout:"fitColumns",tableBuilding:function(){e.table=this,e.props.tableBuilding&&e.props.tableBuilding()},dataLoaded:function(){e.props.dataLoaded&&e.props.dataLoaded()}},s,{data:r})),r&&r.length>0&&this.setState({data:r})},e.prototype.componentWillUnmount=function(){this.table.destroy()},e.prototype.componentWillReceiveProps=function(t){var e=this;u.isSameArray(this.state.data,t.data)||this.setState({data:t.data},function(){e.table.setData(e.state.data)})},e.prototype.render=function(){var t=this;this.pickValidHTMLProps();var e=this.props.className;return r.createElement("div",o({ref:function(e){return t.ref=e},"data-instance":this.mainId},this.htmlProps,{className:e}))},e}(r.Component);e.default=h},function(t,e,n){"use strict";var i,o=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();e.__esModule=!0;var r=n(2),a=n(128),s=n(287),l=n(401),u=n(406);var c=[{title:"Name",field:"name",width:150},{title:"Age",field:"age",align:"left",formatter:"progress"},{title:"Favourite Color",field:"color"},{title:"Date Of Birth",field:"dob"},{title:"Rating",field:"rating",align:"center",formatter:"star"},{title:"Passed?",field:"passed",align:"center",formatter:"tickCross"},{title:"Custom",field:"custom",align:"center",formatter:n(46).reactFormatter(r.createElement(function(t){var e=t.cell._cell.row.data;return r.createElement("button",{onClick:function(){return alert(e.name)}},"Show")},null))}],h=[{id:1,name:"Oli Bob",age:"12",color:"red",dob:"01/01/1980",rating:5,passed:!0,pets:["cat","dog"]},{id:2,name:"Mary May",age:"1",color:"green",dob:"12/05/1989",rating:4,passed:!0,pets:["cat"]},{id:3,name:"Christine Lobowski",age:"42",color:"green",dob:"10/05/1985",rating:4,passed:!1},{id:4,name:"Brendon Philips",age:"125",color:"red",dob:"01/08/1980",rating:4.5,passed:!0},{id:5,name:"Margret Marmajuke",age:"16",color:"yellow",dob:"07/01/1999",rating:4,passed:!1},{id:6,name:"Van Ng",age:"37",color:"green",dob:"06/10/1982",rating:4,passed:!0,pets:["dog","fish"]},{id:7,name:"Duc Ng",age:"37",color:"yellow",dob:"10/10/1982",rating:4,passed:!0,pets:["dog"]}],d=((i={})[""]="&nbsp;",i.red="red",i.green="green",i.yellow="yellow",i),f=[{title:"Name",field:"name",width:150,editor:"input",headerFilter:"input"},{title:"Age",field:"age",align:"left",formatter:"progress",editor:"progress"},{title:"Favourite Color",field:"color",editor:"select",editorParams:{allowEmpty:!0,showListOnEmpty:!0,values:d},headerFilter:"select",headerFilterParams:{values:d}},{title:"Date Of Birth",field:"dob",editor:s.default,editorParams:{format:"MM/dd/yyyy"}},{title:"Pets",field:"pets",editor:l.default,editorParams:{values:[{id:"cat",name:"cat"},{id:"dog",name:"dog"},{id:"fish",name:"fish"}]},formatter:u.default,formatterParams:{style:"PILL"}},{title:"Passed?",field:"passed",align:"center",formatter:"tickCross",editor:!0}],p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={data:[]},e.ref=null,e.rowClick=function(t,n){console.log("ref table: ",e.ref.table),console.log("rowClick id: ${row.getData().id}",n,t)},e.setData=function(){e.setState({data:h})},e.clearData=function(){e.setState({data:[]})},e}return o(e,t),e.prototype.render=function(){var t=this;return r.createElement("div",null,r.createElement(a.default,{ref:function(e){return t.ref=e},columns:c,data:h,rowClick:this.rowClick,options:{height:150,movableRows:!0},"data-custom-attr":"test-custom-attribute",className:"custom-css-class"}),r.createElement("h3",null,"Asynchronous data: (e.g. fetch) - ",r.createElement("button",{onClick:this.setData},"Set Data")," ",r.createElement("button",{onClick:this.clearData},"Clear")),r.createElement(a.default,{columns:c,data:this.state.data}),r.createElement("h3",null,"Editable Table"),r.createElement(a.default,{columns:f,data:h,cellEdited:function(t){return console.log("cellEdited",t)},dataEdited:function(t){return console.log("dataEdited",t)},footerElement:r.createElement("span",null,"Footer")}),r.createElement("p",null,r.createElement("a",{href:"https://github.com/ngduc/react-tabulator",target:"_blank"},"Back to: Github Repo: react-tabulator")),r.createElement("p",null,r.createElement("a",{href:"http://tabulator.info/examples/4.0",target:"_blank"},"More Tabulator's Examples")))},e}(r.Component);e.default=p},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();e.__esModule=!0;var o=n(2),r=n(2),a=n(288),s={width:"100%",height:"100%",fontSize:"1em",fontFamily:"inherit"},l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={value:""},e.ref=null,e.format=e.props.editorParams.format||"MM/dd/yyyy",e.setValueOnSuccess=function(t){void 0===t&&(t=e.state.value);var n=e.props.success,i=t;i.indexOf("-")>0&&(i=a.format(t,e.format)),n(i)},e.onChange=function(t){var n=t.target.value;e.setState({value:n})},e.onKeyPress=function(t){var n=e.props.cancel;13===t.keyCode?e.setValueOnSuccess():27===t.keyCode&&n()},e.onBlur=function(){e.setValueOnSuccess()},e}return i(e,t),e.prototype.componentDidMount=function(){var t=this;this.props.onRendered(function(){var e=t.props.cell.getValue();t.setState({value:e}),t.ref.focus()})},e.prototype.render=function(){var t=this,e=this.props.cell,n=a.parse(e.getValue(),this.format,new Date,{awareOfUnicodeTokens:!0}),i=a.format(n,"yyyy-MM-dd");return o.createElement("input",{type:"date",ref:function(e){return t.ref=e},defaultValue:i,onBlur:this.onBlur,onChange:this.onChange,onKeyUp:this.onKeyPress,style:s})},e}(o.Component);e.default=function(t,e,n,i,a){var s=document.createElement("div");return s.style.height="100%",r.render(o.createElement(l,{cell:t,onRendered:e,success:n,cancel:i,editorParams:a}),s),s}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(47);n.d(e,"addDays",function(){return i.a});var o=n(132);n.d(e,"addHours",function(){return o.a});var r=n(133);n.d(e,"addISOWeekYears",function(){return r.a});var a=n(48);n.d(e,"addMilliseconds",function(){return a.a});var s=n(135);n.d(e,"addMinutes",function(){return s.a});var l=n(58);n.d(e,"addMonths",function(){return l.a});var u=n(136);n.d(e,"addQuarters",function(){return u.a});var c=n(137);n.d(e,"addSeconds",function(){return c.a});var h=n(59);n.d(e,"addWeeks",function(){return h.a});var d=n(138);n.d(e,"addYears",function(){return d.a});var f=n(289);n.d(e,"areIntervalsOverlapping",function(){return f.a});var p=n(290);n.d(e,"closestIndexTo",function(){return p.a});var g=n(291);n.d(e,"closestTo",function(){return g.a});var m=n(28);n.d(e,"compareAsc",function(){return m.a});var v=n(292);n.d(e,"compareDesc",function(){return v.a});var y=n(36);n.d(e,"differenceInCalendarDays",function(){return y.a});var b=n(139);n.d(e,"differenceInCalendarISOWeekYears",function(){return b.a});var w=n(293);n.d(e,"differenceInCalendarISOWeeks",function(){return w.a});var _=n(140);n.d(e,"differenceInCalendarMonths",function(){return _.a});var x=n(294);n.d(e,"differenceInCalendarQuarters",function(){return x.a});var S=n(142);n.d(e,"differenceInCalendarWeeks",function(){return S.a});var E=n(143);n.d(e,"differenceInCalendarYears",function(){return E.a});var C=n(144);n.d(e,"differenceInDays",function(){return C.a});var T=n(295);n.d(e,"differenceInHours",function(){return T.a});var M=n(296);n.d(e,"differenceInISOWeekYears",function(){return M.a});var P=n(60);n.d(e,"differenceInMilliseconds",function(){return P.a});var L=n(297);n.d(e,"differenceInMinutes",function(){return L.a});var A=n(92);n.d(e,"differenceInMonths",function(){return A.a});var k=n(298);n.d(e,"differenceInQuarters",function(){return k.a});var O=n(93);n.d(e,"differenceInSeconds",function(){return O.a});var R=n(299);n.d(e,"differenceInWeeks",function(){return R.a});var D=n(300);n.d(e,"differenceInYears",function(){return D.a});var j=n(146);n.d(e,"eachDayOfInterval",function(){return j.a});var z=n(301);n.d(e,"eachWeekOfInterval",function(){return z.a});var N=n(94);n.d(e,"eachWeekendOfInterval",function(){return N.a});var I=n(302);n.d(e,"eachWeekendOfMonth",function(){return I.a});var F=n(303);n.d(e,"eachWeekendOfYear",function(){return F.a});var H=n(150);n.d(e,"endOfDay",function(){return H.a});var G=n(304);n.d(e,"endOfDecade",function(){return G.a});var V=n(305);n.d(e,"endOfHour",function(){return V.a});var B=n(306);n.d(e,"endOfISOWeek",function(){return B.a});var U=n(307);n.d(e,"endOfISOWeekYear",function(){return U.a});var W=n(308);n.d(e,"endOfMinute",function(){return W.a});var q=n(95);n.d(e,"endOfMonth",function(){return q.a});var Y=n(309);n.d(e,"endOfQuarter",function(){return Y.a});var X=n(310);n.d(e,"endOfSecond",function(){return X.a});var Z=n(151);n.d(e,"endOfWeek",function(){return Z.a});var Q=n(149);n.d(e,"endOfYear",function(){return Q.a});var K=n(152);n.d(e,"format",function(){return K.a});var $=n(325);n.d(e,"formatDistance",function(){return $.a});var J=n(326);n.d(e,"formatDistanceStrict",function(){return J.a});var tt=n(327);n.d(e,"formatRelative",function(){return tt.a});var et=n(328);n.d(e,"fromUnixTime",function(){return et.a});var nt=n(158);n.d(e,"getDate",function(){return nt.a});var it=n(159);n.d(e,"getDay",function(){return it.a});var ot=n(329);n.d(e,"getDayOfYear",function(){return ot.a});var rt=n(91);n.d(e,"getDaysInMonth",function(){return rt.a});var at=n(330);n.d(e,"getDaysInYear",function(){return at.a});var st=n(331);n.d(e,"getDecade",function(){return st.a});var lt=n(332);n.d(e,"getHours",function(){return lt.a});var ut=n(161);n.d(e,"getISODay",function(){return ut.a});var ct=n(162);n.d(e,"getISOWeek",function(){return ct.a});var ht=n(34);n.d(e,"getISOWeekYear",function(){return ht.a});var dt=n(333);n.d(e,"getISOWeeksInYear",function(){return dt.a});var ft=n(334);n.d(e,"getMilliseconds",function(){return ft.a});var pt=n(335);n.d(e,"getMinutes",function(){return pt.a});var gt=n(336);n.d(e,"getMonth",function(){return gt.a});var mt=n(337);n.d(e,"getOverlappingDaysInIntervals",function(){return mt.a});var vt=n(141);n.d(e,"getQuarter",function(){return vt.a});var yt=n(338);n.d(e,"getSeconds",function(){return yt.a});var bt=n(163);n.d(e,"getTime",function(){return bt.a});var wt=n(339);n.d(e,"getUnixTime",function(){return wt.a});var _t=n(164);n.d(e,"getWeek",function(){return _t.a});var xt=n(340);n.d(e,"getWeekOfMonth",function(){return xt.a});var St=n(165);n.d(e,"getWeekYear",function(){return St.a});var Et=n(341);n.d(e,"getWeeksInMonth",function(){return Et.a});var Ct=n(342);n.d(e,"getYear",function(){return Ct.a});var Tt=n(343);n.d(e,"isAfter",function(){return Tt.a});var Mt=n(344);n.d(e,"isBefore",function(){return Mt.a});var Pt=n(345);n.d(e,"isDate",function(){return Pt.a});var Lt=n(346);n.d(e,"isEqual",function(){return Lt.a});var At=n(347);n.d(e,"isFirstDayOfMonth",function(){return At.a});var kt=n(348);n.d(e,"isFriday",function(){return kt.a});var Ot=n(349);n.d(e,"isLastDayOfMonth",function(){return Ot.a});var Rt=n(160);n.d(e,"isLeapYear",function(){return Rt.a});var Dt=n(350);n.d(e,"isMonday",function(){return Dt.a});var jt=n(351);n.d(e,"isSameDay",function(){return jt.a});var zt=n(352);n.d(e,"isSameHour",function(){return zt.a});var Nt=n(353);n.d(e,"isSameISOWeek",function(){return Nt.a});var It=n(354);n.d(e,"isSameISOWeekYear",function(){return It.a});var Ft=n(355);n.d(e,"isSameMinute",function(){return Ft.a});var Ht=n(356);n.d(e,"isSameMonth",function(){return Ht.a});var Gt=n(357);n.d(e,"isSameQuarter",function(){return Gt.a});var Vt=n(358);n.d(e,"isSameSecond",function(){return Vt.a});var Bt=n(168);n.d(e,"isSameWeek",function(){return Bt.a});var Ut=n(359);n.d(e,"isSameYear",function(){return Ut.a});var Wt=n(360);n.d(e,"isSaturday",function(){return Wt.a});var qt=n(147);n.d(e,"isSunday",function(){return qt.a});var Yt=n(361);n.d(e,"isThursday",function(){return Yt.a});var Xt=n(362);n.d(e,"isTuesday",function(){return Xt.a});var Zt=n(153);n.d(e,"isValid",function(){return Zt.a});var Qt=n(363);n.d(e,"isWednesday",function(){return Qt.a});var Kt=n(148);n.d(e,"isWeekend",function(){return Kt.a});var $t=n(364);n.d(e,"isWithinInterval",function(){return $t.a});var Jt=n(365);n.d(e,"lastDayOfDecade",function(){return Jt.a});var te=n(366);n.d(e,"lastDayOfISOWeek",function(){return te.a});var ee=n(367);n.d(e,"lastDayOfISOWeekYear",function(){return ee.a});var ne=n(166);n.d(e,"lastDayOfMonth",function(){return ne.a});var ie=n(368);n.d(e,"lastDayOfQuarter",function(){return ie.a});var oe=n(172);n.d(e,"lastDayOfWeek",function(){return oe.a});var re=n(369);n.d(e,"lastDayOfYear",function(){return re.a});var ae=n(370);n.d(e,"max",function(){return ae.a});var se=n(371);n.d(e,"min",function(){return se.a});var le=n(372);n.d(e,"parse",function(){return le.a});var ue=n(378);n.d(e,"roundToNearestMinutes",function(){return ue.a});var ce=n(379);n.d(e,"setDate",function(){return ce.a});var he=n(380);n.d(e,"setDay",function(){return he.a});var de=n(381);n.d(e,"setDayOfYear",function(){return de.a});var fe=n(382);n.d(e,"setHours",function(){return fe.a});var pe=n(383);n.d(e,"setISODay",function(){return pe.a});var ge=n(384);n.d(e,"setISOWeek",function(){return ge.a});var me=n(134);n.d(e,"setISOWeekYear",function(){return me.a});var ve=n(385);n.d(e,"setMilliseconds",function(){return ve.a});var ye=n(386);n.d(e,"setMinutes",function(){return ye.a});var be=n(173);n.d(e,"setMonth",function(){return be.a});var we=n(387);n.d(e,"setQuarter",function(){return we.a});var _e=n(388);n.d(e,"setSeconds",function(){return _e.a});var xe=n(389);n.d(e,"setWeek",function(){return xe.a});var Se=n(390);n.d(e,"setWeekYear",function(){return Se.a});var Ee=n(391);n.d(e,"setYear",function(){return Ee.a});var Ce=n(90);n.d(e,"startOfDay",function(){return Ce.a});var Te=n(392);n.d(e,"startOfDecade",function(){return Te.a});var Me=n(167);n.d(e,"startOfHour",function(){return Me.a});var Pe=n(27);n.d(e,"startOfISOWeek",function(){return Pe.a});var Le=n(49);n.d(e,"startOfISOWeekYear",function(){return Le.a});var Ae=n(169);n.d(e,"startOfMinute",function(){return Ae.a});var ke=n(61);n.d(e,"startOfMonth",function(){return ke.a});var Oe=n(170);n.d(e,"startOfQuarter",function(){return Oe.a});var Re=n(171);n.d(e,"startOfSecond",function(){return Re.a});var De=n(22);n.d(e,"startOfWeek",function(){return De.a});var je=n(98);n.d(e,"startOfWeekYear",function(){return je.a});var ze=n(96);n.d(e,"startOfYear",function(){return ze.a});var Ne=n(393);n.d(e,"subDays",function(){return Ne.a});var Ie=n(394);n.d(e,"subHours",function(){return Ie.a});var Fe=n(145);n.d(e,"subISOWeekYears",function(){return Fe.a});var He=n(64);n.d(e,"subMilliseconds",function(){return He.a});var Ge=n(395);n.d(e,"subMinutes",function(){return Ge.a});var Ve=n(396);n.d(e,"subMonths",function(){return Ve.a});var Be=n(397);n.d(e,"subQuarters",function(){return Be.a});var Ue=n(398);n.d(e,"subSeconds",function(){return Ue.a});var We=n(399);n.d(e,"subWeeks",function(){return We.a});var qe=n(400);n.d(e,"subYears",function(){return qe.a});var Ye=n(0);n.d(e,"toDate",function(){return Ye.a})},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=t||{},r=e||{},a=Object(i.a)(o.start,n).getTime(),s=Object(i.a)(o.end,n).getTime(),l=Object(i.a)(r.start,n).getTime(),u=Object(i.a)(r.end,n).getTime();if(!(a<=s&&l<=u))throw new RangeError("Invalid interval");return a<u&&l<s};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n);if(isNaN(o))return NaN;var r,a,s,l=o.getTime();r=null==e?[]:"function"==typeof e.forEach?e:Array.prototype.slice.call(e);return r.forEach(function(t,e){var o=Object(i.a)(t,n);if(isNaN(o))return a=NaN,void(s=NaN);var r=Math.abs(l-o.getTime());(null==a||r<s)&&(a=e,s=r)}),a};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n);if(isNaN(o))return new Date(NaN);var r,a,s,l=o.getTime();r=null==e?[]:"function"==typeof e.forEach?e:Array.prototype.slice.call(e);return r.forEach(function(t){var e=Object(i.a)(t,n);if(isNaN(e))return a=new Date(NaN),void(s=NaN);var o=Math.abs(l-e.getTime());(null==a||o<s)&&(a=e,s=o)}),a};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n),a=o.getTime()-r.getTime();return a>0?-1:a<0?1:a};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(o.a)(t,n),s=Object(o.a)(e,n),l=a.getTime()-Object(i.a)(a),u=s.getTime()-Object(i.a)(s);return Math.round((l-u)/r)};var i=n(19),o=n(27),r=6048e5},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(o.a)(t,n),a=Object(o.a)(e,n),s=r.getFullYear()-a.getFullYear(),l=Object(i.a)(r,n)-Object(i.a)(a,n);return 4*s+l};var i=n(141),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(t,e,n)/o;return r>0?Math.floor(r):Math.ceil(r)};var i=n(60),o=36e5},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var s=Object(i.a)(t,n),l=Object(i.a)(e,n),u=Object(r.a)(s,l,n),c=Math.abs(Object(o.a)(s,l,n));s=Object(a.a)(s,u*c,n);var h=Object(r.a)(s,l,n)===-u,d=u*(c-h);return 0===d?0:d};var i=n(0),o=n(139),r=n(28),a=n(145)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(t,e,n)/o;return r>0?Math.floor(r):Math.ceil(r)};var i=n(60),o=6e4},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,e,n)/3;return o>0?Math.floor(o):Math.ceil(o)};var i=n(92)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,e,n)/7;return o>0?Math.floor(o):Math.ceil(o)};var i=n(144)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(i.a)(t,n),s=Object(i.a)(e,n),l=Object(r.a)(a,s,n),u=Math.abs(Object(o.a)(a,s,n));a.setFullYear(a.getFullYear()-l*u);var c=Object(r.a)(a,s,n)===-l,h=l*(u-c);return 0===h?0:h};var i=n(0),o=n(143),r=n(28)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=t||{},a=Object(i.a)(n.start,e),s=Object(i.a)(n.end,e),l=s.getTime();if(!(a.getTime()<=l))throw new RangeError("Invalid interval");var u=Object(o.a)(a,e),c=Object(o.a)(s,e);u.setHours(15),c.setHours(15),l=c.getTime();var h=[],d=u;for(;d.getTime()<=l;)d.setHours(0),h.push(Object(i.a)(d,e)),(d=Object(r.a)(d,1)).setHours(15);return h};var i=n(0),o=n(22),r=n(59)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 arguments required, but only "+arguments.length+" present");var n=Object(o.a)(t,e),a=Object(r.a)(t,e);return Object(i.a)({start:n,end:a})};var i=n(94),o=n(61),r=n(95)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 arguments required, but only "+arguments.length+" present");var n=Object(o.a)(t,e),a=Object(r.a)(t,e);return Object(i.a)({start:n,end:a})};var i=n(94),o=n(96),r=n(149)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getFullYear(),r=9+10*Math.floor(o/10);return n.setFullYear(r,11,31),n.setHours(23,59,59,999),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return n.setMinutes(59,59,999),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(o.a)(e);return n.weekStartsOn=1,Object(i.a)(t,n)};var i=n(151),o=n(35)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),r=new Date(0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);var a=Object(o.a)(r,e);return a.setMilliseconds(a.getMilliseconds()-1),a};var i=n(34),o=n(27)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return n.setSeconds(59,999),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getMonth(),r=o-o%3+3;return n.setMonth(r,0),n.setHours(23,59,59,999),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return n.setMilliseconds(999),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){var o;n=n||{},o="string"==typeof i[t]?i[t]:1===e?i[t].one:i[t].other.replace("{{count}}",e);if(n.addSuffix)return n.comparison>0?"in "+o:o+" ago";return o};var i={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}}},function(t,e,n){"use strict";var i=n(313),o={date:Object(i.a)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Object(i.a)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Object(i.a)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};e.a=o},function(t,e,n){"use strict";e.a=function(t){return function(e){var n=e||{},i=n.width?String(n.width):t.defaultWidth,o=t.formats[i]||t.formats[t.defaultWidth];return o}}},function(t,e,n){"use strict";e.a=function(t,e,n,o){return i[t]};var i={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"}},function(t,e,n){"use strict";var i=n(316);var o={ordinalNumber:function(t,e){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Object(i.a)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Object(i.a)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:Object(i.a)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Object(i.a)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Object(i.a)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaulFormattingWidth:"wide"})};e.a=o},function(t,e,n){"use strict";e.a=function(t){return function(e,n){var i,o=n||{},r=o.width?String(o.width):t.defaultWidth,a=o.context?String(o.context):"standalone";i="formatting"===a&&t.formattingValues?t.formattingValues[r]||t.formattingValues[t.defaultFormattingWidth]:t.values[r]||t.values[t.defaultWidth];var s=t.argumentCallback?t.argumentCallback(e):e;return i[s]}}},function(t,e,n){"use strict";var i=n(318),o=n(319),r={ordinalNumber:Object(i.a)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:Object(o.a)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Object(o.a)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Object(o.a)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Object(o.a)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Object(o.a)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.a=r},function(t,e,n){"use strict";e.a=function(t){return function(e,n){var i=String(e),o=n||{},r=i.match(t.matchPattern);if(!r)return null;var a=r[0],s=i.match(t.parsePattern);if(!s)return null;var l=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:l=o.valueCallback?o.valueCallback(l):l,rest:i.slice(a.length)}}}},function(t,e,n){"use strict";e.a=function(t){return function(e,n){var i=String(e),o=n||{},r=o.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=i.match(a);if(!s)return null;var l,u=s[0],c=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth];return l="[object Array]"===Object.prototype.toString.call(c)?c.findIndex(function(t){return t.test(i)}):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,function(t){return t.test(i)}),l=t.valueCallback?t.valueCallback(l):l,{value:l=o.valueCallback?o.valueCallback(l):l,rest:i.slice(u.length)}}}},function(t,e,n){"use strict";var i=n(321),o=n(154),r=n(155),a=n(156),s=n(97),l="midnight",u="noon",c="morning",h="afternoon",d="evening",f="night",p={G:function(t,e,n){var i=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,e,n,i){var o=t.getUTCFullYear(),r=o>0?o:1-o;return"yy"===e?g(r%100,2):"yo"===e?n.ordinalNumber(r,{unit:"year"}):g(r,e.length)},Y:function(t,e,n,i){var o=Object(s.a)(t,i),r=o>0?o:1-o;return"YY"===e?g(r%100,2):"Yo"===e?n.ordinalNumber(r,{unit:"year"}):g(r,e.length)},R:function(t,e,n,i){return g(Object(r.a)(t,i),e.length)},u:function(t,e,n,i){return g(t.getUTCFullYear(),e.length)},Q:function(t,e,n,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return g(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,n,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return g(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,n,i){var o=t.getUTCMonth();switch(e){case"M":return String(o+1);case"MM":return g(o+1,2);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,n,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return g(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){var o=Object(a.a)(t,i);return"wo"===e?n.ordinalNumber(o,{unit:"week"}):g(o,e.length)},I:function(t,e,n,i){var r=Object(o.a)(t,i);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):g(r,e.length)},d:function(t,e,n,i){var o=t.getUTCDate();return"do"===e?n.ordinalNumber(o,{unit:"date"}):g(o,e.length)},D:function(t,e,n,o){var r=Object(i.a)(t,o);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):g(r,e.length)},E:function(t,e,n,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});case"EEEE":default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){var o=t.getUTCDay(),r=(o-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return g(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){var o=t.getUTCDay(),r=(o-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return g(r,e.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,n,i){var o=t.getUTCDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return g(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});case"iiii":default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,n){var i=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){var i,o=t.getUTCHours();switch(i=12===o?u:0===o?l:o/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){var i,o=t.getUTCHours();switch(i=o>=17?d:o>=12?h:o>=4?c:f,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n,i){var o=t.getUTCHours()%12;return 0===o&&(o=12),"ho"===e?n.ordinalNumber(o,{unit:"hour"}):g(o,e.length)},H:function(t,e,n,i){var o=t.getUTCHours();return"Ho"===e?n.ordinalNumber(o,{unit:"hour"}):g(o,e.length)},K:function(t,e,n,i){var o=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(o,{unit:"hour"}):g(o,e.length)},k:function(t,e,n,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?n.ordinalNumber(o,{unit:"hour"}):g(o,e.length)},m:function(t,e,n,i){var o=t.getUTCMinutes();return"mo"===e?n.ordinalNumber(o,{unit:"minute"}):g(o,e.length)},s:function(t,e,n,i){var o=t.getUTCSeconds();return"so"===e?n.ordinalNumber(o,{unit:"second"}):g(o,e.length)},S:function(t,e,n,i){var o=e.length,r=t.getUTCMilliseconds();return g(Math.floor(r*Math.pow(10,o-3)),o)},X:function(t,e,n,i){var o=(i._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return v(o);case"XXXX":case"XX":return m(o);case"XXXXX":case"XXX":default:return m(o,":")}},x:function(t,e,n,i){var o=(i._originalDate||t).getTimezoneOffset();switch(e){case"x":return v(o);case"xxxx":case"xx":return m(o);case"xxxxx":case"xxx":default:return m(o,":")}},O:function(t,e,n,i){var o=(i._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+y(o,":");case"OOOO":default:return"GMT"+m(o,":")}},z:function(t,e,n,i){var o=(i._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+y(o,":");case"zzzz":default:return"GMT"+m(o,":")}},t:function(t,e,n,i){var o=i._originalDate||t;return g(Math.floor(o.getTime()/1e3),e.length)},T:function(t,e,n,i){return g((i._originalDate||t).getTime(),e.length)}};function g(t,e){for(var n=t<0?"-":"",i=Math.abs(t).toString();i.length<e;)i="0"+i;return n+i}function m(t,e){var n=e||"",i=t>0?"-":"+",o=Math.abs(t);return i+g(Math.floor(o/60),2)+n+g(o%60,2)}function v(t,e){return t%60==0?(t>0?"-":"+")+g(Math.abs(t)/60,2):m(t,e)}function y(t,e){var n=t>0?"-":"+",i=Math.abs(t),o=Math.floor(i/60),r=i%60;if(0===r)return n+String(o);var a=e||"";return n+String(o)+a+g(r,2)}e.a=p},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),r=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var a=n.getTime(),s=r-a;return Math.floor(s/o)+1};var i=n(0),o=864e5},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),Object(o.a)(r,e)};var i=n(155),o=n(62)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},a=n.locale,s=a&&a.options&&a.options.firstWeekContainsDate,l=null==s?1:Object(i.a)(s),u=null==n.firstWeekContainsDate?l:Object(i.a)(n.firstWeekContainsDate),c=Object(o.a)(t,e),h=new Date(0);return h.setUTCFullYear(c,0,u),h.setUTCHours(0,0,0,0),Object(r.a)(h,e)};var i=n(1),o=n(97),r=n(63)},function(t,e,n){"use strict";function i(t,e,n){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function o(t,e,n){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var r={p:o,P:function(t,e,n){var r,a=t.match(/(P+)(p+)?/),s=a[1],l=a[2];if(!l)return i(t,e);switch(s){case"P":r=e.dateTime({width:"short"});break;case"PP":r=e.dateTime({width:"medium"});break;case"PPP":r=e.dateTime({width:"long"});break;case"PPPP":default:r=e.dateTime({width:"full"})}return r.replace("{{date}}",i(s,e)).replace("{{time}}",o(l,e))}};e.a=r},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var p=n||{},g=p.locale||u.a;if(!g.formatDistance)throw new RangeError("locale must contain formatDistance property");var m=Object(o.a)(t,e,p);if(isNaN(m))return"Invalid Date";var v,y,b=Object(l.a)(p);b.addSuffix=Boolean(p.addSuffix),b.comparison=m,m>0?(v=Object(r.a)(e,p),y=Object(r.a)(t,p)):(v=Object(r.a)(t,p),y=Object(r.a)(e,p));var w,_=Object(a.a)(y,v,p),x=(Object(i.a)(y)-Object(i.a)(v))/1e3,S=Math.round((_-x)/60);if(S<2)return p.includeSeconds?_<5?g.formatDistance("lessThanXSeconds",5,b):_<10?g.formatDistance("lessThanXSeconds",10,b):_<20?g.formatDistance("lessThanXSeconds",20,b):_<40?g.formatDistance("halfAMinute",null,b):_<60?g.formatDistance("lessThanXMinutes",1,b):g.formatDistance("xMinutes",1,b):0===S?g.formatDistance("lessThanXMinutes",1,b):g.formatDistance("xMinutes",S,b);if(S<45)return g.formatDistance("xMinutes",S,b);if(S<90)return g.formatDistance("aboutXHours",1,b);if(S<c){var E=Math.round(S/60);return g.formatDistance("aboutXHours",E,b)}if(S<h)return g.formatDistance("xDays",1,b);if(S<d){var C=Math.round(S/c);return g.formatDistance("xDays",C,b)}if(S<f)return w=Math.round(S/d),g.formatDistance("aboutXMonths",w,b);if((w=Object(s.a)(y,v,p))<12){var T=Math.round(S/d);return g.formatDistance("xMonths",T,b)}var M=w%12,P=Math.floor(w/12);return M<3?g.formatDistance("aboutXYears",P,b):M<9?g.formatDistance("overXYears",P,b):g.formatDistance("almostXYears",P+1,b)};var i=n(19),o=n(28),r=n(0),a=n(93),s=n(92),l=n(35),u=n(50),c=1440,h=2520,d=43200,f=86400},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var d=n||{},f=d.locale||l.a;if(!f.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var p=Object(o.a)(t,e,d);if(isNaN(p))return"Invalid Date";var g,m,v=Object(s.a)(d);v.addSuffix=Boolean(d.addSuffix),v.comparison=p,p>0?(g=Object(r.a)(e,d),m=Object(r.a)(t,d)):(g=Object(r.a)(t,d),m=Object(r.a)(e,d));var y,b=null==d.roundingMethod?"round":String(d.roundingMethod);if("floor"===b)y=Math.floor;else if("ceil"===b)y=Math.ceil;else{if("round"!==b)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");y=Math.round}var w,_=Object(a.a)(m,g,n),x=(Object(i.a)(m)-Object(i.a)(g))/1e3,S=y((_-x)/60);w=null==d.unit?S<1?"second":S<60?"minute":S<u?"hour":S<c?"day":S<h?"month":"year":String(d.unit);if("second"===w)return f.formatDistance("xSeconds",_,v);if("minute"===w)return f.formatDistance("xMinutes",S,v);if("hour"===w){var E=y(S/60);return f.formatDistance("xHours",E,v)}if("day"===w){var C=y(S/u);return f.formatDistance("xDays",C,v)}if("month"===w){var T=y(S/c);return f.formatDistance("xMonths",T,v)}if("year"===w){var M=y(S/h);return f.formatDistance("xYears",M,v)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")};var i=n(19),o=n(28),r=n(0),a=n(93),s=n(35),l=n(50),u=1440,c=43200,h=525600},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var u=Object(o.a)(t,n),c=Object(o.a)(e,n),h=n||{},d=h.locale||s.a;if(!d.localize)throw new RangeError("locale must contain localize property");if(!d.formatLong)throw new RangeError("locale must contain formatLong property");if(!d.formatRelative)throw new RangeError("locale must contain formatRelative property");var f,p=Object(a.a)(u,c,h);if(isNaN(p))return"Invalid Date";f=p<-6?"other":p<-1?"lastWeek":p<0?"yesterday":p<1?"today":p<2?"tomorrow":p<7?"nextWeek":"other";var g=Object(l.a)(u,Object(i.a)(u),h),m=Object(l.a)(c,Object(i.a)(c),h),v=d.formatRelative(f,g,m,h);return Object(r.a)(u,v,h)};var i=n(19),o=n(0),r=n(152),a=n(36),s=n(50),l=n(64)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(o.a)(t);return Object(i.a)(1e3*n,e)};var i=n(0),o=n(1)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return Object(r.a)(n,Object(o.a)(n,e),e)+1};var i=n(0),o=n(96),r=n(36)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);if(isNaN(n))return NaN;return Object(o.a)(n,e)?366:365};var i=n(0),o=n(160)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e).getFullYear();return 10*Math.floor(n/10)};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Object(i.a)(t,e).getHours()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),a=Object(i.a)(Object(o.a)(n,60,e),e).valueOf()-n.valueOf();return Math.round(a/r)};var i=n(49),o=n(59),r=6048e5},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Object(i.a)(t,e).getMilliseconds()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Object(i.a)(t,e).getMinutes()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Object(i.a)(t,e).getMonth()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=t||{},a=e||{},s=Object(i.a)(r.start,n).getTime(),l=Object(i.a)(r.end,n).getTime(),u=Object(i.a)(a.start,n).getTime(),c=Object(i.a)(a.end,n).getTime();if(!(s<=l&&u<=c))throw new RangeError("Invalid interval");if(!(s<c&&u<l))return 0;var h=(c>l?l:c)-(u<s?s:u);return Math.ceil(h/o)};var i=n(0),o=864e5},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Object(i.a)(t,e).getSeconds()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Math.floor(Object(i.a)(t,e)/1e3)};var i=n(163)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},s=n.locale,l=s&&s.options&&s.options.weekStartsOn,u=null==l?0:Object(i.a)(l),c=null==n.weekStartsOn?u:Object(i.a)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Object(a.a)(Object(r.a)(t,e),e),d=Object(a.a)(t,e),f=(h<c?7-c:h)>d?7-c:0;return Math.ceil((Object(o.a)(t,e)+f)/7)};var i=n(1),o=n(158),r=n(61),a=n(159)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Object(i.a)(Object(o.a)(t,e),Object(r.a)(t,e),e)+1};var i=n(142),o=n(166),r=n(61)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Object(i.a)(t,e).getFullYear()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getTime()>r.getTime()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getTime()<r.getTime()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getTime()===r.getTime()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 1===Object(i.a)(t,e).getDate()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 5===Object(i.a)(t,e).getDay()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e);return Object(o.a)(n,e).getTime()===Object(r.a)(n,e).getTime()};var i=n(0),o=n(150),r=n(95)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 1===Object(i.a)(t,e).getDay()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getTime()===r.getTime()};var i=n(90)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getTime()===r.getTime()};var i=n(167)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(o.a)(n);return r.weekStartsOn=1,Object(i.a)(t,e,r)};var i=n(168),o=n(35)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getTime()===r.getTime()};var i=n(49)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getTime()===r.getTime()};var i=n(169)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getTime()===r.getTime()};var i=n(170)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getTime()===r.getTime()};var i=n(171)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=Object(i.a)(t,n),r=Object(i.a)(e,n);return o.getFullYear()===r.getFullYear()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 6===Object(i.a)(t,e).getDay()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 4===Object(i.a)(t,e).getDay()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 2===Object(i.a)(t,e).getDay()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 3===Object(i.a)(t,e).getDay()};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=e||{},r=Object(i.a)(t,n).getTime(),a=Object(i.a)(o.start,n).getTime(),s=Object(i.a)(o.end,n).getTime();if(!(a<=s))throw new RangeError("Invalid interval");return r>=a&&r<=s};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getFullYear(),r=9+10*Math.floor(o/10);return n.setFullYear(r+1,0,0),n.setHours(0,0,0,0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(o.a)(e);return n.weekStartsOn=1,Object(i.a)(t,n)};var i=n(172),o=n(35)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),r=new Date(0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);var a=Object(o.a)(r,e);return a.setDate(a.getDate()-1),a};var i=n(34),o=n(27)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getMonth(),r=o-o%3+3;return n.setMonth(r,0),n.setHours(0,0,0,0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getFullYear();return n.setFullYear(o+1,0,0),n.setHours(0,0,0,0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n,o;n=null==t?[]:"function"==typeof t.forEach?t:Array.prototype.slice.call(t);return n.forEach(function(t){var n=Object(i.a)(t,e);(void 0===o||o<n||isNaN(n))&&(o=n)}),o};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n,o;n=null==t?[]:"function"==typeof t.forEach?t:Array.prototype.slice.call(t);return n.forEach(function(t){var n=Object(i.a)(t,e);(void 0===o||o>n||isNaN(n))&&(o=n)}),o};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n,d){if(arguments.length<3)throw new TypeError("3 arguments required, but only "+arguments.length+" present");var f=String(t),v=String(e),y=d||{},b=y.locale||s.a;if(!b.match)throw new RangeError("locale must contain match property");var w=b.options&&b.options.firstWeekContainsDate,_=null==w?1:Object(i.a)(w),x=null==y.firstWeekContainsDate?_:Object(i.a)(y.firstWeekContainsDate);if(!(x>=1&&x<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=b.options&&b.options.weekStartsOn,E=null==S?0:Object(i.a)(S),C=null==y.weekStartsOn?E:Object(i.a)(y.weekStartsOn);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===v)return""===f?Object(r.a)(n,y):new Date(NaN);var T,M={firstWeekContainsDate:x,weekStartsOn:C,locale:b},P=[{priority:c,set:g,index:0}],L=v.match(h);for(T=0;T<L.length;T++){var A=L[T];!y.awareOfUnicodeTokens&&Object(u.a)(A)&&Object(u.b)(A);var k=A[0],O=l.a[k];if(O){var R=O.parse(f,A,b.match,M);if(!R)return new Date(NaN);P.push({priority:O.priority,set:O.set,validate:O.validate,value:R.value,index:P.length}),f=R.rest}else{if("''"===A?A="'":"'"===k&&(A=m(A)),0!==f.indexOf(A))return new Date(NaN);f=f.slice(A.length)}}if(f.length>0&&p.test(f))return new Date(NaN);var D=P.map(function(t){return t.priority}).sort(function(t,e){return e-t}).filter(function(t,e,n){return n.indexOf(t)===e}).map(function(t){return P.filter(function(e){return e.priority===t}).reverse()}).map(function(t){return t[0]}),j=Object(r.a)(n,y);if(isNaN(j))return new Date(NaN);var z=Object(a.a)(j,Object(o.a)(j));for(T=0;T<D.length;T++){var N=D[T];if(N.validate&&!N.validate(z,N.value,M))return new Date(NaN);z=N.set(z,N.value,M)}return z};var i=n(1),o=n(19),r=n(0),a=n(64),s=n(50),l=n(373),u=n(157),c=20,h=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,d=/^'(.*?)'?$/,f=/''/g,p=/\S/;function g(t){var e=new Date(0);return e.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),e.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),e}function m(t){return t.match(d)[1].replace(f,"'")}},function(t,e,n){"use strict";var i=n(97),o=n(374),r=n(375),a=n(63),s=n(376),l=n(377),u=n(62),c=36e5,h=6e4,d=1e3,f={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},p=/^([+-])(\d{2})(\d{2})?|Z/,g=/^([+-])(\d{2})(\d{2})|Z/,m=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,v=/^([+-])(\d{2}):(\d{2})|Z/,y=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function b(t,e,n){var i=e.match(t);if(!i)return null;var o=parseInt(i[0],10);return{value:n?n(o):o,rest:e.slice(i[0].length)}}function w(t,e){var n=e.match(t);if(!n)return null;if("Z"===n[0])return{value:0,rest:e.slice(1)};var i="+"===n[1]?1:-1,o=n[2]?parseInt(n[2],10):0,r=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:i*(o*c+r*h+a*d),rest:e.slice(n[0].length)}}function _(t,e){return b(f.anyDigitsSigned,t,e)}function x(t,e,n){switch(t){case 1:return b(f.singleDigit,e,n);case 2:return b(f.twoDigits,e,n);case 3:return b(f.threeDigits,e,n);case 4:return b(f.fourDigits,e,n);default:return b(new RegExp("^\\d{1,"+t+"}"),e,n)}}function S(t,e,n){switch(t){case 1:return b(f.singleDigitSigned,e,n);case 2:return b(f.twoDigitsSigned,e,n);case 3:return b(f.threeDigitsSigned,e,n);case 4:return b(f.fourDigitsSigned,e,n);default:return b(new RegExp("^-?\\d{1,"+t+"}"),e,n)}}function E(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function C(t,e){var n,i=e>0,o=i?e:1-e;if(o<=50)n=t||100;else{var r=o+50;n=t+100*Math.floor(r/100)-(t>=r%100?100:0)}return i?n:1-n}var T=[31,28,31,30,31,30,31,31,30,31,30,31],M=[31,29,31,30,31,30,31,31,30,31,30,31];function P(t){return t%400==0||t%4==0&&t%100!=0}var L={G:{priority:140,parse:function(t,e,n,i){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});case"GGGG":default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}},set:function(t,e,n){return t.setUTCFullYear(1===e?10:-9,0,1),t.setUTCHours(0,0,0,0),t}},y:{priority:130,parse:function(t,e,n,i){var o=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return x(4,t,o);case"yo":return n.ordinalNumber(t,{unit:"year",valueCallback:o});default:return x(e.length,t,o)}},validate:function(t,e,n){return e.isTwoDigitYear||e.year>0},set:function(t,e,n){var o=Object(i.a)(t,n);if(e.isTwoDigitYear){var r=C(e.year,o);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}var a=o>0?e.year:1-e.year;return t.setUTCFullYear(a,0,1),t.setUTCHours(0,0,0,0),t}},Y:{priority:130,parse:function(t,e,n,i){var o=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return x(4,t,o);case"Yo":return n.ordinalNumber(t,{unit:"year",valueCallback:o});default:return x(e.length,t,o)}},validate:function(t,e,n){return e.isTwoDigitYear||e.year>0},set:function(t,e,n){var i=t.getUTCFullYear();if(e.isTwoDigitYear){var o=C(e.year,i);return t.setUTCFullYear(o,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Object(a.a)(t,n)}var r=i>0?e.year:1-e.year;return t.setUTCFullYear(r,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Object(a.a)(t,n)}},R:{priority:130,parse:function(t,e,n,i){return S("R"===e?4:e.length,t)},set:function(t,e,n){var i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Object(u.a)(i)}},u:{priority:130,parse:function(t,e,n,i){return S("u"===e?4:e.length,t)},set:function(t,e,n){return t.setUTCFullYear(e,0,1),t.setUTCHours(0,0,0,0),t}},Q:{priority:120,parse:function(t,e,n,i){switch(e){case"Q":case"QQ":return x(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=1&&e<=4},set:function(t,e,n){return t.setUTCMonth(3*(e-1),1),t.setUTCHours(0,0,0,0),t}},q:{priority:120,parse:function(t,e,n,i){switch(e){case"q":case"qq":return x(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=1&&e<=4},set:function(t,e,n){return t.setUTCMonth(3*(e-1),1),t.setUTCHours(0,0,0,0),t}},M:{priority:110,parse:function(t,e,n,i){var o=function(t){return t-1};switch(e){case"M":return b(f.month,t,o);case"MM":return x(2,t,o);case"Mo":return n.ordinalNumber(t,{unit:"month",valueCallback:o});case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n){return t.setUTCMonth(e,1),t.setUTCHours(0,0,0,0),t}},L:{priority:110,parse:function(t,e,n,i){var o=function(t){return t-1};switch(e){case"L":return b(f.month,t,o);case"LL":return x(2,t,o);case"Lo":return n.ordinalNumber(t,{unit:"month",valueCallback:o});case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n){return t.setUTCMonth(e,1),t.setUTCHours(0,0,0,0),t}},w:{priority:100,parse:function(t,e,n,i){switch(e){case"w":return b(f.week,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return x(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=53},set:function(t,e,n){return Object(a.a)(Object(r.a)(t,e,n),n)}},I:{priority:100,parse:function(t,e,n,i){switch(e){case"I":return b(f.week,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return x(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=53},set:function(t,e,n){return Object(u.a)(Object(l.a)(t,e,n),n)}},d:{priority:90,parse:function(t,e,n,i){switch(e){case"d":return b(f.date,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return x(e.length,t)}},validate:function(t,e,n){var i=P(t.getUTCFullYear()),o=t.getUTCMonth();return i?e>=1&&e<=M[o]:e>=1&&e<=T[o]},set:function(t,e,n){return t.setUTCDate(e),t.setUTCHours(0,0,0,0),t}},D:{priority:90,parse:function(t,e,n,i){switch(e){case"D":case"DD":return b(f.dayOfYear,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return x(e.length,t)}},validate:function(t,e,n){return P(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365},set:function(t,e,n){return t.setUTCMonth(0,e),t.setUTCHours(0,0,0,0),t}},E:{priority:90,parse:function(t,e,n,i){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n){return(t=Object(o.a)(t,e,n)).setUTCHours(0,0,0,0),t}},e:{priority:90,parse:function(t,e,n,i){var o=function(t){var e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return x(e.length,t,o);case"eo":return n.ordinalNumber(t,{unit:"day",valueCallback:o});case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n){return(t=Object(o.a)(t,e,n)).setUTCHours(0,0,0,0),t}},c:{priority:90,parse:function(t,e,n,i){var o=function(t){var e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return x(e.length,t,o);case"co":return n.ordinalNumber(t,{unit:"day",valueCallback:o});case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n){return(t=Object(o.a)(t,e,n)).setUTCHours(0,0,0,0),t}},i:{priority:90,parse:function(t,e,n,i){var o=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return x(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return n.day(t,{width:"abbreviated",context:"formatting",valueCallback:o})||n.day(t,{width:"short",context:"formatting",valueCallback:o})||n.day(t,{width:"narrow",context:"formatting",valueCallback:o});case"iiiii":return n.day(t,{width:"narrow",context:"formatting",valueCallback:o});case"iiiiii":return n.day(t,{width:"short",context:"formatting",valueCallback:o})||n.day(t,{width:"narrow",context:"formatting",valueCallback:o});case"iiii":default:return n.day(t,{width:"wide",context:"formatting",valueCallback:o})||n.day(t,{width:"abbreviated",context:"formatting",valueCallback:o})||n.day(t,{width:"short",context:"formatting",valueCallback:o})||n.day(t,{width:"narrow",context:"formatting",valueCallback:o})}},validate:function(t,e,n){return e>=1&&e<=7},set:function(t,e,n){return(t=Object(s.a)(t,e,n)).setUTCHours(0,0,0,0),t}},a:{priority:80,parse:function(t,e,n,i){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n){return t.setUTCHours(E(e),0,0,0),t}},b:{priority:80,parse:function(t,e,n,i){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n){return t.setUTCHours(E(e),0,0,0),t}},B:{priority:80,parse:function(t,e,n,i){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n){return t.setUTCHours(E(e),0,0,0),t}},h:{priority:70,parse:function(t,e,n,i){switch(e){case"h":return b(f.hour12h,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return x(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=12},set:function(t,e,n){var i=t.getUTCHours()>=12;return i&&e<12?t.setUTCHours(e+12,0,0,0):i||12!==e?t.setUTCHours(e,0,0,0):t.setUTCHours(0,0,0,0),t}},H:{priority:70,parse:function(t,e,n,i){switch(e){case"H":return b(f.hour23h,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return x(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=23},set:function(t,e,n){return t.setUTCHours(e,0,0,0),t}},K:{priority:70,parse:function(t,e,n,i){switch(e){case"K":return b(f.hour11h,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return x(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n){return t.getUTCHours()>=12&&e<12?t.setUTCHours(e+12,0,0,0):t.setUTCHours(e,0,0,0),t}},k:{priority:70,parse:function(t,e,n,i){switch(e){case"k":return b(f.hour24h,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return x(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=24},set:function(t,e,n){var i=e<=24?e%24:e;return t.setUTCHours(i,0,0,0),t}},m:{priority:60,parse:function(t,e,n,i){switch(e){case"m":return b(f.minute,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return x(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=59},set:function(t,e,n){return t.setUTCMinutes(e,0,0),t}},s:{priority:50,parse:function(t,e,n,i){switch(e){case"s":return b(f.second,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return x(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=59},set:function(t,e,n){return t.setUTCSeconds(e,0),t}},S:{priority:40,parse:function(t,e,n,i){return x(e.length,t,function(t){return Math.floor(t*Math.pow(10,3-e.length))})},set:function(t,e,n){return t.setUTCMilliseconds(e),t}},X:{priority:20,parse:function(t,e,n,i){switch(e){case"X":return w(p,t);case"XX":return w(g,t);case"XXXX":return w(m,t);case"XXXXX":return w(y,t);case"XXX":default:return w(v,t)}},set:function(t,e,n){return new Date(t.getTime()-e)}},x:{priority:20,parse:function(t,e,n,i){switch(e){case"x":return w(p,t);case"xx":return w(g,t);case"xxxx":return w(m,t);case"xxxxx":return w(y,t);case"xxx":default:return w(v,t)}},set:function(t,e,n){return new Date(t.getTime()-e)}},t:{priority:10,parse:function(t,e,n,i){return _(t)},set:function(t,e,n){return new Date(1e3*e)}},T:{priority:10,parse:function(t,e,n,i){return _(t)},set:function(t,e,n){return new Date(e)}}};e.a=L},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=n||{},a=r.locale,s=a&&a.options&&a.options.weekStartsOn,l=null==s?0:Object(i.a)(s),u=null==r.weekStartsOn?l:Object(i.a)(r.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=Object(o.a)(t,n),h=Object(i.a)(e),d=c.getUTCDay(),f=((h%7+7)%7<u?7:0)+h-d;return c.setUTCDate(c.getUTCDate()+f),c};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(o.a)(t,n),s=Object(i.a)(e),l=Object(r.a)(a,n)-s;return a.setUTCDate(a.getUTCDate()-7*l),a};var i=n(1),o=n(0),r=n(156)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);r%7==0&&(r-=7);var a=Object(o.a)(t,n),s=a.getUTCDay(),l=((r%7+7)%7<1?7:0)+r-s;return a.setUTCDate(a.getUTCDate()+l),a};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(o.a)(t,n),s=Object(i.a)(e),l=Object(r.a)(a,n)-s;return a.setUTCDate(a.getUTCDate()-7*l),a};var i=n(1),o=n(0),r=n(154)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<1)throw new TypeError("1 argument required, but only none provided present");var r=1===arguments.length?1:Object(o.a)(e);2===arguments.length&&"number"!=typeof e&&"string"!=typeof e&&(n=e,r=1);if(!r||r>30||r<1)throw new RangeError("nearestTo must be between 1 and 30");var a=Object(i.a)(t,n),s=a.getSeconds(),l=a.getMinutes()+s/60,u=Math.floor(l/r)*r,c=l%r,h=Math.round(c/r)*r;return new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),u+h)};var i=n(0),o=n(1)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(o.a)(t,n),a=Object(i.a)(e);return r.setDate(a),r};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=n||{},s=a.locale,l=s&&s.options&&s.options.weekStartsOn,u=null==l?0:Object(i.a)(l),c=null==a.weekStartsOn?u:Object(i.a)(a.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Object(o.a)(t,a),d=Object(i.a)(e),f=h.getDay(),p=((d%7+7)%7<c?7:0)+d-f;return Object(r.a)(h,p,a)};var i=n(1),o=n(0),r=n(47)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(o.a)(t,n),a=Object(i.a)(e);return r.setMonth(0),r.setDate(a),r};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(o.a)(t,n),a=Object(i.a)(e);return r.setHours(a),r};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var s=Object(o.a)(t,n),l=Object(i.a)(e),u=Object(a.a)(s,n),c=l-u;return Object(r.a)(s,c,n)};var i=n(1),o=n(0),r=n(47),a=n(161)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(o.a)(t,n),s=Object(i.a)(e),l=Object(r.a)(a,n)-s;return a.setDate(a.getDate()-7*l),a};var i=n(1),o=n(0),r=n(162)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(o.a)(t,n),a=Object(i.a)(e);return r.setMilliseconds(a),r};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(o.a)(t,n),a=Object(i.a)(e);return r.setMinutes(a),r};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(o.a)(t,n),s=Object(i.a)(e),l=Math.floor(a.getMonth()/3)+1,u=s-l;return Object(r.a)(a,a.getMonth()+3*u,n)};var i=n(1),o=n(0),r=n(173)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(o.a)(t,n),a=Object(i.a)(e);return r.setSeconds(a),r};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=Object(o.a)(t,n),s=Object(i.a)(e),l=Object(r.a)(a,n)-s;return a.setDate(a.getDate()-7*l),a};var i=n(1),o=n(0),r=n(164)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var s=n||{},l=s.locale,u=l&&l.options&&l.options.firstWeekContainsDate,c=null==u?1:Object(i.a)(u),h=null==s.firstWeekContainsDate?c:Object(i.a)(s.firstWeekContainsDate),d=Object(o.a)(t,n),f=Object(i.a)(e),p=Object(a.a)(d,Object(r.a)(d,n),n),g=new Date(0);return g.setFullYear(f,0,h),g.setHours(0,0,0,0),(d=Object(r.a)(g,n)).setDate(d.getDate()+p),d};var i=n(1),o=n(0),r=n(98),a=n(36)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(o.a)(t,n),a=Object(i.a)(e);if(isNaN(r))return new Date(NaN);return r.setFullYear(a),r};var i=n(1),o=n(0)},function(t,e,n){"use strict";e.a=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object(i.a)(t,e),o=n.getFullYear(),r=10*Math.floor(o/10);return n.setFullYear(r,0,1),n.setHours(0,0,0,0),n};var i=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,-r,n)};var i=n(1),o=n(47)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,-r,n)};var i=n(1),o=n(132)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,-r,n)};var i=n(1),o=n(135)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,-r,n)};var i=n(1),o=n(58)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,-r,n)};var i=n(1),o=n(136)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,-r,n)};var i=n(1),o=n(137)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,-r,n)};var i=n(1),o=n(59)},function(t,e,n){"use strict";e.a=function(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.a)(e);return Object(o.a)(t,-r,n)};var i=n(1),o=n(138)},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();e.__esModule=!0;var o=n(2),r=n(2),a=n(46),s=n(402),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={value:"",values:[],autofocus:!1},e.ref=null,e.setValueOnSuccess=function(t){void 0===t&&(t=e.state.values);var n=e.props,i=n.success;n.cancel;i(t)},e.handleDelete=function(t){var n=e.state.values.filter(function(e,n){return n!==t});e.setState({values:n},function(){e.setValueOnSuccess(n)})},e.handleAddition=function(t){var n=e.state.values;t.name&&(n.push({id:t.name,name:t.name}),e.setState({values:n},function(){e.setValueOnSuccess(n)}))},e.handleBlur=function(){var t=e.props.cancel,n=e.ref.input.input.value;if(n){var i=a.clone(e.state.values);i.push({id:n,name:n}),e.setValueOnSuccess(i)}else t();var o=r.findDOMNode(e.ref);o&&o.parentElement.parentElement.parentElement&&(o.parentElement.parentElement.parentElement.style.overflow="hidden")},e}return i(e,t),e.prototype.componentDidMount=function(){var t=this;this.props.onRendered(function(){var e=r.findDOMNode(t.ref);e.style.zIndex=1,e.parentElement.parentElement.parentElement.style.overflow="inherit",e.querySelector("input").focus();var n=(t.props.cell.getValue()||[]).map(function(t){return"string"==typeof t?{id:t,name:t}:t});t.setState({values:n})})},e.prototype.render=function(){var t=this,e=this.props.editorParams,n=this.state.values,i=e.values;return o.createElement("div",null,o.createElement(s,{ref:function(e){return t.ref=e},placeholder:"Select or Type",tags:n,suggestions:i,allowNew:!0,autoresize:!0,autofocus:this.state.autofocus,handleAddition:this.handleAddition,handleDelete:this.handleDelete,handleBlur:this.handleBlur,minQueryLength:0}))},e}(o.Component);e.default=function(t,e,n,i,a){var s=document.createElement("div");return s.style.height="100%",r.render(o.createElement(l,{cell:t,onRendered:e,success:n,cancel:i,editorParams:a}),s),s}},function(t,e,n){"use strict";var i=n(2),o=n(33),r=n(403),a=n(404),s=n(405),l=13,u=9,c=8,h=38,d=40,f={root:"react-tags",rootFocused:"is-focused",selected:"react-tags__selected",selectedTag:"react-tags__selected-tag",selectedTagName:"react-tags__selected-tag-name",search:"react-tags__search",searchInput:"react-tags__search-input",suggestions:"react-tags__suggestions",suggestionActive:"is-active",suggestionDisabled:"is-disabled"},p=function(t){function e(e){t.call(this,e),this.state={query:"",focused:!1,expandable:!1,selectedIndex:-1,classNames:Object.assign({},f,this.props.classNames)},this.inputEventHandlers={onChange:function(){},onBlur:this.handleBlur.bind(this),onFocus:this.handleFocus.bind(this),onInput:this.handleInput.bind(this),onKeyDown:this.handleKeyDown.bind(this)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.componentWillReceiveProps=function(t){this.setState({classNames:Object.assign({},f,t.classNames)})},e.prototype.handleInput=function(t){var e=t.target.value;this.props.handleInputChange&&this.props.handleInputChange(e),this.setState({query:e})},e.prototype.handleKeyDown=function(t){var e=this.state,n=e.query,i=e.selectedIndex,o=this.props,r=o.delimiters,a=o.delimiterChars;(r.indexOf(t.keyCode)>-1||a.indexOf(t.key)>-1)&&((n||i>-1)&&t.preventDefault(),this.handleDelimiter()),t.keyCode===c&&0===n.length&&this.props.allowBackspace&&this.deleteTag(this.props.tags.length-1),t.keyCode===h&&(t.preventDefault(),i<=0?this.setState({selectedIndex:this.suggestions.state.options.length-1}):this.setState({selectedIndex:i-1})),t.keyCode===d&&(t.preventDefault(),this.setState({selectedIndex:(i+1)%this.suggestions.state.options.length}))},e.prototype.handleDelimiter=function(){var t=this.state,e=t.query,n=t.selectedIndex;if(e.length>=this.props.minQueryLength){var i=this.suggestions.state.options.findIndex(function(t){return 0===t.name.search(new RegExp("^"+e+"$","i"))}),o=-1===n?i:n;o>-1?this.addTag(this.suggestions.state.options[o]):this.props.allowNew&&this.addTag({name:e})}},e.prototype.handleClick=function(t){document.activeElement!==t.target&&this.input.input.focus()},e.prototype.handleBlur=function(){this.setState({focused:!1,selectedIndex:-1}),this.props.handleBlur&&this.props.handleBlur(),this.props.addOnBlur&&this.handleDelimiter()},e.prototype.handleFocus=function(){this.setState({focused:!0}),this.props.handleFocus&&this.props.handleFocus()},e.prototype.addTag=function(t){t.disabled||("function"!=typeof this.props.handleValidate||this.props.handleValidate(t))&&(this.props.handleAddition(t),this.setState({query:"",selectedIndex:-1}))},e.prototype.deleteTag=function(t){this.props.handleDelete(t),this.setState({query:""})},e.prototype.render=function(){var t=this,e=this.props.tagComponent||r,n=this.props.tags.map(function(n,o){return i.createElement(e,{key:o,tag:n,classNames:t.state.classNames,onDelete:t.deleteTag.bind(t,o)})}),o=this.state.focused&&this.state.query.length>=this.props.minQueryLength,l=[this.state.classNames.root];return this.state.focused&&l.push(this.state.classNames.rootFocused),i.createElement("div",{className:l.join(" "),onClick:this.handleClick.bind(this)},i.createElement("div",{className:this.state.classNames.selected,"aria-live":"polite","aria-relevant":"additions removals"},n),i.createElement("div",{className:this.state.classNames.search},i.createElement(a,Object.assign({},this.state,{inputAttributes:this.props.inputAttributes,inputEventHandlers:this.inputEventHandlers,ref:function(e){t.input=e},listboxId:"ReactTags-listbox",autofocus:this.props.autofocus,autoresize:this.props.autoresize,expandable:o,placeholder:this.props.placeholder})),i.createElement(s,Object.assign({},this.state,{ref:function(e){t.suggestions=e},listboxId:"ReactTags-listbox",expandable:o,suggestions:this.props.suggestions,addTag:this.addTag.bind(this),maxSuggestionsLength:this.props.maxSuggestionsLength}))))},e}(i.Component);p.defaultProps={tags:[],placeholder:"Add new tag",suggestions:[],autofocus:!0,autoresize:!0,delimiters:[u,l],delimiterChars:[],minQueryLength:2,maxSuggestionsLength:6,allowNew:!1,allowBackspace:!0,tagComponent:null,inputAttributes:{},addOnBlur:!1},p.propTypes={tags:o.arrayOf(o.object),placeholder:o.string,suggestions:o.arrayOf(o.object),autofocus:o.bool,autoresize:o.bool,delimiters:o.arrayOf(o.number),delimiterChars:o.arrayOf(o.string),handleDelete:o.func.isRequired,handleAddition:o.func.isRequired,handleInputChange:o.func,handleFocus:o.func,handleBlur:o.func,handleValidate:o.func,minQueryLength:o.number,maxSuggestionsLength:o.number,classNames:o.object,allowNew:o.bool,allowBackspace:o.bool,tagComponent:o.oneOfType([o.func,o.element]),inputAttributes:o.object,addOnBlur:o.bool},t.exports=p},function(t,e,n){"use strict";var i=n(2);t.exports=function(t){return i.createElement("button",{type:"button",className:t.classNames.selectedTag,title:"Click to remove tag",onClick:t.onDelete},i.createElement("span",{className:t.classNames.selectedTagName},t.tag.name))}},function(t,e,n){"use strict";var i=n(2),o={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},r=["fontSize","fontFamily","fontWeight","fontStyle","letterSpacing"],a=function(t){function e(e){t.call(this,e),this.state={inputWidth:null}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.componentDidMount=function(){this.props.autoresize&&(this.copyInputStyles(),this.updateInputWidth()),this.props.autofocus&&this.input.focus()},e.prototype.componentDidUpdate=function(){this.updateInputWidth()},e.prototype.copyInputStyles=function(){var t=this,e=window.getComputedStyle(this.input);r.forEach(function(n){t.sizer.style[n]=e[n]})},e.prototype.updateInputWidth=function(){var t;this.props.autoresize&&(t=Math.ceil(this.sizer.scrollWidth)+2),t!==this.state.inputWidth&&this.setState({inputWidth:t})},e.prototype.render=function(){var t=this,e=this.props,n=e.inputAttributes,r=e.inputEventHandlers,a=e.query,s=e.placeholder,l=e.expandable,u=e.listboxId,c=e.selectedIndex;return i.createElement("div",{className:this.props.classNames.searchInput},i.createElement("input",Object.assign({},n,r,{ref:function(e){t.input=e},value:a,placeholder:s,role:"combobox","aria-autocomplete":"list","aria-label":s,"aria-owns":u,"aria-activedescendant":c>-1?u+"-"+c:null,"aria-expanded":l,style:{width:this.state.inputWidth}})),i.createElement("div",{ref:function(e){t.sizer=e},style:o},a||s))},e}(i.Component);t.exports=a},function(t,e,n){"use strict";var i=n(2);function o(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function r(t,e,n){var i=new RegExp("(?:^|\\s)"+o(t),"i");return e.filter(function(t){return i.test(t.name)}).slice(0,n)}var a=function(t){function e(e){t.call(this,e),this.state={options:r(this.props.query,this.props.suggestions,this.props.maxSuggestionsLength)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.componentWillReceiveProps=function(t){this.setState({options:r(t.query,t.suggestions,t.maxSuggestionsLength)})},e.prototype.handleMouseDown=function(t,e){e.preventDefault(),this.props.addTag(t)},e.prototype.render=function(){var t=this;if(!this.props.expandable||!this.state.options.length)return null;var e=this.state.options.map(function(e,n){var r=t.props.listboxId+"-"+n,a=[];return t.props.selectedIndex===n&&a.push(t.props.classNames.suggestionActive),e.disabled&&a.push(t.props.classNames.suggestionDisabled),i.createElement("li",{id:r,key:r,role:"option",className:a.join(" "),"aria-disabled":!0===e.disabled,onMouseDown:t.handleMouseDown.bind(t,e)},i.createElement("span",{dangerouslySetInnerHTML:function(t,e){var n=RegExp(o(e),"gi");return{__html:t.replace(n,"<mark>$&</mark>")}}(e.name,t.props.query)}))});return i.createElement("div",{className:this.props.classNames.suggestions},i.createElement("ul",{role:"listbox",id:this.props.listboxId},e))},e}(i.Component);t.exports=a},function(t,e,n){"use strict";e.__esModule=!0;var i=n(2),o=n(2),r=function(){var t=document.createElement("div");return t.style.height="100%",t};e.default=function(t,e,n){var a=e.style||"",s=t.getValue()||[],l=s&&s.length>0&&"string"==typeof s[0]?i.createElement("span",null,s.join(", ")):i.createElement("span",null);"PILL"===a&&(l=i.createElement("div",null,s.map(function(t){return"string"==typeof t?i.createElement("span",{key:t},t):i.createElement("span",{key:t.name},t.name)})));var u=r();return u.className="multi-value-formatter-content",u.title=s&&s.length>0&&"string"==typeof s[0]?s.join(", "):"",o.render(l,u),u}},function(t,e,n){(function(n){var i,o,r;!function(n,a){o=[],void 0===(r="function"==typeof(i=a)?i.apply(e,o):i)||(t.exports=r)}(0,function(){"use strict";function e(t,e,n){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){a(i.response,e,n)},i.onerror=function(){console.error("could not download file")},i.send()}function i(t){var e=new XMLHttpRequest;return e.open("HEAD",t,!1),e.send(),200<=e.status&&299>=e.status}function o(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(t,n,a){var s=r.URL||r.webkitURL,l=document.createElement("a");n=n||t.name||"download",l.download=n,l.rel="noopener","string"==typeof t?(l.href=t,l.origin===location.origin?o(l):i(l.href)?e(t,n,a):o(l,l.target="_blank")):(l.href=s.createObjectURL(t),setTimeout(function(){s.revokeObjectURL(l.href)},4e4),setTimeout(function(){o(l)},0))}:"msSaveOrOpenBlob"in navigator?function(t,n,r){if(n=n||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}(t,r),n);else if(i(t))e(t,n,r);else{var a=document.createElement("a");a.href=t,a.target="_blank",setTimeout(function(){o(a)})}}:function(t,n,i,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,i);var a="application/octet-stream"===t.type,s=/constructor/i.test(r.HTMLElement)||r.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&s)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var t=u.result;t=l?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=t:location=t,o=null},u.readAsDataURL(t)}else{var c=r.URL||r.webkitURL,h=c.createObjectURL(t);o?o.location=h:location.href=h,o=null,setTimeout(function(){c.revokeObjectURL(h)},4e4)}});r.saveAs=a.saveAs=a,void 0!==t&&(t.exports=a)})}).call(e,n(119))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=f(n(45)),o=f(n(12)),r=f(n(7)),a=f(n(8)),s=f(n(13)),l=f(n(14)),u=n(2),c=f(u),h=n(11),d=n(51);function f(t){return t&&t.__esModule?t:{default:t}}var p=function(t){function e(){return(0,r.default)(this,e),(0,s.default)(this,(e.__proto__||(0,o.default)(e)).apply(this,arguments))}return(0,l.default)(e,t),(0,a.default)(e,[{key:"render",value:function(){var t=this.props,e=t.tag,n=t.sha256,o=t.verified,r=t.keyframes,a=void 0===r?{}:r,s=t.labels,l=t.summary,u=t.aspectRatio,f=void 0===u?1.777:u,p=t.showAll,g=0,m=(0,i.default)(a).map(function(t){return parseInt(t,10)}),v=m.sort(function(t,e){return t-e}).map(function(t){var e=a[t];return e.length||p?(g+=e.length,{frame:t,detections:e}):null}).filter(function(t){return!!t}),y=v.reduce(function(t,e){return e.detections.reduce(function(t,e){var n=e.idx;return n in t||(t[n]=[s[n],0]),t[n][1]+=1,t},t),t},{}),b=(0,i.default)(y).map(function(t){return y[t]}).sort(function(t,e){return e[1]-t[1]});return l?c.default.createElement("div",null,c.default.createElement("h3",null,e," Detections"),c.default.createElement(d.TableTuples,{list:b})):c.default.createElement("div",null,c.default.createElement("h2",null,e),c.default.createElement("h3",null,"Detections"),c.default.createElement(d.TableTuples,{list:b}),c.default.createElement("h3",null,"Frames"),c.default.createElement("ul",{className:"meta"},c.default.createElement("li",null,"Displaying ",v.length," / ",(0,h.courtesyS)(m.length,"frame")),c.default.createElement("li",null,(0,h.courtesyS)(g,"detection")," found")),c.default.createElement("div",{className:"thumbnails"},v.map(function(t){var e=t.frame,i=t.detections;return c.default.createElement(d.Keyframe,{key:e,sha256:n,frame:e,verified:o,size:"th",showFrame:!0,showTimestamp:!0,aspectRatio:f,detectionList:[{labels:s,detections:i}]},c.default.createElement(d.DetectionList,{labels:s,detections:i,width:160,height:90}))})))}}]),e}(u.Component);e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.detections,n=t.width,r=t.height;return e.map(function(t,e){var a=t.rect;return a&&i.default.createElement("div",{className:"rect",key:e,style:{left:(0,o.px)(a[0],n),top:(0,o.px)(a[1],r),width:(0,o.px)(a[2]-a[0],n),height:(0,o.px)(a[3]-a[1],r)}})})};var i=function(t){return t&&t.__esModule?t:{default:t}}(n(2)),o=n(11)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.detections,n=t.labels,o=t.tag,r=t.showEmpty;return i.default.createElement("span",{className:"detectionList"},o&&i.default.createElement("h3",null,o),!e.length&&r&&i.default.createElement("label",null,i.default.createElement("small",null,"No detections")),e.map(function(t,e){var o=t.idx,r=t.score;t.rect;return i.default.createElement("label",{key:e},i.default.createElement("small",{className:"title"},(n[o]||"Unknown").replace(/_/," ")),i.default.createElement("small",null,r.toFixed(2)))}))};var i=function(t){return t&&t.__esModule?t:{default:t}}(n(2))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return i.default.createElement(o.default,{config:{width:5,radius:20,color:"white"}})};var i=r(n(2)),o=r(n(412));function r(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";e.__esModule=!0;var i=r(n(2)),o=r(n(413));function r(t){return t&&t.__esModule?t:{default:t}}var a=i.default.createClass({displayName:"ReactSpinner",propTypes:{config:i.default.PropTypes.object,stopped:i.default.PropTypes.bool},componentDidMount:function(){this.spinner=new o.default(this.props.config),this.props.stopped||this.spinner.spin(this.refs.container)},componentWillReceiveProps:function(t){!0!==t.stopped||this.props.stopped?t.stopped||!0!==this.props.stopped||this.spinner.spin(this.refs.container):this.spinner.stop()},componentWillUnmount:function(){this.spinner.stop()},render:function(){return i.default.createElement("span",{ref:"container"})}});e.default=a},function(t,e,n){var i,o;!function(r,a){"object"==typeof t&&t.exports?t.exports=a():void 0===(o="function"==typeof(i=a)?i.call(e,n,e,t):i)||(t.exports=o)}(0,function(){"use strict";var t,e,n=["webkit","Moz","ms","O"],i={};function o(t,e){var n,i=document.createElement(t||"div");for(n in e)i[n]=e[n];return i}function r(t){for(var e=1,n=arguments.length;e<n;e++)t.appendChild(arguments[e]);return t}function a(n,o,r,a){var s=["opacity",o,~~(100*n),r,a].join("-"),l=.01+r/a*100,u=Math.max(1-(1-n)/o*(100-l),n),c=t.substring(0,t.indexOf("Animation")).toLowerCase(),h=c&&"-"+c+"-"||"";return i[s]||(e.insertRule("@"+h+"keyframes "+s+"{0%{opacity:"+u+"}"+l+"%{opacity:"+n+"}"+(l+.01)+"%{opacity:1}"+(l+o)%100+"%{opacity:"+n+"}100%{opacity:"+u+"}}",e.cssRules.length),i[s]=1),s}function s(t,e){var i,o,r=t.style;if(void 0!==r[e=e.charAt(0).toUpperCase()+e.slice(1)])return e;for(o=0;o<n.length;o++)if(void 0!==r[i=n[o]+e])return i}function l(t,e){for(var n in e)t.style[s(t,n)||n]=e[n];return t}function u(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)void 0===t[i]&&(t[i]=n[i])}return t}function c(t,e){return"string"==typeof t?t:t[e%t.length]}var h={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"};function d(t){this.opts=u(t||{},d.defaults,h)}if(d.defaults={},u(d.prototype,{spin:function(e){this.stop();var n=this,i=n.opts,r=n.el=o(null,{className:i.className});if(l(r,{position:i.position,width:0,zIndex:i.zIndex,left:i.left,top:i.top}),e&&e.insertBefore(r,e.firstChild||null),r.setAttribute("role","progressbar"),n.lines(r,n.opts),!t){var a,s=0,u=(i.lines-1)*(1-i.direction)/2,c=i.fps,h=c/i.speed,d=(1-i.opacity)/(h*i.trail/100),f=h/i.lines;!function t(){s++;for(var e=0;e<i.lines;e++)a=Math.max(1-(s+(i.lines-e)*f)%h*d,i.opacity),n.opacity(r,e*i.direction+u,a,i);n.timeout=n.el&&setTimeout(t,~~(1e3/c))}()}return n},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=void 0),this},lines:function(e,n){var i,s=0,u=(n.lines-1)*(1-n.direction)/2;function h(t,e){return l(o(),{position:"absolute",width:n.scale*(n.length+n.width)+"px",height:n.scale*n.width+"px",background:t,boxShadow:e,transformOrigin:"left",transform:"rotate("+~~(360/n.lines*s+n.rotate)+"deg) translate("+n.scale*n.radius+"px,0)",borderRadius:(n.corners*n.scale*n.width>>1)+"px"})}for(;s<n.lines;s++)i=l(o(),{position:"absolute",top:1+~(n.scale*n.width/2)+"px",transform:n.hwaccel?"translate3d(0,0,0)":"",opacity:n.opacity,animation:t&&a(n.opacity,n.trail,u+s*n.direction,n.lines)+" "+1/n.speed+"s linear infinite"}),n.shadow&&r(i,l(h("#000","0 0 4px #000"),{top:"2px"})),r(e,r(i,h(c(n.color,s),"0 0 1px rgba(0,0,0,.1)")));return e},opacity:function(t,e,n){e<t.childNodes.length&&(t.childNodes[e].style.opacity=n)}}),"undefined"!=typeof document){e=function(){var t=o("style",{type:"text/css"});return r(document.getElementsByTagName("head")[0],t),t.sheet||t.styleSheet}();var f=l(o("group"),{behavior:"url(#default#VML)"});!s(f,"transform")&&f.adj?function(){function t(t,e){return o("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',e)}e.addRule(".spin-vml","behavior:url(#default#VML)"),d.prototype.lines=function(e,n){var i=n.scale*(n.length+n.width),o=2*n.scale*i;function a(){return l(t("group",{coordsize:o+" "+o,coordorigin:-i+" "+-i}),{width:o,height:o})}var s,u=-(n.width+n.length)*n.scale*2+"px",h=l(a(),{position:"absolute",top:u,left:u});function d(e,o,s){r(h,r(l(a(),{rotation:360/n.lines*e+"deg",left:~~o}),r(l(t("roundrect",{arcsize:n.corners}),{width:i,height:n.scale*n.width,left:n.scale*n.radius,top:-n.scale*n.width>>1,filter:s}),t("fill",{color:c(n.color,e),opacity:n.opacity}),t("stroke",{opacity:0}))))}if(n.shadow)for(s=1;s<=n.lines;s++)d(s,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(s=1;s<=n.lines;s++)d(s);return r(e,h)},d.prototype.opacity=function(t,e,n,i){var o=t.firstChild;i=i.shadow&&i.lines||0,o&&e+i<o.childNodes.length&&(o=(o=(o=o.childNodes[e+i])&&o.firstChild)&&o.firstChild)&&(o.opacity=n)}}():t=s(f,"animation")}return d})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=h(n(12)),o=h(n(7)),r=h(n(8)),a=h(n(13)),s=h(n(14)),l=n(2),u=h(l),c=n(415);function h(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(e.__proto__||(0,i.default)(e)).apply(this,arguments))}return(0,s.default)(e,t),(0,r.default)(e,[{key:"upload",value:function(t){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=void 0,o=void 0;for(i=0;i<n.length&&(!(o=n[i])||!o.type.match("image.*"));i++);if(o){var r=new FileReader;r.onload=function(t){r.onload=null;var n=new Image;n.onload=function(){n.onload=null,e.resizeAndUpload(n)},n.src=t.target.result},r.readAsDataURL(n[0])}}},{key:"resizeAndUpload",value:function(t){var e=this;(0,c.renderThumbnail)(t).toBlob(function(t){e.props.onUpload(t)},"image/jpeg",80)}},{key:"render",value:function(){return u.default.createElement("input",{type:"file",name:"img",accept:"image/*",onChange:this.upload.bind(this),required:!0})}}]),e}(l.Component);e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_SIDE=void 0,e.renderToCanvas=l,e.renderThumbnail=function(t){return l(t,{correctOrientation:!0})};var i=function(t){return t&&t.__esModule?t:{default:t}}(n(416));var o=e.MAX_SIDE=256;function r(t){var e=function(t,e,n){e=e||0,n=n||t.length;for(var i=atob(t),o=new Uint8Array(i.length),r=e;r<n;r++)o[r]=i.charCodeAt(r);return o}(t.split(",")[1],0,Math.pow(2,17));try{return i.default.load(e.buffer).Orientation}catch(t){return 1}}var a={1:{rotation:0,mirror:!1},2:{rotation:0,mirror:!0},3:{rotation:180,mirror:!1},4:{rotation:180,mirror:!0},5:{rotation:90,mirror:!0},6:{rotation:90,mirror:!1},7:{rotation:270,mirror:!0},8:{rotation:270,mirror:!1}};function s(t,e,n){var i=r(n);if(i&&1!==i){var o=a[i].rotation;(90===o||270===o)&&(t.width=t.height+t.width,t.height=t.width-t.height,t.width-=t.height),o>0&&function(t,e,n){var i=n*(Math.PI/180);90===n?e.translate(t.width,0):180===n?e.translate(t.width,t.height):270===n&&e.translate(0,t.height),e.rotate(i)}(t,e,o)}}function l(t,e){if(!t)return null;e=e||{};var n=o,i=document.createElement("canvas"),r=i.getContext("2d"),a=e.scale||1,l=function(t,e,n,i,o){function r(){return n/t}function a(){return i/e}if(o=!!o,t/e>n/i){if(o)return a();if(t>n)return r()}else{if(o)return r();if(e>i)return a()}return 1}(t.naturalWidth*a,t.naturalHeight*a,n,n,!0);l*=a,i.width=Math.round(t.naturalWidth*l),i.height=Math.round(t.naturalHeight*l);var u=e.correctOrientation,c=!!t.src.match(/data:image\/jpeg|\.jpeg$|\.jpg$/i),h=!!t.src.match(/^data:/);return r.save(),u&&c&&h&&s(i,r,t.src),1!==l&&r.scale(l,l),r.drawImage(t,0,0),r.restore(),i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=l,e.loadView=u;var i=n(417),o=n(418),r=n(425),a=n(427),s=n(429);function l(t,e={expanded:!1}){let n;try{n=new DataView(t)}catch(t){return console.warn("Warning: A full DataView implementation is not available. If you're using Node.js you probably want to do this:\n 1. Install a DataView polyfill, e.g. jdataview: npm install --save jdataview\n 2. Require that at the top of your script: global.DataView = require('jdataview');\nSee an example of this in the ExifReader example directory."),{}}return u(n,e)}function u(t,e={expanded:!1}){let n=!1,l={};i.a.check(t);const{tiffHeaderOffset:u,iptcDataOffset:c,xmpDataOffset:h,xmpFieldLength:d}=i.a.parseAppMarkers(t);if(function(t){return void 0!==t}(u)){n=!0;const i=o.a.read(t,u);e.expanded?l.exif=i:l=Object.assign({},l,i)}if(function(t){return void 0!==t}(c)){n=!0;const i=r.a.read(t,c);e.expanded?l.iptc=i:l=Object.assign({},l,i)}if(function(t){return void 0!==t}(h)){n=!0;const i=a.a.read(t,h,d);e.expanded?l.xmp=i:l=Object.assign({},l,i)}if(!n)throw new s.a.MetadataMissingError;return l}e.default={load:l,loadView:u,errors:s.a}},function(t,e,n){"use strict";var i=n(174);const o=2,r=65496,a=2,s=4,l=2,u=10,c=18,h=33,d=65504,f=65505,p=65517,g=65519,m=65534,v="Exif",y="http://ns.adobe.com/xap/1.0/",b="Photoshop 3.0";function w(t,e){const n=v.length;return t.getUint16(e,!1)===f&&Object(i.a)(t,e+s,n)===v&&0===t.getUint8(e+s+n,!1)}function _(t,e){const n=y.length;return t.getUint16(e,!1)===f&&Object(i.a)(t,e+s,n)===y&&0===t.getUint8(e+s+n,!1)}function x(t,e){const n=b.length;return t.getUint16(e,!1)===p&&Object(i.a)(t,e+s,n)===b&&0===t.getUint8(e+s+n,!1)}function S(t,e){const n=t.getUint16(e,!1);return n>=d&&n<=g||n===m}e.a={check:function(t){if(t.byteLength<o||t.getUint16(0,!1)!==r)throw new Error("Invalid image format")},parseAppMarkers:function(t){let e,n,i,o,r,d=a;for(;d+s+5<=t.byteLength;){if(w(t,d))e=t.getUint16(d+l,!1),n=d+u;else if(_(t,d))e=t.getUint16(d+l,!1),o=d+h,r=e-(h-l);else if(x(t,d))e=t.getUint16(d+l,!1),i=d+c;else{if(!S(t,d))break;e=t.getUint16(d+l,!1)}d+=l+e}return{hasAppMarkers:d>a,tiffHeaderOffset:n,iptcDataOffset:i,xmpDataOffset:o,xmpFieldLength:r}}}},function(t,e,n){"use strict";var i=n(175),o=n(419),r=n(420);const a="Exif IFD Pointer",s="GPS Info IFD Pointer",l="Interoperability IFD Pointer",u={1:o.a.getByteAt,2:o.a.getAsciiAt,3:o.a.getShortAt,4:o.a.getLongAt,5:o.a.getRationalAt,7:o.a.getUndefinedAt,9:o.a.getSlongAt,10:o.a.getSrationalAt};function c(t,e,n,i,r){const a=o.a.getTypeSize("SHORT"),s={},l=o.a.getShortAt(t,i,r);i+=a;for(let o=0;o<l;o++){const o=h(t,e,n,i,r);void 0!==o&&(s[o.name]={value:o.value,description:o.description}),i+=12}return s}function h(t,e,n,i,a){const s=o.a.getTypeSize("SHORT"),l=s+o.a.getTypeSize("SHORT"),u=l+o.a.getTypeSize("LONG"),c=o.a.getShortAt(t,i,a),h=o.a.getShortAt(t,i+s,a),f=o.a.getLongAt(t,i+l,a);let p;if(void 0!==o.a.typeSizes[h]){if(function(t,e){return o.a.typeSizes[t]*e<=o.a.getTypeSize("LONG")}(h,f))p=d(t,i+u,h,f,a);else{const e=o.a.getLongAt(t,i+u,a);p=function(t,e,n,i,r){return e+n+o.a.typeSizes[i]*r<=t.byteLength}(t,n,e,h,f)?d(t,n+e,h,f,a):"<faulty value>"}if(h===o.a.tagTypes.ASCII&&(p=function(t){try{return t.map(t=>decodeURIComponent(escape(t)))}catch(e){return t}}(p=function(t){const e=[];let n=0;for(const i of t)"\0"!==i?(void 0===e[n]&&(e[n]=""),e[n]+=i):n++;return e}(p))),void 0!==r.a[e][c]){let t,n;return void 0!==r.a[e][c].name&&void 0!==r.a[e][c].description?(t=r.a[e][c].name,n=r.a[e][c].description(p)):(t=r.a[e][c],n=p instanceof Array?p.join(", "):p),{name:t,value:p,description:n}}return{name:`undefined-${c}`,value:p,description:p}}}function d(t,e,n,i,r){let a=[];for(let s=0;s<i;s++)a.push(u[n](t,e,r)),e+=o.a.typeSizes[n];return n===o.a.tagTypes.ASCII?a=o.a.getAsciiValue(a):1===a.length&&(a=a[0]),a}e.a={read:function(t,e){const n=i.a.getByteOrder(t,e);let r=function(t,e,n){return c(t,"0th",e,function(t,e,n){return e+o.a.getLongAt(t,e+4,n)}(t,e,n),n)}(t,e,n);return r=function(t,e,n,i){return void 0!==t[l]?Object.assign(t,c(e,"interoperability",n,n+t[l].value,i)):t}(r=function(t,e,n,i){return void 0!==t[s]?Object.assign(t,c(e,"gps",n,n+t[s].value,i)):t}(r=function(t,e,n,i){return void 0!==t[a]?Object.assign(t,c(e,"exif",n,n+t[a].value,i)):t}(r,t,e,n),t,e,n),t,e,n)}}},function(t,e,n){"use strict";var i=n(175);const o={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8},r={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10};function a(t,e){return t.getUint8(e)}function s(t,e,n){return t.getUint32(e,n===i.a.LITTLE_ENDIAN)}function l(t,e,n){return t.getInt32(e,n===i.a.LITTLE_ENDIAN)}e.a={getAsciiValue:function(t){return t.map(t=>String.fromCharCode(t))},getByteAt:a,getAsciiAt:function(t,e){return t.getUint8(e)},getShortAt:function(t,e,n){return t.getUint16(e,n===i.a.LITTLE_ENDIAN)},getLongAt:s,getRationalAt:function(t,e,n){return s(t,e,n)/s(t,e+4,n)},getUndefinedAt:function(t,e){return a(t,e)},getSlongAt:l,getSrationalAt:function(t,e,n){return l(t,e,n)/l(t,e+4,n)},typeSizes:o,tagTypes:r,getTypeSize:function(t){if(void 0===r[t])throw new Error("No such type found.");return o[r[t]]}}},function(t,e,n){"use strict";var i=n(421),o=n(422),r=n(423),a=n(424);e.a={"0th":i.a,exif:o.a,gps:r.a,interoperability:a.a}},function(t,e,n){"use strict";e.a={256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:t=>1===t?"top-left":2===t?"top-right":3===t?"bottom-right":4===t?"bottom-left":5===t?"left-top":6===t?"right-top":7===t?"right-bottom":8===t?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:{name:"ResolutionUnit",description:t=>2===t?"inches":3===t?"centimeters":"Unknown"},301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",318:"WhitePoint",319:"PrimaryChromaticities",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:t=>1===t?"centered":2===t?"co-sited":"undefined "+t},532:"ReferenceBlackWhite",33432:{name:"Copyright",description:t=>t.join("; ")},34665:"Exif IFD Pointer",34853:"GPS Info IFD Pointer"}},function(t,e,n){"use strict";var i=n(99);e.a={33434:"ExposureTime",33437:"FNumber",34850:{name:"ExposureProgram",description:t=>0===t?"Undefined":1===t?"Manual":2===t?"Normal program":3===t?"Aperture priority":4===t?"Shutter priority":5===t?"Creative program":6===t?"Action program":7===t?"Portrait mode":8===t?"Landscape mode":"Unknown"},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},36864:{name:"ExifVersion",description:t=>Object(i.b)(t)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",37121:{name:"ComponentsConfiguration",description:t=>t.map(t=>49===t?"Y":50===t?"Cb":51===t?"Cr":52===t?"R":53===t?"G":54===t?"B":void 0).join("")},37122:"CompressedBitsPerPixel",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBiasValue",37381:"MaxApertureValue",37382:"SubjectDistance",37383:{name:"MeteringMode",description:t=>1===t?"Average":2===t?"CenterWeightedAverage":3===t?"Spot":4===t?"MultiSpot":5===t?"Pattern":6===t?"Partial":255===t?"Other":"Unknown"},37384:{name:"LightSource",description:t=>1===t?"Daylight":2===t?"Fluorescent":3===t?"Tungsten (incandescent light)":4===t?"Flash":9===t?"Fine weather":10===t?"Cloudy weather":11===t?"Shade":12===t?"Daylight fluorescent (D 5700 – 7100K)":13===t?"Day white fluorescent (N 4600 – 5400K)":14===t?"Cool white fluorescent (W 3900 – 4500K)":15===t?"White fluorescent (WW 3200 – 3700K)":17===t?"Standard light A":18===t?"Standard light B":19===t?"Standard light C":20===t?"D55":21===t?"D65":22===t?"D75":23===t?"D50":24===t?"ISO studio tungsten":255===t?"Other light source":"Unknown"},37385:{name:"Flash",description:t=>0===t?"Flash did not fire":1===t?"Flash fired":5===t?"Strobe return light not detected":7===t?"Strobe return light detected":9===t?"Flash fired, compulsory flash mode":13===t?"Flash fired, compulsory flash mode, return light not detected":15===t?"Flash fired, compulsory flash mode, return light detected":16===t?"Flash did not fire, compulsory flash mode":24===t?"Flash did not fire, auto mode":25===t?"Flash fired, auto mode":29===t?"Flash fired, auto mode, return light not detected":31===t?"Flash fired, auto mode, return light detected":32===t?"No flash function":65===t?"Flash fired, red-eye reduction mode":69===t?"Flash fired, red-eye reduction mode, return light not detected":71===t?"Flash fired, red-eye reduction mode, return light detected":73===t?"Flash fired, compulsory flash mode, red-eye reduction mode":77===t?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===t?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===t?"Flash fired, auto mode, red-eye reduction mode":93===t?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===t?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:"FocalLength",37396:{name:"SubjectArea",description:t=>2===t.length?`Location; X: ${t[0]}, Y: ${t[1]}`:3===t.length?`Circle; X: ${t[0]}, Y: ${t[1]}, diameter: ${t[2]}`:4===t.length?`Rectangle; X: ${t[0]}, Y: ${t[1]}, width: ${t[2]}, height: ${t[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:i.a},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",40960:{name:"FlashpixVersion",description:t=>t.map(t=>String.fromCharCode(t)).join("")},40961:{name:"ColorSpace",description:t=>1===t?"sRGB":65535===t?"Uncalibrated":"Unknown"},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:t=>2===t?"inches":3===t?"centimeters":"Unknown"},41492:{name:"SubjectLocation",description:([t,e])=>`X: ${t}, Y: ${e}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:t=>1===t?"Undefined":2===t?"One-chip color area sensor":3===t?"Two-chip color area sensor":4===t?"Three-chip color area sensor":5===t?"Color sequential area sensor":7===t?"Trilinear sensor":8===t?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:t=>3===t?"DSC":"Unknown"},41729:{name:"SceneType",description:t=>1===t?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:t=>0===t?"Normal process":1===t?"Custom process":"Unknown"},41986:{name:"ExposureMode",description:t=>0===t?"Auto exposure":1===t?"Manual exposure":2===t?"Auto bracket":"Unknown"},41987:{name:"WhiteBalance",description:t=>0===t?"Auto white balance":1===t?"Manual white balance":"Unknown"},41988:{name:"DigitalZoomRatio",description:t=>0===t?"Digital zoom was not used":t},41989:{name:"FocalLengthIn35mmFilm",description:t=>0===t?"Unknown":t},41990:{name:"SceneCaptureType",description:t=>0===t?"Standard":1===t?"Landscape":2===t?"Portrait":3===t?"Night scene":"Unknown"},41991:{name:"GainControl",description:t=>0===t?"None":1===t?"Low gain up":2===t?"High gain up":3===t?"Low gain down":4===t?"High gain down":"Unknown"},41992:{name:"Contrast",description:t=>0===t?"Normal":1===t?"Soft":2===t?"Hard":"Unknown"},41993:{name:"Saturation",description:t=>0===t?"Normal":1===t?"Low saturation":2===t?"High saturation":"Unknown"},41994:{name:"Sharpness",description:t=>0===t?"Normal":1===t?"Soft":2===t?"Hard":"Unknown"},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:t=>1===t?"Macro":2===t?"Close view":3===t?"Distant view":"Unknown"},42016:"ImageUniqueID"}},function(t,e,n){"use strict";var i=n(99);e.a={0:{name:"GPSVersionID",description:t=>2===t[0]&&2===t[1]&&0===t[2]&&0===t[3]?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:t=>{const e=t.join("");return"N"===e?"North latitude":"S"===e?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:t=>t[0]+t[1]/60+t[2]/3600},3:{name:"GPSLongitudeRef",description:t=>{const e=t.join("");return"E"===e?"East longitude":"W"===e?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:t=>t[0]+t[1]/60+t[2]/3600},5:{name:"GPSAltitudeRef",description:t=>0===t?"Sea level":1===t?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:t=>t+" m"},7:{name:"GPSTimeStamp",description:t=>t.map(t=>1===`${t}`.length?`0${t}`:t).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:t=>{const e=t.join("");return"A"===e?"Measurement in progress":"V"===e?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:t=>{const e=t.join("");return"2"===e?"2-dimensional measurement":"3"===e?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:t=>{const e=t.join("");return"K"===e?"Kilometers per hour":"M"===e?"Miles per hour":"N"===e?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:t=>{const e=t.join("");return"N"===e?"North latitude":"S"===e?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:t=>t[0]+t[1]/60+t[2]/3600},21:{name:"GPSDestLongitudeRef",description:t=>{const e=t.join("");return"E"===e?"East longitude":"W"===e?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:t=>t[0]+t[1]/60+t[2]/3600},23:{name:"GPSDestBearingRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:t=>{const e=t.join("");return"K"===e?"Kilometers":"M"===e?"Miles":"N"===e?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:i.a},28:{name:"GPSAreaInformation",description:i.a},29:"GPSDateStamp",30:{name:"GPSDifferential",description:t=>0===t?"Measurement without differential correction":1===t?"Differential correction applied":"Unknown"}}},function(t,e,n){"use strict";e.a={1:"InteroperabilityIndex"}},function(t,e,n){"use strict";var i=n(426);const o=943868237,r=4,a=r+8,s=1028,l=5;function u(t,e){if(t.getUint32(e,!1)!==o)throw new Error("Not an IPTC resource block.");return{type:t.getUint16(e+r,!1),size:t.getUint16(e+10,!1)}}function c(t){return t.type===s}function h(t){return t%2!=0?1:0}function d(t,e,n){const o=t.getUint16(e+1,!1),r=t.getUint16(e+3,!1),a=function(t,e,n){const i=[];for(let o=0;o<n;o++)i.push(t.getUint8(e+o));return i}(t,e+l,r);let s;if(void 0!==i.a.iptc[o]){let t,e;void 0!==i.a.iptc[o].name&&void 0!==i.a.iptc[o].description?(t=i.a.iptc[o].name,e=i.a.iptc[o].description(a,n)):(t=void 0!==i.a.iptc[o].name?i.a.iptc[o].name:i.a.iptc[o],e=a instanceof Array?function(t){try{return decodeURIComponent(escape(t))}catch(e){return t}}(e=a.map(t=>String.fromCharCode(t)).join("")):a),s={name:t,value:a,description:e},void 0!==i.a.iptc[o].repeatable&&(s.repeatable=!0)}else s={name:`undefined-${o}`,value:a,description:a};return{tag:s,tagSize:r}}e.a={read:function(t,e){try{const{naaBlock:n,dataOffset:i}=function(t,e){for(;e+a<=t.byteLength;){const n=u(t,e);if(c(n))return{naaBlock:n,dataOffset:e};e+=a+n.size+h(n.size)}throw new Error("No IPTC NAA resource block.")}(t,e);return function(t,e,n){const i={},o=(n+=a)+e.size;for(;n<o&&n<t.byteLength;){const{tag:e,tagSize:o}=d(t,n,i);void 0===i[e.name]||void 0===e.repeatable?i[e.name]={value:e.value,description:e.description}:(i[e.name]instanceof Array||(i[e.name]=[{value:i[e.name].value,description:i[e.name].description}]),i[e.name].push({value:e.value,description:e.description})),n+=l+o}return i}(t,n,i)}catch(t){return{}}}}},function(t,e,n){"use strict";var i=n(99);function o(t){const e=Object(i.b)(t);return e.length>=8?e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2):e}function r(t){const e=Object(i.b)(t);let n=e;return e.length>=6&&(n=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2),11===e.length&&(n+=e.substr(6,1)+e.substr(7,2)+":"+e.substr(9,2))),n}e.a={iptc:{346:{name:"Coded Character Set",description:t=>{const e=Object(i.b)(t);return"%G"===e?"UTF-8":"%/G"===e?"UTF-8 Level 1":"%/H"===e?"UTF-8 Level 2":"%/I"===e?"UTF-8 Level 3":"Unknown"}},512:{name:"Record Version",description:t=>((t[0]<<8)+t[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:t=>"01"===Object(i.b)(t)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:t=>{const e=Object(i.b)(t).split(":");return e[2]+(e[3]?"/"+e[3]:"")+(e[4]?"/"+e[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:t=>{const e=Object(i.b)(t);return"01"===e?"Object Kill":"02"===e?"Object Replace":"03"===e?"Object Append":"04"===e?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:o},572:{name:"Time Created",description:r},574:{name:"Digital Creation Date",description:o},575:{name:"Digital Creation Time",description:r},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:t=>{const e=Object(i.b)(t);return"a"===e?"morning":"p"===e?"evening":"b"===e?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:t=>t},642:"Image Type",643:{name:"Image Orientation",description:t=>{const e=Object(i.b)(t);return"P"===e?"Portrait":"L"===e?"Landscape":"S"===e?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:t=>{const e=Object(i.b)(t),n=e.charAt(0),o=e.charAt(1);let r="";return"1"===n?r+="Mono":"2"===n&&(r+="Stereo"),"A"===o?r+=", actuality":"C"===o?r+=", question and answer session":"M"===o?r+=", music, transmitted by itself":"Q"===o?r+=", response to a question":"R"===o?r+=", raw sound":"S"===o?r+=", scener":"V"===o?r+=", voicer":"W"===o&&(r+=", wrap"),""!==r?r:e}},663:{name:"Audio Sampling Rate",description:t=>parseInt(Object(i.b)(t),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:t=>{const e=parseInt(Object(i.b)(t),10);return e+(1===e?" bit":" bits")}},665:{name:"Audio Duration",description:t=>{const e=Object(i.b)(t);return e.length>=6?e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2):e}},666:"Audio Outcue",712:{name:"ObjectData Preview File Format",description:t=>{const e=Object(i.b)(t);return"00"===e?"No ObjectData":"01"===e?"IPTC-NAA Digital Newsphoto Parameter Record":"02"===e?"IPTC7901 Recommended Message Format":"03"===e?"Tagged Image File Format (Adobe/Aldus Image data)":"04"===e?"Illustrator (Adobe Graphics data)":"05"===e?"AppleSingle (Apple Computer Inc)":"06"===e?"NAA 89-3 (ANPA 1312)":"07"===e?"MacBinary II":"08"===e?"IPTC Unstructured Character Oriented File Format (UCOFF)":"09"===e?"United Press International ANPA 1312 variant":"10"===e?"United Press International Down-Load Message":"11"===e?"JPEG File Interchange (JFIF)":"12"===e?"Photo-CD Image-Pac (Eastman Kodak)":"13"===e?"Microsoft Bit Mapped Graphics File [*.BMP]":"14"===e?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":"15"===e?"Audio plus Moving Video [*.AVI] (Microsoft)":"16"===e?"PC DOS/Windows Executable Files [*.COM][*.EXE]":"17"===e?"Compressed Binary File [*.ZIP] (PKWare Inc)":"18"===e?"Audio Interchange File Format AIFF (Apple Computer Inc)":"19"===e?"RIFF Wave (Microsoft Corporation)":"20"===e?"Freehand (Macromedia/Aldus)":"21"===e?'Hypertext Markup Language "HTML" (The Internet Society)':"22"===e?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":"23"===e?"MPEG 2 Audio Layer 3, ISO/IEC":"24"===e?"Portable Document File (*.PDF) Adobe":"25"===e?"News Industry Text Format (NITF)":"26"===e?"Tape Archive (*.TAR)":"27"===e?"Tidningarnas TelegrambyrĆ„ NITF version (TTNITF DTD)":"28"===e?"Ritzaus Bureau NITF version (RBNITF DTD)":"29"===e?"Corel Draw [*.CDR]":"Unknown format "+e}},713:{name:"ObjectData Preview File Format Version",description:(t,e)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},o=Object(i.b)(t);if(e["ObjectData Preview File Format"]){const t=Object(i.b)(e["ObjectData Preview File Format"].value);if(n[t]&&n[t][o])return n[t][o]}return o}},714:"ObjectData Preview Data"}}},function(t,e,n){"use strict";var i=n(174),o=n(428);function r(t,e=!1){const n=function(t){const e=[];for(let n=0;n<t.childNodes.length;n++)e.push(t.childNodes[n]);return e}(t);return function(t){return 1===t.length&&"#text"===t[0].nodeName}(n)?e?{}:function(t){return t.nodeValue}(n[0]):function(t){const e={};return t.forEach(t=>{if(function(t){return t.nodeName&&"#text"!==t.nodeName}(t)){const n=function(t){return{attributes:function(t){const e={};for(let n=0;n<t.attributes.length;n++)e[t.attributes[n].nodeName]=t.attributes[n].value;return e}(t),value:r(t)}}(t);void 0!==e[t.nodeName]?(Array.isArray(e[t.nodeName])||(e[t.nodeName]=[e[t.nodeName]]),e[t.nodeName].push(n)):e[t.nodeName]=n}}),e}(n)}function a(t){const e={};if("string"==typeof t)return t;for(const n in t){let i=t[n];Array.isArray(i)||(i=[i]),i.forEach(t=>{Object.assign(e,s(t.attributes)),"object"==typeof t.value&&Object.assign(e,f(t.value))})}return e}function s(t){const e={};for(const n in t)l(n)&&(e[c(n)]={value:t[n],attributes:{},description:h(t[n],n)});return e}function l(t){return"rdf:parseType"!==t&&!u(t)}function u(t){return"xmlns"===t.split(":")[0]}function c(t){return t.split(":")[1]}function h(t,e){if(Array.isArray(t))return function(t){return t.map(t=>void 0!==t.value?h(t.value):h(t)).join(", ")}(t);if("object"==typeof t)return function(t){const e=[];for(const n in t)e.push(`${d(n)}: ${t[n].value}`);return e.join("; ")}(t);try{return e&&"function"==typeof o.a[e]?o.a[e](t):decodeURIComponent(escape(t))}catch(e){return t}}function d(t){return"CiAdrCity"===t?"CreatorCity":"CiAdrCtry"===t?"CreatorCountry":"CiAdrExtadr"===t?"CreatorAddress":"CiAdrPcode"===t?"CreatorPostalCode":"CiAdrRegion"===t?"CreatorRegion":"CiEmailWork"===t?"CreatorWorkEmail":"CiTelWork"===t?"CreatorWorkPhone":"CiUrlWork"===t?"CreatorWorkUrl":t}function f(t){const e={};for(const n in t)u(n)||(e[c(n)]=p(t[n],n));return e}function p(t,e){return g(t)?m(t,e):function(t){return"Resource"===t.attributes["rdf:parseType"]||void 0!==t.value["rdf:Description"]&&void 0===t.value["rdf:Description"].value["rdf:value"]}(t)?function(t,e){const n={value:{},attributes:{}};void 0!==t.value["rdf:Description"]&&(Object.assign(n.value,s(t.value["rdf:Description"].attributes)),Object.assign(n.attributes,v(t)),t=t.value["rdf:Description"]);return Object.assign(n.value,f(t.value)),n.description=h(n.value,e),n}(t,e):function(t){return 0===Object.keys(t.value).length&&void 0===t.attributes["rdf:resource"]}(t)?function(t,e){const n=s(t.attributes);return{value:n,attributes:{},description:h(n,e)}}(t,e):function(t){return void 0!==y(t.value)}(t)?function(t,e){let n=y(t.value).value["rdf:li"];const i=v(t),o=[];Array.isArray(n)||(n=[n]);return n.forEach(t=>{o.push(function(t){return g(t)?m(t):function(t){return"Resource"===t.attributes["rdf:parseType"]}(t)?f(t.value):{value:t.value,attributes:v(t),description:h(t.value)}}(t))}),{value:o,attributes:i,description:h(o,e)}}(t,e):function(t,e){const n=b(t)||a(t.value);return{value:n,attributes:v(t),description:h(n,e)}}(t,e)}function g(t){return"Resource"===t.attributes["rdf:parseType"]&&void 0!==t.value["rdf:value"]||void 0!==t.value["rdf:Description"]&&void 0!==t.value["rdf:Description"].value["rdf:value"]}function m(t,e){const n=v(t);void 0!==t.value["rdf:Description"]&&(t=t.value["rdf:Description"]),Object.assign(n,v(t),function(t){const e={};for(const n in t.value)"rdf:value"===n||u(n)||(e[c(n)]=t.value[n].value);return e}(t));const i=function(t){return b(t.value["rdf:value"])||t.value["rdf:value"].value}(t);return{value:i,attributes:n,description:h(i,e)}}function v(t){const e={};for(const n in t.attributes)"rdf:parseType"===n||"rdf:resource"===n||u(n)||(e[c(n)]=t.attributes[n]);return e}function y(t){return t["rdf:Bag"]||t["rdf:Seq"]||t["rdf:Alt"]}function b(t){return t.attributes&&t.attributes["rdf:resource"]}e.a={read:function(t,e,n){try{const o=function(t,e,n){if("undefined"==typeof DOMParser)throw console.warn("Warning: DOMParser is not available. If you're using Node.js you probably want to do this:\n 1. Install a DOM parser, e.g. xmldom: npm install --save xmldom\n 2. Require that at the top of your script: global.DOMParser = require('xmldom').DOMParser;\nSee an example of this in the ExifReader example directory."),new Error;const o=new DOMParser,r=Object(i.a)(t,e,n),a=o.parseFromString(r,"application/xml");if("parsererror"===a.documentElement.nodeName)throw new Error;return a}(t,e,n),s=function t(e){for(let n=0;n<e.childNodes.length;n++){if("x:xmpmeta"===e.childNodes[n].tagName)return t(e.childNodes[n]);if("rdf:RDF"===e.childNodes[n].tagName)return e.childNodes[n]}throw new Error}(o);return a(r(s,!0))}catch(t){return{}}}}},function(t,e,n){"use strict";function i(t){const[e,n]=t.split(",");if(void 0!==e&&void 0!==n){const t=parseFloat(e),i=parseFloat(n),o=n.charAt(n.length-1);if(!Number.isNaN(t)&&!Number.isNaN(i))return""+(t+i/60)+o}return t}e.a={"tiff:Orientation":t=>"1"===t?"Horizontal (normal)":"2"===t?"Mirror horizontal":"3"===t?"Rotate 180":"4"===t?"Mirror vertical":"5"===t?"Mirror horizontal and rotate 270 CW":"6"===t?"Rotate 90 CW":"7"===t?"Mirror horizontal and rotate 90 CW":"8"===t?"Rotate 270 CW":t,"exif:GPSLatitude":i,"exif:GPSLongitude":i}},function(t,e,n){"use strict";function i(t){this.name="MetadataMissingError",this.message=t||"No Exif data",this.stack=(new Error).stack}i.prototype=new Error,e.a={MetadataMissingError:i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=h(n(12)),o=h(n(7)),r=h(n(8)),a=h(n(13)),s=h(n(14)),l=n(2),u=h(l),c=n(17);function h(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(){return(0,o.default)(this,e),(0,a.default)(this,(e.__proto__||(0,i.default)(e)).apply(this,arguments))}return(0,s.default)(e,t),(0,r.default)(e,[{key:"render",value:function(){return u.default.createElement("div",{className:"sidebar"})}}]),e}(l.Component);e.default=(0,c.connect)(function(t){return{hash:t.metadata.hash}})(d)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(n(65)),o=a(n(2)),r=n(17);function a(t){return t&&t.__esModule?t:{default:t}}e.default=(0,r.connect)(function(t){return{app:t.metadata}})(function(t){var e=t.app,n=t.tag,r=t.View,a=e[n];return a?"loading"===a?o.default.createElement("div",{className:"tableObject loading"},n,": Loading"):a.err?o.default.createElement("div",{className:"tableObject error"},n," Error: ",a.err):o.default.createElement(r,(0,i.default)({data:a},t)):null})},function(t,e,n){t.exports={default:n(433),__esModule:!0}},function(t,e,n){n(434),t.exports=n(3).Object.assign},function(t,e,n){var i=n(4);i(i.S+i.F,"Object",{assign:n(435)})},function(t,e,n){"use strict";var i=n(42),o=n(87),r=n(57),a=n(31),s=n(67),l=Object.assign;t.exports=!l||n(23)(function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=i})?function(t,e){for(var n=a(t),l=arguments.length,u=1,c=o.f,h=r.f;l>u;)for(var d,f=s(arguments[u++]),p=c?i(f).concat(c(f)):i(f),g=p.length,m=0;g>m;)h.call(f,d=p[m++])&&(n[d]=f[d]);return n}:l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=p(n(65)),o=p(n(12)),r=p(n(7)),a=p(n(8)),s=p(n(13)),l=p(n(14)),u=n(2),c=p(u),h=n(17),d=n(11),f=n(51);function p(t){return t&&t.__esModule?t:{default:t}}var g=function(t){function e(){var t,n,i,a;(0,r.default)(this,e);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=i=(0,s.default)(this,(t=e.__proto__||(0,o.default)(e)).call.apply(t,[this].concat(u))),i.state={playing:!1},a=n,(0,s.default)(i,a)}return(0,l.default)(e,t),(0,a.default)(e,[{key:"render",value:function(){var t=this,e=this.props,n=e.app,i=e.data,o=e.size,r=this.state.playing,a=i.metadata.sugarcube.fp.replace("/var/www/files/","https://cube.syrianarchive.org/"),s=n.mediainfo,l=s.sha256,u=s.verified,h=n.mediainfo.metadata.mediainfo.video,f=n.keyframe.metadata.keyframe.basic[0];return c.default.createElement("div",{className:"video"},r?c.default.createElement("video",{src:a,autoPlay:!0,controls:!0,muted:!0}):c.default.createElement("div",{className:"bg",style:{width:d.widths[o||"sm"],height:d.widths[o||"sm"]/h.aspect_ratio,backgroundImage:"url("+(0,d.imageUrl)(u,l,f,o)+")"},onClick:function(){return t.setState({playing:!0})}},c.default.createElement("div",{className:"play"})))}}]),e}(u.Component);e.default=(0,h.connect)(function(){return{tag:"sugarcube"}})(function(t){return c.default.createElement(f.Gate,(0,i.default)({View:g},t))})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=u(n(56)),o=u(n(438)),r=u(n(66)),a=u(n(45));e.TableObject=h,e.TableArray=d,e.TableTuples=function(t){var e=t.tag,n=t.list;return n?s.default.createElement("div",null,e&&s.default.createElement("h3",null,e),s.default.createElement("table",{className:"tableTuples "+e},s.default.createElement("tbody",null,n.map(function(t,n){var i=(0,o.default)(t),r=i[0],a=i.slice(1);return s.default.createElement("tr",{key:e+"_"+n},s.default.createElement("th",null,(0,l.formatName)(r)),a.map(function(t,e){return s.default.createElement(p,{key:n+"_"+e,value:t})}))})))):null},e.TableRow=f,e.TableCell=p;var s=u(n(2)),l=n(11);function u(t){return t&&t.__esModule?t:{default:t}}var c="__HR__";function h(t){var e=t.tag,n=t.object,i=t.order,o=t.summary;if(!n)return null;if("loading"===n)return s.default.createElement("div",{className:"tableObject loading"},e,": Loading");if(n.err)return s.default.createElement("div",{className:"tableObject error"},e," Error: ",n.err);var l=(0,a.default)(n);if(i){var u=l.reduce(function(t,e){var n=i.indexOf(e);return-1!==n?t.order.push([n,e]):t.alpha.push(e),t},{order:[],alpha:[]});l=u.order.sort(function(t,e){return t[0]-e[0]}).map(function(t){var e=(0,r.default)(t,2);e[0];return e[1]}),o||(l=l.concat(u.alpha.sort()))}else l=l.sort();return s.default.createElement("div",null,e&&s.default.createElement("h3",null,e),s.default.createElement("table",{className:"tableObject "+e},s.default.createElement("tbody",null,l.map(function(t,e){return s.default.createElement(f,{key:t+"_"+e,name:t,value:n[t]})}))))}function d(t){var e=t.tag,n=t.list;return n?s.default.createElement("div",null,e&&s.default.createElement("h3",null,e),s.default.createElement("table",{className:"tableArray "+e},s.default.createElement("tbody",null,n.map(function(t,n){return s.default.createElement("tr",{key:e+"_"+n},s.default.createElement(p,{value:t}))})))):null}function f(t){var e=t.name,n=t.value;return e===c?s.default.createElement("tr",null,s.default.createElement("th",{className:"tr"},s.default.createElement("hr",null))):s.default.createElement("tr",null,s.default.createElement("th",null,(0,l.formatName)(e)),s.default.createElement(p,{name:e,value:n}))}function p(t){var e=t.value;return e&&"object"===(void 0===e?"undefined":(0,i.default)(e))&&(e=e._raw?e.value:e.length?s.default.createElement(d,{nested:!0,tag:"",list:e}):s.default.createElement(h,{nested:!0,tag:"",object:e})),s.default.createElement("td",null,e)}},function(t,e,n){"use strict";e.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(n(88));e.default=function(t){return Array.isArray(t)?t:(0,i.default)(t)}},function(t,e,n){var i=n(440);"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(26)(i,o);i.locals&&(t.exports=i.locals)},function(t,e,n){(t.exports=n(25)(!1)).push([t.i,"* {}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=p(n(12)),o=p(n(7)),r=p(n(8)),a=p(n(13)),s=p(n(14)),l=n(2),u=p(l),c=(n(21),n(17),n(89)),h=n(11),d=n(51),f=p(n(176));function p(t){return t&&t.__esModule?t:{default:t}}var g=function(t){function e(){var t,n,r,s;(0,o.default)(this,e);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=(0,a.default)(this,(t=e.__proto__||(0,i.default)(e)).call.apply(t,[this].concat(u))),r.state={keys:[],data:[],columns:[]},s=n,(0,a.default)(r,s)}return(0,s.default)(e,t),(0,r.default)(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.payload;console.log(e.url),fetch(e.url,{mode:"cors"}).then(function(t){return t.text()}).then(function(n){try{var i=n.split("\n")[0].split(",").map(function(t){return t.trim().replace(/\"/,"")}),o=f.default.toJSON(n,{headers:{included:!0}}),r=t.getColumns(i,o,e.fields);t.setState({keys:i,data:o,columns:r})}catch(t){console.error("error making json:",e.url),console.error(t)}})}},{key:"getColumns",value:function(t,e,n){var i=n.length?n[0].split(", "):t;return t.map(function(t,n){var o=i[n]||t;if(t.match("url")){var r=t.replace("url","label");return e.forEach(function(e){return e[r]=(0,h.domainFromUrl)(e[t])}),{title:o,field:r,formatter:"link",formatterParams:{target:"_blank",urlField:t},sorter:"string"}}switch(t){case"images":case"year":return{title:o,field:t.toLowerCase(),sorter:"number"};default:return{title:o,field:t.toLowerCase(),sorter:"string"}}})}},{key:"render",value:function(){this.props.payload;return this.state.data.length?u.default.createElement(c.ReactTabulator,{columns:this.state.columns,data:this.state.data,options:{height:Math.min(37*this.state.data.length+29,311),layout:"fitColumns",placeholder:"No Data Set"}}):u.default.createElement(d.Loader,null)}}]),e}(l.Component);e.default=g},function(t,e,n){"use strict";
+/*!
+ * is-extendable <https://github.com/jonschlinkert/is-extendable>
+ *
+ * Copyright (c) 2015, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */t.exports=function(t){return void 0!==t&&null!==t&&("object"==typeof t||"function"==typeof t)}},function(t,e,n){"use strict";n(444);var i=n(100),o=n(177);function r(t){this.options=o({},{headers:{included:!0,downcase:!0,upcase:!0},delimiter:"tab",decimalSign:"comma",outputDataType:"json",columnDelimiter:"\t",rowDelimiter:"\n",inputHeader:{},outputHeader:{},dataSelect:{},outputText:"",newline:"\n",indent:" ",commentLine:"//",commentLineEnd:"",tableName:"converter",useUnderscores:!0,includeWhiteSpace:!0,useTabsForIndent:!1},t),this.options.includeWhiteSpace?this.options.newline="\n":(this.options.indent="",this.options.newline="")}r.prototype.render=function(t){var e=[].slice.call(arguments,1);return this[t].apply(this,e)},r.prototype.json=function(t,e){for(var n,o=i({},this.options,e),r=(t=i({},t)).data,a=t.header||o.header,s=o.newline,l=r.length,u=a.names.length,c="[",h=0;h<l;h++){var d=r[h];c+="{";for(var f=0;f<u;f++)n="int"==a.types[f]||"float"==a.types[f]?d[f]||"null":'"'+(d[f]||"")+'"',c+='"'+a.names[f]+'":'+n,f<u-1&&(c+=",");c+="}",h<l-1&&(c+=","+s)}return c+="]"},r.prototype.jsonArrayCols=function(t,e){var n=i({},this.options,e),o=(t=i({},t)).data,r=t.header||n.header,a=n.indent,s=n.newline,l="",u=o.length,c=r.names.length;l+="{"+s;for(var h=0;h<c;h++){l+=a+'"'+r.names[h]+'":[';for(var d=0;d<u;d++)"int"==r.types[h]||"float"==r.types[h]?l+=o[d][h]||0:l+='"'+(o[d][h]||"")+'"',d<u-1&&(l+=",");l+="]",h<c-1&&(l+=","+s)}return l+=s+"}"},r.prototype.jsonArrayRows=function(t,e){var n=i({},this.options,e),o=(t=i({},t)).data,r=t.header||n.header,a=n.indent,s=n.newline,l="",u=o.length,c=r.names.length;l+="["+s;for(var h=0;h<u;h++){l+=a+"[";for(var d=0;d<c;d++)"int"==r.types[d]||"float"==r.types[d]?l+=o[h][d]||0:l+='"'+(o[h][d]||"")+'"',d<c-1&&(l+=",");l+="]",h<u-1&&(l+=","+s)}return l+=s+"]"},r.prototype.jsonDict=function(t,e){var n=i({},this.options,e),o=(t=i({},t)).data,r=t.header||n.header,a=n.indent,s=n.newline,l="",u=o.length,c=r.names.length;l+="{"+s;for(var h=0;h<u;h++){if(l+=a+'"'+o[h][0]+'": ',2==c)l+=f(h,1);else{l+="{ ";for(var d=1;d<c;d++)d>1&&(l+=", "),l+='"'+r.names[d]+'":'+f(h,d);l+="}"}h<u-1&&(l+=","+s)}function f(t,e){return"int"==r.types[e]||"float"==r.types[e]?o[t][e]||0:'"'+(o[t][e]||"")+'"'}return l+=s+"}"},r.prototype.as=function(t,e){for(var n,o=i({},this.options,e),r=(t=i({},t)).data,a=t.header||o.header,s=o.newline,l="[",u=r.length,c=a.names.length,h=0;h<u;h++){var d=r[h];l+="{";for(var f=0;f<c;f++)n="int"==a.types[f]||"float"==a.types[f]?d[f]||"null":'"'+(d[f]||"")+'"',l+=a.names[f]+":"+n,f<c-1&&(l+=",");l+="}",h<u-1&&(l+=","+s)}return l+="];"},r.prototype.asp=function(t,e){for(var n=i({},this.options,e),o=(t=i({},t)).data,r=t.header||n.header,a=n.newline,s="",l=o.length,u=r.names.length,c=0;c<l;c++){for(var h=o[c],d=0;d<u;d++)s+="myArray("+d+","+c+") = "+("int"==r.types[d]||"float"==r.types[d]?h[d]||"null":'"'+(h[d]||"")+'"')+a;s="Dim myArray("+(d-1)+","+(c-1)+")"+a+s}return s},r.prototype.html=function(t,e){var n=i({},this.options,e),o=(t=i({},t)).data,r=t.header||n.header,a=n.indent,s=n.newline,l="",u=o.length,c=r.names.length;l+="<table>"+s,l+=a+"<thead>"+s,l+=a+a+"<tr>"+s;for(var h=0;h<c;h++)l+=a+a+a+'<th class="'+r.names[h]+'-cell">',l+=r.names[h],l+="</th>"+s;l+=a+a+"</tr>"+s,l+=a+"</thead>"+s,l+=a+"<tbody>"+s;for(var d=0;d<u;d++){var f=o[d],p="";d===u-1?p=' class="lastRow"':0===d&&(p=' class="firstRow"'),l+=a+a+"<tr"+p+">"+s;for(var g=0;g<c;g++)l+=a+a+a+'<td class="'+r.names[g]+'-cell">',l+=f[g],l+="</td>"+s;l+=a+a+"</tr>"+s}return l+=a+"</tbody>"+s,l+="</table>"},r.prototype.mysql=function(t,e){var n=i({},this.options,e),o=(t=i({},t)).data,r=t.header||n.header,a=n.indent,s=n.newline,l="",u=o.length,c=r.names.length;l+="CREATE TABLE converter ("+s,l+=a+"id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,"+s;for(var h=0;h<c;h++){var d="VARCHAR(255)";"int"!=r.types[h]&&"float"!=r.types[h]||(d=r.types[h].toUpperCase()),l+=a+""+r.names[h]+" "+d,h<c-1&&(l+=","),l+=s}l+=");"+s,l+="INSERT INTO converter "+s+a+"(";for(var f=0;f<c;f++)l+=r.names[f],f<c-1&&(l+=",");l+=") "+s+"VALUES "+s;for(var p=0;p<u;p++){l+=a+"(";for(var g=0;g<c;g++)"int"==r.types[g]||"float"==r.types[g]?l+=o[p][g]||"null":l+="'"+(o[p][g]||"")+"'",g<c-1&&(l+=",");l+=")",p<u-1&&(l+=","+s)}return l+=";"},r.prototype.php=function(t,e){var n,o=i({},this.options,e),r=(t=i({},t)).data,a=t.header||o.header,s=o.indent,l=o.newline,u="",c=r.length,h=a.names.length;u+="array("+l;for(var d=0;d<c;d++){var f=r[d];u+=s+"array(";for(var p=0;p<h;p++)n="int"==a.types[p]||"float"==a.types[p]?f[p]||"null":'"'+(f[p]||"")+'"',u+='"'+a.names[p]+'"=>'+n,p<h-1&&(u+=",");u+=")",d<c-1&&(u+=","+l)}return u+=l+");"},r.prototype.python=function(t,e){for(var n,o=i({},this.options,e),r=(t=i({},t)).data,a=t.header||o.header,s=o.newline,l="[",u=r.length,c=a.names.length,h=0;h<u;h++){var d=r[h];l+="{";for(var f=0;f<c;f++)n="int"==a.types[f]||"float"==a.types[f]?d[f]||"None":'"'+(d[f]||"")+'"',l+='"'+a.names[f]+'":'+n,f<c-1&&(l+=",");l+="}",h<u-1&&(l+=","+s)}return l+="];"},r.prototype.ruby=function(t,e){var n,o=i({},this.options,e),r=(t=i({},t)).data,a=t.header||o.header,s=o.newline,l="",u=r.length,c=a.names.length;l+="[";for(var h=0;h<u;h++){var d=r[h];l+="{";for(var f=0;f<c;f++)n="int"==a.types[f]||"float"==a.types[f]?d[f]||"nil":'"'+(d[f]||"")+'"',l+='"'+a.names[f]+'"=>'+n,f<c-1&&(l+=",");l+="}",h<u-1&&(l+=","+s)}return l+="];"},r.prototype.xml=function(t,e){var n=i({},this.options,e),o=(t=i({},t)).data,r=t.header||n.header,a=n.indent,s=n.newline,l="",u=o.length,c=r.names.length;l='<?xml version="1.0" encoding="UTF-8"?>'+s,l+="<rows>"+s;for(var h=0;h<u;h++){var d=o[h];l+=a+"<row>"+s;for(var f=0;f<c;f++)l+=a+a+"<"+r.names[f]+">",l+=d[f]||"",l+="</"+r.names[f]+">"+s;l+=a+"</row>"+s}return l+="</rows>"},r.prototype.xmlProperties=function(t,e){var n=i({},this.options,e),o=(t=i({},t)).data,r=t.header||n.header,a=n.indent,s=n.newline,l="",u=o.length,c=r.names.length;l='<?xml version="1.0" encoding="UTF-8"?>'+s,l+="<rows>"+s;for(var h=0;h<u;h++){var d=o[h];l+=a+"<row ";for(var f=0;f<c;f++)l+=r.names[f]+"=",l+='"'+d[f]+'" ';l+="></row>"+s}return l+="</rows>"},r.prototype.xmlIllustrator=function(t,e){var n=i({},this.options,e),o=(t=i({},t)).data,r=t.header||n.header,a=n.indent,s=n.newline,l="",u=o.length,c=r.names.length;l='<?xml version="1.0" encoding="utf-8"?>'+s,l+='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd" ['+s,l+=a+'<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">'+s,l+=a+'<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">'+s,l+=a+'<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">'+s,l+=a+'<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">'+s,l+=a+'<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">'+s,l+=a+'<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">'+s,l+="]>"+s,l+="<svg>"+s,l+='<variableSets xmlns="&ns_vars;">'+s,l+=a+'<variableSet varSetName="binding1" locked="none">'+s,l+=a+a+"<variables>"+s;for(var h=0;h<c;h++)l+=a+a+a+'<variable varName="'+r.names[h]+'" trait="textcontent" category="&ns_flows;"></variable>'+s;l+=a+a+"</variables>"+s,l+=a+a+'<v:sampleDataSets xmlns:v="http://ns.adobe.com/Variables/1.0/" xmlns="http://ns.adobe.com/GenericCustomNamespace/1.0/">'+s;for(var d=0;d<u;d++){var f=o[d];l+=a+a+a+'<v:sampleDataSet dataSetName="'+f[0]+'">'+s;for(var p=0;p<c;p++)l+=a+a+a+a+"<"+r.names[p]+">"+s,l+=a+a+a+a+a+"<p>"+f[p]+"</p>"+s,l+=a+a+a+a+"</"+r.names[p]+">"+s;l+=a+a+a+"</v:sampleDataSet>"+s}return l+=a+a+"</v:sampleDataSets>"+s,l+=a+"</variableSet>"+s,l+="</variableSets>"+s,l+="</svg>"+s},t.exports=r},function(t,e,n){"use strict";
+/*!
+ * isobject <https://github.com/jonschlinkert/isobject>
+ *
+ * Copyright (c) 2014-2015, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */var i=n(445);t.exports=function(t){return null!=t&&"object"==typeof t&&!1===i(t)}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";
+/*!
+ * is-extendable <https://github.com/jonschlinkert/is-extendable>
+ *
+ * Copyright (c) 2015-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */var i=n(447);t.exports=function(t){return i(t)||"function"==typeof t||Array.isArray(t)}},function(t,e,n){"use strict";
+/*!
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */var i=n(448);function o(t){return!0===i(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,n;return!1!==o(t)&&("function"==typeof(e=t.constructor)&&(!1!==o(n=e.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")))}},function(t,e,n){"use strict";
+/*!
+ * isobject <https://github.com/jonschlinkert/isobject>
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},function(t,e,n){"use strict";
+/*!
+ * for-in <https://github.com/jonschlinkert/for-in>
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */t.exports=function(t,e,n){for(var i in t)if(!1===e.call(n,t[i],i,t))break}},function(t,e,n){"use strict";var i=n(451),o=n(100),r=n(177),a=/^\s*(\+|-)?((\d+([,\.]\d+)?)|([,\.]\d+))\s*$/;function s(t){this.options=r({},{headers:{included:!1,downcase:!0,upcase:!0},delimiter:"tab",decimalSign:"comma"},t)}s.prototype.parse=function(t,e){if("string"!=typeof t)throw new TypeError("expected a string");var n=o({},this.options,e),r=[],s=((t=t.replace(/(\r|\r\n)/g,"")).match(/,/g)||[]).length,l=(t.match(/\t/g)||[]).length;n.delimiter;for(var u=(r=function(t,e){var n,i=o({delim:","},e),r=new RegExp("(\\"+i.delim+'|\\n|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\'+i.delim+"\\n]*))","gi"),a=[[]],s=null;for(;s=r.exec(t);){var l=s[1];l.length&&l!=i.delim&&a.push([]),n=s[2]?s[2].replace(/""/g,'"'):s[3],a[a.length-1].push(n)}return a}(t=t.replace(/^\n+|\n+$/g,""),n)).length-1;u>=0;u--)for(var c=r[u].length-1;c>=0;c--)r[u][c]=r[u][c].replace(/([\t\n])/,"\\$1");var h=[],d=[],f=r[0].length;r.length;if(n.headers.included)h=r.splice(0,1)[0],r.length;else for(var p=0;p<f;p++)h.push("val"+String(p)),d.push("");if(n.headers.upcase)for(var g=h.length-1;g>=0;g--)h[g]=h[g].toUpperCase();if(n.headers.downcase)for(var m=h.length-1;m>=0;m--)h[m]=h[m].toLowerCase();for(var v=0;v<r.length;v++){r[v].length!=f&&this.log("Error parsing row "+String(v)+". Wrong number of columns.")}for(var y=r.length,b=0;b<h.length;b++){for(var w=0,_=0,x=0;x<y;x++)r[x]&&("comma"===n.decimalSign&&a.test(r[x][b])&&(r[x][b]=r[x][b].replace(",",".")),i(r[x][b])&&(_++,String(r[x][b]).indexOf(".")>0&&w++));d[u]=_/y>.9?w>0?"float":"int":"string"}return{data:r,header:{names:h,types:d}}},t.exports=s},function(t,e,n){"use strict";
+/*!
+ * is-number <https://github.com/jonschlinkert/is-number>
+ *
+ * Copyright (c) 2014-2015, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */var i=n(452);t.exports=function(t){var e=i(t);if("number"!==e&&"string"!==e)return!1;var n=+t;return n-n+1>=0&&""!==t}},function(t,e,n){var i=n(453),o=Object.prototype.toString;t.exports=function(t){if(void 0===t)return"undefined";if(null===t)return"null";if(!0===t||!1===t||t instanceof Boolean)return"boolean";if("string"==typeof t||t instanceof String)return"string";if("number"==typeof t||t instanceof Number)return"number";if("function"==typeof t||t instanceof Function)return"function";if(void 0!==Array.isArray&&Array.isArray(t))return"array";if(t instanceof RegExp)return"regexp";if(t instanceof Date)return"date";var e=o.call(t);return"[object RegExp]"===e?"regexp":"[object Date]"===e?"date":"[object Arguments]"===e?"arguments":"[object Error]"===e?"error":i(t)?"buffer":"[object Set]"===e?"set":"[object WeakSet]"===e?"weakset":"[object Map]"===e?"map":"[object WeakMap]"===e?"weakmap":"[object Symbol]"===e?"symbol":"[object Int8Array]"===e?"int8array":"[object Uint8Array]"===e?"uint8array":"[object Uint8ClampedArray]"===e?"uint8clampedarray":"[object Int16Array]"===e?"int16array":"[object Uint16Array]"===e?"uint16array":"[object Int32Array]"===e?"int32array":"[object Uint32Array]"===e?"uint32array":"[object Float32Array]"===e?"float32array":"[object Float64Array]"===e?"float64array":"object"}},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
+/*!
+ * Determine if an object is a Buffer
+ *
+ * @author Feross Aboukhadijeh <https://feross.org>
+ * @license MIT
+ */
+t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieCharts=e.CountriesByYear=void 0;var i=r(n(455)),o=r(n(460));function r(t){return t&&t.__esModule?t:{default:t}}e.CountriesByYear=i.default,e.PieCharts=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=g(n(126)),o=g(n(66)),r=g(n(45)),a=g(n(12)),s=g(n(7)),l=g(n(8)),u=g(n(13)),c=g(n(14)),h=n(2),d=g(h),f=(n(21),n(17),n(11),g(n(178)));n(179),n(180);var p=n(181);function g(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(){return(0,s.default)(this,e),(0,u.default)(this,(e.__proto__||(0,a.default)(e)).apply(this,arguments))}return(0,c.default)(e,t),(0,l.default)(e,[{key:"render",value:function(){var t=this.props.payload.data,e=t.paper,n=t.citations;if(!n.length)return null;var a={},s={};n.forEach(function(t){var e=t.year,n=t.addresses;e&&parseInt(e)&&(e=parseInt(e),a[e]=a[e]||{},n.forEach(function(t){var n=t.country;n&&(n in s?s[n]+=1:s[n]=1,n in a[e]?a[e][n]+=1:a[e][n]=1)}))});for(var l=(0,r.default)(a).map(function(t){return parseInt(t)}).sort(),u=l[0];u<l[-1];u++)u in a||(a[u]={});l=(0,r.default)(a).map(function(t){return parseInt(t)}).sort(),(0,r.default)(s).forEach(function(t){l.forEach(function(e){t in a[e]||(a[e][t]=0)})});var c=(0,r.default)(s).sort(function(t,e){return s[e]-s[t]}),h=c.slice(0,p.topCountryCount),g=c.slice(p.topCountryCount),m=[["x"].concat(l.map(function(t){return String(t)}))].concat(h.map(function(t){return[t].concat(l.map(function(e){return a[e][t]}))}));g.length&&m.push([p.otherCountriesLabel].concat(l.map(function(t){return g.reduce(function(e,n){return e+a[t][n]},0)})));for(var v=0,y=0,b=1;b<m[0].length;b++){y=0;for(var w=1;w<m.length;w++)y+=m[w][b];v=Math.max(y,v)}for(var _=[],x=0;x<v;x+=50)_.push(x);_[_.length-1]<v&&_.push("");var S=p.rainbow;return d.default.createElement("div",{className:"chart"},d.default.createElement(f.default,{data:{x:"x",columns:m,type:"bar",groups:[h.concat(p.otherCountriesLabel)]},axis:{x:{type:"category"},y:{show:!1},y2:{tick:{values:_},default:[0,286*v/261],show:!0}},legend:{position:"right"},color:{pattern:S},tooltip:{contents:function(t){var e=a[l[t[0].x]],n=(0,r.default)(e).map(function(t){return[t,e[t]]}).sort(function(t,e){return e[1]-t[1]}),s=n.slice(0,p.topCountryCount),u=n.slice(p.topCountryCount).reduce(function(t,e){return t+e[1]},0);s.push([p.otherCountriesLabel,u]);var c=s.filter(function(t){return!!t[1]}).map(function(t){var e=(0,o.default)(t,2),n=e[0],i=e[1],r=h.indexOf(n);return r<0&&(r=S.length-1),["<tr>","<td>","<span style='background-color:"+S[r]+"' class='swatch'></span>",n,"</td>","<td>",i,"</td>","</tr>"].join("")});return["<table class='c3-tooltip'>"].concat((0,i.default)(c),["</table>"]).join("")}}}),e.vetting&&d.default.createElement("div",{className:"caption"},e.name," dataset citations per country per year. We confirmed use of the dataset in ",n.length," papers, out of ",e.vetting.total," citations vetted."))}}]),e}(h.Component);e.default=m},function(t,e,n){
+/* @license C3.js v0.4.23 | (c) C3 Team and other contributors | http://c3js.org/ */
+!function(e,n){t.exports=n()}(0,function(){"use strict";var t,e,i={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",chartArcsBackground:"c3-chart-arcs-background",chartArcsGaugeUnit:"c3-chart-arcs-gauge-unit",chartArcsGaugeMax:"c3-chart-arcs-gauge-max",chartArcsGaugeMin:"c3-chart-arcs-gauge-min",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",eventRectsSingle:"c3-event-rects-single",eventRectsMultiple:"c3-event-rects-multiple",zoomRect:"c3-zoom-rect",brush:"c3-brush",focused:"c3-focused",defocused:"c3-defocused",region:"c3-region",regions:"c3-regions",title:"c3-title",tooltipContainer:"c3-tooltip-container",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",lines:"c3-lines",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",arcLabelLine:"c3-arc-label-line",arcs:"c3-arcs",area:"c3-area",areas:"c3-areas",empty:"c3-empty",text:"c3-text",texts:"c3-texts",gaugeValue:"c3-gauge-value",grid:"c3-grid",gridLines:"c3-grid-lines",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axis:"c3-axis",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendBackground:"c3-legend-background",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",legendItemHidden:"c3-legend-item-hidden",legendItemFocused:"c3-legend-item-focused",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},s=function(t){return t||0===t},l=function(t){return"function"==typeof t},u=function(t){return Array.isArray(t)},c=function(t){return"string"==typeof t},h=function(t){return void 0===t},d=function(t){return void 0!==t},f=function(t){return 10*Math.ceil(t/10)},p=function(t){return Math.ceil(t)+.5},g=function(t){return t[1]-t[0]},m=function(t){return void 0===t||null===t||c(t)&&0===t.length||"object"===(void 0===t?"undefined":o(t))&&0===Object.keys(t).length},v=function(t){return!C.isEmpty(t)},y=function(t,e,n){return d(t[e])?t[e]:n},b=function(t,e){var n=!1;return Object.keys(t).forEach(function(i){t[i]===e&&(n=!0)}),n},w=function(t){return"string"==typeof t?t.replace(/</g,"&lt;").replace(/>/g,"&gt;"):t},_=function(t){var e=t.getBoundingClientRect(),n=[t.pathSegList.getItem(0),t.pathSegList.getItem(1)];return{x:n[0].x,y:Math.min(n[0].y,n[1].y),width:e.width,height:e.height}};function x(t,e){this.component=t,this.params=e||{},this.d3=t.d3,this.scale=this.d3.scale.linear(),this.range,this.orient="bottom",this.innerTickSize=6,this.outerTickSize=this.params.withOuterTick?6:0,this.tickPadding=3,this.tickValues=null,this.tickFormat,this.tickArguments,this.tickOffset=0,this.tickCulling=!0,this.tickCentered,this.tickTextCharSize,this.tickTextRotate=this.params.tickTextRotate,this.tickLength,this.axis=this.generateAxis()}(e=x.prototype).axisX=function(t,e,n){t.attr("transform",function(t){return"translate("+Math.ceil(e(t)+n)+", 0)"})},e.axisY=function(t,e){t.attr("transform",function(t){return"translate(0,"+Math.ceil(e(t))+")"})},e.scaleExtent=function(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]},e.generateTicks=function(t){var e,n,i=[];if(t.ticks)return t.ticks.apply(t,this.tickArguments);for(n=t.domain(),e=Math.ceil(n[0]);e<n[1];e++)i.push(e);return i.length>0&&i[0]>0&&i.unshift(i[0]-(i[1]-i[0])),i},e.copyScale=function(){var t,e=this.scale.copy();return this.params.isCategory&&(t=this.scale.domain(),e.domain([t[0],t[1]-1])),e},e.textFormatted=function(t){var e=this.tickFormat?this.tickFormat(t):t;return void 0!==e?e:""},e.updateRange=function(){return this.range=this.scale.rangeExtent?this.scale.rangeExtent():this.scaleExtent(this.scale.range()),this.range},e.updateTickTextCharSize=function(t){var e=this;if(e.tickTextCharSize)return e.tickTextCharSize;var n={h:11.5,w:5.5};return t.select("text").text(function(t){return e.textFormatted(t)}).each(function(t){var i=this.getBoundingClientRect(),o=e.textFormatted(t),r=i.height,a=o?i.width/o.length:void 0;r&&a&&(n.h=r,n.w=a)}).text(""),e.tickTextCharSize=n,n},e.transitionise=function(t){return this.params.withoutTransition?t:this.d3.transition(t)},e.isVertical=function(){return"left"===this.orient||"right"===this.orient},e.tspanData=function(t,e,n,i){var o=this.params.tickMultiline?this.splitTickText(t,n,i):[].concat(this.textFormatted(t));return this.params.tickMultiline&&this.params.tickMultilineMax>0&&(o=this.ellipsify(o,this.params.tickMultilineMax)),o.map(function(t){return{index:e,splitted:t,length:o.length}})},e.splitTickText=function(t,e,n){var i,o,r,a=this,s=a.textFormatted(t),l=a.params.tickWidth;if("[object Array]"===Object.prototype.toString.call(s))return s;return(!l||l<=0)&&(l=a.isVertical()?95:a.params.isCategory?Math.ceil(n(e[1])-n(e[0]))-12:110),function t(e,n){o=void 0;for(var s=1;s<n.length;s++)if(" "===n.charAt(s)&&(o=s),i=n.substr(0,s+1),r=a.tickTextCharSize.w*i.length,l<r)return t(e.concat(n.substr(0,o||s)),n.slice(o?o+1:s));return e.concat(n)}([],s+"")},e.ellipsify=function(t,e){if(t.length<=e)return t;for(var n=t.slice(0,e),i=3,o=e-1;o>=0;o--){var r=n[o].length;if(n[o]=n[o].substr(0,r-i).padEnd(r,"."),(i-=r)<=0)break}return n},e.updateTickLength=function(){this.tickLength=Math.max(this.innerTickSize,0)+this.tickPadding},e.lineY2=function(t){var e=this.scale(t)+(this.tickCentered?0:this.tickOffset);return this.range[0]<e&&e<this.range[1]?this.innerTickSize:0},e.textY=function(){var t=this.tickTextRotate;return t?11.5-t/15*2.5*(t>0?1:-1):this.tickLength},e.textTransform=function(){var t=this.tickTextRotate;return t?"rotate("+t+")":""},e.textTextAnchor=function(){var t=this.tickTextRotate;return t?t>0?"start":"end":"middle"},e.tspanDx=function(){var t=this.tickTextRotate;return t?8*Math.sin(Math.PI*(t/180)):0},e.tspanDy=function(t,e){var n=this.tickTextCharSize.h;return 0===e&&(n=this.isVertical()?-((t.length-1)*(this.tickTextCharSize.h/2)-3):".71em"),n},e.generateAxis=function(){var t=this,e=t.d3,n=t.params;function i(o){o.each(function(){var o,r,a,s=i.g=e.select(this),l=this.__chart__||t.scale,u=this.__chart__=t.copyScale(),c=t.tickValues?t.tickValues:t.generateTicks(u),h=s.selectAll(".tick").data(c,u),d=h.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),f=h.exit().remove(),p=t.transitionise(h).style("opacity",1);n.isCategory?(t.tickOffset=Math.ceil((u(1)-u(0))/2),r=t.tickCentered?0:t.tickOffset,a=t.tickCentered?t.tickOffset:0):t.tickOffset=r=0,d.append("line"),d.append("text"),t.updateRange(),t.updateTickLength(),t.updateTickTextCharSize(s.select(".tick"));var g=p.select("line"),m=p.select("text"),v=h.select("text").selectAll("tspan").data(function(e,n){return t.tspanData(e,n,c,u)});v.enter().append("tspan"),v.exit().remove(),v.text(function(t){return t.splitted});var y=s.selectAll(".domain").data([0]),b=(y.enter().append("path").attr("class","domain"),t.transitionise(y));switch(t.orient){case"bottom":o=t.axisX,g.attr("x1",r).attr("x2",r).attr("y2",function(e,n){return t.lineY2(e,n)}),m.attr("x",0).attr("y",function(e,n){return t.textY(e,n)}).attr("transform",function(e,n){return t.textTransform(e,n)}).style("text-anchor",function(e,n){return t.textTextAnchor(e,n)}),v.attr("x",0).attr("dy",function(e,n){return t.tspanDy(e,n)}).attr("dx",function(e,n){return t.tspanDx(e,n)}),b.attr("d","M"+t.range[0]+","+t.outerTickSize+"V0H"+t.range[1]+"V"+t.outerTickSize);break;case"top":o=t.axisX,g.attr("x1",r).attr("x2",r).attr("y2",function(e,n){return-1*t.lineY2(e,n)}),m.attr("x",0).attr("y",function(e,i){return-1*t.textY(e,i)-(n.isCategory?2:t.tickLength-2)}).attr("transform",function(e,n){return t.textTransform(e,n)}).style("text-anchor",function(e,n){return t.textTextAnchor(e,n)}),v.attr("x",0).attr("dy",function(e,n){return t.tspanDy(e,n)}).attr("dx",function(e,n){return t.tspanDx(e,n)}),b.attr("d","M"+t.range[0]+","+-t.outerTickSize+"V0H"+t.range[1]+"V"+-t.outerTickSize);break;case"left":o=t.axisY,g.attr("x2",-t.innerTickSize).attr("y1",a).attr("y2",a),m.attr("x",-t.tickLength).attr("y",t.tickOffset).style("text-anchor","end"),v.attr("x",-t.tickLength).attr("dy",function(e,n){return t.tspanDy(e,n)}),b.attr("d","M"+-t.outerTickSize+","+t.range[0]+"H0V"+t.range[1]+"H"+-t.outerTickSize);break;case"right":o=t.axisY,g.attr("x2",t.innerTickSize).attr("y1",a).attr("y2",a),m.attr("x",t.tickLength).attr("y",t.tickOffset).style("text-anchor","start"),v.attr("x",t.tickLength).attr("dy",function(e,n){return t.tspanDy(e,n)}),b.attr("d","M"+t.outerTickSize+","+t.range[0]+"H0V"+t.range[1]+"H"+t.outerTickSize)}if(u.rangeBand){var w=u,_=w.rangeBand()/2;l=u=function(t){return w(t)+_}}else l.rangeBand?l=u:f.call(o,u,t.tickOffset);d.call(o,l,t.tickOffset),p.call(o,u,t.tickOffset)})}return i.scale=function(e){return arguments.length?(t.scale=e,i):t.scale},i.orient=function(e){return arguments.length?(t.orient=e in{top:1,right:1,bottom:1,left:1}?e+"":"bottom",i):t.orient},i.tickFormat=function(e){return arguments.length?(t.tickFormat=e,i):t.tickFormat},i.tickCentered=function(e){return arguments.length?(t.tickCentered=e,i):t.tickCentered},i.tickOffset=function(){return t.tickOffset},i.tickInterval=function(){var e;return(e=n.isCategory?2*t.tickOffset:(i.g.select("path.domain").node().getTotalLength()-2*t.outerTickSize)/i.g.selectAll("line").size())===1/0?0:e},i.ticks=function(){return arguments.length?(t.tickArguments=arguments,i):t.tickArguments},i.tickCulling=function(e){return arguments.length?(t.tickCulling=e,i):t.tickCulling},i.tickValues=function(e){if("function"==typeof e)t.tickValues=function(){return e(t.scale.domain())};else{if(!arguments.length)return t.tickValues;t.tickValues=e}return i},i};var S=function(n){function i(n){r(this,i);var o={fn:t,internal:{fn:e}},s=a(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,n,"axis",o));return s.d3=n.d3,s.internal=x,s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(i,M),i}();(t=S.prototype).init=function(){var t=this.owner,e=t.config,n=t.main;t.axes.x=n.append("g").attr("class",i.axis+" "+i.axisX).attr("clip-path",e.axis_x_inner?"":t.clipPathForXAxis).attr("transform",t.getTranslate("x")).style("visibility",e.axis_x_show?"visible":"hidden"),t.axes.x.append("text").attr("class",i.axisXLabel).attr("transform",e.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),t.axes.y=n.append("g").attr("class",i.axis+" "+i.axisY).attr("clip-path",e.axis_y_inner?"":t.clipPathForYAxis).attr("transform",t.getTranslate("y")).style("visibility",e.axis_y_show?"visible":"hidden"),t.axes.y.append("text").attr("class",i.axisYLabel).attr("transform",e.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),t.axes.y2=n.append("g").attr("class",i.axis+" "+i.axisY2).attr("transform",t.getTranslate("y2")).style("visibility",e.axis_y2_show?"visible":"hidden"),t.axes.y2.append("text").attr("class",i.axisY2Label).attr("transform",e.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))},t.getXAxis=function(t,e,n,i,o,r,a){var s=this.owner,l=s.config,u={isCategory:s.isCategorized(),withOuterTick:o,tickMultiline:l.axis_x_tick_multiline,tickMultilineMax:l.axis_x_tick_multiline?Number(l.axis_x_tick_multilineMax):0,tickWidth:l.axis_x_tick_width,tickTextRotate:a?0:l.axis_x_tick_rotate,withoutTransition:r},c=new this.internal(this,u).axis.scale(t).orient(e);return s.isTimeSeries()&&i&&"function"!=typeof i&&(i=i.map(function(t){return s.parseDate(t)})),c.tickFormat(n).tickValues(i),s.isCategorized()&&(c.tickCentered(l.axis_x_tick_centered),m(l.axis_x_tick_culling)&&(l.axis_x_tick_culling=!1)),c},t.updateXAxisTickValues=function(t,e){var n,i=this.owner,o=i.config;return(o.axis_x_tick_fit||o.axis_x_tick_count)&&(n=this.generateTickValues(i.mapTargetsToUniqueXs(t),o.axis_x_tick_count,i.isTimeSeries())),e?e.tickValues(n):(i.xAxis.tickValues(n),i.subXAxis.tickValues(n)),n},t.getYAxis=function(t,e,n,i,o,r,a){var s=this.owner,l=s.config,u={withOuterTick:o,withoutTransition:r,tickTextRotate:a?0:l.axis_y_tick_rotate},c=new this.internal(this,u).axis.scale(t).orient(e).tickFormat(n);return s.isTimeSeriesY()?c.ticks(s.d3.time[l.axis_y_tick_time_value],l.axis_y_tick_time_interval):c.tickValues(i),c},t.getId=function(t){var e=this.owner.config;return t in e.data_axes?e.data_axes[t]:"y"},t.getXAxisTickFormat=function(){var t=this.owner,e=t.config,n=t.isTimeSeries()?t.defaultAxisTimeFormat:t.isCategorized()?t.categoryName:function(t){return t<0?t.toFixed(0):t};return e.axis_x_tick_format&&(l(e.axis_x_tick_format)?n=e.axis_x_tick_format:t.isTimeSeries()&&(n=function(n){return n?t.axisTimeFormat(e.axis_x_tick_format)(n):""})),l(n)?function(e){return n.call(t,e)}:n},t.getTickValues=function(t,e){return t||(e?e.tickValues():void 0)},t.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},t.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},t.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},t.getLabelOptionByAxisId=function(t){var e,n=this.owner.config;return"y"===t?e=n.axis_y_label:"y2"===t?e=n.axis_y2_label:"x"===t&&(e=n.axis_x_label),e},t.getLabelText=function(t){var e=this.getLabelOptionByAxisId(t);return c(e)?e:e?e.text:null},t.setLabelText=function(t,e){var n=this.owner.config,i=this.getLabelOptionByAxisId(t);c(i)?"y"===t?n.axis_y_label=e:"y2"===t?n.axis_y2_label=e:"x"===t&&(n.axis_x_label=e):i&&(i.text=e)},t.getLabelPosition=function(t,e){var n=this.getLabelOptionByAxisId(t),i=n&&"object"===(void 0===n?"undefined":o(n))&&n.position?n.position:e;return{isInner:i.indexOf("inner")>=0,isOuter:i.indexOf("outer")>=0,isLeft:i.indexOf("left")>=0,isCenter:i.indexOf("center")>=0,isRight:i.indexOf("right")>=0,isTop:i.indexOf("top")>=0,isMiddle:i.indexOf("middle")>=0,isBottom:i.indexOf("bottom")>=0}},t.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")},t.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},t.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},t.getLabelPositionById=function(t){return"y2"===t?this.getY2AxisLabelPosition():"y"===t?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},t.textForXAxisLabel=function(){return this.getLabelText("x")},t.textForYAxisLabel=function(){return this.getLabelText("y")},t.textForY2AxisLabel=function(){return this.getLabelText("y2")},t.xForAxisLabel=function(t,e){var n=this.owner;return t?e.isLeft?0:e.isCenter?n.width/2:n.width:e.isBottom?-n.height:e.isMiddle?-n.height/2:0},t.dxForAxisLabel=function(t,e){return t?e.isLeft?"0.5em":e.isRight?"-0.5em":"0":e.isTop?"-0.5em":e.isBottom?"0.5em":"0"},t.textAnchorForAxisLabel=function(t,e){return t?e.isLeft?"start":e.isCenter?"middle":"end":e.isBottom?"start":e.isMiddle?"middle":"end"},t.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},t.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},t.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},t.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},t.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},t.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},t.dyForXAxisLabel=function(){var t=this.owner,e=t.config,n=this.getXAxisLabelPosition();return e.axis_rotated?n.isInner?"1.2em":-25-(t.config.axis_x_inner?0:this.getMaxTickWidth("x")):n.isInner?"-0.5em":e.axis_x_height?e.axis_x_height-10:"3em"},t.dyForYAxisLabel=function(){var t=this.owner,e=this.getYAxisLabelPosition();return t.config.axis_rotated?e.isInner?"-0.5em":"3em":e.isInner?"1.2em":-10-(t.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},t.dyForY2AxisLabel=function(){var t=this.owner,e=this.getY2AxisLabelPosition();return t.config.axis_rotated?e.isInner?"1.2em":"-2.2em":e.isInner?"-0.5em":15+(t.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},t.textAnchorForXAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(!t.config.axis_rotated,this.getXAxisLabelPosition())},t.textAnchorForYAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getYAxisLabelPosition())},t.textAnchorForY2AxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getY2AxisLabelPosition())},t.getMaxTickWidth=function(t,e){var n,i,o,r,a=this.owner,s=a.config,l=0;return e&&a.currentMaxTickWidths[t]?a.currentMaxTickWidths[t]:(a.svg&&(n=a.filterTargetsToShow(a.data.targets),"y"===t?(i=a.y.copy().domain(a.getYDomain(n,"y")),o=this.getYAxis(i,a.yOrient,s.axis_y_tick_format,a.yAxisTickValues,!1,!0,!0)):"y2"===t?(i=a.y2.copy().domain(a.getYDomain(n,"y2")),o=this.getYAxis(i,a.y2Orient,s.axis_y2_tick_format,a.y2AxisTickValues,!1,!0,!0)):(i=a.x.copy().domain(a.getXDomain(n)),o=this.getXAxis(i,a.xOrient,a.xAxisTickFormat,a.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(n,o)),(r=a.d3.select("body").append("div").classed("c3",!0)).append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0).append("g").call(o).each(function(){a.d3.select(this).selectAll("text").each(function(){var t=this.getBoundingClientRect();l<t.width&&(l=t.width)}),r.remove()})),a.currentMaxTickWidths[t]=l<=0?a.currentMaxTickWidths[t]:l,a.currentMaxTickWidths[t])},t.updateLabels=function(t){var e=this.owner,n=e.main.select("."+i.axisX+" ."+i.axisXLabel),o=e.main.select("."+i.axisY+" ."+i.axisYLabel),r=e.main.select("."+i.axisY2+" ."+i.axisY2Label);(t?n.transition():n).attr("x",this.xForXAxisLabel.bind(this)).attr("dx",this.dxForXAxisLabel.bind(this)).attr("dy",this.dyForXAxisLabel.bind(this)).text(this.textForXAxisLabel.bind(this)),(t?o.transition():o).attr("x",this.xForYAxisLabel.bind(this)).attr("dx",this.dxForYAxisLabel.bind(this)).attr("dy",this.dyForYAxisLabel.bind(this)).text(this.textForYAxisLabel.bind(this)),(t?r.transition():r).attr("x",this.xForY2AxisLabel.bind(this)).attr("dx",this.dxForY2AxisLabel.bind(this)).attr("dy",this.dyForY2AxisLabel.bind(this)).text(this.textForY2AxisLabel.bind(this))},t.getPadding=function(t,e,n,i){var o="number"==typeof t?t:t[e];return s(o)?"ratio"===t.unit?t[e]*i:this.convertPixelsToAxisPadding(o,i):n},t.convertPixelsToAxisPadding=function(t,e){var n=this.owner;return e*(t/(n.config.axis_rotated?n.width:n.height))},t.generateTickValues=function(t,e,n){var i,o,r,a,s,u,c,h=t;if(e)if(1===(i=l(e)?e():e))h=[t[0]];else if(2===i)h=[t[0],t[t.length-1]];else if(i>2){for(a=i-2,o=t[0],s=((r=t[t.length-1])-o)/(a+1),h=[o],u=0;u<a;u++)c=+o+s*(u+1),h.push(n?new Date(c):c);h.push(r)}return n||(h=h.sort(function(t,e){return t-e})),h},t.generateTransitions=function(t){var e=this.owner.axes;return{axisX:t?e.x.transition().duration(t):e.x,axisY:t?e.y.transition().duration(t):e.y,axisY2:t?e.y2.transition().duration(t):e.y2,axisSubX:t?e.subx.transition().duration(t):e.subx}},t.redraw=function(t,e){var n=this.owner;n.axes.x.style("opacity",e?0:1),n.axes.y.style("opacity",e?0:1),n.axes.y2.style("opacity",e?0:1),n.axes.subx.style("opacity",e?0:1),t.axisX.call(n.xAxis),t.axisY.call(n.yAxis),t.axisY2.call(n.y2Axis),t.axisSubX.call(n.subXAxis)};var E,C,T={version:"0.4.23"};function M(t,e,n){this.owner=t,T.chart.internal[e]=n}function P(t){var e=this.internal=new L(this);e.loadConfig(t),e.beforeInit(t),e.init(),e.afterInit(t),function t(e,n,i){Object.keys(e).forEach(function(o){n[o]=e[o].bind(i),Object.keys(e[o]).length>0&&t(e[o],n[o],i)})}(E,this,this)}function L(t){var e=this;e.d3=window.d3?window.d3:n(457),e.api=t,e.config=e.getDefaultConfig(),e.data={},e.cache={},e.axes={}}return T.generate=function(t){return new P(t)},T.chart={fn:P.prototype,internal:{fn:L.prototype}},E=T.chart.fn,(C=T.chart.internal.fn).beforeInit=function(){},C.afterInit=function(){},C.init=function(){var t=this,e=t.config;if(t.initParams(),e.data_url)t.convertUrlToData(e.data_url,e.data_mimeType,e.data_headers,e.data_keys,t.initWithData);else if(e.data_json)t.initWithData(t.convertJsonToData(e.data_json,e.data_keys));else if(e.data_rows)t.initWithData(t.convertRowsToData(e.data_rows));else{if(!e.data_columns)throw Error("url or json or rows or columns is required.");t.initWithData(t.convertColumnsToData(e.data_columns))}},C.initParams=function(){var t=this,e=t.d3,n=t.config;t.clipId="c3-"+ +new Date+"-clip",t.clipIdForXAxis=t.clipId+"-xaxis",t.clipIdForYAxis=t.clipId+"-yaxis",t.clipIdForGrid=t.clipId+"-grid",t.clipIdForSubchart=t.clipId+"-subchart",t.clipPath=t.getClipPath(t.clipId),t.clipPathForXAxis=t.getClipPath(t.clipIdForXAxis),t.clipPathForYAxis=t.getClipPath(t.clipIdForYAxis),t.clipPathForGrid=t.getClipPath(t.clipIdForGrid),t.clipPathForSubchart=t.getClipPath(t.clipIdForSubchart),t.dragStart=null,t.dragging=!1,t.flowing=!1,t.cancelClick=!1,t.mouseover=!1,t.transiting=!1,t.color=t.generateColor(),t.levelColor=t.generateLevelColor(),t.dataTimeFormat=n.data_xLocaltime?e.time.format:e.time.format.utc,t.axisTimeFormat=n.axis_x_localtime?e.time.format:e.time.format.utc,t.defaultAxisTimeFormat=t.axisTimeFormat.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%-m/%-d",function(t){return t.getDay()&&1!==t.getDate()}],["%-m/%-d",function(t){return 1!==t.getDate()}],["%-m/%-d",function(t){return t.getMonth()}],["%Y/%-m/%-d",function(){return!0}]]),t.hiddenTargetIds=[],t.hiddenLegendIds=[],t.focusedTargetIds=[],t.defocusedTargetIds=[],t.xOrient=n.axis_rotated?n.axis_x_inner?"right":"left":n.axis_x_inner?"top":"bottom",t.yOrient=n.axis_rotated?n.axis_y_inner?"top":"bottom":n.axis_y_inner?"right":"left",t.y2Orient=n.axis_rotated?n.axis_y2_inner?"bottom":"top":n.axis_y2_inner?"left":"right",t.subXOrient=n.axis_rotated?"left":"bottom",t.isLegendRight="right"===n.legend_position,t.isLegendInset="inset"===n.legend_position,t.isLegendTop="top-left"===n.legend_inset_anchor||"top-right"===n.legend_inset_anchor,t.isLegendLeft="top-left"===n.legend_inset_anchor||"bottom-left"===n.legend_inset_anchor,t.legendStep=0,t.legendItemWidth=0,t.legendItemHeight=0,t.currentMaxTickWidths={x:0,y:0,y2:0},t.rotated_padding_left=30,t.rotated_padding_right=n.axis_rotated&&!n.axis_x_show?0:30,t.rotated_padding_top=5,t.withoutFadeIn={},t.intervalForObserveInserted=void 0,t.axes.subx=e.selectAll([])},C.initChartElements=function(){this.initBar&&this.initBar(),this.initLine&&this.initLine(),this.initArc&&this.initArc(),this.initGauge&&this.initGauge(),this.initText&&this.initText()},C.initWithData=function(t){var e,n,o=this,r=o.d3,a=o.config,s=!0;o.axis=new S(o),o.initPie&&o.initPie(),o.initBrush&&o.initBrush(),o.initZoom&&o.initZoom(),a.bindto?"function"==typeof a.bindto.node?o.selectChart=a.bindto:o.selectChart=r.select(a.bindto):o.selectChart=r.selectAll([]),o.selectChart.empty()&&(o.selectChart=r.select(document.createElement("div")).style("opacity",0),o.observeInserted(o.selectChart),s=!1),o.selectChart.html("").classed("c3",!0),o.data.xs={},o.data.targets=o.convertDataToTargets(t),a.data_filter&&(o.data.targets=o.data.targets.filter(a.data_filter)),a.data_hide&&o.addHiddenTargetIds(!0===a.data_hide?o.mapToIds(o.data.targets):a.data_hide),a.legend_hide&&o.addHiddenLegendIds(!0===a.legend_hide?o.mapToIds(o.data.targets):a.legend_hide),o.updateSizes(),o.updateScales(),o.x.domain(r.extent(o.getXDomain(o.data.targets))),o.y.domain(o.getYDomain(o.data.targets,"y")),o.y2.domain(o.getYDomain(o.data.targets,"y2")),o.subX.domain(o.x.domain()),o.subY.domain(o.y.domain()),o.subY2.domain(o.y2.domain()),o.orgXDomain=o.x.domain(),o.brush&&o.brush.scale(o.subX),a.zoom_enabled&&o.zoom.scale(o.x),o.svg=o.selectChart.append("svg").style("overflow","hidden").on("mouseenter",function(){return a.onmouseover.call(o)}).on("mouseleave",function(){return a.onmouseout.call(o)}),o.config.svg_classname&&o.svg.attr("class",o.config.svg_classname),e=o.svg.append("defs"),o.clipChart=o.appendClip(e,o.clipId),o.clipXAxis=o.appendClip(e,o.clipIdForXAxis),o.clipYAxis=o.appendClip(e,o.clipIdForYAxis),o.clipGrid=o.appendClip(e,o.clipIdForGrid),o.clipSubchart=o.appendClip(e,o.clipIdForSubchart),o.updateSvgSize(),n=o.main=o.svg.append("g").attr("transform",o.getTranslate("main")),o.initSubchart&&o.initSubchart(),o.initTooltip&&o.initTooltip(),o.initLegend&&o.initLegend(),o.initTitle&&o.initTitle(),n.append("text").attr("class",i.text+" "+i.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),o.initRegion(),o.initGrid(),n.append("g").attr("clip-path",o.clipPath).attr("class",i.chart),a.grid_lines_front&&o.initGridLines(),o.initEventRect(),o.initChartElements(),n.insert("rect",a.zoom_privileged?null:"g."+i.regions).attr("class",i.zoomRect).attr("width",o.width).attr("height",o.height).style("opacity",0).on("dblclick.zoom",null),a.axis_x_extent&&o.brush.extent(o.getDefaultExtent()),o.axis.init(),o.updateTargets(o.data.targets),s&&(o.updateDimension(),o.config.oninit.call(o),o.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1})),o.bindResize(),o.api.element=o.selectChart.node()},C.smoothLines=function(t,e){var n=this;"grid"===e&&t.each(function(){var t=n.d3.select(this),e=t.attr("x1"),i=t.attr("x2"),o=t.attr("y1"),r=t.attr("y2");t.attr({x1:Math.ceil(e),x2:Math.ceil(i),y1:Math.ceil(o),y2:Math.ceil(r)})})},C.updateSizes=function(){var t=this,e=t.config,n=t.legend?t.getLegendHeight():0,i=t.legend?t.getLegendWidth():0,o=t.isLegendRight||t.isLegendInset?0:n,r=t.hasArcType(),a=e.axis_rotated||r?0:t.getHorizontalAxisHeight("x"),s=e.subchart_show&&!r?e.subchart_size_height+a:0;t.currentWidth=t.getCurrentWidth(),t.currentHeight=t.getCurrentHeight(),t.margin=e.axis_rotated?{top:t.getHorizontalAxisHeight("y2")+t.getCurrentPaddingTop(),right:r?0:t.getCurrentPaddingRight(),bottom:t.getHorizontalAxisHeight("y")+o+t.getCurrentPaddingBottom(),left:s+(r?0:t.getCurrentPaddingLeft())}:{top:4+t.getCurrentPaddingTop(),right:r?0:t.getCurrentPaddingRight(),bottom:a+s+o+t.getCurrentPaddingBottom(),left:r?0:t.getCurrentPaddingLeft()},t.margin2=e.axis_rotated?{top:t.margin.top,right:NaN,bottom:20+o,left:t.rotated_padding_left}:{top:t.currentHeight-s-o,right:NaN,bottom:a+o,left:t.margin.left},t.margin3={top:0,right:NaN,bottom:0,left:0},t.updateSizeForLegend&&t.updateSizeForLegend(n,i),t.width=t.currentWidth-t.margin.left-t.margin.right,t.height=t.currentHeight-t.margin.top-t.margin.bottom,t.width<0&&(t.width=0),t.height<0&&(t.height=0),t.width2=e.axis_rotated?t.margin.left-t.rotated_padding_left-t.rotated_padding_right:t.width,t.height2=e.axis_rotated?t.height:t.currentHeight-t.margin2.top-t.margin2.bottom,t.width2<0&&(t.width2=0),t.height2<0&&(t.height2=0),t.arcWidth=t.width-(t.isLegendRight?i+10:0),t.arcHeight=t.height-(t.isLegendRight?0:10),t.hasType("gauge")&&!e.gauge_fullCircle&&(t.arcHeight+=t.height-t.getGaugeLabelHeight()),t.updateRadius&&t.updateRadius(),t.isLegendRight&&r&&(t.margin3.left=t.arcWidth/2+1.1*t.radiusExpanded)},C.updateTargets=function(t){var e=this;e.updateTargetsForText(t),e.updateTargetsForBar(t),e.updateTargetsForLine(t),e.hasArcType()&&e.updateTargetsForArc&&e.updateTargetsForArc(t),e.updateTargetsForSubchart&&e.updateTargetsForSubchart(t),e.showTargets()},C.showTargets=function(){var t=this;t.svg.selectAll("."+i.target).filter(function(e){return t.isTargetToShow(e.id)}).transition().duration(t.config.transition_duration).style("opacity",1)},C.redraw=function(t,e){var n,o,r,a,s,l,u,c,h,d,f,p,g,m,v,b,w,_,x,S,E,C,T,M,P,L,A,k,O,R=this,D=R.main,j=R.d3,z=R.config,N=R.getShapeIndices(R.isAreaType),I=R.getShapeIndices(R.isBarType),F=R.getShapeIndices(R.isLineType),H=R.hasArcType(),G=R.filterTargetsToShow(R.data.targets),V=R.xv.bind(R);if(n=y(t=t||{},"withY",!0),o=y(t,"withSubchart",!0),r=y(t,"withTransition",!0),l=y(t,"withTransform",!1),u=y(t,"withUpdateXDomain",!1),c=y(t,"withUpdateOrgXDomain",!1),h=y(t,"withTrimXDomain",!0),g=y(t,"withUpdateXAxis",u),d=y(t,"withLegend",!1),f=y(t,"withEventRect",!0),p=y(t,"withDimension",!0),a=y(t,"withTransitionForExit",r),s=y(t,"withTransitionForAxis",r),x=r?z.transition_duration:0,S=a?x:0,E=s?x:0,e=e||R.axis.generateTransitions(E),d&&z.legend_show?R.updateLegend(R.mapToIds(R.data.targets),t,e):p&&R.updateDimension(!0),R.isCategorized()&&0===G.length&&R.x.domain([0,R.axes.x.selectAll(".tick").size()]),G.length?(R.updateXDomain(G,u,c,h),z.axis_x_tick_values||(M=R.axis.updateXAxisTickValues(G))):(R.xAxis.tickValues([]),R.subXAxis.tickValues([])),z.zoom_rescale&&!t.flow&&(A=R.x.orgDomain()),R.y.domain(R.getYDomain(G,"y",A)),R.y2.domain(R.getYDomain(G,"y2",A)),!z.axis_y_tick_values&&z.axis_y_tick_count&&R.yAxis.tickValues(R.axis.generateTickValues(R.y.domain(),z.axis_y_tick_count)),!z.axis_y2_tick_values&&z.axis_y2_tick_count&&R.y2Axis.tickValues(R.axis.generateTickValues(R.y2.domain(),z.axis_y2_tick_count)),R.axis.redraw(e,H),R.axis.updateLabels(r),(u||g)&&G.length)if(z.axis_x_tick_culling&&M){for(P=1;P<M.length;P++)if(M.length/P<z.axis_x_tick_culling_max){L=P;break}R.svg.selectAll("."+i.axisX+" .tick text").each(function(t){var e=M.indexOf(t);e>=0&&j.select(this).style("display",e%L?"none":"block")})}else R.svg.selectAll("."+i.axisX+" .tick text").style("display","block");m=R.generateDrawArea?R.generateDrawArea(N,!1):void 0,v=R.generateDrawBar?R.generateDrawBar(I):void 0,b=R.generateDrawLine?R.generateDrawLine(F,!1):void 0,w=R.generateXYForText(N,I,F,!0),_=R.generateXYForText(N,I,F,!1),n&&(R.subY.domain(R.getYDomain(G,"y")),R.subY2.domain(R.getYDomain(G,"y2"))),R.updateXgridFocus(),D.select("text."+i.text+"."+i.empty).attr("x",R.width/2).attr("y",R.height/2).text(z.data_empty_label_text).transition().style("opacity",G.length?0:1),R.updateGrid(x),R.updateRegion(x),R.updateBar(S),R.updateLine(S),R.updateArea(S),R.updateCircle(),R.hasDataLabel()&&R.updateText(S),R.redrawTitle&&R.redrawTitle(),R.redrawArc&&R.redrawArc(x,S,l),R.redrawSubchart&&R.redrawSubchart(o,e,x,S,N,I,F),D.selectAll("."+i.selectedCircles).filter(R.isBarType.bind(R)).selectAll("circle").remove(),z.interaction_enabled&&!t.flow&&f&&(R.redrawEventRect(),R.updateZoom&&R.updateZoom()),R.updateCircleY(),k=(R.config.axis_rotated?R.circleY:R.circleX).bind(R),O=(R.config.axis_rotated?R.circleX:R.circleY).bind(R),t.flow&&(T=R.generateFlow({targets:G,flow:t.flow,duration:t.flow.duration,drawBar:v,drawLine:b,drawArea:m,cx:k,cy:O,xv:V,xForText:w,yForText:_})),(x||T)&&R.isTabVisible()?j.transition().duration(x).each(function(){var e=[];[R.redrawBar(v,!0),R.redrawLine(b,!0),R.redrawArea(m,!0),R.redrawCircle(k,O,!0),R.redrawText(w,_,t.flow,!0),R.redrawRegion(!0),R.redrawGrid(!0)].forEach(function(t){t.forEach(function(t){e.push(t)})}),C=R.generateWait(),e.forEach(function(t){C.add(t)})}).call(C,function(){T&&T(),z.onrendered&&z.onrendered.call(R)}):(R.redrawBar(v),R.redrawLine(b),R.redrawArea(m),R.redrawCircle(k,O),R.redrawText(w,_,t.flow),R.redrawRegion(),R.redrawGrid(),z.onrendered&&z.onrendered.call(R)),R.mapToIds(R.data.targets).forEach(function(t){R.withoutFadeIn[t]=!0})},C.updateAndRedraw=function(t){var e,n=this,i=n.config;(t=t||{}).withTransition=y(t,"withTransition",!0),t.withTransform=y(t,"withTransform",!1),t.withLegend=y(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=y(t,"withTransitionForTransform",t.withTransition),n.updateSizes(),t.withLegend&&i.legend_show||(e=n.axis.generateTransitions(t.withTransitionForAxis?i.transition_duration:0),n.updateScales(),n.updateSvgSize(),n.transformAll(t.withTransitionForTransform,e)),n.redraw(t,e)},C.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},C.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},C.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0},C.isCustomX=function(){var t=this.config;return!this.isTimeSeries()&&(t.data_x||v(t.data_xs))},C.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},C.getTranslate=function(t){var e,n,i=this,o=i.config;return"main"===t?(e=p(i.margin.left),n=p(i.margin.top)):"context"===t?(e=p(i.margin2.left),n=p(i.margin2.top)):"legend"===t?(e=i.margin3.left,n=i.margin3.top):"x"===t?(e=0,n=o.axis_rotated?0:i.height):"y"===t?(e=0,n=o.axis_rotated?i.height:0):"y2"===t?(e=o.axis_rotated?0:i.width,n=o.axis_rotated?1:0):"subx"===t?(e=0,n=o.axis_rotated?0:i.height2):"arc"===t&&(e=i.arcWidth/2,n=i.arcHeight/2-(i.hasType("gauge")?6:0)),"translate("+e+","+n+")"},C.initialOpacity=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?1:0},C.initialOpacityForCircle=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?this.opacityForCircle(t):0},C.opacityForCircle=function(t){var e=(l(this.config.point_show)?this.config.point_show(t):this.config.point_show)?1:0;return s(t.value)?this.isScatterType(t)?.5:e:0},C.opacityForText=function(){return this.hasDataLabel()?1:0},C.xx=function(t){return t?this.x(t.x):null},C.xv=function(t){var e=this,n=t.value;return e.isTimeSeries()?n=e.parseDate(t.value):e.isCategorized()&&"string"==typeof t.value&&(n=e.config.axis_x_categories.indexOf(t.value)),Math.ceil(e.x(n))},C.yv=function(t){var e=t.axis&&"y2"===t.axis?this.y2:this.y;return Math.ceil(e(t.value))},C.subxx=function(t){return t?this.subX(t.x):null},C.transformMain=function(t,e){var n,o,r,a=this;e&&e.axisX?n=e.axisX:(n=a.main.select("."+i.axisX),t&&(n=n.transition())),e&&e.axisY?o=e.axisY:(o=a.main.select("."+i.axisY),t&&(o=o.transition())),e&&e.axisY2?r=e.axisY2:(r=a.main.select("."+i.axisY2),t&&(r=r.transition())),(t?a.main.transition():a.main).attr("transform",a.getTranslate("main")),n.attr("transform",a.getTranslate("x")),o.attr("transform",a.getTranslate("y")),r.attr("transform",a.getTranslate("y2")),a.main.select("."+i.chartArcs).attr("transform",a.getTranslate("arc"))},C.transformAll=function(t,e){var n=this;n.transformMain(t,e),n.config.subchart_show&&n.transformContext(t,e),n.legend&&n.transformLegend(t)},C.updateSvgSize=function(){var t=this,e=t.svg.select(".c3-brush .background");t.svg.attr("width",t.currentWidth).attr("height",t.currentHeight),t.svg.selectAll(["#"+t.clipId,"#"+t.clipIdForGrid]).select("rect").attr("width",t.width).attr("height",t.height),t.svg.select("#"+t.clipIdForXAxis).select("rect").attr("x",t.getXAxisClipX.bind(t)).attr("y",t.getXAxisClipY.bind(t)).attr("width",t.getXAxisClipWidth.bind(t)).attr("height",t.getXAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForYAxis).select("rect").attr("x",t.getYAxisClipX.bind(t)).attr("y",t.getYAxisClipY.bind(t)).attr("width",t.getYAxisClipWidth.bind(t)).attr("height",t.getYAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForSubchart).select("rect").attr("width",t.width).attr("height",e.size()?e.attr("height"):0),t.svg.select("."+i.zoomRect).attr("width",t.width).attr("height",t.height),t.selectChart.style("max-height",t.currentHeight+"px")},C.updateDimension=function(t){var e=this;t||(e.config.axis_rotated?(e.axes.x.call(e.xAxis),e.axes.subx.call(e.subXAxis)):(e.axes.y.call(e.yAxis),e.axes.y2.call(e.y2Axis))),e.updateSizes(),e.updateScales(),e.updateSvgSize(),e.transformAll(!1)},C.observeInserted=function(t){var e,n=this;"undefined"!=typeof MutationObserver?(e=new MutationObserver(function(i){i.forEach(function(i){"childList"===i.type&&i.previousSibling&&(e.disconnect(),n.intervalForObserveInserted=window.setInterval(function(){t.node().parentNode&&(window.clearInterval(n.intervalForObserveInserted),n.updateDimension(),n.brush&&n.brush.update(),n.config.oninit.call(n),n.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),t.transition().style("opacity",1))},10))})})).observe(t.node(),{attributes:!0,childList:!0,characterData:!0}):window.console.error("MutationObserver not defined.")},C.bindResize=function(){var t=this,e=t.config;if(t.resizeFunction=t.generateResize(),t.resizeFunction.add(function(){e.onresize.call(t)}),e.resize_auto&&t.resizeFunction.add(function(){void 0!==t.resizeTimeout&&window.clearTimeout(t.resizeTimeout),t.resizeTimeout=window.setTimeout(function(){delete t.resizeTimeout,t.api.flush()},100)}),t.resizeFunction.add(function(){e.onresized.call(t)}),t.resizeIfElementDisplayed=function(){null!=t.api&&t.api.element.offsetParent&&t.resizeFunction()},window.attachEvent)window.attachEvent("onresize",t.resizeIfElementDisplayed);else if(window.addEventListener)window.addEventListener("resize",t.resizeIfElementDisplayed,!1);else{var n=window.onresize;n?n.add&&n.remove||(n=t.generateResize()).add(window.onresize):n=t.generateResize(),n.add(t.resizeFunction),window.onresize=function(){t.api.element.offsetParent&&n()}}},C.generateResize=function(){var t=[];function e(){t.forEach(function(t){t()})}return e.add=function(e){t.push(e)},e.remove=function(e){for(var n=0;n<t.length;n++)if(t[n]===e){t.splice(n,1);break}},e},C.endall=function(t,e){var n=0;t.each(function(){++n}).each("end",function(){--n||e.apply(this,arguments)})},C.generateWait=function(){var t=[],e=function(e,n){var i=setInterval(function(){var e=0;t.forEach(function(t){if(t.empty())e+=1;else try{t.transition()}catch(t){e+=1}}),e===t.length&&(clearInterval(i),n&&n())},10)};return e.add=function(e){t.push(e)},e},C.parseDate=function(t){var e;return t instanceof Date?e=t:"string"==typeof t?e=this.dataTimeFormat(this.config.data_xFormat).parse(t):"object"===(void 0===t?"undefined":o(t))?e=new Date(+t):"number"!=typeof t||isNaN(t)||(e=new Date(+t)),e&&!isNaN(+e)||window.console.error("Failed to parse x '"+t+"' to Date object"),e},C.isTabVisible=function(){var t;return void 0!==document.hidden?t="hidden":void 0!==document.mozHidden?t="mozHidden":void 0!==document.msHidden?t="msHidden":void 0!==document.webkitHidden&&(t="webkitHidden"),!document[t]},C.isValue=s,C.isFunction=l,C.isString=c,C.isUndefined=h,C.isDefined=d,C.ceil10=f,C.asHalfPixel=p,C.diffDomain=g,C.isEmpty=m,C.notEmpty=v,C.notEmpty=v,C.getOption=y,C.hasValue=b,C.sanitise=w,C.getPathBox=_,C.CLASS=i,Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),n=this,i=function(){},o=function(){return n.apply(this instanceof i?this:t,e.concat(Array.prototype.slice.call(arguments)))};return i.prototype=this.prototype,o.prototype=new i,o}),"SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,n){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=n},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=n},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=n},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=n},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=n},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,n,i,o,r,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=n,this._x1=i,this._y1=o,this._x2=r,this._y2=a},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,n,i,o,r,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=n,this._x1=i,this._y1=o,this._x2=r,this._y2=a},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=n,this._x1=i,this._y1=o},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=n,this._x1=i,this._y1=o},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,n,i,o,r,a,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=n,this._r1=i,this._r2=o,this._angle=r,this._largeArcFlag=a,this._sweepFlag=s},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,n,i,o,r,a,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=n,this._r1=i,this._r2=o,this._angle=r,this._largeArcFlag=a,this._sweepFlag=s},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=n,this._x2=i,this._y2=o},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=n,this._x2=i,this._y2=o},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=n},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=n},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,n,i,o,r){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,n,i,o,r)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,n,i,o,r){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,n,i,o,r)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,n,i){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,n,i){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,n,i,o,r,a){return new window.SVGPathSegArcAbs(void 0,t,e,n,i,o,r,a)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,n,i,o,r,a){return new window.SVGPathSegArcRel(void 0,t,e,n,i,o,r,a)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,n,i){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,n,i){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";var e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));var n=e.pathSegList.numberOfItems-1;if(n<=0)return 0;do{if(e.pathSegList.removeItem(n),t>e.getTotalLength())break;n--}while(n>0);return n})),"SVGPathSegList"in window||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(this._pathElement){var e=!1;t.forEach(function(t){"d"==t.attributeName&&(e=!0)}),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))}},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(t){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach(function(t){t._owningPathSegList=null}),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);var e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){var e="",n=!0;return t.forEach(function(t){n?(n=!1,e+=t._asPathString()):e+=" "+t._asPathString()}),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||0==t.length)return[];var e=this,n=function(){this.pathSegList=[]};n.prototype.appendSegment=function(t){this.pathSegList.push(t)};var i=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};i.prototype._isCurrentSpace=function(){var t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},i.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},i.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},i.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},i.prototype.peekSegmentType=function(){var t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},i.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},i.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},i.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;var t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},i.prototype._parseNumber=function(){var t=0,e=0,n=1,i=0,o=1,r=1,a=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,o=-1),!(this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))){for(var s=this._currentIndex;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=s)for(var l=this._currentIndex-1,u=1;l>=s;)e+=u*(this._string.charAt(l--)-"0"),u*=10;if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)n*=10,i+=(this._string.charAt(this._currentIndex)-"0")/n,this._currentIndex+=1}if(this._currentIndex!=a&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,r=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}var c=e+i;if(c*=o,t&&(c*=Math.pow(10,r*t)),a!=this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),c}},i.prototype._parseArcFlag=function(){if(!(this._currentIndex>=this._endIndex)){var t=!1,e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t}},i.prototype.parseSegment=function(){var t=this._string[this._currentIndex],n=this._pathSegTypeFromChar(t);if(n==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if((n=this._nextCommandHelper(t,this._previousCommand))==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=n,n){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicRel(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);default:throw"Unknown path seg type."}};var o=new n,r=new i(t);if(!r.initialCommandIsMoveTo())return[];for(;r.hasMoreData();){var a=r.parseSegment();if(!a)return[];o.appendSegment(a)}return o.pathSegList}),String.prototype.padEnd||(String.prototype.padEnd=function(t,e){return t>>=0,e=String(void 0!==e?e:" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),String(this)+e.slice(0,t))}),E.axis=function(){},E.axis.labels=function(t){var e=this.internal;arguments.length&&(Object.keys(t).forEach(function(n){e.axis.setLabelText(n,t[n])}),e.axis.updateLabels())},E.axis.max=function(t){var e=this.internal,n=e.config;if(!arguments.length)return{x:n.axis_x_max,y:n.axis_y_max,y2:n.axis_y2_max};"object"===(void 0===t?"undefined":o(t))?(s(t.x)&&(n.axis_x_max=t.x),s(t.y)&&(n.axis_y_max=t.y),s(t.y2)&&(n.axis_y2_max=t.y2)):n.axis_y_max=n.axis_y2_max=t,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},E.axis.min=function(t){var e=this.internal,n=e.config;if(!arguments.length)return{x:n.axis_x_min,y:n.axis_y_min,y2:n.axis_y2_min};"object"===(void 0===t?"undefined":o(t))?(s(t.x)&&(n.axis_x_min=t.x),s(t.y)&&(n.axis_y_min=t.y),s(t.y2)&&(n.axis_y2_min=t.y2)):n.axis_y_min=n.axis_y2_min=t,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},E.axis.range=function(t){if(!arguments.length)return{max:this.axis.max(),min:this.axis.min()};d(t.max)&&this.axis.max(t.max),d(t.min)&&this.axis.min(t.min)},E.category=function(t,e){var n=this.internal,i=n.config;return arguments.length>1&&(i.axis_x_categories[t]=e,n.redraw()),i.axis_x_categories[t]},E.categories=function(t){var e=this.internal,n=e.config;return arguments.length?(n.axis_x_categories=t,e.redraw(),n.axis_x_categories):n.axis_x_categories},E.resize=function(t){var e=this.internal.config;e.size_width=t?t.width:null,e.size_height=t?t.height:null,this.flush()},E.flush=function(){this.internal.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},E.destroy=function(){var t=this.internal;if(window.clearInterval(t.intervalForObserveInserted),void 0!==t.resizeTimeout&&window.clearTimeout(t.resizeTimeout),window.detachEvent)window.detachEvent("onresize",t.resizeIfElementDisplayed);else if(window.removeEventListener)window.removeEventListener("resize",t.resizeIfElementDisplayed);else{var e=window.onresize;e&&e.add&&e.remove&&e.remove(t.resizeFunction)}return t.resizeFunction.remove(),t.selectChart.classed("c3",!1).html(""),Object.keys(t).forEach(function(e){t[e]=null}),null},E.color=function(t){return this.internal.color(t)},E.data=function(t){var e=this.internal.data.targets;return void 0===t?e:e.filter(function(e){return[].concat(t).indexOf(e.id)>=0})},E.data.shown=function(t){return this.internal.filterTargetsToShow(this.data(t))},E.data.values=function(t){var e,n=null;return t&&(n=(e=this.data(t))[0]?e[0].values.map(function(t){return t.value}):null),n},E.data.names=function(t){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",t)},E.data.colors=function(t){return this.internal.updateDataAttributes("colors",t)},E.data.axes=function(t){return this.internal.updateDataAttributes("axes",t)},E.flow=function(t){var e,n,i,o,r,a,l,u=this.internal,c=[],h=u.getMaxDataCount(),f=0,p=0;if(t.json)n=u.convertJsonToData(t.json,t.keys);else if(t.rows)n=u.convertRowsToData(t.rows);else{if(!t.columns)return;n=u.convertColumnsToData(t.columns)}e=u.convertDataToTargets(n,!0),u.data.targets.forEach(function(t){var n,i,o=!1;for(n=0;n<e.length;n++)if(t.id===e[n].id){for(o=!0,t.values[t.values.length-1]&&(p=t.values[t.values.length-1].index+1),f=e[n].values.length,i=0;i<f;i++)e[n].values[i].index=p+i,u.isTimeSeries()||(e[n].values[i].x=p+i);t.values=t.values.concat(e[n].values),e.splice(n,1);break}o||c.push(t.id)}),u.data.targets.forEach(function(t){var e,n;for(e=0;e<c.length;e++)if(t.id===c[e])for(p=t.values[t.values.length-1].index+1,n=0;n<f;n++)t.values.push({id:t.id,index:p+n,x:u.isTimeSeries()?u.getOtherTargetX(p+n):p+n,value:null})}),u.data.targets.length&&e.forEach(function(t){var e,n=[];for(e=u.data.targets[0].values[0].index;e<p;e++)n.push({id:t.id,index:e,x:u.isTimeSeries()?u.getOtherTargetX(e):e,value:null});t.values.forEach(function(t){t.index+=p,u.isTimeSeries()||(t.x+=p)}),t.values=n.concat(t.values)}),u.data.targets=u.data.targets.concat(e),u.getMaxDataCount(),r=(o=u.data.targets[0]).values[0],d(t.to)?(f=0,l=u.isTimeSeries()?u.parseDate(t.to):t.to,o.values.forEach(function(t){t.x<l&&f++})):d(t.length)&&(f=t.length),h?1===h&&u.isTimeSeries()&&(a=(o.values[o.values.length-1].x-r.x)/2,i=[new Date(+r.x-a),new Date(+r.x+a)],u.updateXDomain(null,!0,!0,!1,i)):(a=u.isTimeSeries()?o.values.length>1?o.values[o.values.length-1].x-r.x:r.x-u.getXDomain(u.data.targets)[0]:1,i=[r.x-a,r.x],u.updateXDomain(null,!0,!0,!1,i)),u.updateTargets(u.data.targets),u.redraw({flow:{index:r.index,length:f,duration:s(t.duration)?t.duration:u.config.transition_duration,done:t.done,orgDataCount:h},withLegend:!0,withTransition:h>1,withTrimXDomain:!1,withUpdateXAxis:!0})},C.generateFlow=function(t){var e=this,n=e.config,o=e.d3;return function(){var r,a,s,l,u=t.targets,c=t.flow,h=t.drawBar,d=t.drawLine,f=t.drawArea,p=t.cx,m=t.cy,v=t.xv,y=t.xForText,b=t.yForText,w=t.duration,_=c.index,x=c.length,S=e.getValueOnIndex(e.data.targets[0].values,_),E=e.getValueOnIndex(e.data.targets[0].values,_+x),C=e.x.domain(),T=c.duration||w,M=c.done||function(){},P=e.generateWait(),L=e.xgrid||o.selectAll([]),A=e.xgridLines||o.selectAll([]),k=e.mainRegion||o.selectAll([]),O=e.mainText||o.selectAll([]),R=e.mainBar||o.selectAll([]),D=e.mainLine||o.selectAll([]),j=e.mainArea||o.selectAll([]),z=e.mainCircle||o.selectAll([]);e.flowing=!0,e.data.targets.forEach(function(t){t.values.splice(0,x)}),l=e.updateXDomain(u,!0,!0),e.updateXGrid&&e.updateXGrid(!0),c.orgDataCount?r=1===c.orgDataCount||(S&&S.x)===(E&&E.x)?e.x(C[0])-e.x(l[0]):e.isTimeSeries()?e.x(C[0])-e.x(l[0]):e.x(S.x)-e.x(E.x):1!==e.data.targets[0].values.length?r=e.x(C[0])-e.x(l[0]):e.isTimeSeries()?(S=e.getValueOnIndex(e.data.targets[0].values,0),E=e.getValueOnIndex(e.data.targets[0].values,e.data.targets[0].values.length-1),r=e.x(S.x)-e.x(E.x)):r=g(l)/2,a=g(C)/g(l),s="translate("+r+",0) scale("+a+",1)",e.hideXGridFocus(),o.transition().ease("linear").duration(T).each(function(){P.add(e.axes.x.transition().call(e.xAxis)),P.add(R.transition().attr("transform",s)),P.add(D.transition().attr("transform",s)),P.add(j.transition().attr("transform",s)),P.add(z.transition().attr("transform",s)),P.add(O.transition().attr("transform",s)),P.add(k.filter(e.isRegionOnX).transition().attr("transform",s)),P.add(L.transition().attr("transform",s)),P.add(A.transition().attr("transform",s))}).call(P,function(){var t,o=[],r=[],a=[];if(x){for(t=0;t<x;t++)o.push("."+i.shape+"-"+(_+t)),r.push("."+i.text+"-"+(_+t)),a.push("."+i.eventRect+"-"+(_+t));e.svg.selectAll("."+i.shapes).selectAll(o).remove(),e.svg.selectAll("."+i.texts).selectAll(r).remove(),e.svg.selectAll("."+i.eventRects).selectAll(a).remove(),e.svg.select("."+i.xgrid).remove()}L.attr("transform",null).attr(e.xgridAttr),A.attr("transform",null),A.select("line").attr("x1",n.axis_rotated?0:v).attr("x2",n.axis_rotated?e.width:v),A.select("text").attr("x",n.axis_rotated?e.width:0).attr("y",v),R.attr("transform",null).attr("d",h),D.attr("transform",null).attr("d",d),j.attr("transform",null).attr("d",f),z.attr("transform",null).attr("cx",p).attr("cy",m),O.attr("transform",null).attr("x",y).attr("y",b).style("fill-opacity",e.opacityForText.bind(e)),k.attr("transform",null),k.select("rect").filter(e.isRegionOnX).attr("x",e.regionX.bind(e)).attr("width",e.regionWidth.bind(e)),n.interaction_enabled&&e.redrawEventRect(),M(),e.flowing=!1})}},E.focus=function(t){var e,n=this.internal;t=n.mapToTargetIds(t),e=n.svg.selectAll(n.selectorTargets(t.filter(n.isTargetToShow,n))),this.revert(),this.defocus(),e.classed(i.focused,!0).classed(i.defocused,!1),n.hasArcType()&&n.expandArc(t),n.toggleFocusLegend(t,!0),n.focusedTargetIds=t,n.defocusedTargetIds=n.defocusedTargetIds.filter(function(e){return t.indexOf(e)<0})},E.defocus=function(t){var e=this.internal;t=e.mapToTargetIds(t),e.svg.selectAll(e.selectorTargets(t.filter(e.isTargetToShow,e))).classed(i.focused,!1).classed(i.defocused,!0),e.hasArcType()&&e.unexpandArc(t),e.toggleFocusLegend(t,!1),e.focusedTargetIds=e.focusedTargetIds.filter(function(e){return t.indexOf(e)<0}),e.defocusedTargetIds=t},E.revert=function(t){var e=this.internal;t=e.mapToTargetIds(t),e.svg.selectAll(e.selectorTargets(t)).classed(i.focused,!1).classed(i.defocused,!1),e.hasArcType()&&e.unexpandArc(t),e.config.legend_show&&(e.showLegend(t.filter(e.isLegendToShow.bind(e))),e.legend.selectAll(e.selectorLegends(t)).filter(function(){return e.d3.select(this).classed(i.legendItemFocused)}).classed(i.legendItemFocused,!1)),e.focusedTargetIds=[],e.defocusedTargetIds=[]},E.xgrids=function(t){var e=this.internal,n=e.config;return t?(n.grid_x_lines=t,e.redrawWithoutRescale(),n.grid_x_lines):n.grid_x_lines},E.xgrids.add=function(t){var e=this.internal;return this.xgrids(e.config.grid_x_lines.concat(t||[]))},E.xgrids.remove=function(t){this.internal.removeGridLines(t,!0)},E.ygrids=function(t){var e=this.internal,n=e.config;return t?(n.grid_y_lines=t,e.redrawWithoutRescale(),n.grid_y_lines):n.grid_y_lines},E.ygrids.add=function(t){var e=this.internal;return this.ygrids(e.config.grid_y_lines.concat(t||[]))},E.ygrids.remove=function(t){this.internal.removeGridLines(t,!1)},E.groups=function(t){var e=this.internal,n=e.config;return h(t)?n.data_groups:(n.data_groups=t,e.redraw(),n.data_groups)},E.legend=function(){},E.legend.show=function(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},E.legend.hide=function(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},E.load=function(t){var e=this.internal,n=e.config;t.xs&&e.addXs(t.xs),"names"in t&&E.data.names.bind(this)(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(e){n.data_classes[e]=t.classes[e]}),"categories"in t&&e.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(e){n.data_axes[e]=t.axes[e]}),"colors"in t&&Object.keys(t.colors).forEach(function(e){n.data_colors[e]=t.colors[e]}),"cacheIds"in t&&e.hasCaches(t.cacheIds)?e.load(e.getCaches(t.cacheIds),t.done):"unload"in t?e.unload(e.mapToTargetIds("boolean"==typeof t.unload&&t.unload?null:t.unload),function(){e.loadFromArgs(t)}):e.loadFromArgs(t)},E.unload=function(t){var e=this.internal;(t=t||{})instanceof Array?t={ids:t}:"string"==typeof t&&(t={ids:[t]}),e.unload(e.mapToTargetIds(t.ids),function(){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),t.done&&t.done()})},E.regions=function(t){var e=this.internal,n=e.config;return t?(n.regions=t,e.redrawWithoutRescale(),n.regions):n.regions},E.regions.add=function(t){var e=this.internal,n=e.config;return t?(n.regions=n.regions.concat(t),e.redrawWithoutRescale(),n.regions):n.regions},E.regions.remove=function(t){var e,n,o,r=this.internal,a=r.config;return t=t||{},e=r.getOption(t,"duration",a.transition_duration),n=r.getOption(t,"classes",[i.region]),o=r.main.select("."+i.regions).selectAll(n.map(function(t){return"."+t})),(e?o.transition().duration(e):o).style("opacity",0).remove(),a.regions=a.regions.filter(function(t){var e=!1;return!t.class||(t.class.split(" ").forEach(function(t){n.indexOf(t)>=0&&(e=!0)}),!e)}),a.regions},E.selected=function(t){var e=this.internal,n=e.d3;return n.merge(e.main.selectAll("."+i.shapes+e.getTargetSelectorSuffix(t)).selectAll("."+i.shape).filter(function(){return n.select(this).classed(i.SELECTED)}).map(function(t){return t.map(function(t){var e=t.__data__;return e.data?e.data:e})}))},E.select=function(t,e,n){var o=this.internal,r=o.d3,a=o.config;a.data_selection_enabled&&o.main.selectAll("."+i.shapes).selectAll("."+i.shape).each(function(s,l){var u=r.select(this),c=s.data?s.data.id:s.id,h=o.getToggle(this,s).bind(o),f=a.data_selection_grouped||!t||t.indexOf(c)>=0,p=!e||e.indexOf(l)>=0,g=u.classed(i.SELECTED);u.classed(i.line)||u.classed(i.area)||(f&&p?a.data_selection_isselectable(s)&&!g&&h(!0,u.classed(i.SELECTED,!0),s,l):d(n)&&n&&g&&h(!1,u.classed(i.SELECTED,!1),s,l))})},E.unselect=function(t,e){var n=this.internal,o=n.d3,r=n.config;r.data_selection_enabled&&n.main.selectAll("."+i.shapes).selectAll("."+i.shape).each(function(a,s){var l=o.select(this),u=a.data?a.data.id:a.id,c=n.getToggle(this,a).bind(n),h=r.data_selection_grouped||!t||t.indexOf(u)>=0,d=!e||e.indexOf(s)>=0,f=l.classed(i.SELECTED);l.classed(i.line)||l.classed(i.area)||h&&d&&r.data_selection_isselectable(a)&&f&&c(!1,l.classed(i.SELECTED,!1),a,s)})},E.show=function(t,e){var n,i=this.internal;t=i.mapToTargetIds(t),e=e||{},i.removeHiddenTargetIds(t),(n=i.svg.selectAll(i.selectorTargets(t))).transition().style("opacity",1,"important").call(i.endall,function(){n.style("opacity",null).style("opacity",1)}),e.withLegend&&i.showLegend(t),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},E.hide=function(t,e){var n,i=this.internal;t=i.mapToTargetIds(t),e=e||{},i.addHiddenTargetIds(t),(n=i.svg.selectAll(i.selectorTargets(t))).transition().style("opacity",0,"important").call(i.endall,function(){n.style("opacity",null).style("opacity",0)}),e.withLegend&&i.hideLegend(t),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},E.toggle=function(t,e){var n=this,i=this.internal;i.mapToTargetIds(t).forEach(function(t){i.isTargetToShow(t)?n.hide(t,e):n.show(t,e)})},E.tooltip=function(){},E.tooltip.show=function(t){var e,n,i=this.internal;t.mouse&&(n=t.mouse),t.data?i.isMultipleX()?(n=[i.x(t.data.x),i.getYScale(t.data.id)(t.data.value)],e=null):e=s(t.data.index)?t.data.index:i.getIndexByX(t.data.x):void 0!==t.x?e=i.getIndexByX(t.x):void 0!==t.index&&(e=t.index),i.dispatchEvent("mouseover",e,n),i.dispatchEvent("mousemove",e,n),i.config.tooltip_onshow.call(i,t.data)},E.tooltip.hide=function(){this.internal.dispatchEvent("mouseout",0),this.internal.config.tooltip_onhide.call(this)},E.transform=function(t,e){var n=this.internal,i=["pie","donut"].indexOf(t)>=0?{withTransform:!0}:null;n.transformTo(e,t,i)},C.transformTo=function(t,e,n){var i=this,o=!i.hasArcType(),r=n||{withTransitionForAxis:o};r.withTransitionForTransform=!1,i.transiting=!1,i.setTargetType(t,e),i.updateTargets(i.data.targets),i.updateAndRedraw(r)},E.x=function(t){var e=this.internal;return arguments.length&&(e.updateTargetX(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs},E.xs=function(t){var e=this.internal;return arguments.length&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs},E.zoom=function(t){var e=this.internal;return t&&(e.isTimeSeries()&&(t=t.map(function(t){return e.parseDate(t)})),e.brush.extent(t),e.redraw({withUpdateXDomain:!0,withY:e.config.zoom_rescale}),e.config.zoom_onzoom.call(this,e.x.orgDomain())),e.brush.extent()},E.zoom.enable=function(t){var e=this.internal;e.config.zoom_enabled=t,e.updateAndRedraw()},E.unzoom=function(){var t=this.internal;t.brush.clear().update(),t.redraw({withUpdateXDomain:!0})},E.zoom.max=function(t){var e=this.internal,n=e.config,i=e.d3;if(0!==t&&!t)return n.zoom_x_max;n.zoom_x_max=i.max([e.orgXDomain[1],t])},E.zoom.min=function(t){var e=this.internal,n=e.config,i=e.d3;if(0!==t&&!t)return n.zoom_x_min;n.zoom_x_min=i.min([e.orgXDomain[0],t])},E.zoom.range=function(t){if(!arguments.length)return{max:this.domain.max(),min:this.domain.min()};d(t.max)&&this.domain.max(t.max),d(t.min)&&this.domain.min(t.min)},C.initPie=function(){var t=this.d3;this.pie=t.layout.pie().value(function(t){return t.values.reduce(function(t,e){return t+e.value},0)}),this.pie.sort(this.getOrderFunction()||null)},C.updateRadius=function(){var t=this,e=t.config,n=e.gauge_width||e.donut_width,i=t.filterTargetsToShow(t.data.targets).length*t.config.gauge_arcs_minWidth;t.radiusExpanded=Math.min(t.arcWidth,t.arcHeight)/2*(t.hasType("gauge")?.85:1),t.radius=.95*t.radiusExpanded,t.innerRadiusRatio=n?(t.radius-n)/t.radius:.6,t.innerRadius=t.hasType("donut")||t.hasType("gauge")?t.radius*t.innerRadiusRatio:0,t.gaugeArcWidth=n||(i<=t.radius-t.innerRadius?t.radius-t.innerRadius:i<=t.radius?i:t.radius)},C.updateArc=function(){var t=this;t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded(),t.svgArcExpandedSub=t.getSvgArcExpanded(.98)},C.updateAngle=function(t){var e,n,i,o,r=this,a=r.config,s=!1,l=0;return a?(r.pie(r.filterTargetsToShow(r.data.targets)).forEach(function(e){s||e.data.id!==t.data.id||(s=!0,(t=e).index=l),l++}),isNaN(t.startAngle)&&(t.startAngle=0),isNaN(t.endAngle)&&(t.endAngle=t.startAngle),r.isGaugeType(t.data)&&(e=a.gauge_min,n=a.gauge_max,i=Math.PI*(a.gauge_fullCircle?2:1)/(n-e),o=t.value<e?0:t.value<n?t.value-e:n-e,t.startAngle=a.gauge_startingAngle,t.endAngle=t.startAngle+i*o),s?t:null):null},C.getSvgArc=function(){var t=this,e=t.hasType("gauge"),n=t.gaugeArcWidth/t.filterTargetsToShow(t.data.targets).length,i=t.d3.svg.arc().outerRadius(function(i){return e?t.radius-n*i.index:t.radius}).innerRadius(function(i){return e?t.radius-n*(i.index+1):t.innerRadius}),o=function(e,n){var o;return n?i(e):(o=t.updateAngle(e))?i(o):"M 0 0"};return o.centroid=i.centroid,o},C.getSvgArcExpanded=function(t){t=t||1;var e=this,n=e.hasType("gauge"),i=e.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length,o=Math.min(e.radiusExpanded*t-e.radius,.8*i-100*(1-t)),r=e.d3.svg.arc().outerRadius(function(r){return n?e.radius-i*r.index+o:e.radiusExpanded*t}).innerRadius(function(t){return n?e.radius-i*(t.index+1):e.innerRadius});return function(t){var n=e.updateAngle(t);return n?r(n):"M 0 0"}},C.getArc=function(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},C.transformForArcLabel=function(t){var e,n,i,o,r,a=this,s=a.config,u=a.updateAngle(t),c="",h=a.hasType("gauge");if(u&&!h)e=this.svgArc.centroid(u),n=isNaN(e[0])?0:e[0],i=isNaN(e[1])?0:e[1],o=Math.sqrt(n*n+i*i),c="translate("+n*(r=a.hasType("donut")&&s.donut_label_ratio?l(s.donut_label_ratio)?s.donut_label_ratio(t,a.radius,o):s.donut_label_ratio:a.hasType("pie")&&s.pie_label_ratio?l(s.pie_label_ratio)?s.pie_label_ratio(t,a.radius,o):s.pie_label_ratio:a.radius&&o?(36/a.radius>.375?1.175-36/a.radius:.8)*a.radius/o:0)+","+i*r+")";else if(u&&h&&a.filterTargetsToShow(a.data.targets).length>1){var d=Math.sin(u.endAngle-Math.PI/2);c="translate("+(n=Math.cos(u.endAngle-Math.PI/2)*(a.radiusExpanded+25))+","+(i=d*(a.radiusExpanded+15-Math.abs(10*d))+3)+")"}return c},C.getArcRatio=function(t){var e=this.config,n=Math.PI*(this.hasType("gauge")&&!e.gauge_fullCircle?1:2);return t?(t.endAngle-t.startAngle)/n:null},C.convertToArcData=function(t){return this.addName({id:t.data.id,value:t.value,ratio:this.getArcRatio(t),index:t.index})},C.textForArcLabel=function(t){var e,n,i,o,r,a=this;return a.shouldShowArcLabel()?(n=(e=a.updateAngle(t))?e.value:null,i=a.getArcRatio(e),o=t.data.id,a.hasType("gauge")||a.meetsArcLabelThreshold(i)?(r=a.getArcLabelFormat())?r(n,i,o):a.defaultArcValueFormat(n,i):""):""},C.textForGaugeMinMax=function(t,e){var n=this.getGaugeLabelExtents();return n?n(t,e):t},C.expandArc=function(t){var e,n=this;n.transiting?e=window.setInterval(function(){n.transiting||(window.clearInterval(e),n.legend.selectAll(".c3-legend-item-focused").size()>0&&n.expandArc(t))},10):(t=n.mapToTargetIds(t),n.svg.selectAll(n.selectorTargets(t,"."+i.chartArc)).each(function(t){n.shouldExpand(t.data.id)&&n.d3.select(this).selectAll("path").transition().duration(n.expandDuration(t.data.id)).attr("d",n.svgArcExpanded).transition().duration(2*n.expandDuration(t.data.id)).attr("d",n.svgArcExpandedSub).each(function(t){n.isDonutType(t.data)})}))},C.unexpandArc=function(t){var e=this;e.transiting||(t=e.mapToTargetIds(t),e.svg.selectAll(e.selectorTargets(t,"."+i.chartArc)).selectAll("path").transition().duration(function(t){return e.expandDuration(t.data.id)}).attr("d",e.svgArc),e.svg.selectAll("."+i.arc))},C.expandDuration=function(t){var e=this.config;return this.isDonutType(t)?e.donut_expand_duration:this.isGaugeType(t)?e.gauge_expand_duration:this.isPieType(t)?e.pie_expand_duration:50},C.shouldExpand=function(t){var e=this.config;return this.isDonutType(t)&&e.donut_expand||this.isGaugeType(t)&&e.gauge_expand||this.isPieType(t)&&e.pie_expand},C.shouldShowArcLabel=function(){var t=this.config,e=!0;return this.hasType("donut")?e=t.donut_label_show:this.hasType("pie")&&(e=t.pie_label_show),e},C.meetsArcLabelThreshold=function(t){var e=this.config;return t>=(this.hasType("donut")?e.donut_label_threshold:e.pie_label_threshold)},C.getArcLabelFormat=function(){var t=this.config,e=t.pie_label_format;return this.hasType("gauge")?e=t.gauge_label_format:this.hasType("donut")&&(e=t.donut_label_format),e},C.getGaugeLabelExtents=function(){return this.config.gauge_label_extents},C.getArcTitle=function(){return this.hasType("donut")?this.config.donut_title:""},C.updateTargetsForArc=function(t){var e,n=this,o=n.main,r=n.classChartArc.bind(n),a=n.classArcs.bind(n),s=n.classFocus.bind(n);(e=o.select("."+i.chartArcs).selectAll("."+i.chartArc).data(n.pie(t)).attr("class",function(t){return r(t)+s(t.data)}).enter().append("g").attr("class",r)).append("g").attr("class",a),e.append("text").attr("dy",n.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")},C.initArc=function(){var t=this;t.arcs=t.main.select("."+i.chart).append("g").attr("class",i.chartArcs).attr("transform",t.getTranslate("arc")),t.arcs.append("text").attr("class",i.chartArcsTitle).style("text-anchor","middle").text(t.getArcTitle())},C.redrawArc=function(t,e,n){var o,r,a,s=this,l=s.d3,u=s.config,c=s.main,h=s.hasType("gauge");if((o=c.selectAll("."+i.arcs).selectAll("."+i.arc).data(s.arcData.bind(s))).enter().append("path").attr("class",s.classArc.bind(s)).style("fill",function(t){return s.color(t.data)}).style("cursor",function(t){return u.interaction_enabled&&u.data_selection_isselectable(t)?"pointer":null}).each(function(t){s.isGaugeType(t.data)&&(t.startAngle=t.endAngle=u.gauge_startingAngle),this._current=t}),h&&((a=c.selectAll("."+i.arcs).selectAll("."+i.arcLabelLine).data(s.arcData.bind(s))).enter().append("rect").attr("class",function(t){return i.arcLabelLine+" "+i.target+" "+i.target+"-"+t.data.id}),1===s.filterTargetsToShow(s.data.targets).length?a.style("display","none"):a.style("fill",function(t){return u.color_pattern.length>0?s.levelColor(t.data.values[0].value):s.color(t.data)}).style("display",u.gauge_labelLine_show?"":"none").each(function(t){var e=0,n=0,i=0,o="";if(s.hiddenTargetIds.indexOf(t.data.id)<0){var r=s.updateAngle(t),a=s.gaugeArcWidth/s.filterTargetsToShow(s.data.targets).length*(r.index+1),u=r.endAngle-Math.PI/2,c=s.radius-a,h=u-(0===c?0:1/c);e=s.radiusExpanded-s.radius+a,n=Math.cos(h)*c,i=Math.sin(h)*c,o="rotate("+180*u/Math.PI+", "+n+", "+i+")"}l.select(this).attr({x:n,y:i,width:e,height:2,transform:o}).style("stroke-dasharray","0, "+(e+2)+", 0")})),o.attr("transform",function(t){return!s.isGaugeType(t.data)&&n?"scale(0)":""}).on("mouseover",u.interaction_enabled?function(t){var e,n;s.transiting||(e=s.updateAngle(t))&&(n=s.convertToArcData(e),s.expandArc(e.data.id),s.api.focus(e.data.id),s.toggleFocusLegend(e.data.id,!0),s.config.data_onmouseover(n,this))}:null).on("mousemove",u.interaction_enabled?function(t){var e,n=s.updateAngle(t);n&&(e=[s.convertToArcData(n)],s.showTooltip(e,this))}:null).on("mouseout",u.interaction_enabled?function(t){var e,n;s.transiting||(e=s.updateAngle(t))&&(n=s.convertToArcData(e),s.unexpandArc(e.data.id),s.api.revert(),s.revertLegend(),s.hideTooltip(),s.config.data_onmouseout(n,this))}:null).on("click",u.interaction_enabled?function(t,e){var n,i=s.updateAngle(t);i&&(n=s.convertToArcData(i),s.toggleShape&&s.toggleShape(this,n,e),s.config.data_onclick.call(s.api,n,this))}:null).each(function(){s.transiting=!0}).transition().duration(t).attrTween("d",function(t){var e,n=s.updateAngle(t);return n?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),e=l.interpolate(this._current,n),this._current=e(0),function(n){var i=e(n);return i.data=t.data,s.getArc(i,!0)}):function(){return"M 0 0"}}).attr("transform",n?"scale(1)":"").style("fill",function(t){return s.levelColor?s.levelColor(t.data.values[0].value):s.color(t.data.id)}).call(s.endall,function(){s.transiting=!1}),o.exit().transition().duration(e).style("opacity",0).remove(),c.selectAll("."+i.chartArc).select("text").style("opacity",0).attr("class",function(t){return s.isGaugeType(t.data)?i.gaugeValue:""}).text(s.textForArcLabel.bind(s)).attr("transform",s.transformForArcLabel.bind(s)).style("font-size",function(t){return s.isGaugeType(t.data)&&1===s.filterTargetsToShow(s.data.targets).length?Math.round(s.radius/5)+"px":""}).transition().duration(t).style("opacity",function(t){return s.isTargetToShow(t.data.id)&&s.isArcType(t.data)?1:0}),c.select("."+i.chartArcsTitle).style("opacity",s.hasType("donut")||h?1:0),h){var d=0;(r=s.arcs.select("g."+i.chartArcsBackground).selectAll("path."+i.chartArcsBackground).data(s.data.targets)).enter().append("path"),r.attr("class",function(t,e){return i.chartArcsBackground+" "+i.chartArcsBackground+"-"+e}).attr("d",function(t){if(s.hiddenTargetIds.indexOf(t.id)>=0)return"M 0 0";var e={data:[{value:u.gauge_max}],startAngle:u.gauge_startingAngle,endAngle:-1*u.gauge_startingAngle*(u.gauge_fullCircle?Math.PI:1),index:d++};return s.getArc(e,!0,!0)}),r.exit().remove(),s.arcs.select("."+i.chartArcsGaugeUnit).attr("dy",".75em").text(u.gauge_label_show?u.gauge_units:""),s.arcs.select("."+i.chartArcsGaugeMin).attr("dx",-1*(s.innerRadius+(s.radius-s.innerRadius)/(u.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(u.gauge_label_show?s.textForGaugeMinMax(u.gauge_min,!1):""),s.arcs.select("."+i.chartArcsGaugeMax).attr("dx",s.innerRadius+(s.radius-s.innerRadius)/(u.gauge_fullCircle?1:2)+"px").attr("dy","1.2em").text(u.gauge_label_show?s.textForGaugeMinMax(u.gauge_max,!0):"")}},C.initGauge=function(){var t=this.arcs;this.hasType("gauge")&&(t.append("g").attr("class",i.chartArcsBackground),t.append("text").attr("class",i.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),t.append("text").attr("class",i.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),t.append("text").attr("class",i.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none"))},C.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},C.hasCaches=function(t){for(var e=0;e<t.length;e++)if(!(t[e]in this.cache))return!1;return!0},C.addCache=function(t,e){this.cache[t]=this.cloneTarget(e)},C.getCaches=function(t){var e,n=[];for(e=0;e<t.length;e++)t[e]in this.cache&&n.push(this.cloneTarget(this.cache[t[e]]));return n},C.categoryName=function(t){var e=this.config;return t<e.axis_x_categories.length?e.axis_x_categories[t]:t},C.generateClass=function(t,e){return" "+t+" "+t+this.getTargetSelectorSuffix(e)},C.classText=function(t){return this.generateClass(i.text,t.index)},C.classTexts=function(t){return this.generateClass(i.texts,t.id)},C.classShape=function(t){return this.generateClass(i.shape,t.index)},C.classShapes=function(t){return this.generateClass(i.shapes,t.id)},C.classLine=function(t){return this.classShape(t)+this.generateClass(i.line,t.id)},C.classLines=function(t){return this.classShapes(t)+this.generateClass(i.lines,t.id)},C.classCircle=function(t){return this.classShape(t)+this.generateClass(i.circle,t.index)},C.classCircles=function(t){return this.classShapes(t)+this.generateClass(i.circles,t.id)},C.classBar=function(t){return this.classShape(t)+this.generateClass(i.bar,t.index)},C.classBars=function(t){return this.classShapes(t)+this.generateClass(i.bars,t.id)},C.classArc=function(t){return this.classShape(t.data)+this.generateClass(i.arc,t.data.id)},C.classArcs=function(t){return this.classShapes(t.data)+this.generateClass(i.arcs,t.data.id)},C.classArea=function(t){return this.classShape(t)+this.generateClass(i.area,t.id)},C.classAreas=function(t){return this.classShapes(t)+this.generateClass(i.areas,t.id)},C.classRegion=function(t,e){return this.generateClass(i.region,e)+" "+("class"in t?t.class:"")},C.classEvent=function(t){return this.generateClass(i.eventRect,t.index)},C.classTarget=function(t){var e=this.config.data_classes[t],n="";return e&&(n=" "+i.target+"-"+e),this.generateClass(i.target,t)+n},C.classFocus=function(t){return this.classFocused(t)+this.classDefocused(t)},C.classFocused=function(t){return" "+(this.focusedTargetIds.indexOf(t.id)>=0?i.focused:"")},C.classDefocused=function(t){return" "+(this.defocusedTargetIds.indexOf(t.id)>=0?i.defocused:"")},C.classChartText=function(t){return i.chartText+this.classTarget(t.id)},C.classChartLine=function(t){return i.chartLine+this.classTarget(t.id)},C.classChartBar=function(t){return i.chartBar+this.classTarget(t.id)},C.classChartArc=function(t){return i.chartArc+this.classTarget(t.data.id)},C.getTargetSelectorSuffix=function(t){return t||0===t?("-"+t).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},C.selectorTarget=function(t,e){return(e||"")+"."+i.target+this.getTargetSelectorSuffix(t)},C.selectorTargets=function(t,e){var n=this;return(t=t||[]).length?t.map(function(t){return n.selectorTarget(t,e)}):null},C.selectorLegend=function(t){return"."+i.legendItem+this.getTargetSelectorSuffix(t)},C.selectorLegends=function(t){var e=this;return t&&t.length?t.map(function(t){return e.selectorLegend(t)}):null},C.getClipPath=function(t){return"url("+(window.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0?"":document.URL.split("#")[0])+"#"+t+")"},C.appendClip=function(t,e){return t.append("clipPath").attr("id",e).append("rect")},C.getAxisClipX=function(t){var e=Math.max(30,this.margin.left);return t?-(1+e):-(e-1)},C.getAxisClipY=function(t){return t?-20:-this.margin.top},C.getXAxisClipX=function(){return this.getAxisClipX(!this.config.axis_rotated)},C.getXAxisClipY=function(){return this.getAxisClipY(!this.config.axis_rotated)},C.getYAxisClipX=function(){return this.config.axis_y_inner?-1:this.getAxisClipX(this.config.axis_rotated)},C.getYAxisClipY=function(){return this.getAxisClipY(this.config.axis_rotated)},C.getAxisClipWidth=function(t){var e=Math.max(30,this.margin.left),n=Math.max(30,this.margin.right);return t?this.width+2+e+n:this.margin.left+20},C.getAxisClipHeight=function(t){return(t?this.margin.bottom:this.margin.top+this.height)+20},C.getXAxisClipWidth=function(){return this.getAxisClipWidth(!this.config.axis_rotated)},C.getXAxisClipHeight=function(){return this.getAxisClipHeight(!this.config.axis_rotated)},C.getYAxisClipWidth=function(){return this.getAxisClipWidth(this.config.axis_rotated)+(this.config.axis_y_inner?20:0)},C.getYAxisClipHeight=function(){return this.getAxisClipHeight(this.config.axis_rotated)},C.generateColor=function(){var t=this.config,e=this.d3,n=t.data_colors,i=v(t.color_pattern)?t.color_pattern:e.scale.category10().range(),o=t.data_color,r=[];return function(t){var e,a=t.id||t.data&&t.data.id||t;return n[a]instanceof Function?e=n[a](t):n[a]?e=n[a]:(r.indexOf(a)<0&&r.push(a),e=i[r.indexOf(a)%i.length],n[a]=e),o instanceof Function?o(e,t):e}},C.generateLevelColor=function(){var t=this.config,e=t.color_pattern,n=t.color_threshold,i="value"===n.unit,o=n.values&&n.values.length?n.values:[],r=n.max||100;return v(t.color_threshold)?function(t){var n,a=e[e.length-1];for(n=0;n<o.length;n++)if((i?t:100*t/r)<o[n]){a=e[n];break}return a}:null},C.getDefaultConfig=function(){var t={bindto:"#chart",svg_classname:void 0,size_width:void 0,size_height:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,zoom_enabled:!1,zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:function(){},zoom_onzoomstart:function(){},zoom_onzoomend:function(){},zoom_x_min:void 0,zoom_x_max:void 0,interaction_brighten:!0,interaction_enabled:!0,onmouseover:function(){},onmouseout:function(){},onresize:function(){},onresized:function(){},oninit:function(){},onrendered:function(){},transition_duration:350,data_x:void 0,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function(t){return t},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:void 0,data_types:{},data_labels:{},data_order:"desc",data_regions:{},data_color:void 0,data_colors:{},data_hide:!1,data_filter:void 0,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function(){},data_onmouseover:function(){},data_onmouseout:function(){},data_onselected:function(){},data_onunselected:function(){},data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:void 0,data_keys:void 0,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_onbrush:function(){},color_pattern:[],color_threshold:{},legend_show:!0,legend_hide:!1,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onmouseover:void 0,legend_item_onmouseout:void 0,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,axis_rotated:!1,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:void 0,axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_multilineMax:0,axis_x_tick_width:null,axis_x_max:void 0,axis_x_min:void 0,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_inner:void 0,axis_y_show:!0,axis_y_type:void 0,axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:void 0,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_time_value:void 0,axis_y_tick_time_interval:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y2_show:!1,axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:void 0,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:void 0,axis_y2_padding:{},axis_y2_default:void 0,grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_lines_front:!0,point_show:!0,point_r:2.5,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_select_r:void 0,line_connectNull:!1,line_step_type:"step",bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0,bar_space:0,area_zerobased:!0,area_above:!1,pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_label_ratio:void 0,pie_expand:{},pie_expand_duration:50,gauge_fullCircle:!1,gauge_label_show:!0,gauge_labelLine_show:!0,gauge_label_format:void 0,gauge_min:0,gauge_max:100,gauge_startingAngle:-1*Math.PI/2,gauge_label_extents:void 0,gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_duration:50,donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_duration:50,spline_interpolation_type:"cardinal",regions:[],tooltip_show:!0,tooltip_grouped:!0,tooltip_order:void 0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:function(t,e,n,i){return this.getTooltipContent?this.getTooltipContent(t,e,n,i):""},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_onshow:function(){},tooltip_onhide:function(){},title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"top-center"};return Object.keys(this.additionalConfig).forEach(function(e){t[e]=this.additionalConfig[e]},this),t},C.additionalConfig={},C.loadConfig=function(t){var e,n,i,r=this.config;Object.keys(r).forEach(function(a){e=t,n=a.split("_"),i=function t(){var i=n.shift();return i&&e&&"object"===(void 0===e?"undefined":o(e))&&i in e?(e=e[i],t()):i?void 0:e}(),d(i)&&(r[a]=i)})},C.convertUrlToData=function(t,e,n,i,o){var r=this,a=e||"csv",s=r.d3.xhr(t);n&&Object.keys(n).forEach(function(t){s.header(t,n[t])}),s.get(function(t,e){var n,s=e.response||e.responseText;if(!e)throw new Error(t.responseURL+" "+t.status+" ("+t.statusText+")");n="json"===a?r.convertJsonToData(JSON.parse(s),i):"tsv"===a?r.convertTsvToData(s):r.convertCsvToData(s),o.call(r,n)})},C.convertXsvToData=function(t,e){var n,i=e.parseRows(t);return 1===i.length?(n=[{}],i[0].forEach(function(t){n[0][t]=null})):n=e.parse(t),n},C.convertCsvToData=function(t){return this.convertXsvToData(t,this.d3.csv)},C.convertTsvToData=function(t){return this.convertXsvToData(t,this.d3.tsv)},C.convertJsonToData=function(t,e){var n,i,o=this,r=[];return e?(e.x?(n=e.value.concat(e.x),o.config.data_x=e.x):n=e.value,r.push(n),t.forEach(function(t){var e=[];n.forEach(function(n){var i=o.findValueInJson(t,n);h(i)&&(i=null),e.push(i)}),r.push(e)}),i=o.convertRowsToData(r)):(Object.keys(t).forEach(function(e){r.push([e].concat(t[e]))}),i=o.convertColumnsToData(r)),i},C.findValueInJson=function(t,e){for(var n=(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),i=0;i<n.length;++i){var o=n[i];if(!(o in t))return;t=t[o]}return t},C.convertRowsToData=function(t){for(var e=[],n=t[0],i=1;i<t.length;i++){for(var o={},r=0;r<t[i].length;r++){if(h(t[i][r]))throw new Error("Source data is missing a component at ("+i+","+r+")!");o[n[r]]=t[i][r]}e.push(o)}return e},C.convertColumnsToData=function(t){for(var e=[],n=0;n<t.length;n++)for(var i=t[n][0],o=1;o<t[n].length;o++){if(h(e[o-1])&&(e[o-1]={}),h(t[n][o]))throw new Error("Source data is missing a component at ("+n+","+o+")!");e[o-1][i]=t[n][o]}return e},C.convertDataToTargets=function(t,e){var n,i=this,o=i.config,r=i.d3.keys(t[0]).filter(i.isNotX,i),a=i.d3.keys(t[0]).filter(i.isX,i);return r.forEach(function(n){var r=i.getXKey(n);i.isCustomX()||i.isTimeSeries()?a.indexOf(r)>=0?i.data.xs[n]=(e&&i.data.xs[n]?i.data.xs[n]:[]).concat(t.map(function(t){return t[r]}).filter(s).map(function(t,e){return i.generateTargetX(t,n,e)})):o.data_x?i.data.xs[n]=i.getOtherTargetXs():v(o.data_xs)&&(i.data.xs[n]=i.getXValuesOfXKey(r,i.data.targets)):i.data.xs[n]=t.map(function(t,e){return e})}),r.forEach(function(t){if(!i.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}),(n=r.map(function(e,n){var r=o.data_idConverter(e);return{id:r,id_org:e,values:t.map(function(t,a){var s,l=t[i.getXKey(e)],u=null===t[e]||isNaN(t[e])?null:+t[e];return i.isCustomX()&&i.isCategorized()&&!h(l)?(0===n&&0===a&&(o.axis_x_categories=[]),-1===(s=o.axis_x_categories.indexOf(l))&&(s=o.axis_x_categories.length,o.axis_x_categories.push(l))):s=i.generateTargetX(l,e,a),(h(t[e])||i.data.xs[e].length<=a)&&(s=void 0),{x:s,value:u,id:r}}).filter(function(t){return d(t.x)})}})).forEach(function(t){var e;o.data_xSort&&(t.values=t.values.sort(function(t,e){return(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)})),e=0,t.values.forEach(function(t){t.index=e++}),i.data.xs[t.id].sort(function(t,e){return t-e})}),i.hasNegativeValue=i.hasNegativeValueInTargets(n),i.hasPositiveValue=i.hasPositiveValueInTargets(n),o.data_type&&i.setTargetType(i.mapToIds(n).filter(function(t){return!(t in o.data_types)}),o.data_type),n.forEach(function(t){i.addCache(t.id_org,t)}),n},C.isX=function(t){var e=this.config;return e.data_x&&t===e.data_x||v(e.data_xs)&&b(e.data_xs,t)},C.isNotX=function(t){return!this.isX(t)},C.getXKey=function(t){var e=this.config;return e.data_x?e.data_x:v(e.data_xs)?e.data_xs[t]:null},C.getXValuesOfXKey=function(t,e){var n,i=this;return(e&&v(e)?i.mapToIds(e):[]).forEach(function(e){i.getXKey(e)===t&&(n=i.data.xs[e])}),n},C.getIndexByX=function(t){var e=this.filterByX(this.data.targets,t);return e.length?e[0].index:null},C.getXValue=function(t,e){return t in this.data.xs&&this.data.xs[t]&&s(this.data.xs[t][e])?this.data.xs[t][e]:e},C.getOtherTargetXs=function(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},C.getOtherTargetX=function(t){var e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},C.addXs=function(t){var e=this;Object.keys(t).forEach(function(n){e.config.data_xs[n]=t[n]})},C.hasMultipleX=function(t){return this.d3.set(Object.keys(t).map(function(e){return t[e]})).size()>1},C.isMultipleX=function(){return v(this.config.data_xs)||!this.config.data_xSort||this.hasType("scatter")},C.addName=function(t){var e;return t&&(e=this.config.data_names[t.id],t.name=void 0!==e?e:t.id),t},C.getValueOnIndex=function(t,e){var n=t.filter(function(t){return t.index===e});return n.length?n[0]:null},C.updateTargetX=function(t,e){var n=this;t.forEach(function(t){t.values.forEach(function(i,o){i.x=n.generateTargetX(e[o],t.id,o)}),n.data.xs[t.id]=e})},C.updateTargetXs=function(t,e){var n=this;t.forEach(function(t){e[t.id]&&n.updateTargetX([t],e[t.id])})},C.generateTargetX=function(t,e,n){var i=this;return i.isTimeSeries()?t?i.parseDate(t):i.parseDate(i.getXValue(e,n)):i.isCustomX()&&!i.isCategorized()?s(t)?+t:i.getXValue(e,n):n},C.cloneTarget=function(t){return{id:t.id,id_org:t.id_org,values:t.values.map(function(t){return{x:t.x,value:t.value,id:t.id}})}},C.updateXs=function(){var t=this;t.data.targets.length&&(t.xs=[],t.data.targets[0].values.forEach(function(e){t.xs[e.index]=e.x}))},C.getPrevX=function(t){var e=this.xs[t-1];return void 0!==e?e:null},C.getNextX=function(t){var e=this.xs[t+1];return void 0!==e?e:null},C.getMaxDataCount=function(){return this.d3.max(this.data.targets,function(t){return t.values.length})},C.getMaxDataCountTarget=function(t){var e,n=t.length,i=0;return n>1?t.forEach(function(t){t.values.length>i&&(e=t,i=t.values.length)}):e=n?t[0]:null,e},C.getEdgeX=function(t){return t.length?[this.d3.min(t,function(t){return t.values[0].x}),this.d3.max(t,function(t){return t.values[t.values.length-1].x})]:[0,0]},C.mapToIds=function(t){return t.map(function(t){return t.id})},C.mapToTargetIds=function(t){return t?[].concat(t):this.mapToIds(this.data.targets)},C.hasTarget=function(t,e){var n,i=this.mapToIds(t);for(n=0;n<i.length;n++)if(i[n]===e)return!0;return!1},C.isTargetToShow=function(t){return this.hiddenTargetIds.indexOf(t)<0},C.isLegendToShow=function(t){return this.hiddenLegendIds.indexOf(t)<0},C.filterTargetsToShow=function(t){var e=this;return t.filter(function(t){return e.isTargetToShow(t.id)})},C.mapTargetsToUniqueXs=function(t){var e=this.d3.set(this.d3.merge(t.map(function(t){return t.values.map(function(t){return+t.x})}))).values();return(e=this.isTimeSeries()?e.map(function(t){return new Date(+t)}):e.map(function(t){return+t})).sort(function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN})},C.addHiddenTargetIds=function(t){t=t instanceof Array?t:new Array(t);for(var e=0;e<t.length;e++)this.hiddenTargetIds.indexOf(t[e])<0&&(this.hiddenTargetIds=this.hiddenTargetIds.concat(t[e]))},C.removeHiddenTargetIds=function(t){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(e){return t.indexOf(e)<0})},C.addHiddenLegendIds=function(t){t=t instanceof Array?t:new Array(t);for(var e=0;e<t.length;e++)this.hiddenLegendIds.indexOf(t[e])<0&&(this.hiddenLegendIds=this.hiddenLegendIds.concat(t[e]))},C.removeHiddenLegendIds=function(t){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(e){return t.indexOf(e)<0})},C.getValuesAsIdKeyed=function(t){var e={};return t.forEach(function(t){e[t.id]=[],t.values.forEach(function(n){e[t.id].push(n.value)})}),e},C.checkValueInTargets=function(t,e){var n,i,o,r=Object.keys(t);for(n=0;n<r.length;n++)for(o=t[r[n]].values,i=0;i<o.length;i++)if(e(o[i].value))return!0;return!1},C.hasNegativeValueInTargets=function(t){return this.checkValueInTargets(t,function(t){return t<0})},C.hasPositiveValueInTargets=function(t){return this.checkValueInTargets(t,function(t){return t>0})},C.isOrderDesc=function(){var t=this.config;return"string"==typeof t.data_order&&"desc"===t.data_order.toLowerCase()},C.isOrderAsc=function(){var t=this.config;return"string"==typeof t.data_order&&"asc"===t.data_order.toLowerCase()},C.getOrderFunction=function(){var t=this.config,e=this.isOrderAsc(),n=this.isOrderDesc();if(e||n)return function(t,e){var i=function(t,e){return t+Math.abs(e.value)},o=t.values.reduce(i,0),r=e.values.reduce(i,0);return n?r-o:o-r};if(l(t.data_order))return t.data_order;if(u(t.data_order)){var i=t.data_order;return function(t,e){return i.indexOf(t.id)-i.indexOf(e.id)}}},C.orderTargets=function(t){var e=this.getOrderFunction();return e&&(t.sort(e),(this.isOrderAsc()||this.isOrderDesc())&&t.reverse()),t},C.filterByX=function(t,e){return this.d3.merge(t.map(function(t){return t.values})).filter(function(t){return t.x-e==0})},C.filterRemoveNull=function(t){return t.filter(function(t){return s(t.value)})},C.filterByXDomain=function(t,e){return t.map(function(t){return{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return e[0]<=t.x&&t.x<=e[1]})}})},C.hasDataLabel=function(){var t=this.config;return!("boolean"!=typeof t.data_labels||!t.data_labels)||!("object"!==o(t.data_labels)||!v(t.data_labels))},C.getDataLabelLength=function(t,e,n){var i=this,o=[0,0];return i.selectChart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return i.dataLabelFormat(t.id)(t)}).each(function(t,e){o[e]=1.3*this.getBoundingClientRect()[n]}).remove(),o},C.isNoneArc=function(t){return this.hasTarget(this.data.targets,t.id)},C.isArc=function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},C.findSameXOfValues=function(t,e){var n,i=t[e].x,o=[];for(n=e-1;n>=0&&i===t[n].x;n--)o.push(t[n]);for(n=e;n<t.length&&i===t[n].x;n++)o.push(t[n]);return o},C.findClosestFromTargets=function(t,e){var n,i=this;return n=t.map(function(t){return i.findClosest(t.values,e)}),i.findClosest(n,e)},C.findClosest=function(t,e){var n,o=this,r=o.config.point_sensitivity;return t.filter(function(t){return t&&o.isBarType(t.id)}).forEach(function(t){var e=o.main.select("."+i.bars+o.getTargetSelectorSuffix(t.id)+" ."+i.bar+"-"+t.index).node();!n&&o.isWithinBar(e)&&(n=t)}),t.filter(function(t){return t&&!o.isBarType(t.id)}).forEach(function(t){var i=o.dist(t,e);i<r&&(r=i,n=t)}),n},C.dist=function(t,e){var n=this.config,i=n.axis_rotated?1:0,o=n.axis_rotated?0:1,r=this.circleY(t,t.index),a=this.x(t.x);return Math.sqrt(Math.pow(a-e[i],2)+Math.pow(r-e[o],2))},C.convertValuesToStep=function(t){var e,n=[].concat(t);if(!this.isCategorized())return t;for(e=t.length+1;0<e;e--)n[e]=n[e-1];return n[0]={x:n[0].x-1,value:n[0].value,id:n[0].id},n[t.length+1]={x:n[t.length].x+1,value:n[t.length].value,id:n[t.length].id},n},C.updateDataAttributes=function(t,e){var n=this.config["data_"+t];return void 0===e?n:(Object.keys(e).forEach(function(t){n[t]=e[t]}),this.redraw({withLegend:!0}),n)},C.load=function(t,e){var n=this;t&&(e.filter&&(t=t.filter(e.filter)),(e.type||e.types)&&t.forEach(function(t){var i=e.types&&e.types[t.id]?e.types[t.id]:e.type;n.setTargetType(t.id,i)}),n.data.targets.forEach(function(e){for(var n=0;n<t.length;n++)if(e.id===t[n].id){e.values=t[n].values,t.splice(n,1);break}}),n.data.targets=n.data.targets.concat(t)),n.updateTargets(n.data.targets),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.done&&e.done()},C.loadFromArgs=function(t){var e=this;t.data?e.load(e.convertDataToTargets(t.data),t):t.url?e.convertUrlToData(t.url,t.mimeType,t.headers,t.keys,function(n){e.load(e.convertDataToTargets(n),t)}):t.json?e.load(e.convertDataToTargets(e.convertJsonToData(t.json,t.keys)),t):t.rows?e.load(e.convertDataToTargets(e.convertRowsToData(t.rows)),t):t.columns?e.load(e.convertDataToTargets(e.convertColumnsToData(t.columns)),t):e.load(null,t)},C.unload=function(t,e){var n=this;e||(e=function(){}),(t=t.filter(function(t){return n.hasTarget(n.data.targets,t)}))&&0!==t.length?(n.svg.selectAll(t.map(function(t){return n.selectorTarget(t)})).transition().style("opacity",0).remove().call(n.endall,e),t.forEach(function(t){n.withoutFadeIn[t]=!1,n.legend&&n.legend.selectAll("."+i.legendItem+n.getTargetSelectorSuffix(t)).remove(),n.data.targets=n.data.targets.filter(function(e){return e.id!==t})})):e()},C.getYDomainMin=function(t){var e,n,i,o,r,a,s=this,l=s.config,u=s.mapToIds(t),c=s.getValuesAsIdKeyed(t);if(l.data_groups.length>0)for(a=s.hasNegativeValueInTargets(t),e=0;e<l.data_groups.length;e++)if(0!==(o=l.data_groups[e].filter(function(t){return u.indexOf(t)>=0})).length)for(i=o[0],a&&c[i]&&c[i].forEach(function(t,e){c[i][e]=t<0?t:0}),n=1;n<o.length;n++)r=o[n],c[r]&&c[r].forEach(function(t,e){s.axis.getId(r)!==s.axis.getId(i)||!c[i]||a&&+t>0||(c[i][e]+=+t)});return s.d3.min(Object.keys(c).map(function(t){return s.d3.min(c[t])}))},C.getYDomainMax=function(t){var e,n,i,o,r,a,s=this,l=s.config,u=s.mapToIds(t),c=s.getValuesAsIdKeyed(t);if(l.data_groups.length>0)for(a=s.hasPositiveValueInTargets(t),e=0;e<l.data_groups.length;e++)if(0!==(o=l.data_groups[e].filter(function(t){return u.indexOf(t)>=0})).length)for(i=o[0],a&&c[i]&&c[i].forEach(function(t,e){c[i][e]=t>0?t:0}),n=1;n<o.length;n++)r=o[n],c[r]&&c[r].forEach(function(t,e){s.axis.getId(r)!==s.axis.getId(i)||!c[i]||a&&+t<0||(c[i][e]+=+t)});return s.d3.max(Object.keys(c).map(function(t){return s.d3.max(c[t])}))},C.getYDomain=function(t,e,n){var i,o,r,a,l,u,c,h,d,f,p=this,m=p.config,y=t.filter(function(t){return p.axis.getId(t.id)===e}),b=n?p.filterByXDomain(y,n):y,w="y2"===e?m.axis_y2_min:m.axis_y_min,_="y2"===e?m.axis_y2_max:m.axis_y_max,x=p.getYDomainMin(b),S=p.getYDomainMax(b),E="y2"===e?m.axis_y2_center:m.axis_y_center,C=p.hasType("bar",b)&&m.bar_zerobased||p.hasType("area",b)&&m.area_zerobased,T="y2"===e?m.axis_y2_inverted:m.axis_y_inverted,M=p.hasDataLabel()&&m.axis_rotated,P=p.hasDataLabel()&&!m.axis_rotated;return x=s(w)?w:s(_)?x<_?x:_-10:x,S=s(_)?_:s(w)?w<S?S:w+10:S,0===b.length?"y2"===e?p.y2.domain():p.y.domain():(isNaN(x)&&(x=0),isNaN(S)&&(S=x),x===S&&(x<0?S=0:x=0),d=x>=0&&S>=0,f=x<=0&&S<=0,(s(w)&&d||s(_)&&f)&&(C=!1),C&&(d&&(x=0),f&&(S=0)),r=a=.1*(o=Math.abs(S-x)),void 0!==E&&(S=E+(l=Math.max(Math.abs(x),Math.abs(S))),x=E-l),M?(u=p.getDataLabelLength(x,S,"width"),c=g(p.y.range()),r+=o*((h=[u[0]/c,u[1]/c])[1]/(1-h[0]-h[1])),a+=o*(h[0]/(1-h[0]-h[1]))):P&&(u=p.getDataLabelLength(x,S,"height"),r+=p.axis.convertPixelsToAxisPadding(u[1],o),a+=p.axis.convertPixelsToAxisPadding(u[0],o)),"y"===e&&v(m.axis_y_padding)&&(r=p.axis.getPadding(m.axis_y_padding,"top",r,o),a=p.axis.getPadding(m.axis_y_padding,"bottom",a,o)),"y2"===e&&v(m.axis_y2_padding)&&(r=p.axis.getPadding(m.axis_y2_padding,"top",r,o),a=p.axis.getPadding(m.axis_y2_padding,"bottom",a,o)),C&&(d&&(a=x),f&&(r=-S)),i=[x-a,S+r],T?i.reverse():i)},C.getXDomainMin=function(t){var e=this,n=e.config;return d(n.axis_x_min)?e.isTimeSeries()?this.parseDate(n.axis_x_min):n.axis_x_min:e.d3.min(t,function(t){return e.d3.min(t.values,function(t){return t.x})})},C.getXDomainMax=function(t){var e=this,n=e.config;return d(n.axis_x_max)?e.isTimeSeries()?this.parseDate(n.axis_x_max):n.axis_x_max:e.d3.max(t,function(t){return e.d3.max(t.values,function(t){return t.x})})},C.getXDomainPadding=function(t){var e,n,i,r,a=this.config,l=t[1]-t[0];return n=this.isCategorized()?0:this.hasType("bar")?(e=this.getMaxDataCount())>1?l/(e-1)/2:.5:.01*l,"object"===o(a.axis_x_padding)&&v(a.axis_x_padding)?(i=s(a.axis_x_padding.left)?a.axis_x_padding.left:n,r=s(a.axis_x_padding.right)?a.axis_x_padding.right:n):i=r="number"==typeof a.axis_x_padding?a.axis_x_padding:n,{left:i,right:r}},C.getXDomain=function(t){var e=this,n=[e.getXDomainMin(t),e.getXDomainMax(t)],i=n[0],o=n[1],r=e.getXDomainPadding(n),a=0,s=0;return i-o!=0||e.isCategorized()||(e.isTimeSeries()?(i=new Date(.5*i.getTime()),o=new Date(1.5*o.getTime())):(i=0===i?1:.5*i,o=0===o?-1:1.5*o)),(i||0===i)&&(a=e.isTimeSeries()?new Date(i.getTime()-r.left):i-r.left),(o||0===o)&&(s=e.isTimeSeries()?new Date(o.getTime()+r.right):o+r.right),[a,s]},C.updateXDomain=function(t,e,n,i,o){var r=this,a=r.config;return n&&(r.x.domain(o||r.d3.extent(r.getXDomain(t))),r.orgXDomain=r.x.domain(),a.zoom_enabled&&r.zoom.scale(r.x).updateScaleExtent(),r.subX.domain(r.x.domain()),r.brush&&r.brush.scale(r.subX)),e&&(r.x.domain(o||(!r.brush||r.brush.empty()?r.orgXDomain:r.brush.extent())),a.zoom_enabled&&r.zoom.scale(r.x).updateScaleExtent()),i&&r.x.domain(r.trimXDomain(r.x.orgDomain())),r.x.domain()},C.trimXDomain=function(t){var e=this.getZoomDomain(),n=e[0],i=e[1];return t[0]<=n&&(t[1]=+t[1]+(n-t[0]),t[0]=n),i<=t[1]&&(t[0]=+t[0]-(t[1]-i),t[1]=i),t},C.drag=function(t){var e,n,o,r,a,s,l,u,c=this,h=c.config,d=c.main,f=c.d3;c.hasArcType()||h.data_selection_enabled&&(h.zoom_enabled&&!c.zoom.altDomain||h.data_selection_multiple&&(e=c.dragStart[0],n=c.dragStart[1],o=t[0],r=t[1],a=Math.min(e,o),s=Math.max(e,o),l=h.data_selection_grouped?c.margin.top:Math.min(n,r),u=h.data_selection_grouped?c.height:Math.max(n,r),d.select("."+i.dragarea).attr("x",a).attr("y",l).attr("width",s-a).attr("height",u-l),d.selectAll("."+i.shapes).selectAll("."+i.shape).filter(function(t){return h.data_selection_isselectable(t)}).each(function(t,e){var n,o,r,h,d,p,g=f.select(this),m=g.classed(i.SELECTED),v=g.classed(i.INCLUDED),y=!1;if(g.classed(i.circle))n=1*g.attr("cx"),o=1*g.attr("cy"),d=c.togglePoint,y=a<n&&n<s&&l<o&&o<u;else{if(!g.classed(i.bar))return;n=(p=_(this)).x,o=p.y,r=p.width,h=p.height,d=c.togglePath,y=!(s<n||n+r<a||u<o||o+h<l)}y^v&&(g.classed(i.INCLUDED,!v),g.classed(i.SELECTED,!m),d.call(c,!m,g,t,e))})))},C.dragstart=function(t){var e=this,n=e.config;e.hasArcType()||n.data_selection_enabled&&(e.dragStart=t,e.main.select("."+i.chart).append("rect").attr("class",i.dragarea).style("opacity",.1),e.dragging=!0)},C.dragend=function(){var t=this,e=t.config;t.hasArcType()||e.data_selection_enabled&&(t.main.select("."+i.dragarea).transition().duration(100).style("opacity",0).remove(),t.main.selectAll("."+i.shape).classed(i.INCLUDED,!1),t.dragging=!1)},C.getYFormat=function(t){var e=this,n=t&&!e.hasType("gauge")?e.defaultArcValueFormat:e.yFormat,i=t&&!e.hasType("gauge")?e.defaultArcValueFormat:e.y2Format;return function(t,o,r){return("y2"===e.axis.getId(r)?i:n).call(e,t,o)}},C.yFormat=function(t){var e=this.config;return(e.axis_y_tick_format?e.axis_y_tick_format:this.defaultValueFormat)(t)},C.y2Format=function(t){var e=this.config;return(e.axis_y2_tick_format?e.axis_y2_tick_format:this.defaultValueFormat)(t)},C.defaultValueFormat=function(t){return s(t)?+t:""},C.defaultArcValueFormat=function(t,e){return(100*e).toFixed(1)+"%"},C.dataLabelFormat=function(t){var e=this.config.data_labels,n=function(t){return s(t)?+t:""};return"function"==typeof e.format?e.format:"object"===o(e.format)?e.format[t]?!0===e.format[t]?n:e.format[t]:function(){return""}:n},C.initGrid=function(){var t=this,e=t.config,n=t.d3;t.grid=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",i.grid),e.grid_x_show&&t.grid.append("g").attr("class",i.xgrids),e.grid_y_show&&t.grid.append("g").attr("class",i.ygrids),e.grid_focus_show&&t.grid.append("g").attr("class",i.xgridFocus).append("line").attr("class",i.xgridFocus),t.xgrid=n.selectAll([]),e.grid_lines_front||t.initGridLines()},C.initGridLines=function(){var t=this,e=t.d3;t.gridLines=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",i.grid+" "+i.gridLines),t.gridLines.append("g").attr("class",i.xgridLines),t.gridLines.append("g").attr("class",i.ygridLines),t.xgridLines=e.selectAll([])},C.updateXGrid=function(t){var e=this,n=e.config,o=e.d3,r=e.generateGridData(n.grid_x_type,e.x),a=e.isCategorized()?e.xAxis.tickOffset():0;e.xgridAttr=n.axis_rotated?{x1:0,x2:e.width,y1:function(t){return e.x(t)-a},y2:function(t){return e.x(t)-a}}:{x1:function(t){return e.x(t)+a},x2:function(t){return e.x(t)+a},y1:0,y2:e.height},e.xgrid=e.main.select("."+i.xgrids).selectAll("."+i.xgrid).data(r),e.xgrid.enter().append("line").attr("class",i.xgrid),t||e.xgrid.attr(e.xgridAttr).style("opacity",function(){return+o.select(this).attr(n.axis_rotated?"y1":"x1")===(n.axis_rotated?e.height:0)?0:1}),e.xgrid.exit().remove()},C.updateYGrid=function(){var t=this,e=t.config,n=t.yAxis.tickValues()||t.y.ticks(e.grid_y_ticks);t.ygrid=t.main.select("."+i.ygrids).selectAll("."+i.ygrid).data(n),t.ygrid.enter().append("line").attr("class",i.ygrid),t.ygrid.attr("x1",e.axis_rotated?t.y:0).attr("x2",e.axis_rotated?t.y:t.width).attr("y1",e.axis_rotated?0:t.y).attr("y2",e.axis_rotated?t.height:t.y),t.ygrid.exit().remove(),t.smoothLines(t.ygrid,"grid")},C.gridTextAnchor=function(t){return t.position?t.position:"end"},C.gridTextDx=function(t){return"start"===t.position?4:"middle"===t.position?0:-4},C.xGridTextX=function(t){return"start"===t.position?-this.height:"middle"===t.position?-this.height/2:0},C.yGridTextX=function(t){return"start"===t.position?0:"middle"===t.position?this.width/2:this.width},C.updateGrid=function(t){var e,n,o,r=this,a=r.main,s=r.config;r.grid.style("visibility",r.hasArcType()?"hidden":"visible"),a.select("line."+i.xgridFocus).style("visibility","hidden"),s.grid_x_show&&r.updateXGrid(),r.xgridLines=a.select("."+i.xgridLines).selectAll("."+i.xgridLine).data(s.grid_x_lines),(e=r.xgridLines.enter().append("g").attr("class",function(t){return i.xgridLine+(t.class?" "+t.class:"")})).append("line").style("opacity",0),e.append("text").attr("text-anchor",r.gridTextAnchor).attr("transform",s.axis_rotated?"":"rotate(-90)").attr("dx",r.gridTextDx).attr("dy",-5).style("opacity",0),r.xgridLines.exit().transition().duration(t).style("opacity",0).remove(),s.grid_y_show&&r.updateYGrid(),r.ygridLines=a.select("."+i.ygridLines).selectAll("."+i.ygridLine).data(s.grid_y_lines),(n=r.ygridLines.enter().append("g").attr("class",function(t){return i.ygridLine+(t.class?" "+t.class:"")})).append("line").style("opacity",0),n.append("text").attr("text-anchor",r.gridTextAnchor).attr("transform",s.axis_rotated?"rotate(-90)":"").attr("dx",r.gridTextDx).attr("dy",-5).style("opacity",0),o=r.yv.bind(r),r.ygridLines.select("line").transition().duration(t).attr("x1",s.axis_rotated?o:0).attr("x2",s.axis_rotated?o:r.width).attr("y1",s.axis_rotated?0:o).attr("y2",s.axis_rotated?r.height:o).style("opacity",1),r.ygridLines.select("text").transition().duration(t).attr("x",s.axis_rotated?r.xGridTextX.bind(r):r.yGridTextX.bind(r)).attr("y",o).text(function(t){return t.text}).style("opacity",1),r.ygridLines.exit().transition().duration(t).style("opacity",0).remove()},C.redrawGrid=function(t){var e=this,n=e.config,i=e.xv.bind(e),o=e.xgridLines.select("line"),r=e.xgridLines.select("text");return[(t?o.transition():o).attr("x1",n.axis_rotated?0:i).attr("x2",n.axis_rotated?e.width:i).attr("y1",n.axis_rotated?i:0).attr("y2",n.axis_rotated?i:e.height).style("opacity",1),(t?r.transition():r).attr("x",n.axis_rotated?e.yGridTextX.bind(e):e.xGridTextX.bind(e)).attr("y",i).text(function(t){return t.text}).style("opacity",1)]},C.showXGridFocus=function(t){var e=this,n=e.config,o=t.filter(function(t){return t&&s(t.value)}),r=e.main.selectAll("line."+i.xgridFocus),a=e.xx.bind(e);n.tooltip_show&&(e.hasType("scatter")||e.hasArcType()||(r.style("visibility","visible").data([o[0]]).attr(n.axis_rotated?"y1":"x1",a).attr(n.axis_rotated?"y2":"x2",a),e.smoothLines(r,"grid")))},C.hideXGridFocus=function(){this.main.select("line."+i.xgridFocus).style("visibility","hidden")},C.updateXgridFocus=function(){var t=this.config;this.main.select("line."+i.xgridFocus).attr("x1",t.axis_rotated?0:-10).attr("x2",t.axis_rotated?this.width:-10).attr("y1",t.axis_rotated?-10:0).attr("y2",t.axis_rotated?-10:this.height)},C.generateGridData=function(t,e){var n,o,r,a,s=[],l=this.main.select("."+i.axisX).selectAll(".tick").size();if("year"===t)for(o=(n=this.getXDomain())[0].getFullYear(),r=n[1].getFullYear(),a=o;a<=r;a++)s.push(new Date(a+"-01-01 00:00:00"));else(s=e.ticks(10)).length>l&&(s=s.filter(function(t){return(""+t).indexOf(".")<0}));return s},C.getGridFilterToRemove=function(t){return t?function(e){var n=!1;return[].concat(t).forEach(function(t){("value"in t&&e.value===t.value||"class"in t&&e.class===t.class)&&(n=!0)}),n}:function(){return!0}},C.removeGridLines=function(t,e){var n=this.config,o=this.getGridFilterToRemove(t),r=function(t){return!o(t)},a=e?i.xgridLines:i.ygridLines,s=e?i.xgridLine:i.ygridLine;this.main.select("."+a).selectAll("."+s).filter(o).transition().duration(n.transition_duration).style("opacity",0).remove(),e?n.grid_x_lines=n.grid_x_lines.filter(r):n.grid_y_lines=n.grid_y_lines.filter(r)},C.initEventRect=function(){this.main.select("."+i.chart).append("g").attr("class",i.eventRects).style("fill-opacity",0)},C.redrawEventRect=function(){var t,e,n=this,o=n.config,r=n.isMultipleX(),a=n.main.select("."+i.eventRects).style("cursor",o.zoom_enabled?o.axis_rotated?"ns-resize":"ew-resize":null).classed(i.eventRectsMultiple,r).classed(i.eventRectsSingle,!r);a.selectAll("."+i.eventRect).remove(),n.eventRect=a.selectAll("."+i.eventRect),r?(t=n.eventRect.data([0]),n.generateEventRectsForMultipleXs(t.enter()),n.updateEventRect(t)):(e=n.getMaxDataCountTarget(n.data.targets),a.datum(e?e.values:[]),n.eventRect=a.selectAll("."+i.eventRect),t=n.eventRect.data(function(t){return t}),n.generateEventRectsForSingleX(t.enter()),n.updateEventRect(t),t.exit().remove())},C.updateEventRect=function(t){var e,n,i,o,r,a,s=this,l=s.config;t=t||s.eventRect.data(function(t){return t}),s.isMultipleX()?(e=0,n=0,i=s.width,o=s.height):(!s.isCustomX()&&!s.isTimeSeries()||s.isCategorized()?(r=s.getEventRectWidth(),a=function(t){return s.x(t.x)-r/2}):(s.updateXs(),r=function(t){var e=s.getPrevX(t.index),n=s.getNextX(t.index);return null===e&&null===n?l.axis_rotated?s.height:s.width:(null===e&&(e=s.x.domain()[0]),null===n&&(n=s.x.domain()[1]),Math.max(0,(s.x(n)-s.x(e))/2))},a=function(t){var e=s.getPrevX(t.index),n=s.getNextX(t.index),i=s.data.xs[t.id][t.index];return null===e&&null===n?0:(null===e&&(e=s.x.domain()[0]),(s.x(i)+s.x(e))/2)}),e=l.axis_rotated?0:a,n=l.axis_rotated?a:0,i=l.axis_rotated?s.width:r,o=l.axis_rotated?r:s.height),t.attr("class",s.classEvent.bind(s)).attr("x",e).attr("y",n).attr("width",i).attr("height",o)},C.generateEventRectsForSingleX=function(t){var e=this,n=e.d3,o=e.config;t.append("rect").attr("class",e.classEvent.bind(e)).style("cursor",o.data_selection_enabled&&o.data_selection_grouped?"pointer":null).on("mouseover",function(t){var n=t.index;e.dragging||e.flowing||e.hasArcType()||(o.point_focus_expand_enabled&&e.expandCircles(n,null,!0),e.expandBars(n,null,!0),e.main.selectAll("."+i.shape+"-"+n).each(function(t){o.data_onmouseover.call(e.api,t)}))}).on("mouseout",function(t){var n=t.index;e.config&&(e.hasArcType()||(e.hideXGridFocus(),e.hideTooltip(),e.unexpandCircles(),e.unexpandBars(),e.main.selectAll("."+i.shape+"-"+n).each(function(t){o.data_onmouseout.call(e.api,t)})))}).on("mousemove",function(t){var r,a=t.index,s=e.svg.select("."+i.eventRect+"-"+a);e.dragging||e.flowing||e.hasArcType()||(e.isStepType(t)&&"step-after"===e.config.line_step_type&&n.mouse(this)[0]<e.x(e.getXValue(t.id,a))&&(a-=1),r=e.filterTargetsToShow(e.data.targets).map(function(t){return e.addName(e.getValueOnIndex(t.values,a))}),o.tooltip_grouped&&(e.showTooltip(r,this),e.showXGridFocus(r)),(!o.tooltip_grouped||o.data_selection_enabled&&!o.data_selection_grouped)&&e.main.selectAll("."+i.shape+"-"+a).each(function(){n.select(this).classed(i.EXPANDED,!0),o.data_selection_enabled&&s.style("cursor",o.data_selection_grouped?"pointer":null),o.tooltip_grouped||(e.hideXGridFocus(),e.hideTooltip(),o.data_selection_grouped||(e.unexpandCircles(a),e.unexpandBars(a)))}).filter(function(t){return e.isWithinShape(this,t)}).each(function(t){o.data_selection_enabled&&(o.data_selection_grouped||o.data_selection_isselectable(t))&&s.style("cursor","pointer"),o.tooltip_grouped||(e.showTooltip([t],this),e.showXGridFocus([t]),o.point_focus_expand_enabled&&e.expandCircles(a,t.id,!0),e.expandBars(a,t.id,!0))}))}).on("click",function(t){var r=t.index;!e.hasArcType()&&e.toggleShape&&(e.cancelClick?e.cancelClick=!1:(e.isStepType(t)&&"step-after"===o.line_step_type&&n.mouse(this)[0]<e.x(e.getXValue(t.id,r))&&(r-=1),e.main.selectAll("."+i.shape+"-"+r).each(function(t){(o.data_selection_grouped||e.isWithinShape(this,t))&&(e.toggleShape(this,t,r),e.config.data_onclick.call(e.api,t,this))})))}).call(o.data_selection_draggable&&e.drag?n.behavior.drag().origin(Object).on("drag",function(){e.drag(n.mouse(this))}).on("dragstart",function(){e.dragstart(n.mouse(this))}).on("dragend",function(){e.dragend()}):function(){})},C.generateEventRectsForMultipleXs=function(t){var e=this,n=e.d3,o=e.config;function r(){e.svg.select("."+i.eventRect).style("cursor",null),e.hideXGridFocus(),e.hideTooltip(),e.unexpandCircles(),e.unexpandBars()}t.append("rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height).attr("class",i.eventRect).on("mouseout",function(){e.config&&(e.hasArcType()||r())}).on("mousemove",function(){var t,a,s,l=e.filterTargetsToShow(e.data.targets);e.dragging||e.hasArcType(l)||(t=n.mouse(this),a=e.findClosestFromTargets(l,t),!e.mouseover||a&&a.id===e.mouseover.id||(o.data_onmouseout.call(e.api,e.mouseover),e.mouseover=void 0),a?(s=(e.isScatterType(a)||!o.tooltip_grouped?[a]:e.filterByX(l,a.x)).map(function(t){return e.addName(t)}),e.showTooltip(s,this),o.point_focus_expand_enabled&&e.expandCircles(a.index,a.id,!0),e.expandBars(a.index,a.id,!0),e.showXGridFocus(s),(e.isBarType(a.id)||e.dist(a,t)<o.point_sensitivity)&&(e.svg.select("."+i.eventRect).style("cursor","pointer"),e.mouseover||(o.data_onmouseover.call(e.api,a),e.mouseover=a))):r())}).on("click",function(){var t,r,a=e.filterTargetsToShow(e.data.targets);e.hasArcType(a)||(t=n.mouse(this),(r=e.findClosestFromTargets(a,t))&&(e.isBarType(r.id)||e.dist(r,t)<o.point_sensitivity)&&e.main.selectAll("."+i.shapes+e.getTargetSelectorSuffix(r.id)).selectAll("."+i.shape+"-"+r.index).each(function(){(o.data_selection_grouped||e.isWithinShape(this,r))&&(e.toggleShape(this,r,r.index),e.config.data_onclick.call(e.api,r,this))}))}).call(o.data_selection_draggable&&e.drag?n.behavior.drag().origin(Object).on("drag",function(){e.drag(n.mouse(this))}).on("dragstart",function(){e.dragstart(n.mouse(this))}).on("dragend",function(){e.dragend()}):function(){})},C.dispatchEvent=function(t,e,n){var o="."+i.eventRect+(this.isMultipleX()?"":"-"+e),r=this.main.select(o).node(),a=r.getBoundingClientRect(),s=a.left+(n?n[0]:0),l=a.top+(n?n[1]:0),u=document.createEvent("MouseEvents");u.initMouseEvent(t,!0,!0,window,0,s,l,s,l,!1,!1,!1,!1,0,null),r.dispatchEvent(u)},C.initLegend=function(){var t=this;if(t.legendItemTextBox={},t.legendHasRendered=!1,t.legend=t.svg.append("g").attr("transform",t.getTranslate("legend")),!t.config.legend_show)return t.legend.style("visibility","hidden"),void(t.hiddenLegendIds=t.mapToIds(t.data.targets));t.updateLegendWithDefaults()},C.updateLegendWithDefaults=function(){this.updateLegend(this.mapToIds(this.data.targets),{withTransform:!1,withTransitionForTransform:!1,withTransition:!1})},C.updateSizeForLegend=function(t,e){var n=this,i=n.config,o={top:n.isLegendTop?n.getCurrentPaddingTop()+i.legend_inset_y+5.5:n.currentHeight-t-n.getCurrentPaddingBottom()-i.legend_inset_y,left:n.isLegendLeft?n.getCurrentPaddingLeft()+i.legend_inset_x+.5:n.currentWidth-e-n.getCurrentPaddingRight()-i.legend_inset_x+.5};n.margin3={top:n.isLegendRight?0:n.isLegendInset?o.top:n.currentHeight-t,right:NaN,bottom:0,left:n.isLegendRight?n.currentWidth-e:n.isLegendInset?o.left:0}},C.transformLegend=function(t){(t?this.legend.transition():this.legend).attr("transform",this.getTranslate("legend"))},C.updateLegendStep=function(t){this.legendStep=t},C.updateLegendItemWidth=function(t){this.legendItemWidth=t},C.updateLegendItemHeight=function(t){this.legendItemHeight=t},C.getLegendWidth=function(){var t=this;return t.config.legend_show?t.isLegendRight||t.isLegendInset?t.legendItemWidth*(t.legendStep+1):t.currentWidth:0},C.getLegendHeight=function(){var t=this,e=0;return t.config.legend_show&&(e=t.isLegendRight?t.currentHeight:Math.max(20,t.legendItemHeight)*(t.legendStep+1)),e},C.opacityForLegend=function(t){return t.classed(i.legendItemHidden)?null:1},C.opacityForUnfocusedLegend=function(t){return t.classed(i.legendItemHidden)?null:.3},C.toggleFocusLegend=function(t,e){var n=this;t=n.mapToTargetIds(t),n.legend.selectAll("."+i.legendItem).filter(function(e){return t.indexOf(e)>=0}).classed(i.legendItemFocused,e).transition().duration(100).style("opacity",function(){return(e?n.opacityForLegend:n.opacityForUnfocusedLegend).call(n,n.d3.select(this))})},C.revertLegend=function(){var t=this,e=t.d3;t.legend.selectAll("."+i.legendItem).classed(i.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return t.opacityForLegend(e.select(this))})},C.showLegend=function(t){var e=this,n=e.config;n.legend_show||(n.legend_show=!0,e.legend.style("visibility","visible"),e.legendHasRendered||e.updateLegendWithDefaults()),e.removeHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("visibility","visible").transition().style("opacity",function(){return e.opacityForLegend(e.d3.select(this))})},C.hideLegend=function(t){var e=this,n=e.config;n.legend_show&&m(t)&&(n.legend_show=!1,e.legend.style("visibility","hidden")),e.addHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("opacity",0).style("visibility","hidden")},C.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},C.updateLegend=function(t,e,n){var o,r,a,s,l,u,c,h,f,p,g,m,v,b,w,_,x=this,S=x.config,E=4,C=10,T=0,M=0,P=10,L=S.legend_item_tile_width+5,A=0,k={},O={},R={},D=[0],j={},z=0;function N(e,n,o){var r,a,s=0===o,l=o===t.length-1,u=function(t,e){return x.legendItemTextBox[e]||(x.legendItemTextBox[e]=x.getTextRect(t.textContent,i.legendItem,t)),x.legendItemTextBox[e]}(e,n),c=u.width+L+(!l||x.isLegendRight||x.isLegendInset?C:0)+S.legend_padding,h=u.height+E,d=x.isLegendRight||x.isLegendInset?h:c,f=x.isLegendRight||x.isLegendInset?x.getLegendHeight():x.getLegendWidth();function p(t,e){e||(r=(f-A-d)/2)<P&&(r=(f-d)/2,A=0,z++),j[t]=z,D[z]=x.isLegendInset?10:r,k[t]=A,A+=d}s&&(A=0,z=0,T=0,M=0),!S.legend_show||x.isLegendToShow(n)?(O[n]=c,R[n]=h,(!T||c>=T)&&(T=c),(!M||h>=M)&&(M=h),a=x.isLegendRight||x.isLegendInset?M:T,S.legend_equally?(Object.keys(O).forEach(function(t){O[t]=T}),Object.keys(R).forEach(function(t){R[t]=M}),(r=(f-a*t.length)/2)<P?(A=0,z=0,t.forEach(function(t){p(t)})):p(n,!0)):p(n)):O[n]=R[n]=j[n]=k[n]=0}t=t.filter(function(t){return!d(S.data_names[t])||null!==S.data_names[t]}),g=y(e=e||{},"withTransition",!0),m=y(e,"withTransitionForTransform",!0),x.isLegendInset&&(z=S.legend_inset_step?S.legend_inset_step:t.length,x.updateLegendStep(z)),x.isLegendRight?(o=function(t){return T*j[t]},s=function(t){return D[j[t]]+k[t]}):x.isLegendInset?(o=function(t){return T*j[t]+10},s=function(t){return D[j[t]]+k[t]}):(o=function(t){return D[j[t]]+k[t]},s=function(t){return M*j[t]}),r=function(t,e){return o(t,e)+4+S.legend_item_tile_width},l=function(t,e){return s(t,e)+9},a=function(t,e){return o(t,e)},u=function(t,e){return s(t,e)-5},c=function(t,e){return o(t,e)-2},h=function(t,e){return o(t,e)-2+S.legend_item_tile_width},f=function(t,e){return s(t,e)+4},(p=x.legend.selectAll("."+i.legendItem).data(t).enter().append("g").attr("class",function(t){return x.generateClass(i.legendItem,t)}).style("visibility",function(t){return x.isLegendToShow(t)?"visible":"hidden"}).style("cursor","pointer").on("click",function(t){S.legend_item_onclick?S.legend_item_onclick.call(x,t):x.d3.event.altKey?(x.api.hide(),x.api.show(t)):(x.api.toggle(t),x.isTargetToShow(t)?x.api.focus(t):x.api.revert())}).on("mouseover",function(t){S.legend_item_onmouseover?S.legend_item_onmouseover.call(x,t):(x.d3.select(this).classed(i.legendItemFocused,!0),!x.transiting&&x.isTargetToShow(t)&&x.api.focus(t))}).on("mouseout",function(t){S.legend_item_onmouseout?S.legend_item_onmouseout.call(x,t):(x.d3.select(this).classed(i.legendItemFocused,!1),x.api.revert())})).append("text").text(function(t){return d(S.data_names[t])?S.data_names[t]:t}).each(function(t,e){N(this,t,e)}).style("pointer-events","none").attr("x",x.isLegendRight||x.isLegendInset?r:-200).attr("y",x.isLegendRight||x.isLegendInset?-200:l),p.append("rect").attr("class",i.legendItemEvent).style("fill-opacity",0).attr("x",x.isLegendRight||x.isLegendInset?a:-200).attr("y",x.isLegendRight||x.isLegendInset?-200:u),p.append("line").attr("class",i.legendItemTile).style("stroke",x.color).style("pointer-events","none").attr("x1",x.isLegendRight||x.isLegendInset?c:-200).attr("y1",x.isLegendRight||x.isLegendInset?-200:f).attr("x2",x.isLegendRight||x.isLegendInset?h:-200).attr("y2",x.isLegendRight||x.isLegendInset?-200:f).attr("stroke-width",S.legend_item_tile_height),_=x.legend.select("."+i.legendBackground+" rect"),x.isLegendInset&&T>0&&0===_.size()&&(_=x.legend.insert("g","."+i.legendItem).attr("class",i.legendBackground).append("rect")),v=x.legend.selectAll("text").data(t).text(function(t){return d(S.data_names[t])?S.data_names[t]:t}).each(function(t,e){N(this,t,e)}),(g?v.transition():v).attr("x",r).attr("y",l),b=x.legend.selectAll("rect."+i.legendItemEvent).data(t),(g?b.transition():b).attr("width",function(t){return O[t]}).attr("height",function(t){return R[t]}).attr("x",a).attr("y",u),w=x.legend.selectAll("line."+i.legendItemTile).data(t),(g?w.transition():w).style("stroke",x.levelColor?function(t){return x.levelColor(x.cache[t].values[0].value)}:x.color).attr("x1",c).attr("y1",f).attr("x2",h).attr("y2",f),_&&(g?_.transition():_).attr("height",x.getLegendHeight()-12).attr("width",T*(z+1)+10),x.legend.selectAll("."+i.legendItem).classed(i.legendItemHidden,function(t){return!x.isTargetToShow(t)}),x.updateLegendItemWidth(T),x.updateLegendItemHeight(M),x.updateLegendStep(z),x.updateSizes(),x.updateScales(),x.updateSvgSize(),x.transformAll(m,n),x.legendHasRendered=!0},C.initRegion=function(){this.region=this.main.append("g").attr("clip-path",this.clipPath).attr("class",i.regions)},C.updateRegion=function(t){var e=this,n=e.config;e.region.style("visibility",e.hasArcType()?"hidden":"visible"),e.mainRegion=e.main.select("."+i.regions).selectAll("."+i.region).data(n.regions),e.mainRegion.enter().append("g").append("rect").style("fill-opacity",0),e.mainRegion.attr("class",e.classRegion.bind(e)),e.mainRegion.exit().transition().duration(t).style("opacity",0).remove()},C.redrawRegion=function(t){var e=this,n=e.mainRegion.selectAll("rect").each(function(){var t=e.d3.select(this.parentNode).datum();e.d3.select(this).datum(t)}),i=e.regionX.bind(e),o=e.regionY.bind(e),r=e.regionWidth.bind(e),a=e.regionHeight.bind(e);return[(t?n.transition():n).attr("x",i).attr("y",o).attr("width",r).attr("height",a).style("fill-opacity",function(t){return s(t.opacity)?t.opacity:.1})]},C.regionX=function(t){var e=this,n=e.config,i="y"===t.axis?e.y:e.y2;return"y"===t.axis||"y2"===t.axis?n.axis_rotated&&"start"in t?i(t.start):0:n.axis_rotated?0:"start"in t?e.x(e.isTimeSeries()?e.parseDate(t.start):t.start):0},C.regionY=function(t){var e=this,n=e.config,i="y"===t.axis?e.y:e.y2;return"y"===t.axis||"y2"===t.axis?n.axis_rotated?0:"end"in t?i(t.end):0:n.axis_rotated&&"start"in t?e.x(e.isTimeSeries()?e.parseDate(t.start):t.start):0},C.regionWidth=function(t){var e,n=this,i=n.config,o=n.regionX(t),r="y"===t.axis?n.y:n.y2;return(e="y"===t.axis||"y2"===t.axis?i.axis_rotated&&"end"in t?r(t.end):n.width:i.axis_rotated?n.width:"end"in t?n.x(n.isTimeSeries()?n.parseDate(t.end):t.end):n.width)<o?0:e-o},C.regionHeight=function(t){var e,n=this,i=n.config,o=this.regionY(t),r="y"===t.axis?n.y:n.y2;return(e="y"===t.axis||"y2"===t.axis?i.axis_rotated?n.height:"start"in t?r(t.start):n.height:i.axis_rotated&&"end"in t?n.x(n.isTimeSeries()?n.parseDate(t.end):t.end):n.height)<o?0:e-o},C.isRegionOnX=function(t){return!t.axis||"x"===t.axis},C.getScale=function(t,e,n){return(n?this.d3.time.scale():this.d3.scale.linear()).range([t,e])},C.getX=function(t,e,n,i){var o,r=this.getScale(t,e,this.isTimeSeries()),a=n?r.domain(n):r;for(o in this.isCategorized()?(i=i||function(){return 0},r=function(t,e){var n=a(t)+i(t);return e?n:Math.ceil(n)}):r=function(t,e){var n=a(t);return e?n:Math.ceil(n)},a)r[o]=a[o];return r.orgDomain=function(){return a.domain()},this.isCategorized()&&(r.domain=function(t){return arguments.length?(a.domain(t),r):[(t=this.orgDomain())[0],t[1]+1]}),r},C.getY=function(t,e,n){var i=this.getScale(t,e,this.isTimeSeriesY());return n&&i.domain(n),i},C.getYScale=function(t){return"y2"===this.axis.getId(t)?this.y2:this.y},C.getSubYScale=function(t){return"y2"===this.axis.getId(t)?this.subY2:this.subY},C.updateScales=function(){var t=this,e=t.config,n=!t.x;t.xMin=e.axis_rotated?1:0,t.xMax=e.axis_rotated?t.height:t.width,t.yMin=e.axis_rotated?0:t.height,t.yMax=e.axis_rotated?t.width:1,t.subXMin=t.xMin,t.subXMax=t.xMax,t.subYMin=e.axis_rotated?0:t.height2,t.subYMax=e.axis_rotated?t.width2:1,t.x=t.getX(t.xMin,t.xMax,n?void 0:t.x.orgDomain(),function(){return t.xAxis.tickOffset()}),t.y=t.getY(t.yMin,t.yMax,n?e.axis_y_default:t.y.domain()),t.y2=t.getY(t.yMin,t.yMax,n?e.axis_y2_default:t.y2.domain()),t.subX=t.getX(t.xMin,t.xMax,t.orgXDomain,function(e){return e%1?0:t.subXAxis.tickOffset()}),t.subY=t.getY(t.subYMin,t.subYMax,n?e.axis_y_default:t.subY.domain()),t.subY2=t.getY(t.subYMin,t.subYMax,n?e.axis_y2_default:t.subY2.domain()),t.xAxisTickFormat=t.axis.getXAxisTickFormat(),t.xAxisTickValues=t.axis.getXAxisTickValues(),t.yAxisTickValues=t.axis.getYAxisTickValues(),t.y2AxisTickValues=t.axis.getY2AxisTickValues(),t.xAxis=t.axis.getXAxis(t.x,t.xOrient,t.xAxisTickFormat,t.xAxisTickValues,e.axis_x_tick_outer),t.subXAxis=t.axis.getXAxis(t.subX,t.subXOrient,t.xAxisTickFormat,t.xAxisTickValues,e.axis_x_tick_outer),t.yAxis=t.axis.getYAxis(t.y,t.yOrient,e.axis_y_tick_format,t.yAxisTickValues,e.axis_y_tick_outer),t.y2Axis=t.axis.getYAxis(t.y2,t.y2Orient,e.axis_y2_tick_format,t.y2AxisTickValues,e.axis_y2_tick_outer),n||(t.brush&&t.brush.scale(t.subX),e.zoom_enabled&&t.zoom.scale(t.x)),t.updateArc&&t.updateArc()},C.selectPoint=function(t,e,n){var o=this,r=o.config,a=(r.axis_rotated?o.circleY:o.circleX).bind(o),s=(r.axis_rotated?o.circleX:o.circleY).bind(o),l=o.pointSelectR.bind(o);r.data_onselected.call(o.api,e,t.node()),o.main.select("."+i.selectedCircles+o.getTargetSelectorSuffix(e.id)).selectAll("."+i.selectedCircle+"-"+n).data([e]).enter().append("circle").attr("class",function(){return o.generateClass(i.selectedCircle,n)}).attr("cx",a).attr("cy",s).attr("stroke",function(){return o.color(e)}).attr("r",function(t){return 1.4*o.pointSelectR(t)}).transition().duration(100).attr("r",l)},C.unselectPoint=function(t,e,n){this.config.data_onunselected.call(this.api,e,t.node()),this.main.select("."+i.selectedCircles+this.getTargetSelectorSuffix(e.id)).selectAll("."+i.selectedCircle+"-"+n).transition().duration(100).attr("r",0).remove()},C.togglePoint=function(t,e,n,i){t?this.selectPoint(e,n,i):this.unselectPoint(e,n,i)},C.selectPath=function(t,e){var n=this;n.config.data_onselected.call(n,e,t.node()),n.config.interaction_brighten&&t.transition().duration(100).style("fill",function(){return n.d3.rgb(n.color(e)).brighter(.75)})},C.unselectPath=function(t,e){var n=this;n.config.data_onunselected.call(n,e,t.node()),n.config.interaction_brighten&&t.transition().duration(100).style("fill",function(){return n.color(e)})},C.togglePath=function(t,e,n,i){t?this.selectPath(e,n,i):this.unselectPath(e,n,i)},C.getToggle=function(t,e){var n;return"circle"===t.nodeName?n=this.isStepType(e)?function(){}:this.togglePoint:"path"===t.nodeName&&(n=this.togglePath),n},C.toggleShape=function(t,e,n){var o=this,r=o.d3,a=o.config,s=r.select(t),l=s.classed(i.SELECTED),u=o.getToggle(t,e).bind(o);a.data_selection_enabled&&a.data_selection_isselectable(e)&&(a.data_selection_multiple||o.main.selectAll("."+i.shapes+(a.data_selection_grouped?o.getTargetSelectorSuffix(e.id):"")).selectAll("."+i.shape).each(function(t,e){var n=r.select(this);n.classed(i.SELECTED)&&u(!1,n.classed(i.SELECTED,!1),t,e)}),s.classed(i.SELECTED,!l),u(!l,s,e,n))},C.initBar=function(){this.main.select("."+i.chart).append("g").attr("class",i.chartBars)},C.updateTargetsForBar=function(t){var e=this,n=e.config,o=e.classChartBar.bind(e),r=e.classBars.bind(e),a=e.classFocus.bind(e);e.main.select("."+i.chartBars).selectAll("."+i.chartBar).data(t).attr("class",function(t){return o(t)+a(t)}).enter().append("g").attr("class",o).style("pointer-events","none").append("g").attr("class",r).style("cursor",function(t){return n.data_selection_isselectable(t)?"pointer":null})},C.updateBar=function(t){var e=this,n=e.barData.bind(e),o=e.classBar.bind(e),r=e.initialOpacity.bind(e),a=function(t){return e.color(t.id)};e.mainBar=e.main.selectAll("."+i.bars).selectAll("."+i.bar).data(n),e.mainBar.enter().append("path").attr("class",o).style("stroke",a).style("fill",a),e.mainBar.style("opacity",r),e.mainBar.exit().transition().duration(t).remove()},C.redrawBar=function(t,e){return[(e?this.mainBar.transition(Math.random().toString()):this.mainBar).attr("d",t).style("stroke",this.color).style("fill",this.color).style("opacity",1)]},C.getBarW=function(t,e){var n=this.config,i="number"==typeof n.bar_width?n.bar_width:e?t.tickInterval()*n.bar_width_ratio/e:0;return n.bar_width_max&&i>n.bar_width_max?n.bar_width_max:i},C.getBars=function(t,e){return(e?this.main.selectAll("."+i.bars+this.getTargetSelectorSuffix(e)):this.main).selectAll("."+i.bar+(s(t)?"-"+t:""))},C.expandBars=function(t,e,n){n&&this.unexpandBars(),this.getBars(t,e).classed(i.EXPANDED,!0)},C.unexpandBars=function(t){this.getBars(t).classed(i.EXPANDED,!1)},C.generateDrawBar=function(t,e){var n=this.config,i=this.generateGetBarPoints(t,e);return function(t,e){var o=i(t,e),r=n.axis_rotated?1:0,a=n.axis_rotated?0:1;return"M "+o[0][r]+","+o[0][a]+" L"+o[1][r]+","+o[1][a]+" L"+o[2][r]+","+o[2][a]+" L"+o[3][r]+","+o[3][a]+" z"}},C.generateGetBarPoints=function(t,e){var n=this,i=e?n.subXAxis:n.xAxis,o=t.__max__+1,r=n.getBarW(i,o),a=n.getShapeX(r,o,t,!!e),s=n.getShapeY(!!e),l=n.getShapeOffset(n.isBarType,t,!!e),u=r*(n.config.bar_space/2),c=e?n.getSubYScale:n.getYScale;return function(t,e){var i=c.call(n,t.id)(0),o=l(t,e)||i,h=a(t),d=s(t);return n.config.axis_rotated&&(0<t.value&&d<i||t.value<0&&i<d)&&(d=i),[[h+u,o],[h+u,d-(i-o)],[h+r-u,d-(i-o)],[h+r-u,o]]}},C.isWithinBar=function(t){var e=this.d3.mouse(t),n=t.getBoundingClientRect(),i=t.pathSegList.getItem(0),o=t.pathSegList.getItem(1),r=Math.min(i.x,o.x),a=Math.min(i.y,o.y),s=r+n.width+2,l=a+n.height+2,u=a-2;return r-2<e[0]&&e[0]<s&&u<e[1]&&e[1]<l},C.getShapeIndices=function(t){var e,n,i=this.config,o={},r=0;return this.filterTargetsToShow(this.data.targets.filter(t,this)).forEach(function(t){for(e=0;e<i.data_groups.length;e++)if(!(i.data_groups[e].indexOf(t.id)<0))for(n=0;n<i.data_groups[e].length;n++)if(i.data_groups[e][n]in o){o[t.id]=o[i.data_groups[e][n]];break}h(o[t.id])&&(o[t.id]=r++)}),o.__max__=r-1,o},C.getShapeX=function(t,e,n,i){var o=i?this.subX:this.x;return function(i){var r=i.id in n?n[i.id]:0;return i.x||0===i.x?o(i.x)-t*(e/2-r):0}},C.getShapeY=function(t){var e=this;return function(n){return(t?e.getSubYScale(n.id):e.getYScale(n.id))(n.value)}},C.getShapeOffset=function(t,e,n){var i=this,o=i.orderTargets(i.filterTargetsToShow(i.data.targets.filter(t,i))),r=o.map(function(t){return t.id});return function(t,a){var s=n?i.getSubYScale(t.id):i.getYScale(t.id),l=s(0),u=l;return o.forEach(function(n){var o=i.isStepType(t)?i.convertValuesToStep(n.values):n.values;n.id!==t.id&&e[n.id]===e[t.id]&&r.indexOf(n.id)<r.indexOf(t.id)&&(void 0!==o[a]&&+o[a].x==+t.x||(a=-1,o.forEach(function(e,n){e.x===t.x&&(a=n)})),a in o&&o[a].value*t.value>=0&&(u+=s(o[a].value)-l))}),u}},C.isWithinShape=function(t,e){var n,o=this,r=o.d3.select(t);return o.isTargetToShow(e.id)?"circle"===t.nodeName?n=o.isStepType(e)?o.isWithinStep(t,o.getYScale(e.id)(e.value)):o.isWithinCircle(t,1.5*o.pointSelectR(e)):"path"===t.nodeName&&(n=!r.classed(i.bar)||o.isWithinBar(t)):n=!1,n},C.getInterpolate=function(t){var e=this,n=e.isInterpolationType(e.config.spline_interpolation_type)?e.config.spline_interpolation_type:"cardinal";return e.isSplineType(t)?n:e.isStepType(t)?e.config.line_step_type:"linear"},C.initLine=function(){this.main.select("."+i.chart).append("g").attr("class",i.chartLines)},C.updateTargetsForLine=function(t){var e,n=this,o=n.config,r=n.classChartLine.bind(n),a=n.classLines.bind(n),s=n.classAreas.bind(n),l=n.classCircles.bind(n),u=n.classFocus.bind(n);(e=n.main.select("."+i.chartLines).selectAll("."+i.chartLine).data(t).attr("class",function(t){return r(t)+u(t)}).enter().append("g").attr("class",r).style("opacity",0).style("pointer-events","none")).append("g").attr("class",a),e.append("g").attr("class",s),e.append("g").attr("class",function(t){return n.generateClass(i.selectedCircles,t.id)}),e.append("g").attr("class",l).style("cursor",function(t){return o.data_selection_isselectable(t)?"pointer":null}),t.forEach(function(t){n.main.selectAll("."+i.selectedCircles+n.getTargetSelectorSuffix(t.id)).selectAll("."+i.selectedCircle).each(function(e){e.value=t.values[e.index].value})})},C.updateLine=function(t){var e=this;e.mainLine=e.main.selectAll("."+i.lines).selectAll("."+i.line).data(e.lineData.bind(e)),e.mainLine.enter().append("path").attr("class",e.classLine.bind(e)).style("stroke",e.color),e.mainLine.style("opacity",e.initialOpacity.bind(e)).style("shape-rendering",function(t){return e.isStepType(t)?"crispEdges":""}).attr("transform",null),e.mainLine.exit().transition().duration(t).style("opacity",0).remove()},C.redrawLine=function(t,e){return[(e?this.mainLine.transition(Math.random().toString()):this.mainLine).attr("d",t).style("stroke",this.color).style("opacity",1)]},C.generateDrawLine=function(t,e){var n=this,i=n.config,o=n.d3.svg.line(),r=n.generateGetLinePoints(t,e),a=e?n.getSubYScale:n.getYScale,s=function(t){return(e?n.subxx:n.xx).call(n,t)},l=function(t,e){return i.data_groups.length>0?r(t,e)[0][1]:a.call(n,t.id)(t.value)};return o=i.axis_rotated?o.x(l).y(s):o.x(s).y(l),i.line_connectNull||(o=o.defined(function(t){return null!=t.value})),function(t){var r,s=i.line_connectNull?n.filterRemoveNull(t.values):t.values,l=e?n.x:n.subX,u=a.call(n,t.id),c=0,h=0;return n.isLineType(t)?i.data_regions[t.id]?r=n.lineWithRegions(s,l,u,i.data_regions[t.id]):(n.isStepType(t)&&(s=n.convertValuesToStep(s)),r=o.interpolate(n.getInterpolate(t))(s)):(s[0]&&(c=l(s[0].x),h=u(s[0].value)),r=i.axis_rotated?"M "+h+" "+c:"M "+c+" "+h),r||"M 0 0"}},C.generateGetLinePoints=function(t,e){var n=this,i=n.config,o=t.__max__+1,r=n.getShapeX(0,o,t,!!e),a=n.getShapeY(!!e),s=n.getShapeOffset(n.isLineType,t,!!e),l=e?n.getSubYScale:n.getYScale;return function(t,e){var o=l.call(n,t.id)(0),u=s(t,e)||o,c=r(t),h=a(t);return i.axis_rotated&&(0<t.value&&h<o||t.value<0&&o<h)&&(h=o),[[c,h-(o-u)],[c,h-(o-u)],[c,h-(o-u)],[c,h-(o-u)]]}},C.lineWithRegions=function(t,e,n,i){var o,r,a,s,l,u,c,f,p,g,m,v=this,y=v.config,b="M",w=v.isCategorized()?.5:0,_=[];function x(t,e){var n;for(n=0;n<e.length;n++)if(e[n].start<t&&t<=e[n].end)return!0;return!1}if(d(i))for(o=0;o<i.length;o++)_[o]={},h(i[o].start)?_[o].start=t[0].x:_[o].start=v.isTimeSeries()?v.parseDate(i[o].start):i[o].start,h(i[o].end)?_[o].end=t[t.length-1].x:_[o].end=v.isTimeSeries()?v.parseDate(i[o].end):i[o].end;function S(t){return"M"+t[0][0]+" "+t[0][1]+" "+t[1][0]+" "+t[1][1]}for(g=y.axis_rotated?function(t){return n(t.value)}:function(t){return e(t.x)},m=y.axis_rotated?function(t){return e(t.x)}:function(t){return n(t.value)},a=v.isTimeSeries()?function(t,i,o,r){var a=t.x.getTime(),s=i.x-t.x,u=new Date(a+s*o),c=new Date(a+s*(o+r));return S(y.axis_rotated?[[n(l(o)),e(u)],[n(l(o+r)),e(c)]]:[[e(u),n(l(o))],[e(c),n(l(o+r))]])}:function(t,i,o,r){return S(y.axis_rotated?[[n(l(o),!0),e(s(o))],[n(l(o+r),!0),e(s(o+r))]]:[[e(s(o),!0),n(l(o))],[e(s(o+r),!0),n(l(o+r))]])},o=0;o<t.length;o++){if(h(_)||!x(t[o].x,_))b+=" "+g(t[o])+" "+m(t[o]);else for(s=v.getScale(t[o-1].x+w,t[o].x+w,v.isTimeSeries()),l=v.getScale(t[o-1].value,t[o].value),u=e(t[o].x)-e(t[o-1].x),c=n(t[o].value)-n(t[o-1].value),p=2*(f=2/Math.sqrt(Math.pow(u,2)+Math.pow(c,2))),r=f;r<=1;r+=p)b+=a(t[o-1],t[o],r,f);t[o].x}return b},C.updateArea=function(t){var e=this,n=e.d3;e.mainArea=e.main.selectAll("."+i.areas).selectAll("."+i.area).data(e.lineData.bind(e)),e.mainArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",function(){return e.orgAreaOpacity=+n.select(this).style("opacity"),0}),e.mainArea.style("opacity",e.orgAreaOpacity),e.mainArea.exit().transition().duration(t).style("opacity",0).remove()},C.redrawArea=function(t,e){return[(e?this.mainArea.transition(Math.random().toString()):this.mainArea).attr("d",t).style("fill",this.color).style("opacity",this.orgAreaOpacity)]},C.generateDrawArea=function(t,e){var n=this,i=n.config,o=n.d3.svg.area(),r=n.generateGetAreaPoints(t,e),a=e?n.getSubYScale:n.getYScale,s=function(t){return(e?n.subxx:n.xx).call(n,t)},l=function(t,e){return i.data_groups.length>0?r(t,e)[0][1]:a.call(n,t.id)(n.getAreaBaseValue(t.id))},u=function(t,e){return i.data_groups.length>0?r(t,e)[1][1]:a.call(n,t.id)(t.value)};return o=i.axis_rotated?o.x0(l).x1(u).y(s):o.x(s).y0(i.area_above?0:l).y1(u),i.line_connectNull||(o=o.defined(function(t){return null!==t.value})),function(t){var e,r=i.line_connectNull?n.filterRemoveNull(t.values):t.values,a=0,s=0;return n.isAreaType(t)?(n.isStepType(t)&&(r=n.convertValuesToStep(r)),e=o.interpolate(n.getInterpolate(t))(r)):(r[0]&&(a=n.x(r[0].x),s=n.getYScale(t.id)(r[0].value)),e=i.axis_rotated?"M "+s+" "+a:"M "+a+" "+s),e||"M 0 0"}},C.getAreaBaseValue=function(){return 0},C.generateGetAreaPoints=function(t,e){var n=this,i=n.config,o=t.__max__+1,r=n.getShapeX(0,o,t,!!e),a=n.getShapeY(!!e),s=n.getShapeOffset(n.isAreaType,t,!!e),l=e?n.getSubYScale:n.getYScale;return function(t,e){var o=l.call(n,t.id)(0),u=s(t,e)||o,c=r(t),h=a(t);return i.axis_rotated&&(0<t.value&&h<o||t.value<0&&o<h)&&(h=o),[[c,u],[c,h-(o-u)],[c,h-(o-u)],[c,u]]}},C.updateCircle=function(){var t=this;t.mainCircle=t.main.selectAll("."+i.circles).selectAll("."+i.circle).data(t.lineOrScatterData.bind(t)),t.mainCircle.enter().append("circle").attr("class",t.classCircle.bind(t)).attr("r",t.pointR.bind(t)).style("fill",t.color),t.mainCircle.style("opacity",t.initialOpacityForCircle.bind(t)),t.mainCircle.exit().remove()},C.redrawCircle=function(t,e,n){var o=this.main.selectAll("."+i.selectedCircle);return[(n?this.mainCircle.transition(Math.random().toString()):this.mainCircle).style("opacity",this.opacityForCircle.bind(this)).style("fill",this.color).attr("cx",t).attr("cy",e),(n?o.transition(Math.random().toString()):o).attr("cx",t).attr("cy",e)]},C.circleX=function(t){return t.x||0===t.x?this.x(t.x):null},C.updateCircleY=function(){var t,e,n=this;n.config.data_groups.length>0?(t=n.getShapeIndices(n.isLineType),e=n.generateGetLinePoints(t),n.circleY=function(t,n){return e(t,n)[0][1]}):n.circleY=function(t){return n.getYScale(t.id)(t.value)}},C.getCircles=function(t,e){return(e?this.main.selectAll("."+i.circles+this.getTargetSelectorSuffix(e)):this.main).selectAll("."+i.circle+(s(t)?"-"+t:""))},C.expandCircles=function(t,e,n){var o=this.pointExpandedR.bind(this);n&&this.unexpandCircles(),this.getCircles(t,e).classed(i.EXPANDED,!0).attr("r",o)},C.unexpandCircles=function(t){var e=this,n=e.pointR.bind(e);e.getCircles(t).filter(function(){return e.d3.select(this).classed(i.EXPANDED)}).classed(i.EXPANDED,!1).attr("r",n)},C.pointR=function(t){var e=this.config;return this.isStepType(t)?0:l(e.point_r)?e.point_r(t):e.point_r},C.pointExpandedR=function(t){var e=this.config;return e.point_focus_expand_enabled?l(e.point_focus_expand_r)?e.point_focus_expand_r(t):e.point_focus_expand_r?e.point_focus_expand_r:1.75*this.pointR(t):this.pointR(t)},C.pointSelectR=function(t){var e=this.config;return l(e.point_select_r)?e.point_select_r(t):e.point_select_r?e.point_select_r:4*this.pointR(t)},C.isWithinCircle=function(t,e){var n=this.d3,i=n.mouse(t),o=n.select(t),r=+o.attr("cx"),a=+o.attr("cy");return Math.sqrt(Math.pow(r-i[0],2)+Math.pow(a-i[1],2))<e},C.isWithinStep=function(t,e){return Math.abs(e-this.d3.mouse(t)[1])<30},C.getCurrentWidth=function(){var t=this.config;return t.size_width?t.size_width:this.getParentWidth()},C.getCurrentHeight=function(){var t=this.config,e=t.size_height?t.size_height:this.getParentHeight();return e>0?e:320/(this.hasType("gauge")&&!t.gauge_fullCircle?2:1)},C.getCurrentPaddingTop=function(){var t=this.config,e=s(t.padding_top)?t.padding_top:0;return this.title&&this.title.node()&&(e+=this.getTitlePadding()),e},C.getCurrentPaddingBottom=function(){var t=this.config;return s(t.padding_bottom)?t.padding_bottom:0},C.getCurrentPaddingLeft=function(t){var e=this.config;return s(e.padding_left)?e.padding_left:e.axis_rotated?!e.axis_x_show||e.axis_x_inner?1:Math.max(f(this.getAxisWidthByAxisId("x",t)),40):!e.axis_y_show||e.axis_y_inner?this.axis.getYAxisLabelPosition().isOuter?30:1:f(this.getAxisWidthByAxisId("y",t))},C.getCurrentPaddingRight=function(){var t=this,e=t.config,n=t.isLegendRight?t.getLegendWidth()+20:0;return s(e.padding_right)?e.padding_right+1:e.axis_rotated?10+n:!e.axis_y2_show||e.axis_y2_inner?2+n+(t.axis.getY2AxisLabelPosition().isOuter?20:0):f(t.getAxisWidthByAxisId("y2"))+n},C.getParentRectValue=function(t){for(var e,n=this.selectChart.node();n&&"BODY"!==n.tagName;){try{e=n.getBoundingClientRect()[t]}catch(i){"width"===t&&(e=n.offsetWidth)}if(e)break;n=n.parentNode}return e},C.getParentWidth=function(){return this.getParentRectValue("width")},C.getParentHeight=function(){var t=this.selectChart.style("height");return t.indexOf("px")>0?+t.replace("px",""):0},C.getSvgLeft=function(t){var e=this,n=e.config,o=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,r=n.axis_rotated?i.axisX:i.axisY,a=e.main.select("."+r).node(),s=a&&o?a.getBoundingClientRect():{right:0},l=e.selectChart.node().getBoundingClientRect(),u=e.hasArcType(),c=s.right-l.left-(u?0:e.getCurrentPaddingLeft(t));return c>0?c:0},C.getAxisWidthByAxisId=function(t,e){var n=this.axis.getLabelPositionById(t);return this.axis.getMaxTickWidth(t,e)+(n.isInner?20:40)},C.getHorizontalAxisHeight=function(t){var e=this,n=e.config,i=30;return"x"!==t||n.axis_x_show?"x"===t&&n.axis_x_height?n.axis_x_height:"y"!==t||n.axis_y_show?"y2"!==t||n.axis_y2_show?("x"===t&&!n.axis_rotated&&n.axis_x_tick_rotate&&(i=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-n.axis_x_tick_rotate)/180)),"y"===t&&n.axis_rotated&&n.axis_y_tick_rotate&&(i=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-n.axis_y_tick_rotate)/180)),i+(e.axis.getLabelPositionById(t).isInner?0:10)+("y2"===t?-10:0)):e.rotated_padding_top:!n.legend_show||e.isLegendRight||e.isLegendInset?1:10:8},C.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())},C.initBrush=function(){var t=this,e=t.d3;t.brush=e.svg.brush().on("brush",function(){t.redrawForBrush()}),t.brush.update=function(){return t.context&&t.context.select("."+i.brush).call(this),this},t.brush.scale=function(e){return t.config.axis_rotated?this.y(e):this.x(e)}},C.initSubchart=function(){var t=this,e=t.config,n=t.context=t.svg.append("g").attr("transform",t.getTranslate("context")),o=e.subchart_show?"visible":"hidden";n.style("visibility",o),n.append("g").attr("clip-path",t.clipPathForSubchart).attr("class",i.chart),n.select("."+i.chart).append("g").attr("class",i.chartBars),n.select("."+i.chart).append("g").attr("class",i.chartLines),n.append("g").attr("clip-path",t.clipPath).attr("class",i.brush).call(t.brush),t.axes.subx=n.append("g").attr("class",i.axisX).attr("transform",t.getTranslate("subx")).attr("clip-path",e.axis_rotated?"":t.clipPathForXAxis).style("visibility",e.subchart_axis_x_show?o:"hidden")},C.updateTargetsForSubchart=function(t){var e,n=this,o=n.context,r=n.config,a=n.classChartBar.bind(n),s=n.classBars.bind(n),l=n.classChartLine.bind(n),u=n.classLines.bind(n),c=n.classAreas.bind(n);r.subchart_show&&(o.select("."+i.chartBars).selectAll("."+i.chartBar).data(t).attr("class",a).enter().append("g").style("opacity",0).attr("class",a).append("g").attr("class",s),(e=o.select("."+i.chartLines).selectAll("."+i.chartLine).data(t).attr("class",l).enter().append("g").style("opacity",0).attr("class",l)).append("g").attr("class",u),e.append("g").attr("class",c),o.selectAll("."+i.brush+" rect").attr(r.axis_rotated?"width":"height",r.axis_rotated?n.width2:n.height2))},C.updateBarForSubchart=function(t){var e=this;e.contextBar=e.context.selectAll("."+i.bars).selectAll("."+i.bar).data(e.barData.bind(e)),e.contextBar.enter().append("path").attr("class",e.classBar.bind(e)).style("stroke","none").style("fill",e.color),e.contextBar.style("opacity",e.initialOpacity.bind(e)),e.contextBar.exit().transition().duration(t).style("opacity",0).remove()},C.redrawBarForSubchart=function(t,e,n){(e?this.contextBar.transition(Math.random().toString()).duration(n):this.contextBar).attr("d",t).style("opacity",1)},C.updateLineForSubchart=function(t){var e=this;e.contextLine=e.context.selectAll("."+i.lines).selectAll("."+i.line).data(e.lineData.bind(e)),e.contextLine.enter().append("path").attr("class",e.classLine.bind(e)).style("stroke",e.color),e.contextLine.style("opacity",e.initialOpacity.bind(e)),e.contextLine.exit().transition().duration(t).style("opacity",0).remove()},C.redrawLineForSubchart=function(t,e,n){(e?this.contextLine.transition(Math.random().toString()).duration(n):this.contextLine).attr("d",t).style("opacity",1)},C.updateAreaForSubchart=function(t){var e=this,n=e.d3;e.contextArea=e.context.selectAll("."+i.areas).selectAll("."+i.area).data(e.lineData.bind(e)),e.contextArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",function(){return e.orgAreaOpacity=+n.select(this).style("opacity"),0}),e.contextArea.style("opacity",0),e.contextArea.exit().transition().duration(t).style("opacity",0).remove()},C.redrawAreaForSubchart=function(t,e,n){(e?this.contextArea.transition(Math.random().toString()).duration(n):this.contextArea).attr("d",t).style("fill",this.color).style("opacity",this.orgAreaOpacity)},C.redrawSubchart=function(t,e,n,i,o,r,a){var s,l,u,c=this,h=c.d3,d=c.config;c.context.style("visibility",d.subchart_show?"visible":"hidden"),d.subchart_show&&(h.event&&"zoom"===h.event.type&&c.brush.extent(c.x.orgDomain()).update(),t&&(c.brush.empty()||c.brush.extent(c.x.orgDomain()).update(),s=c.generateDrawArea(o,!0),l=c.generateDrawBar(r,!0),u=c.generateDrawLine(a,!0),c.updateBarForSubchart(n),c.updateLineForSubchart(n),c.updateAreaForSubchart(n),c.redrawBarForSubchart(l,n,n),c.redrawLineForSubchart(u,n,n),c.redrawAreaForSubchart(s,n,n)))},C.redrawForBrush=function(){var t=this,e=t.x;t.redraw({withTransition:!1,withY:t.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t.config.subchart_onbrush.call(t.api,e.orgDomain())},C.transformContext=function(t,e){var n;e&&e.axisSubX?n=e.axisSubX:(n=this.context.select("."+i.axisX),t&&(n=n.transition())),this.context.attr("transform",this.getTranslate("context")),n.attr("transform",this.getTranslate("subx"))},C.getDefaultExtent=function(){var t=this,e=t.config,n=l(e.axis_x_extent)?e.axis_x_extent(t.getXDomain(t.data.targets)):e.axis_x_extent;return t.isTimeSeries()&&(n=[t.parseDate(n[0]),t.parseDate(n[1])]),n},C.initText=function(){this.main.select("."+i.chart).append("g").attr("class",i.chartTexts),this.mainText=this.d3.selectAll([])},C.updateTargetsForText=function(t){var e=this,n=e.classChartText.bind(e),o=e.classTexts.bind(e),r=e.classFocus.bind(e);e.main.select("."+i.chartTexts).selectAll("."+i.chartText).data(t).attr("class",function(t){return n(t)+r(t)}).enter().append("g").attr("class",n).style("opacity",0).style("pointer-events","none").append("g").attr("class",o)},C.updateText=function(t){var e=this,n=e.config,o=e.barOrLineData.bind(e),r=e.classText.bind(e);e.mainText=e.main.selectAll("."+i.texts).selectAll("."+i.text).data(o),e.mainText.enter().append("text").attr("class",r).attr("text-anchor",function(t){return n.axis_rotated?t.value<0?"end":"start":"middle"}).style("stroke","none").style("fill",function(t){return e.color(t)}).style("fill-opacity",0),e.mainText.text(function(t,n,i){return e.dataLabelFormat(t.id)(t.value,t.id,n,i)}),e.mainText.exit().transition().duration(t).style("fill-opacity",0).remove()},C.redrawText=function(t,e,n,i){return[(i?this.mainText.transition():this.mainText).attr("x",t).attr("y",e).style("fill",this.color).style("fill-opacity",n?0:this.opacityForText.bind(this))]},C.getTextRect=function(t,e,n){var i,o=this.d3.select("body").append("div").classed("c3",!0),r=o.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),a=this.d3.select(n).style("font");return r.selectAll(".dummy").data([t]).enter().append("text").classed(e||"",!0).style("font",a).text(t).each(function(){i=this.getBoundingClientRect()}),o.remove(),i},C.generateXYForText=function(t,e,n,i){var o=this,r=o.generateGetAreaPoints(t,!1),a=o.generateGetBarPoints(e,!1),s=o.generateGetLinePoints(n,!1),l=i?o.getXForText:o.getYForText;return function(t,e){var n=o.isAreaType(t)?r:o.isBarType(t)?a:s;return l.call(o,n(t,e),t,this)}},C.getXForText=function(t,e,n){var i,o,r=this,a=n.getBoundingClientRect();return r.config.axis_rotated?(o=r.isBarType(e)?4:6,i=t[2][1]+o*(e.value<0?-1:1)):i=r.hasType("bar")?(t[2][0]+t[0][0])/2:t[0][0],null===e.value&&(i>r.width?i=r.width-a.width:i<0&&(i=4)),i},C.getYForText=function(t,e,n){var i,o=this,r=n.getBoundingClientRect();return o.config.axis_rotated?i=(t[0][0]+t[2][0]+.6*r.height)/2:(i=t[2][1],e.value<0||0===e.value&&!o.hasPositiveValue?(i+=r.height,o.isBarType(e)&&o.isSafari()?i-=3:!o.isBarType(e)&&o.isChrome()&&(i+=3)):i+=o.isBarType(e)?-3:-6),null!==e.value||o.config.axis_rotated||(i<r.height?i=r.height:i>this.height&&(i=this.height-4)),i},C.initTitle=function(){this.title=this.svg.append("text").text(this.config.title_text).attr("class",this.CLASS.title)},C.redrawTitle=function(){var t=this;t.title.attr("x",t.xForTitle.bind(t)).attr("y",t.yForTitle.bind(t))},C.xForTitle=function(){var t=this,e=t.config,n=e.title_position||"left";return n.indexOf("right")>=0?t.currentWidth-t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).width-e.title_padding.right:n.indexOf("center")>=0?(t.currentWidth-t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).width)/2:e.title_padding.left},C.yForTitle=function(){var t=this;return t.config.title_padding.top+t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).height},C.getTitlePadding=function(){return this.yForTitle()+this.config.title_padding.bottom},C.initTooltip=function(){var t,e=this,n=e.config;if(e.tooltip=e.selectChart.style("position","relative").append("div").attr("class",i.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),n.tooltip_init_show){if(e.isTimeSeries()&&c(n.tooltip_init_x)){for(n.tooltip_init_x=e.parseDate(n.tooltip_init_x),t=0;t<e.data.targets[0].values.length&&e.data.targets[0].values[t].x-n.tooltip_init_x!=0;t++);n.tooltip_init_x=t}e.tooltip.html(n.tooltip_contents.call(e,e.data.targets.map(function(t){return e.addName(t.values[n.tooltip_init_x])}),e.axis.getXAxisTickFormat(),e.getYFormat(e.hasArcType()),e.color)),e.tooltip.style("top",n.tooltip_init_position.top).style("left",n.tooltip_init_position.left).style("display","block")}},C.getTooltipSortFunction=function(){var t=this,e=t.config;if(0!==e.data_groups.length&&void 0===e.tooltip_order){var n=t.orderTargets(t.data.targets).map(function(t){return t.id});return(t.isOrderAsc()||t.isOrderDesc())&&(n=n.reverse()),function(t,e){return n.indexOf(t.id)-n.indexOf(e.id)}}var i=e.tooltip_order;void 0===i&&(i=e.data_order);var o=function(t){return t?t.value:null};if(c(i)&&"asc"===i.toLowerCase())return function(t,e){return o(t)-o(e)};if(c(i)&&"desc"===i.toLowerCase())return function(t,e){return o(e)-o(t)};if(l(i)){var r=i;return void 0===e.tooltip_order&&(r=function(t,e){return i(t?{id:t.id,values:[t]}:null,e?{id:e.id,values:[e]}:null)}),r}return u(i)?function(t,e){return i.indexOf(t.id)-i.indexOf(e.id)}:void 0},C.getTooltipContent=function(t,e,n,i){var o,r,a,s,l,u,c=this,h=c.config,d=h.tooltip_format_title||e,f=h.tooltip_format_name||function(t){return t},p=h.tooltip_format_value||n,g=this.getTooltipSortFunction();for(g&&t.sort(g),r=0;r<t.length;r++)if(t[r]&&(t[r].value||0===t[r].value)&&(o||(a=w(d?d(t[r].x):t[r].x),o="<table class='"+c.CLASS.tooltip+"'>"+(a||0===a?"<tr><th colspan='2'>"+a+"</th></tr>":"")),void 0!==(s=w(p(t[r].value,t[r].ratio,t[r].id,t[r].index,t))))){if(null===t[r].name)continue;l=w(f(t[r].name,t[r].ratio,t[r].id,t[r].index)),u=c.levelColor?c.levelColor(t[r].value):i(t[r].id),o+="<tr class='"+c.CLASS.tooltipName+"-"+c.getTargetSelectorSuffix(t[r].id)+"'>",o+="<td class='name'><span style='background-color:"+u+"'></span>"+l+"</td>",o+="<td class='value'>"+s+"</td>",o+="</tr>"}return o+"</table>"},C.tooltipPosition=function(t,e,n,i){var o,r,a,s,l,u=this,c=u.config,h=u.d3,d=u.hasArcType(),f=h.mouse(i);return d?(r=(u.width-(u.isLegendRight?u.getLegendWidth():0))/2+f[0],s=(u.hasType("gauge")?u.height:u.height/2)+f[1]+20):(o=u.getSvgLeft(!0),c.axis_rotated?(a=(r=o+f[0]+100)+e,l=u.currentWidth-u.getCurrentPaddingRight(),s=u.x(t[0].x)+20):(a=(r=o+u.getCurrentPaddingLeft(!0)+u.x(t[0].x)+20)+e,l=o+u.currentWidth-u.getCurrentPaddingRight(),s=f[1]+15),a>l&&(r-=a-l+20),s+n>u.currentHeight&&(s-=n+30)),s<0&&(s=0),{top:s,left:r}},C.showTooltip=function(t,e){var n,i,o,r=this,a=r.config,l=r.hasArcType(),u=t.filter(function(t){return t&&s(t.value)}),c=a.tooltip_position||C.tooltipPosition;0!==u.length&&a.tooltip_show&&(r.tooltip.html(a.tooltip_contents.call(r,t,r.axis.getXAxisTickFormat(),r.getYFormat(l),r.color)).style("display","block"),n=r.tooltip.property("offsetWidth"),i=r.tooltip.property("offsetHeight"),o=c.call(this,u,n,i,e),r.tooltip.style("top",o.top+"px").style("left",o.left+"px"))},C.hideTooltip=function(){this.tooltip.style("display","none")},C.setTargetType=function(t,e){var n=this,i=n.config;n.mapToTargetIds(t).forEach(function(t){n.withoutFadeIn[t]=e===i.data_types[t],i.data_types[t]=e}),t||(i.data_type=e)},C.hasType=function(t,e){var n=this.config.data_types,i=!1;return(e=e||this.data.targets)&&e.length?e.forEach(function(e){var o=n[e.id];(o&&o.indexOf(t)>=0||!o&&"line"===t)&&(i=!0)}):Object.keys(n).length?Object.keys(n).forEach(function(e){n[e]===t&&(i=!0)}):i=this.config.data_type===t,i},C.hasArcType=function(t){return this.hasType("pie",t)||this.hasType("donut",t)||this.hasType("gauge",t)},C.isLineType=function(t){var e=this.config,n=c(t)?t:t.id;return!e.data_types[n]||["line","spline","area","area-spline","step","area-step"].indexOf(e.data_types[n])>=0},C.isStepType=function(t){var e=c(t)?t:t.id;return["step","area-step"].indexOf(this.config.data_types[e])>=0},C.isSplineType=function(t){var e=c(t)?t:t.id;return["spline","area-spline"].indexOf(this.config.data_types[e])>=0},C.isAreaType=function(t){var e=c(t)?t:t.id;return["area","area-spline","area-step"].indexOf(this.config.data_types[e])>=0},C.isBarType=function(t){var e=c(t)?t:t.id;return"bar"===this.config.data_types[e]},C.isScatterType=function(t){var e=c(t)?t:t.id;return"scatter"===this.config.data_types[e]},C.isPieType=function(t){var e=c(t)?t:t.id;return"pie"===this.config.data_types[e]},C.isGaugeType=function(t){var e=c(t)?t:t.id;return"gauge"===this.config.data_types[e]},C.isDonutType=function(t){var e=c(t)?t:t.id;return"donut"===this.config.data_types[e]},C.isArcType=function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)},C.lineData=function(t){return this.isLineType(t)?[t]:[]},C.arcData=function(t){return this.isArcType(t.data)?[t]:[]},C.barData=function(t){return this.isBarType(t)?t.values:[]},C.lineOrScatterData=function(t){return this.isLineType(t)||this.isScatterType(t)?t.values:[]},C.barOrLineData=function(t){return this.isBarType(t)||this.isLineType(t)?t.values:[]},C.isInterpolationType=function(t){return["linear","linear-closed","basis","basis-open","basis-closed","bundle","cardinal","cardinal-open","cardinal-closed","monotone"].indexOf(t)>=0},C.isSafari=function(){var t=window.navigator.userAgent;return t.indexOf("Safari")>=0&&t.indexOf("Chrome")<0},C.isChrome=function(){return window.navigator.userAgent.indexOf("Chrome")>=0},C.initZoom=function(){var t,e=this,n=e.d3,i=e.config;e.zoom=n.behavior.zoom().on("zoomstart",function(){t=n.event.sourceEvent,e.zoom.altDomain=n.event.sourceEvent.altKey?e.x.orgDomain():null,i.zoom_onzoomstart.call(e.api,n.event.sourceEvent)}).on("zoom",function(){e.redrawForZoom.call(e)}).on("zoomend",function(){var o=n.event.sourceEvent;o&&t.clientX===o.clientX&&t.clientY===o.clientY||(e.redrawEventRect(),e.updateZoom(),i.zoom_onzoomend.call(e.api,e.x.orgDomain()))}),e.zoom.scale=function(t){return i.axis_rotated?this.y(t):this.x(t)},e.zoom.orgScaleExtent=function(){var t=i.zoom_extent?i.zoom_extent:[1,10];return[t[0],Math.max(e.getMaxDataCount()/t[1],t[1])]},e.zoom.updateScaleExtent=function(){var t=g(e.x.orgDomain())/g(e.getZoomDomain()),n=this.orgScaleExtent();return this.scaleExtent([n[0]*t,n[1]*t]),this}},C.getZoomDomain=function(){var t=this.config,e=this.d3;return[e.min([this.orgXDomain[0],t.zoom_x_min]),e.max([this.orgXDomain[1],t.zoom_x_max])]},C.updateZoom=function(){var t=this.config.zoom_enabled?this.zoom:function(){};this.main.select("."+i.zoomRect).call(t).on("dblclick.zoom",null),this.main.selectAll("."+i.eventRect).call(t).on("dblclick.zoom",null)},C.redrawForZoom=function(){var t=this,e=t.d3,n=t.config,i=t.zoom,o=t.x;if(n.zoom_enabled&&0!==t.filterTargetsToShow(t.data.targets).length){if("mousemove"===e.event.sourceEvent.type&&i.altDomain)return o.domain(i.altDomain),void i.scale(o).updateScaleExtent();t.isCategorized()&&o.orgDomain()[0]===t.orgXDomain[0]&&o.domain([t.orgXDomain[0]-1e-10,o.orgDomain()[1]]),t.redraw({withTransition:!1,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),"mousemove"===e.event.sourceEvent.type&&(t.cancelClick=!0),n.zoom_onzoom.call(t.api,o.orgDomain())}},T})},function(t,e,n){var i,o;!function(){var r={version:"3.5.17"},a=[].slice,s=function(t){return a.call(t)},l=this.document;function u(t){return t&&(t.ownerDocument||t.document||t).documentElement}function c(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var h=this.Element.prototype,d=h.setAttribute,f=h.setAttributeNS,p=this.CSSStyleDeclaration.prototype,g=p.setProperty;h.setAttribute=function(t,e){d.call(this,t,e+"")},h.setAttributeNS=function(t,e,n){f.call(this,t,e,n+"")},p.setProperty=function(t,e,n){g.call(this,t,e+"",n)}}function m(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function v(t){return null===t?NaN:+t}function y(t){return!isNaN(t)}function b(t){return{left:function(e,n,i,o){for(arguments.length<3&&(i=0),arguments.length<4&&(o=e.length);i<o;){var r=i+o>>>1;t(e[r],n)<0?i=r+1:o=r}return i},right:function(e,n,i,o){for(arguments.length<3&&(i=0),arguments.length<4&&(o=e.length);i<o;){var r=i+o>>>1;t(e[r],n)>0?o=r:i=r+1}return i}}}r.ascending=m,r.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},r.min=function(t,e){var n,i,o=-1,r=t.length;if(1===arguments.length){for(;++o<r;)if(null!=(i=t[o])&&i>=i){n=i;break}for(;++o<r;)null!=(i=t[o])&&n>i&&(n=i)}else{for(;++o<r;)if(null!=(i=e.call(t,t[o],o))&&i>=i){n=i;break}for(;++o<r;)null!=(i=e.call(t,t[o],o))&&n>i&&(n=i)}return n},r.max=function(t,e){var n,i,o=-1,r=t.length;if(1===arguments.length){for(;++o<r;)if(null!=(i=t[o])&&i>=i){n=i;break}for(;++o<r;)null!=(i=t[o])&&i>n&&(n=i)}else{for(;++o<r;)if(null!=(i=e.call(t,t[o],o))&&i>=i){n=i;break}for(;++o<r;)null!=(i=e.call(t,t[o],o))&&i>n&&(n=i)}return n},r.extent=function(t,e){var n,i,o,r=-1,a=t.length;if(1===arguments.length){for(;++r<a;)if(null!=(i=t[r])&&i>=i){n=o=i;break}for(;++r<a;)null!=(i=t[r])&&(n>i&&(n=i),o<i&&(o=i))}else{for(;++r<a;)if(null!=(i=e.call(t,t[r],r))&&i>=i){n=o=i;break}for(;++r<a;)null!=(i=e.call(t,t[r],r))&&(n>i&&(n=i),o<i&&(o=i))}return[n,o]},r.sum=function(t,e){var n,i=0,o=t.length,r=-1;if(1===arguments.length)for(;++r<o;)y(n=+t[r])&&(i+=n);else for(;++r<o;)y(n=+e.call(t,t[r],r))&&(i+=n);return i},r.mean=function(t,e){var n,i=0,o=t.length,r=-1,a=o;if(1===arguments.length)for(;++r<o;)y(n=v(t[r]))?i+=n:--a;else for(;++r<o;)y(n=v(e.call(t,t[r],r)))?i+=n:--a;if(a)return i/a},r.quantile=function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),o=+t[i-1],r=n-i;return r?o+r*(t[i]-o):o},r.median=function(t,e){var n,i=[],o=t.length,a=-1;if(1===arguments.length)for(;++a<o;)y(n=v(t[a]))&&i.push(n);else for(;++a<o;)y(n=v(e.call(t,t[a],a)))&&i.push(n);if(i.length)return r.quantile(i.sort(m),.5)},r.variance=function(t,e){var n,i,o=t.length,r=0,a=0,s=-1,l=0;if(1===arguments.length)for(;++s<o;)y(n=v(t[s]))&&(a+=(i=n-r)*(n-(r+=i/++l)));else for(;++s<o;)y(n=v(e.call(t,t[s],s)))&&(a+=(i=n-r)*(n-(r+=i/++l)));if(l>1)return a/(l-1)},r.deviation=function(){var t=r.variance.apply(this,arguments);return t?Math.sqrt(t):t};var w=b(m);function _(t){return t.length}r.bisectLeft=w.left,r.bisect=r.bisectRight=w.right,r.bisector=function(t){return b(1===t.length?function(e,n){return m(t(e),n)}:t)},r.shuffle=function(t,e,n){(r=arguments.length)<3&&(n=t.length,r<2&&(e=0));for(var i,o,r=n-e;r;)o=Math.random()*r--|0,i=t[r+e],t[r+e]=t[o+e],t[o+e]=i;return t},r.permute=function(t,e){for(var n=e.length,i=new Array(n);n--;)i[n]=t[e[n]];return i},r.pairs=function(t){for(var e=0,n=t.length-1,i=t[0],o=new Array(n<0?0:n);e<n;)o[e]=[i,i=t[++e]];return o},r.transpose=function(t){if(!(o=t.length))return[];for(var e=-1,n=r.min(t,_),i=new Array(n);++e<n;)for(var o,a=-1,s=i[e]=new Array(o);++a<o;)s[a]=t[a][e];return i},r.zip=function(){return r.transpose(arguments)},r.keys=function(t){var e=[];for(var n in t)e.push(n);return e},r.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},r.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},r.merge=function(t){for(var e,n,i,o=t.length,r=-1,a=0;++r<o;)a+=t[r].length;for(n=new Array(a);--o>=0;)for(e=(i=t[o]).length;--e>=0;)n[--a]=i[e];return n};var x=Math.abs;function S(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function E(){this._=Object.create(null)}r.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n==1/0)throw new Error("infinite range");var i,o=[],r=function(t){var e=1;for(;t*e%1;)e*=10;return e}(x(n)),a=-1;if(t*=r,e*=r,(n*=r)<0)for(;(i=t+n*++a)>e;)o.push(i/r);else for(;(i=t+n*++a)<e;)o.push(i/r);return o},r.map=function(t,e){var n=new E;if(t instanceof E)t.forEach(function(t,e){n.set(t,e)});else if(Array.isArray(t)){var i,o=-1,r=t.length;if(1===arguments.length)for(;++o<r;)n.set(o,t[o]);else for(;++o<r;)n.set(e.call(t,i=t[o],o),i)}else for(var a in t)n.set(a,t[a]);return n};var C="__proto__",T="\0";function M(t){return(t+="")===C||t[0]===T?T+t:t}function P(t){return(t+="")[0]===T?t.slice(1):t}function L(t){return M(t)in this._}function A(t){return(t=M(t))in this._&&delete this._[t]}function k(){var t=[];for(var e in this._)t.push(P(e));return t}function O(){var t=0;for(var e in this._)++t;return t}function R(){for(var t in this._)return!1;return!0}function D(){this._=Object.create(null)}function j(t){return t}function z(t,e,n){return function(){var i=n.apply(e,arguments);return i===e?t:i}}function N(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,i=I.length;n<i;++n){var o=I[n]+e;if(o in t)return o}}S(E,{has:L,get:function(t){return this._[M(t)]},set:function(t,e){return this._[M(t)]=e},remove:A,keys:k,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:P(e),value:this._[e]});return t},size:O,empty:R,forEach:function(t){for(var e in this._)t.call(this,P(e),this._[e])}}),r.nest=function(){var t,e,n={},i=[],o=[];function a(o,r,s){if(s>=i.length)return e?e.call(n,r):t?r.sort(t):r;for(var l,u,c,h,d=-1,f=r.length,p=i[s++],g=new E;++d<f;)(h=g.get(l=p(u=r[d])))?h.push(u):g.set(l,[u]);return o?(u=o(),c=function(t,e){u.set(t,a(o,e,s))}):(u={},c=function(t,e){u[t]=a(o,e,s)}),g.forEach(c),u}return n.map=function(t,e){return a(e,t,0)},n.entries=function(t){return function t(e,n){if(n>=i.length)return e;var r=[],a=o[n++];return e.forEach(function(e,i){r.push({key:e,values:t(i,n)})}),a?r.sort(function(t,e){return a(t.key,e.key)}):r}(a(r.map,t,0),0)},n.key=function(t){return i.push(t),n},n.sortKeys=function(t){return o[i.length-1]=t,n},n.sortValues=function(e){return t=e,n},n.rollup=function(t){return e=t,n},n},r.set=function(t){var e=new D;if(t)for(var n=0,i=t.length;n<i;++n)e.add(t[n]);return e},S(D,{has:L,add:function(t){return this._[M(t+="")]=!0,t},remove:A,values:k,size:O,empty:R,forEach:function(t){for(var e in this._)t.call(this,P(e))}}),r.behavior={},r.rebind=function(t,e){for(var n,i=1,o=arguments.length;++i<o;)t[n=arguments[i]]=z(t,e,e[n]);return t};var I=["webkit","ms","moz","Moz","o","O"];function F(){}function H(){}function G(t){var e=[],n=new E;function i(){for(var n,i=e,o=-1,r=i.length;++o<r;)(n=i[o].on)&&n.apply(this,arguments);return t}return i.on=function(i,o){var r,a=n.get(i);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,r=e.indexOf(a)).concat(e.slice(r+1)),n.remove(i)),o&&e.push(n.set(i,{on:o})),t)},i}function V(){r.event.preventDefault()}function B(){for(var t,e=r.event;t=e.sourceEvent;)e=t;return e}function U(t){for(var e=new H,n=0,i=arguments.length;++n<i;)e[arguments[n]]=G(e);return e.of=function(n,i){return function(o){try{var a=o.sourceEvent=r.event;o.target=t,r.event=o,e[o.type].apply(n,i)}finally{r.event=a}}},e}r.dispatch=function(){for(var t=new H,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=G(t);return t},H.prototype.on=function(t,e){var n=t.indexOf("."),i="";if(n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(i):this[t].on(i,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(i,null);return this}},r.event=null,r.requote=function(t){return t.replace(W,"\\$&")};var W=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,q={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]};function Y(t){return q(t,K),t}var X=function(t,e){return e.querySelector(t)},Z=function(t,e){return e.querySelectorAll(t)},Q=function(t,e){var n=t.matches||t[N(t,"matchesSelector")];return(Q=function(t,e){return n.call(t,e)})(t,e)};"function"==typeof Sizzle&&(X=function(t,e){return Sizzle(t,e)[0]||null},Z=Sizzle,Q=Sizzle.matchesSelector),r.selection=function(){return r.select(l.documentElement)};var K=r.selection.prototype=[];function $(t){return"function"==typeof t?t:function(){return X(t,this)}}function J(t){return"function"==typeof t?t:function(){return Z(t,this)}}K.select=function(t){var e,n,i,o,r=[];t=$(t);for(var a=-1,s=this.length;++a<s;){r.push(e=[]),e.parentNode=(i=this[a]).parentNode;for(var l=-1,u=i.length;++l<u;)(o=i[l])?(e.push(n=t.call(o,o.__data__,l,a)),n&&"__data__"in o&&(n.__data__=o.__data__)):e.push(null)}return Y(r)},K.selectAll=function(t){var e,n,i=[];t=J(t);for(var o=-1,r=this.length;++o<r;)for(var a=this[o],l=-1,u=a.length;++l<u;)(n=a[l])&&(i.push(e=s(t.call(n,n.__data__,l,o))),e.parentNode=n);return Y(i)};var tt="http://www.w3.org/1999/xhtml",et={svg:"http://www.w3.org/2000/svg",xhtml:tt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nt(t,e){return t=r.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof e?t.local?function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}:function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function it(t){return t.trim().replace(/\s+/g," ")}function ot(t){return new RegExp("(?:^|\\s+)"+r.requote(t)+"(?:\\s+|$)","g")}function rt(t){return(t+"").trim().split(/^|\s+/)}function at(t,e){var n=(t=rt(t).map(st)).length;return"function"==typeof e?function(){for(var i=-1,o=e.apply(this,arguments);++i<n;)t[i](this,o)}:function(){for(var i=-1;++i<n;)t[i](this,e)}}function st(t){var e=ot(t);return function(n,i){if(o=n.classList)return i?o.add(t):o.remove(t);var o=n.getAttribute("class")||"";i?(e.lastIndex=0,e.test(o)||n.setAttribute("class",it(o+" "+t))):n.setAttribute("class",it(o.replace(e," ")))}}function lt(t,e,n){return null==e?function(){this.style.removeProperty(t)}:"function"==typeof e?function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}:function(){this.style.setProperty(t,e,n)}}function ut(t,e){return null==e?function(){delete this[t]}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}:function(){this[t]=e}}function ct(t){return"function"==typeof t?t:(t=r.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,n=this.namespaceURI;return n===tt&&e.documentElement.namespaceURI===tt?e.createElement(t):e.createElementNS(n,t)}}function ht(){var t=this.parentNode;t&&t.removeChild(this)}function dt(t){return{__data__:t}}function ft(t){return function(){return Q(this,t)}}function pt(t,e){for(var n=0,i=t.length;n<i;n++)for(var o,r=t[n],a=0,s=r.length;a<s;a++)(o=r[a])&&e(o,a,n);return t}function gt(t){return q(t,mt),t}r.ns={prefix:et,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),et.hasOwnProperty(n)?{space:et[n],local:t}:t}},K.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=r.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(nt(e,t[e]));return this}return this.each(nt(t,e))},K.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),i=(t=rt(t)).length,o=-1;if(e=n.classList){for(;++o<i;)if(!e.contains(t[o]))return!1}else for(e=n.getAttribute("class");++o<i;)if(!ot(t[o]).test(e))return!1;return!0}for(e in t)this.each(at(e,t[e]));return this}return this.each(at(t,e))},K.style=function(t,e,n){var i=arguments.length;if(i<3){if("string"!=typeof t){for(n in i<2&&(e=""),t)this.each(lt(n,t[n],e));return this}if(i<2){var o=this.node();return c(o).getComputedStyle(o,null).getPropertyValue(t)}n=""}return this.each(lt(t,e,n))},K.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(ut(e,t[e]));return this}return this.each(ut(t,e))},K.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},K.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},K.append=function(t){return t=ct(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},K.insert=function(t,e){return t=ct(t),e=$(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},K.remove=function(){return this.each(ht)},K.data=function(t,e){var n,i,o=-1,r=this.length;if(!arguments.length){for(t=new Array(r=(n=this[0]).length);++o<r;)(i=n[o])&&(t[o]=i.__data__);return t}function a(t,n){var i,o,r,a=t.length,c=n.length,h=Math.min(a,c),d=new Array(c),f=new Array(c),p=new Array(a);if(e){var g,m=new E,v=new Array(a);for(i=-1;++i<a;)(o=t[i])&&(m.has(g=e.call(o,o.__data__,i))?p[i]=o:m.set(g,o),v[i]=g);for(i=-1;++i<c;)(o=m.get(g=e.call(n,r=n[i],i)))?!0!==o&&(d[i]=o,o.__data__=r):f[i]=dt(r),m.set(g,!0);for(i=-1;++i<a;)i in v&&!0!==m.get(v[i])&&(p[i]=t[i])}else{for(i=-1;++i<h;)o=t[i],r=n[i],o?(o.__data__=r,d[i]=o):f[i]=dt(r);for(;i<c;++i)f[i]=dt(n[i]);for(;i<a;++i)p[i]=t[i]}f.update=d,f.parentNode=d.parentNode=p.parentNode=t.parentNode,s.push(f),l.push(d),u.push(p)}var s=gt([]),l=Y([]),u=Y([]);if("function"==typeof t)for(;++o<r;)a(n=this[o],t.call(n,n.parentNode.__data__,o));else for(;++o<r;)a(n=this[o],t);return l.enter=function(){return s},l.exit=function(){return u},l},K.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},K.filter=function(t){var e,n,i,o=[];"function"!=typeof t&&(t=ft(t));for(var r=0,a=this.length;r<a;r++){o.push(e=[]),e.parentNode=(n=this[r]).parentNode;for(var s=0,l=n.length;s<l;s++)(i=n[s])&&t.call(i,i.__data__,s,r)&&e.push(i)}return Y(o)},K.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,i=this[t],o=i.length-1,r=i[o];--o>=0;)(n=i[o])&&(r&&r!==n.nextSibling&&r.parentNode.insertBefore(n,r),r=n);return this},K.sort=function(t){t=function(t){arguments.length||(t=m);return function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},K.each=function(t){return pt(this,function(e,n,i){t.call(e,e.__data__,n,i)})},K.call=function(t){var e=s(arguments);return t.apply(e[0]=this,e),this},K.empty=function(){return!this.node()},K.node=function(){for(var t=0,e=this.length;t<e;t++)for(var n=this[t],i=0,o=n.length;i<o;i++){var r=n[i];if(r)return r}return null},K.size=function(){var t=0;return pt(this,function(){++t}),t};var mt=[];function vt(t,e,n){var i="__on"+t,o=t.indexOf("."),a=bt;o>0&&(t=t.slice(0,o));var l=yt.get(t);function u(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}return l&&(t=l,a=wt),o?e?function(){var o=a(e,s(arguments));u.call(this),this.addEventListener(t,this[i]=o,o.$=n),o._=e}:u:e?F:function(){var e,n=new RegExp("^__on([^.]+)"+r.requote(t)+"$");for(var i in this)if(e=i.match(n)){var o=this[i];this.removeEventListener(e[1],o,o.$),delete this[i]}}}r.selection.enter=gt,r.selection.enter.prototype=mt,mt.append=K.append,mt.empty=K.empty,mt.node=K.node,mt.call=K.call,mt.size=K.size,mt.select=function(t){for(var e,n,i,o,r,a=[],s=-1,l=this.length;++s<l;){i=(o=this[s]).update,a.push(e=[]),e.parentNode=o.parentNode;for(var u=-1,c=o.length;++u<c;)(r=o[u])?(e.push(i[u]=n=t.call(o.parentNode,r.__data__,u,s)),n.__data__=r.__data__):e.push(null)}return Y(a)},mt.insert=function(t,e){return arguments.length<2&&(e=function(t){var e,n;return function(i,o,r){var a,s=t[r].update,l=s.length;for(r!=n&&(n=r,e=0),o>=e&&(e=o+1);!(a=s[e])&&++e<l;);return a}}(this)),K.insert.call(this,t,e)},r.select=function(t){var e;return"string"==typeof t?(e=[X(t,l)]).parentNode=l.documentElement:(e=[t]).parentNode=u(t),Y([e])},r.selectAll=function(t){var e;return"string"==typeof t?(e=s(Z(t,l))).parentNode=l.documentElement:(e=s(t)).parentNode=null,Y([e])},K.on=function(t,e,n){var i=arguments.length;if(i<3){if("string"!=typeof t){for(n in i<2&&(e=!1),t)this.each(vt(n,t[n],e));return this}if(i<2)return(i=this.node()["__on"+t])&&i._;n=!1}return this.each(vt(t,e,n))};var yt=r.map({mouseenter:"mouseover",mouseleave:"mouseout"});function bt(t,e){return function(n){var i=r.event;r.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{r.event=i}}}function wt(t,e){var n=bt(t,e);return function(t){var e=t.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||n.call(this,t)}}l&&yt.forEach(function(t){"on"+t in l&&yt.remove(t)});var _t,xt=0;function St(t){var e=".dragsuppress-"+ ++xt,n="click"+e,i=r.select(c(t)).on("touchmove"+e,V).on("dragstart"+e,V).on("selectstart"+e,V);if(null==_t&&(_t=!("onselectstart"in t)&&N(t.style,"userSelect")),_t){var o=u(t).style,a=o[_t];o[_t]="none"}return function(t){if(i.on(e,null),_t&&(o[_t]=a),t){var r=function(){i.on(n,null)};i.on(n,function(){V(),r()},!0),setTimeout(r,0)}}}r.mouse=function(t){return Ct(t,B())};var Et=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ct(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();if(Et<0){var o=c(t);if(o.scrollX||o.scrollY){var a=(n=r.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Et=!(a.f||a.e),n.remove()}}return Et?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function Tt(){return r.event.changedTouches[0].identifier}r.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=B().changedTouches),e)for(var i,o=0,r=e.length;o<r;++o)if((i=e[o]).identifier===n)return Ct(t,i)},r.behavior.drag=function(){var t=U(o,"drag","dragstart","dragend"),e=null,n=a(F,r.mouse,c,"mousemove","mouseup"),i=a(Tt,r.touch,j,"touchmove","touchend");function o(){this.on("mousedown.drag",n).on("touchstart.drag",i)}function a(n,i,o,a,s){return function(){var l,u=r.event.target.correspondingElement||r.event.target,c=this.parentNode,h=t.of(this,arguments),d=0,f=n(),p=".drag"+(null==f?"":"-"+f),g=r.select(o(u)).on(a+p,function(){var t,e,n=i(c,f);if(!n)return;t=n[0]-v[0],e=n[1]-v[1],d|=t|e,v=n,h({type:"drag",x:n[0]+l[0],y:n[1]+l[1],dx:t,dy:e})}).on(s+p,function(){if(!i(c,f))return;g.on(a+p,null).on(s+p,null),m(d),h({type:"dragend"})}),m=St(u),v=i(c,f);l=e?[(l=e.apply(this,arguments)).x-v[0],l.y-v[1]]:[0,0],h({type:"dragstart"})}}return o.origin=function(t){return arguments.length?(e=t,o):e},r.rebind(o,t,"on")},r.touches=function(t,e){return arguments.length<2&&(e=B().touches),e?s(e).map(function(e){var n=Ct(t,e);return n.identifier=e.identifier,n}):[]};var Mt=1e-6,Pt=Mt*Mt,Lt=Math.PI,At=2*Lt,kt=At-Mt,Ot=Lt/2,Rt=Lt/180,Dt=180/Lt;function jt(t){return t>0?1:t<0?-1:0}function zt(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function Nt(t){return t>1?0:t<-1?Lt:Math.acos(t)}function It(t){return t>1?Ot:t<-1?-Ot:Math.asin(t)}function Ft(t){return((t=Math.exp(t))+1/t)/2}function Ht(t){return(t=Math.sin(t/2))*t}var Gt=Math.SQRT2;r.interpolateZoom=function(t,e){var n,i,o=t[0],r=t[1],a=t[2],s=e[0],l=e[1],u=e[2],c=s-o,h=l-r,d=c*c+h*h;if(d<Pt)i=Math.log(u/a)/Gt,n=function(t){return[o+t*c,r+t*h,a*Math.exp(Gt*t*i)]};else{var f=Math.sqrt(d),p=(u*u-a*a+4*d)/(2*a*2*f),g=(u*u-a*a-4*d)/(2*u*2*f),m=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);i=(v-m)/Gt,n=function(t){var e=t*i,n=Ft(m),s=a/(2*f)*(n*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(Gt*e+m)-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[o+s*c,r+s*h,a*n/Ft(Gt*e+m)]}}return n.duration=1e3*i,n},r.behavior.zoom=function(){var t,e,n,i,o,a,s,u,h,d={x:0,y:0,k:1},f=[960,500],p=Ut,g=250,m=0,v="mousedown.zoom",y="mousemove.zoom",b="mouseup.zoom",w="touchstart.zoom",_=U(x,"zoomstart","zoom","zoomend");function x(t){t.on(v,k).on(Bt+".zoom",R).on("dblclick.zoom",D).on(w,O)}function S(t){return[(t[0]-d.x)/d.k,(t[1]-d.y)/d.k]}function E(t){d.k=Math.max(p[0],Math.min(p[1],t))}function C(t,e){e=function(t){return[t[0]*d.k+d.x,t[1]*d.k+d.y]}(e),d.x+=t[0]-e[0],d.y+=t[1]-e[1]}function T(t,n,i,o){t.__chart__={x:d.x,y:d.y,k:d.k},E(Math.pow(2,o)),C(e=n,i),t=r.select(t),g>0&&(t=t.transition().duration(g)),t.call(x.event)}function M(){s&&s.domain(a.range().map(function(t){return(t-d.x)/d.k}).map(a.invert)),h&&h.domain(u.range().map(function(t){return(t-d.y)/d.k}).map(u.invert))}function P(t){m++||t({type:"zoomstart"})}function L(t){M(),t({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function A(t){--m||(t({type:"zoomend"}),e=null)}function k(){var t=this,e=_.of(t,arguments),n=0,i=r.select(c(t)).on(y,function(){n=1,C(r.mouse(t),o),L(e)}).on(b,function(){i.on(y,null).on(b,null),a(n),A(e)}),o=S(r.mouse(t)),a=St(t);fs.call(t),P(e)}function O(){var t,e=this,n=_.of(e,arguments),i={},a=0,s=".zoom-"+r.event.changedTouches[0].identifier,l="touchmove"+s,u="touchend"+s,c=[],h=r.select(e),f=St(e);function p(){var n=r.touches(e);return t=d.k,n.forEach(function(t){t.identifier in i&&(i[t.identifier]=S(t))}),n}function g(){var t=r.event.target;r.select(t).on(l,m).on(u,y),c.push(t);for(var n=r.event.changedTouches,s=0,h=n.length;s<h;++s)i[n[s].identifier]=null;var f=p(),g=Date.now();if(1===f.length){if(g-o<500){var v=f[0];T(e,v,i[v.identifier],Math.floor(Math.log(d.k)/Math.LN2)+1),V()}o=g}else if(f.length>1){v=f[0];var b=f[1],w=v[0]-b[0],_=v[1]-b[1];a=w*w+_*_}}function m(){var s,l,u,c,h=r.touches(e);fs.call(e);for(var d=0,f=h.length;d<f;++d,c=null)if(u=h[d],c=i[u.identifier]){if(l)break;s=u,l=c}if(c){var p=(p=u[0]-s[0])*p+(p=u[1]-s[1])*p,g=a&&Math.sqrt(p/a);s=[(s[0]+u[0])/2,(s[1]+u[1])/2],l=[(l[0]+c[0])/2,(l[1]+c[1])/2],E(g*t)}o=null,C(s,l),L(n)}function y(){if(r.event.touches.length){for(var t=r.event.changedTouches,e=0,o=t.length;e<o;++e)delete i[t[e].identifier];for(var a in i)return void p()}r.selectAll(c).on(s,null),h.on(v,k).on(w,O),f(),A(n)}g(),P(n),h.on(v,null).on(w,g)}function R(){var o=_.of(this,arguments);i?clearTimeout(i):(fs.call(this),t=S(e=n||r.mouse(this)),P(o)),i=setTimeout(function(){i=null,A(o)},50),V(),E(Math.pow(2,.002*Vt())*d.k),C(e,t),L(o)}function D(){var t=r.mouse(this),e=Math.log(d.k)/Math.LN2;T(this,t,S(t),r.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}return Bt||(Bt="onwheel"in l?(Vt=function(){return-r.event.deltaY*(r.event.deltaMode?120:1)},"wheel"):"onmousewheel"in l?(Vt=function(){return r.event.wheelDelta},"mousewheel"):(Vt=function(){return-r.event.detail},"MozMousePixelScroll")),x.event=function(t){t.each(function(){var t=_.of(this,arguments),n=d;ms?r.select(this).transition().each("start.zoom",function(){d=this.__chart__||{x:0,y:0,k:1},P(t)}).tween("zoom:zoom",function(){var i=f[0],o=f[1],a=e?e[0]:i/2,s=e?e[1]:o/2,l=r.interpolateZoom([(a-d.x)/d.k,(s-d.y)/d.k,i/d.k],[(a-n.x)/n.k,(s-n.y)/n.k,i/n.k]);return function(e){var n=l(e),o=i/n[2];this.__chart__=d={x:a-n[0]*o,y:s-n[1]*o,k:o},L(t)}}).each("interrupt.zoom",function(){A(t)}).each("end.zoom",function(){A(t)}):(this.__chart__=d,P(t),L(t),A(t))})},x.translate=function(t){return arguments.length?(d={x:+t[0],y:+t[1],k:d.k},M(),x):[d.x,d.y]},x.scale=function(t){return arguments.length?(d={x:d.x,y:d.y,k:null},E(+t),M(),x):d.k},x.scaleExtent=function(t){return arguments.length?(p=null==t?Ut:[+t[0],+t[1]],x):p},x.center=function(t){return arguments.length?(n=t&&[+t[0],+t[1]],x):n},x.size=function(t){return arguments.length?(f=t&&[+t[0],+t[1]],x):f},x.duration=function(t){return arguments.length?(g=+t,x):g},x.x=function(t){return arguments.length?(s=t,a=t.copy(),d={x:0,y:0,k:1},x):s},x.y=function(t){return arguments.length?(h=t,u=t.copy(),d={x:0,y:0,k:1},x):h},r.rebind(x,_,"on")};var Vt,Bt,Ut=[0,1/0];function Wt(){}function qt(t,e,n){return this instanceof qt?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof qt?new qt(t.h,t.s,t.l):pe(""+t,ge,qt):new qt(t,e,n)}r.color=Wt,Wt.prototype.toString=function(){return this.rgb()+""},r.hsl=qt;var Yt=qt.prototype=new Wt;function Xt(t,e,n){var i,o;function r(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?i+(o-i)*t/60:t<180?o:t<240?i+(o-i)*(240-t)/60:i}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,i=2*(n=n<0?0:n>1?1:n)-(o=n<=.5?n*(1+e):n+e-n*e),new ue(r(t+120),r(t),r(t-120))}function Zt(t,e,n){return this instanceof Zt?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof Zt?new Zt(t.h,t.c,t.l):re(t instanceof $t?t.l:(t=me((t=r.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Zt(t,e,n)}Yt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new qt(this.h,this.s,this.l/t)},Yt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new qt(this.h,this.s,t*this.l)},Yt.rgb=function(){return Xt(this.h,this.s,this.l)},r.hcl=Zt;var Qt=Zt.prototype=new Wt;function Kt(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new $t(n,Math.cos(t*=Rt)*e,Math.sin(t)*e)}function $t(t,e,n){return this instanceof $t?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof $t?new $t(t.l,t.a,t.b):t instanceof Zt?Kt(t.h,t.c,t.l):me((t=ue(t)).r,t.g,t.b):new $t(t,e,n)}Qt.brighter=function(t){return new Zt(this.h,this.c,Math.min(100,this.l+Jt*(arguments.length?t:1)))},Qt.darker=function(t){return new Zt(this.h,this.c,Math.max(0,this.l-Jt*(arguments.length?t:1)))},Qt.rgb=function(){return Kt(this.h,this.c,this.l).rgb()},r.lab=$t;var Jt=18,te=.95047,ee=1,ne=1.08883,ie=$t.prototype=new Wt;function oe(t,e,n){var i=(t+16)/116,o=i+e/500,r=i-n/200;return new ue(le(3.2404542*(o=ae(o)*te)-1.5371385*(i=ae(i)*ee)-.4985314*(r=ae(r)*ne)),le(-.969266*o+1.8760108*i+.041556*r),le(.0556434*o-.2040259*i+1.0572252*r))}function re(t,e,n){return t>0?new Zt(Math.atan2(n,e)*Dt,Math.sqrt(e*e+n*n),t):new Zt(NaN,NaN,t)}function ae(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function se(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function le(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ue(t,e,n){return this instanceof ue?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof ue?new ue(t.r,t.g,t.b):pe(""+t,ue,Xt):new ue(t,e,n)}function ce(t){return new ue(t>>16,t>>8&255,255&t)}function he(t){return ce(t)+""}ie.brighter=function(t){return new $t(Math.min(100,this.l+Jt*(arguments.length?t:1)),this.a,this.b)},ie.darker=function(t){return new $t(Math.max(0,this.l-Jt*(arguments.length?t:1)),this.a,this.b)},ie.rgb=function(){return oe(this.l,this.a,this.b)},r.rgb=ue;var de=ue.prototype=new Wt;function fe(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function pe(t,e,n){var i,o,r,a=0,s=0,l=0;if(i=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(o=i[2].split(","),i[1]){case"hsl":return n(parseFloat(o[0]),parseFloat(o[1])/100,parseFloat(o[2])/100);case"rgb":return e(ye(o[0]),ye(o[1]),ye(o[2]))}return(r=be.get(t))?e(r.r,r.g,r.b):(null==t||"#"!==t.charAt(0)||isNaN(r=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&r)>>4,a|=a>>4,s=240&r,s|=s>>4,l=15&r,l|=l<<4):7===t.length&&(a=(16711680&r)>>16,s=(65280&r)>>8,l=255&r)),e(a,s,l))}function ge(t,e,n){var i,o,r=Math.min(t/=255,e/=255,n/=255),a=Math.max(t,e,n),s=a-r,l=(a+r)/2;return s?(o=l<.5?s/(a+r):s/(2-a-r),i=t==a?(e-n)/s+(e<n?6:0):e==a?(n-t)/s+2:(t-e)/s+4,i*=60):(i=NaN,o=l>0&&l<1?0:i),new qt(i,o,l)}function me(t,e,n){var i=se((.4124564*(t=ve(t))+.3575761*(e=ve(e))+.1804375*(n=ve(n)))/te),o=se((.2126729*t+.7151522*e+.072175*n)/ee);return $t(116*o-16,500*(i-o),200*(o-se((.0193339*t+.119192*e+.9503041*n)/ne)))}function ve(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ye(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}de.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,i=this.b,o=30;return e||n||i?(e&&e<o&&(e=o),n&&n<o&&(n=o),i&&i<o&&(i=o),new ue(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,i/t))):new ue(o,o,o)},de.darker=function(t){return new ue((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},de.hsl=function(){return ge(this.r,this.g,this.b)},de.toString=function(){return"#"+fe(this.r)+fe(this.g)+fe(this.b)};var be=r.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function we(t){return"function"==typeof t?t:function(){return t}}function _e(t){return function(e,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),xe(e,n,t,i)}}function xe(t,e,n,i){var o={},a=r.dispatch("beforesend","progress","load","error"),l={},u=new XMLHttpRequest,c=null;function h(){var t,e=u.status;if(!e&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(u)||e>=200&&e<300||304===e){try{t=n.call(o,u)}catch(t){return void a.error.call(o,t)}a.load.call(o,t)}else a.error.call(o,u)}return!this.XDomainRequest||"withCredentials"in u||!/^(http(s)?:)?\/\//.test(t)||(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=h:u.onreadystatechange=function(){u.readyState>3&&h()},u.onprogress=function(t){var e=r.event;r.event=t;try{a.progress.call(o,u)}finally{r.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(c=t,o):c},o.response=function(t){return n=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(s(arguments)))}}),o.send=function(n,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),u.open(n,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),u.setRequestHeader)for(var s in l)u.setRequestHeader(s,l[s]);return null!=e&&u.overrideMimeType&&u.overrideMimeType(e),null!=c&&(u.responseType=c),null!=r&&o.on("error",r).on("load",function(t){r(null,t)}),a.beforesend.call(o,u),u.send(null==i?null:i),o},o.abort=function(){return u.abort(),o},r.rebind(o,a,"on"),null==i?o:o.get(function(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}(i))}be.forEach(function(t,e){be.set(t,ce(e))}),r.functor=we,r.xhr=_e(j),r.dsv=function(t,e){var n=new RegExp('["'+t+"\n]"),i=t.charCodeAt(0);function o(t,n,i){arguments.length<3&&(i=n,n=null);var o=xe(t,e,null==n?r:a(n),i);return o.row=function(t){return arguments.length?o.response(null==(n=t)?r:a(t)):n},o}function r(t){return o.parse(t.responseText)}function a(t){return function(e){return o.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return n.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return o.parse=function(t,e){var n;return o.parseRows(t,function(t,i){if(n)return n(t,i-1);var o=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");n=e?function(t,n){return e(o(t),n)}:o})},o.parseRows=function(t,e){var n,o,r={},a={},s=[],l=t.length,u=0,c=0;function h(){if(u>=l)return a;if(o)return o=!1,r;var e=u;if(34===t.charCodeAt(e)){for(var n=e;n++<l;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}return u=n+2,13===(s=t.charCodeAt(n+1))?(o=!0,10===t.charCodeAt(n+2)&&++u):10===s&&(o=!0),t.slice(e+1,n).replace(/""/g,'"')}for(;u<l;){var s,c=1;if(10===(s=t.charCodeAt(u++)))o=!0;else if(13===s)o=!0,10===t.charCodeAt(u)&&(++u,++c);else if(s!==i)continue;return t.slice(e,u-c)}return t.slice(e)}for(;(n=h())!==a;){for(var d=[];n!==r&&n!==a;)d.push(n),n=h();e&&null==(d=e(d,c++))||s.push(d)}return s},o.format=function(e){if(Array.isArray(e[0]))return o.formatRows(e);var n=new D,i=[];return e.forEach(function(t){for(var e in t)n.has(e)||i.push(n.add(e))}),[i.map(l).join(t)].concat(e.map(function(e){return i.map(function(t){return l(e[t])}).join(t)})).join("\n")},o.formatRows=function(t){return t.map(s).join("\n")},o},r.csv=r.dsv(",","text/csv"),r.tsv=r.dsv("\t","text/tab-separated-values");var Se,Ee,Ce,Te,Me=this[N(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};function Pe(t,e,n){var i=arguments.length;i<2&&(e=0),i<3&&(n=Date.now());var o={c:t,t:n+e,n:null};return Ee?Ee.n=o:Se=o,Ee=o,Ce||(Te=clearTimeout(Te),Ce=1,Me(Le)),o}function Le(){var t=Ae(),e=ke()-t;e>24?(isFinite(e)&&(clearTimeout(Te),Te=setTimeout(Le,e)),Ce=0):(Ce=1,Me(Le))}function Ae(){for(var t=Date.now(),e=Se;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function ke(){for(var t,e=Se,n=1/0;e;)e.c?(e.t<n&&(n=e.t),e=(t=e).n):e=t?t.n=e.n:Se=e.n;return Ee=t,n}function Oe(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}r.timer=function(){Pe.apply(this,arguments)},r.timer.flush=function(){Ae(),ke()},r.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Re=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(function(t,e){var n=Math.pow(10,3*x(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}});r.formatPrefix=function(t,e){var n=0;return(t=+t)&&(t<0&&(t*=-1),e&&(t=r.round(t,Oe(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Re[8+n/3]};var De=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,je=r.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=r.round(t,Oe(t,e))).toFixed(Math.max(0,Math.min(20,Oe(t*(1+1e-15),e))))}});function ze(t){return t+""}var Ne=r.time={},Ie=Date;function Fe(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}Fe.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){He.setUTCDate.apply(this._,arguments)},setDay:function(){He.setUTCDay.apply(this._,arguments)},setFullYear:function(){He.setUTCFullYear.apply(this._,arguments)},setHours:function(){He.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){He.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){He.setUTCMinutes.apply(this._,arguments)},setMonth:function(){He.setUTCMonth.apply(this._,arguments)},setSeconds:function(){He.setUTCSeconds.apply(this._,arguments)},setTime:function(){He.setTime.apply(this._,arguments)}};var He=Date.prototype;function Ge(t,e,n){function i(e){var n=t(e),i=r(n,1);return e-n<i-e?n:i}function o(n){return e(n=t(new Ie(n-1)),1),n}function r(t,n){return e(t=new Ie(+t),n),t}function a(t,i,r){var a=o(t),s=[];if(r>1)for(;a<i;)n(a)%r||s.push(new Date(+a)),e(a,1);else for(;a<i;)s.push(new Date(+a)),e(a,1);return s}t.floor=t,t.round=i,t.ceil=o,t.offset=r,t.range=a;var s=t.utc=Ve(t);return s.floor=s,s.round=Ve(i),s.ceil=Ve(o),s.offset=Ve(r),s.range=function(t,e,n){try{Ie=Fe;var i=new Fe;return i._=t,a(i,e,n)}finally{Ie=Date}},t}function Ve(t){return function(e,n){try{Ie=Fe;var i=new Fe;return i._=e,t(i,n)._}finally{Ie=Date}}}Ne.year=Ge(function(t){return(t=Ne.day(t)).setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),Ne.years=Ne.year.range,Ne.years.utc=Ne.year.utc.range,Ne.day=Ge(function(t){var e=new Ie(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),Ne.days=Ne.day.range,Ne.days.utc=Ne.day.utc.range,Ne.dayOfYear=function(t){var e=Ne.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=Ne[t]=Ge(function(t){return(t=Ne.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=Ne.year(t).getDay();return Math.floor((Ne.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});Ne[t+"s"]=n.range,Ne[t+"s"].utc=n.utc.range,Ne[t+"OfYear"]=function(t){var n=Ne.year(t).getDay();return Math.floor((Ne.dayOfYear(t)+(n+e)%7)/7)}}),Ne.week=Ne.sunday,Ne.weeks=Ne.sunday.range,Ne.weeks.utc=Ne.sunday.utc.range,Ne.weekOfYear=Ne.sundayOfYear;var Be={"-":"",_:" ",0:"0"},Ue=/^\s*\d+/,We=/^%/;function qe(t,e,n){var i=t<0?"-":"",o=(i?-t:t)+"",r=o.length;return i+(r<n?new Array(n-r+1).join(e)+o:o)}function Ye(t){return new RegExp("^(?:"+t.map(r.requote).join("|")+")","i")}function Xe(t){for(var e=new E,n=-1,i=t.length;++n<i;)e.set(t[n].toLowerCase(),n);return e}function Ze(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Qe(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n));return i?(t.U=+i[0],n+i[0].length):-1}function Ke(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n));return i?(t.W=+i[0],n+i[0].length):-1}function $e(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Je(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n,n+2));return i?(t.y=function(t){return t+(t>68?1900:2e3)}(+i[0]),n+i[0].length):-1}function tn(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function en(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function nn(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function on(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n,n+3));return i?(t.j=+i[0],n+i[0].length):-1}function rn(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function an(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function sn(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function ln(t,e,n){Ue.lastIndex=0;var i=Ue.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function un(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",i=x(e)/60|0,o=x(e)%60;return n+qe(i,"0",2)+qe(o,"0",2)}function cn(t,e,n){We.lastIndex=0;var i=We.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function hn(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(e){for(var n=0,i=t[n];!i[1](e);)i=t[++n];return i[0](e)}}r.locale=function(t){return{numberFormat:function(t){var e=t.decimal,n=t.thousands,i=t.grouping,o=t.currency,a=i&&n?function(t,e){for(var o=t.length,r=[],a=0,s=i[0],l=0;o>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),r.push(t.substring(o-=s,o+s)),!((l+=s+1)>e));)s=i[a=(a+1)%i.length];return r.reverse().join(n)}:j;return function(t){var n=De.exec(t),i=n[1]||" ",s=n[2]||">",l=n[3]||"-",u=n[4]||"",c=n[5],h=+n[6],d=n[7],f=n[8],p=n[9],g=1,m="",v="",y=!1,b=!0;switch(f&&(f=+f.substring(1)),(c||"0"===i&&"="===s)&&(c=i="0",s="="),p){case"n":d=!0,p="g";break;case"%":g=100,v="%",p="f";break;case"p":g=100,v="%",p="r";break;case"b":case"o":case"x":case"X":"#"===u&&(m="0"+p.toLowerCase());case"c":b=!1;case"d":y=!0,f=0;break;case"s":g=-1,p="r"}"$"===u&&(m=o[0],v=o[1]),"r"!=p||f||(p="g"),null!=f&&("g"==p?f=Math.max(1,Math.min(21,f)):"e"!=p&&"f"!=p||(f=Math.max(0,Math.min(20,f)))),p=je.get(p)||ze;var w=c&&d;return function(t){var n=v;if(y&&t%1)return"";var o=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===l?"":l;if(g<0){var u=r.formatPrefix(t,f);t=u.scale(t),n=u.symbol+v}else t*=g;var _,x,S=(t=p(t,f)).lastIndexOf(".");if(S<0){var E=b?t.lastIndexOf("e"):-1;E<0?(_=t,x=""):(_=t.substring(0,E),x=t.substring(E))}else _=t.substring(0,S),x=e+t.substring(S+1);!c&&d&&(_=a(_,1/0));var C=m.length+_.length+x.length+(w?0:o.length),T=C<h?new Array(C=h-C+1).join(i):"";return w&&(_=a(T+_,T.length?h-x.length:1/0)),o+=m,t=_+x,("<"===s?o+t+T:">"===s?T+o+t:"^"===s?T.substring(0,C>>=1)+o+t+T.substring(C):o+(w?t:T+t))+n}}}(t),timeFormat:function(t){var e=t.dateTime,n=t.date,i=t.time,o=t.periods,a=t.days,s=t.shortDays,l=t.months,u=t.shortMonths;function c(t){var e=t.length;function n(n){for(var i,o,r,a=[],s=-1,l=0;++s<e;)37===t.charCodeAt(s)&&(a.push(t.slice(l,s)),null!=(o=Be[i=t.charAt(++s)])&&(i=t.charAt(++s)),(r=_[i])&&(i=r(n,null==o?"e"===i?" ":"0":o)),a.push(i),l=s+1);return a.push(t.slice(l,s)),a.join("")}return n.parse=function(e){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(h(n,t,e,0)!=e.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var i=null!=n.Z&&Ie!==Fe,o=new(i?Fe:Ie);return"j"in n?o.setFullYear(n.y,0,n.j):"W"in n||"U"in n?("w"in n||(n.w="W"in n?1:0),o.setFullYear(n.y,0,1),o.setFullYear(n.y,0,"W"in n?(n.w+6)%7+7*n.W-(o.getDay()+5)%7:n.w+7*n.U-(o.getDay()+6)%7)):o.setFullYear(n.y,n.m,n.d),o.setHours(n.H+(n.Z/100|0),n.M+n.Z%100,n.S,n.L),i?o._:o},n.toString=function(){return t},n}function h(t,e,n,i){for(var o,r,a,s=0,l=e.length,u=n.length;s<l;){if(i>=u)return-1;if(37===(o=e.charCodeAt(s++))){if(a=e.charAt(s++),!(r=x[a in Be?e.charAt(s++):a])||(i=r(t,n,i))<0)return-1}else if(o!=n.charCodeAt(i++))return-1}return i}c.utc=function(t){var e=c(t);function n(t){try{var n=new(Ie=Fe);return n._=t,e(n)}finally{Ie=Date}}return n.parse=function(t){try{Ie=Fe;var n=e.parse(t);return n&&n._}finally{Ie=Date}},n.toString=e.toString,n},c.multi=c.utc.multi=hn;var d=r.map(),f=Ye(a),p=Xe(a),g=Ye(s),m=Xe(s),v=Ye(l),y=Xe(l),b=Ye(u),w=Xe(u);o.forEach(function(t,e){d.set(t.toLowerCase(),e)});var _={a:function(t){return s[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:c(e),d:function(t,e){return qe(t.getDate(),e,2)},e:function(t,e){return qe(t.getDate(),e,2)},H:function(t,e){return qe(t.getHours(),e,2)},I:function(t,e){return qe(t.getHours()%12||12,e,2)},j:function(t,e){return qe(1+Ne.dayOfYear(t),e,3)},L:function(t,e){return qe(t.getMilliseconds(),e,3)},m:function(t,e){return qe(t.getMonth()+1,e,2)},M:function(t,e){return qe(t.getMinutes(),e,2)},p:function(t){return o[+(t.getHours()>=12)]},S:function(t,e){return qe(t.getSeconds(),e,2)},U:function(t,e){return qe(Ne.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return qe(Ne.mondayOfYear(t),e,2)},x:c(n),X:c(i),y:function(t,e){return qe(t.getFullYear()%100,e,2)},Y:function(t,e){return qe(t.getFullYear()%1e4,e,4)},Z:un,"%":function(){return"%"}},x={a:function(t,e,n){g.lastIndex=0;var i=g.exec(e.slice(n));return i?(t.w=m.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){f.lastIndex=0;var i=f.exec(e.slice(n));return i?(t.w=p.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){b.lastIndex=0;var i=b.exec(e.slice(n));return i?(t.m=w.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){v.lastIndex=0;var i=v.exec(e.slice(n));return i?(t.m=y.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,e,n){return h(t,_.c.toString(),e,n)},d:nn,e:nn,H:rn,I:rn,j:on,L:ln,m:en,M:an,p:function(t,e,n){var i=d.get(e.slice(n,n+=2).toLowerCase());return null==i?-1:(t.p=i,n)},S:sn,U:Qe,w:Ze,W:Ke,x:function(t,e,n){return h(t,_.x.toString(),e,n)},X:function(t,e,n){return h(t,_.X.toString(),e,n)},y:Je,Y:$e,Z:tn,"%":cn};return c}(t)}};var dn=r.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function fn(){}r.format=dn.numberFormat,r.geo={},fn.prototype={s:0,t:0,add:function(t){gn(t,this.t,pn),gn(pn.s,this.s,this),this.s?this.t+=pn.t:this.s=pn.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var pn=new fn;function gn(t,e,n){var i=n.s=t+e,o=i-t,r=i-o;n.t=t-r+(e-o)}function mn(t,e){t&&yn.hasOwnProperty(t.type)&&yn[t.type](t,e)}r.geo.stream=function(t,e){t&&vn.hasOwnProperty(t.type)?vn[t.type](t,e):mn(t,e)};var vn={Feature:function(t,e){mn(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)mn(n[i].geometry,e)}},yn={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){bn(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)bn(n[i],e,0)},Polygon:function(t,e){wn(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)wn(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)mn(n[i],e)}};function bn(t,e,n){var i,o=-1,r=t.length-n;for(e.lineStart();++o<r;)i=t[o],e.point(i[0],i[1],i[2]);e.lineEnd()}function wn(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)bn(t[n],e,1);e.polygonEnd()}r.geo.area=function(t){return _n=0,r.geo.stream(t,Dn),_n};var _n,xn,Sn,En,Cn,Tn,Mn,Pn,Ln,An,kn,On,Rn=new fn,Dn={sphere:function(){_n+=4*Lt},point:F,lineStart:F,lineEnd:F,polygonStart:function(){Rn.reset(),Dn.lineStart=jn},polygonEnd:function(){var t=2*Rn;_n+=t<0?4*Lt+t:t,Dn.lineStart=Dn.lineEnd=Dn.point=F}};function jn(){var t,e,n,i,o;function r(t,e){e=e*Rt/2+Lt/4;var r=(t*=Rt)-n,a=r>=0?1:-1,s=a*r,l=Math.cos(e),u=Math.sin(e),c=o*u,h=i*l+c*Math.cos(s),d=c*a*Math.sin(s);Rn.add(Math.atan2(d,h)),n=t,i=l,o=u}Dn.point=function(a,s){Dn.point=r,n=(t=a)*Rt,i=Math.cos(s=(e=s)*Rt/2+Lt/4),o=Math.sin(s)},Dn.lineEnd=function(){r(t,e)}}function zn(t){var e=t[0],n=t[1],i=Math.cos(n);return[i*Math.cos(e),i*Math.sin(e),Math.sin(n)]}function Nn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function In(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Fn(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Hn(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Gn(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Vn(t){return[Math.atan2(t[1],t[0]),It(t[2])]}function Bn(t,e){return x(t[0]-e[0])<Mt&&x(t[1]-e[1])<Mt}r.geo.bounds=function(){var t,e,n,i,o,a,s,l,u,c,h,d={point:f,lineStart:g,lineEnd:m,polygonStart:function(){d.point=v,d.lineStart=y,d.lineEnd=b,u=0,Dn.polygonStart()},polygonEnd:function(){Dn.polygonEnd(),d.point=f,d.lineStart=g,d.lineEnd=m,Rn<0?(t=-(n=180),e=-(i=90)):u>Mt?i=90:u<-Mt&&(e=-90),h[0]=t,h[1]=n}};function f(o,r){c.push(h=[t=o,n=o]),r<e&&(e=r),r>i&&(i=r)}function p(r,a){var s=zn([r*Rt,a*Rt]);if(l){var u=In(l,s),c=In([u[1],-u[0],0],u);Gn(c),c=Vn(c);var h=r-o,d=h>0?1:-1,p=c[0]*Dt*d,g=x(h)>180;if(g^(d*o<p&&p<d*r))(m=c[1]*Dt)>i&&(i=m);else if(g^(d*o<(p=(p+360)%360-180)&&p<d*r)){var m;(m=-c[1]*Dt)<e&&(e=m)}else a<e&&(e=a),a>i&&(i=a);g?r<o?w(t,r)>w(t,n)&&(n=r):w(r,n)>w(t,n)&&(t=r):n>=t?(r<t&&(t=r),r>n&&(n=r)):r>o?w(t,r)>w(t,n)&&(n=r):w(r,n)>w(t,n)&&(t=r)}else f(r,a);l=s,o=r}function g(){d.point=p}function m(){h[0]=t,h[1]=n,d.point=f,l=null}function v(t,e){if(l){var n=t-o;u+=x(n)>180?n+(n>0?360:-360):n}else a=t,s=e;Dn.point(t,e),p(t,e)}function y(){Dn.lineStart()}function b(){v(a,s),Dn.lineEnd(),x(u)>Mt&&(t=-(n=180)),h[0]=t,h[1]=n,l=null}function w(t,e){return(e-=t)<0?e+360:e}function _(t,e){return t[0]-e[0]}function S(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}return function(o){if(i=n=-(t=e=1/0),c=[],r.geo.stream(o,d),u=c.length){c.sort(_);for(var a=1,s=[g=c[0]];a<u;++a)S((f=c[a])[0],g)||S(f[1],g)?(w(g[0],f[1])>w(g[0],g[1])&&(g[1]=f[1]),w(f[0],g[1])>w(g[0],g[1])&&(g[0]=f[0])):s.push(g=f);for(var l,u,f,p=-1/0,g=(a=0,s[u=s.length-1]);a<=u;g=f,++a)f=s[a],(l=w(g[1],f[0]))>p&&(p=l,t=f[0],n=g[1])}return c=h=null,t===1/0||e===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,e],[n,i]]}}(),r.geo.centroid=function(t){xn=Sn=En=Cn=Tn=Mn=Pn=Ln=An=kn=On=0,r.geo.stream(t,Un);var e=An,n=kn,i=On,o=e*e+n*n+i*i;return o<Pt&&(e=Mn,n=Pn,i=Ln,Sn<Mt&&(e=En,n=Cn,i=Tn),(o=e*e+n*n+i*i)<Pt)?[NaN,NaN]:[Math.atan2(n,e)*Dt,It(i/Math.sqrt(o))*Dt]};var Un={sphere:F,point:Wn,lineStart:Yn,lineEnd:Xn,polygonStart:function(){Un.lineStart=Zn},polygonEnd:function(){Un.lineStart=Yn}};function Wn(t,e){t*=Rt;var n=Math.cos(e*=Rt);qn(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function qn(t,e,n){En+=(t-En)/++xn,Cn+=(e-Cn)/xn,Tn+=(n-Tn)/xn}function Yn(){var t,e,n;function i(i,o){i*=Rt;var r=Math.cos(o*=Rt),a=r*Math.cos(i),s=r*Math.sin(i),l=Math.sin(o),u=Math.atan2(Math.sqrt((u=e*l-n*s)*u+(u=n*a-t*l)*u+(u=t*s-e*a)*u),t*a+e*s+n*l);Sn+=u,Mn+=u*(t+(t=a)),Pn+=u*(e+(e=s)),Ln+=u*(n+(n=l)),qn(t,e,n)}Un.point=function(o,r){o*=Rt;var a=Math.cos(r*=Rt);t=a*Math.cos(o),e=a*Math.sin(o),n=Math.sin(r),Un.point=i,qn(t,e,n)}}function Xn(){Un.point=Wn}function Zn(){var t,e,n,i,o;function r(t,e){t*=Rt;var r=Math.cos(e*=Rt),a=r*Math.cos(t),s=r*Math.sin(t),l=Math.sin(e),u=i*l-o*s,c=o*a-n*l,h=n*s-i*a,d=Math.sqrt(u*u+c*c+h*h),f=n*a+i*s+o*l,p=d&&-Nt(f)/d,g=Math.atan2(d,f);An+=p*u,kn+=p*c,On+=p*h,Sn+=g,Mn+=g*(n+(n=a)),Pn+=g*(i+(i=s)),Ln+=g*(o+(o=l)),qn(n,i,o)}Un.point=function(a,s){t=a,e=s,Un.point=r,a*=Rt;var l=Math.cos(s*=Rt);n=l*Math.cos(a),i=l*Math.sin(a),o=Math.sin(s),qn(n,i,o)},Un.lineEnd=function(){r(t,e),Un.lineEnd=Xn,Un.point=Wn}}function Qn(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return(n=e.invert(n,i))&&t.invert(n[0],n[1])}),n}function Kn(){return!0}function $n(t,e,n,i,o){var r=[],a=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],i=t[e];if(Bn(n,i)){o.lineStart();for(var s=0;s<e;++s)o.point((n=t[s])[0],n[1]);o.lineEnd()}else{var l=new ti(n,t,null,!0),u=new ti(n,null,l,!1);l.o=u,r.push(l),a.push(u),u=new ti(i,null,l=new ti(i,t,null,!1),!0),l.o=u,r.push(l),a.push(u)}}}),a.sort(e),Jn(r),Jn(a),r.length){for(var s=0,l=n,u=a.length;s<u;++s)a[s].e=l=!l;for(var c,h,d=r[0];;){for(var f=d,p=!0;f.v;)if((f=f.n)===d)return;c=f.z,o.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,u=c.length;s<u;++s)o.point((h=c[s])[0],h[1]);else i(f.x,f.n.x,1,o);f=f.n}else{if(p)for(s=(c=f.p.z).length-1;s>=0;--s)o.point((h=c[s])[0],h[1]);else i(f.x,f.p.x,-1,o);f=f.p}c=(f=f.o).z,p=!p}while(!f.v);o.lineEnd()}}}function Jn(t){if(e=t.length){for(var e,n,i=0,o=t[0];++i<e;)o.n=n=t[i],n.p=o,o=n;o.n=n=t[0],n.p=o}}function ti(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function ei(t,e,n,i){return function(o,a){var s,l=e(a),u=o.invert(i[0],i[1]),c={point:h,lineStart:f,lineEnd:p,polygonStart:function(){c.point=w,c.lineStart=_,c.lineEnd=x,s=[],g=[]},polygonEnd:function(){c.point=h,c.lineStart=f,c.lineEnd=p,s=r.merge(s);var t=function(t,e){var n=t[0],i=t[1],o=[Math.sin(n),-Math.cos(n),0],r=0,a=0;Rn.reset();for(var s=0,l=e.length;s<l;++s){var u=e[s],c=u.length;if(c)for(var h=u[0],d=h[0],f=h[1]/2+Lt/4,p=Math.sin(f),g=Math.cos(f),m=1;;){m===c&&(m=0);var v=(t=u[m])[0],y=t[1]/2+Lt/4,b=Math.sin(y),w=Math.cos(y),_=v-d,x=_>=0?1:-1,S=x*_,E=S>Lt,C=p*b;if(Rn.add(Math.atan2(C*x*Math.sin(S),g*w+C*Math.cos(S))),r+=E?_+x*At:_,E^d>=n^v>=n){var T=In(zn(h),zn(t));Gn(T);var M=In(o,T);Gn(M);var P=(E^_>=0?-1:1)*It(M[2]);(i>P||i===P&&(T[0]||T[1]))&&(a+=E^_>=0?1:-1)}if(!m++)break;d=v,p=b,g=w,h=t}}return(r<-Mt||r<Mt&&Rn<-Mt)^1&a}(u,g);s.length?(b||(a.polygonStart(),b=!0),$n(s,oi,t,n,a)):t&&(b||(a.polygonStart(),b=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),b&&(a.polygonEnd(),b=!1),s=g=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function h(e,n){var i=o(e,n);t(e=i[0],n=i[1])&&a.point(e,n)}function d(t,e){var n=o(t,e);l.point(n[0],n[1])}function f(){c.point=d,l.lineStart()}function p(){c.point=h,l.lineEnd()}var g,m,v=ii(),y=e(v),b=!1;function w(t,e){m.push([t,e]);var n=o(t,e);y.point(n[0],n[1])}function _(){y.lineStart(),m=[]}function x(){w(m[0][0],m[0][1]),y.lineEnd();var t,e=y.clean(),n=v.buffer(),i=n.length;if(m.pop(),g.push(m),m=null,i)if(1&e){var o,r=-1;if((i=(t=n[0]).length-1)>0){for(b||(a.polygonStart(),b=!0),a.lineStart();++r<i;)a.point((o=t[r])[0],o[1]);a.lineEnd()}}else i>1&&2&e&&n.push(n.pop().concat(n.shift())),s.push(n.filter(ni))}return c}}function ni(t){return t.length>1}function ii(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:F,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function oi(t,e){return((t=t.x)[0]<0?t[1]-Ot-Mt:Ot-t[1])-((e=e.x)[0]<0?e[1]-Ot-Mt:Ot-e[1])}var ri=ei(Kn,function(t){var e,n=NaN,i=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(r,a){var s=r>0?Lt:-Lt,l=x(r-n);x(l-Lt)<Mt?(t.point(n,i=(i+a)/2>0?Ot:-Ot),t.point(o,i),t.lineEnd(),t.lineStart(),t.point(s,i),t.point(r,i),e=0):o!==s&&l>=Lt&&(x(n-o)<Mt&&(n-=o*Mt),x(r-s)<Mt&&(r-=s*Mt),i=function(t,e,n,i){var o,r,a=Math.sin(t-n);return x(a)>Mt?Math.atan((Math.sin(e)*(r=Math.cos(i))*Math.sin(n)-Math.sin(i)*(o=Math.cos(e))*Math.sin(t))/(o*r*a)):(e+i)/2}(n,i,r,a),t.point(o,i),t.lineEnd(),t.lineStart(),t.point(s,i),e=0),t.point(n=r,i=a),o=s},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}},function(t,e,n,i){var o;if(null==t)o=n*Ot,i.point(-Lt,o),i.point(0,o),i.point(Lt,o),i.point(Lt,0),i.point(Lt,-o),i.point(0,-o),i.point(-Lt,-o),i.point(-Lt,0),i.point(-Lt,o);else if(x(t[0]-e[0])>Mt){var r=t[0]<e[0]?Lt:-Lt;o=n*r/2,i.point(-r,o),i.point(0,o),i.point(r,o)}else i.point(e[0],e[1])},[-Lt,-Lt/2]);function ai(t,e,n,i){return function(o){var r,a=o.a,s=o.b,l=a.x,u=a.y,c=0,h=1,d=s.x-l,f=s.y-u;if(r=t-l,d||!(r>0)){if(r/=d,d<0){if(r<c)return;r<h&&(h=r)}else if(d>0){if(r>h)return;r>c&&(c=r)}if(r=n-l,d||!(r<0)){if(r/=d,d<0){if(r>h)return;r>c&&(c=r)}else if(d>0){if(r<c)return;r<h&&(h=r)}if(r=e-u,f||!(r>0)){if(r/=f,f<0){if(r<c)return;r<h&&(h=r)}else if(f>0){if(r>h)return;r>c&&(c=r)}if(r=i-u,f||!(r<0)){if(r/=f,f<0){if(r>h)return;r>c&&(c=r)}else if(f>0){if(r<c)return;r<h&&(h=r)}return c>0&&(o.a={x:l+c*d,y:u+c*f}),h<1&&(o.b={x:l+h*d,y:u+h*f}),o}}}}}}var si=1e9;function li(t,e,n,i){return function(l){var u,c,h,d,f,p,g,m,v,y,b,w=l,_=ii(),x=ai(t,e,n,i),S={point:T,lineStart:function(){S.point=M,c&&c.push(h=[]);y=!0,v=!1,g=m=NaN},lineEnd:function(){u&&(M(d,f),p&&v&&_.rejoin(),u.push(_.buffer()));S.point=T,v&&l.lineEnd()},polygonStart:function(){l=_,u=[],c=[],b=!0},polygonEnd:function(){l=w,u=r.merge(u);var e=function(t){for(var e=0,n=c.length,i=t[1],o=0;o<n;++o)for(var r,a=1,s=c[o],l=s.length,u=s[0];a<l;++a)r=s[a],u[1]<=i?r[1]>i&&zt(u,r,t)>0&&++e:r[1]<=i&&zt(u,r,t)<0&&--e,u=r;return 0!==e}([t,i]),n=b&&e,o=u.length;(n||o)&&(l.polygonStart(),n&&(l.lineStart(),E(null,null,1,l),l.lineEnd()),o&&$n(u,a,e,E,l),l.polygonEnd()),u=c=h=null}};function E(r,a,l,u){var c=0,h=0;if(null==r||(c=o(r,l))!==(h=o(a,l))||s(r,a)<0^l>0)do{u.point(0===c||3===c?t:n,c>1?i:e)}while((c=(c+l+4)%4)!==h);else u.point(a[0],a[1])}function C(o,r){return t<=o&&o<=n&&e<=r&&r<=i}function T(t,e){C(t,e)&&l.point(t,e)}function M(t,e){var n=C(t=Math.max(-si,Math.min(si,t)),e=Math.max(-si,Math.min(si,e)));if(c&&h.push([t,e]),y)d=t,f=e,p=n,y=!1,n&&(l.lineStart(),l.point(t,e));else if(n&&v)l.point(t,e);else{var i={a:{x:g,y:m},b:{x:t,y:e}};x(i)?(v||(l.lineStart(),l.point(i.a.x,i.a.y)),l.point(i.b.x,i.b.y),n||l.lineEnd(),b=!1):n&&(l.lineStart(),l.point(t,e),b=!1)}g=t,m=e,v=n}return S};function o(i,o){return x(i[0]-t)<Mt?o>0?0:3:x(i[0]-n)<Mt?o>0?2:1:x(i[1]-e)<Mt?o>0?1:0:o>0?3:2}function a(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),i=o(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}}function ui(t){var e=0,n=Lt/3,i=ki(t),o=i(e,n);return o.parallels=function(t){return arguments.length?i(e=t[0]*Lt/180,n=t[1]*Lt/180):[e/Lt*180,n/Lt*180]},o}function ci(t,e){var n=Math.sin(t),i=(n+Math.sin(e))/2,o=1+n*(2*i-n),r=Math.sqrt(o)/i;function a(t,e){var n=Math.sqrt(o-2*i*Math.sin(e))/i;return[n*Math.sin(t*=i),r-n*Math.cos(t)]}return a.invert=function(t,e){var n=r-e;return[Math.atan2(t,n)/i,It((o-(t*t+n*n)*i*i)/(2*i))]},a}r.geo.clipExtent=function(){var t,e,n,i,o,r,a={stream:function(t){return o&&(o.valid=!1),(o=r(t)).valid=!0,o},extent:function(s){return arguments.length?(r=li(t=+s[0][0],e=+s[0][1],n=+s[1][0],i=+s[1][1]),o&&(o.valid=!1,o=null),a):[[t,e],[n,i]]}};return a.extent([[0,0],[960,500]])},(r.geo.conicEqualArea=function(){return ui(ci)}).raw=ci,r.geo.albers=function(){return r.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},r.geo.albersUsa=function(){var t,e,n,i,o=r.geo.albers(),a=r.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=r.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,n){t=[e,n]}};function u(o){var r=o[0],a=o[1];return t=null,e(r,a),t||(n(r,a),t)||i(r,a),t}return u.invert=function(t){var e=o.scale(),n=o.translate(),i=(t[0]-n[0])/e,r=(t[1]-n[1])/e;return(r>=.12&&r<.234&&i>=-.425&&i<-.214?a:r>=.166&&r<.234&&i>=-.214&&i<-.115?s:o).invert(t)},u.stream=function(t){var e=o.stream(t),n=a.stream(t),i=s.stream(t);return{point:function(t,o){e.point(t,o),n.point(t,o),i.point(t,o)},sphere:function(){e.sphere(),n.sphere(),i.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),i.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),i.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),i.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),i.polygonEnd()}}},u.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),u):o.precision()},u.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),u.translate(o.translate())):o.scale()},u.translate=function(t){if(!arguments.length)return o.translate();var r=o.scale(),c=+t[0],h=+t[1];return e=o.translate(t).clipExtent([[c-.455*r,h-.238*r],[c+.455*r,h+.238*r]]).stream(l).point,n=a.translate([c-.307*r,h+.201*r]).clipExtent([[c-.425*r+Mt,h+.12*r+Mt],[c-.214*r-Mt,h+.234*r-Mt]]).stream(l).point,i=s.translate([c-.205*r,h+.212*r]).clipExtent([[c-.214*r+Mt,h+.166*r+Mt],[c-.115*r-Mt,h+.234*r-Mt]]).stream(l).point,u},u.scale(1070)};var hi,di,fi,pi,gi,mi,vi={point:F,lineStart:F,lineEnd:F,polygonStart:function(){di=0,vi.lineStart=yi},polygonEnd:function(){vi.lineStart=vi.lineEnd=vi.point=F,hi+=x(di/2)}};function yi(){var t,e,n,i;function o(t,e){di+=i*t-n*e,n=t,i=e}vi.point=function(r,a){vi.point=o,t=n=r,e=i=a},vi.lineEnd=function(){o(t,e)}}var bi={point:function(t,e){t<fi&&(fi=t);t>gi&&(gi=t);e<pi&&(pi=e);e>mi&&(mi=e)},lineStart:F,lineEnd:F,polygonStart:F,polygonEnd:F};function wi(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var _i,xi={point:Si,lineStart:Ei,lineEnd:Ci,polygonStart:function(){xi.lineStart=Ti},polygonEnd:function(){xi.point=Si,xi.lineStart=Ei,xi.lineEnd=Ci}};function Si(t,e){En+=t,Cn+=e,++Tn}function Ei(){var t,e;function n(n,i){var o=n-t,r=i-e,a=Math.sqrt(o*o+r*r);Mn+=a*(t+n)/2,Pn+=a*(e+i)/2,Ln+=a,Si(t=n,e=i)}xi.point=function(i,o){xi.point=n,Si(t=i,e=o)}}function Ci(){xi.point=Si}function Ti(){var t,e,n,i;function o(t,e){var o=t-n,r=e-i,a=Math.sqrt(o*o+r*r);Mn+=a*(n+t)/2,Pn+=a*(i+e)/2,Ln+=a,An+=(a=i*t-n*e)*(n+t),kn+=a*(i+e),On+=3*a,Si(n=t,i=e)}xi.point=function(r,a){xi.point=o,Si(t=n=r,e=i=a)},xi.lineEnd=function(){o(t,e)}}function Mi(t){var e=.5,n=Math.cos(30*Rt),i=16;function o(e){return(i?function(e){var n,o,a,s,l,u,c,h,d,f,p,g,m={point:v,lineStart:y,lineEnd:w,polygonStart:function(){e.polygonStart(),m.lineStart=_},polygonEnd:function(){e.polygonEnd(),m.lineStart=y}};function v(n,i){n=t(n,i),e.point(n[0],n[1])}function y(){h=NaN,m.point=b,e.lineStart()}function b(n,o){var a=zn([n,o]),s=t(n,o);r(h,d,c,f,p,g,h=s[0],d=s[1],c=n,f=a[0],p=a[1],g=a[2],i,e),e.point(h,d)}function w(){m.point=v,e.lineEnd()}function _(){y(),m.point=x,m.lineEnd=S}function x(t,e){b(n=t,e),o=h,a=d,s=f,l=p,u=g,m.point=b}function S(){r(h,d,c,f,p,g,o,a,n,s,l,u,i,e),m.lineEnd=w,w()}return m}:function(e){return Li(e,function(n,i){n=t(n,i),e.point(n[0],n[1])})})(e)}function r(i,o,a,s,l,u,c,h,d,f,p,g,m,v){var y=c-i,b=h-o,w=y*y+b*b;if(w>4*e&&m--){var _=s+f,S=l+p,E=u+g,C=Math.sqrt(_*_+S*S+E*E),T=Math.asin(E/=C),M=x(x(E)-1)<Mt||x(a-d)<Mt?(a+d)/2:Math.atan2(S,_),P=t(M,T),L=P[0],A=P[1],k=L-i,O=A-o,R=b*k-y*O;(R*R/w>e||x((y*k+b*O)/w-.5)>.3||s*f+l*p+u*g<n)&&(r(i,o,a,s,l,u,L,A,M,_/=C,S/=C,E,m,v),v.point(L,A),r(L,A,M,_,S,E,c,h,d,f,p,g,m,v))}}return o.precision=function(t){return arguments.length?(i=(e=t*t)>0&&16,o):Math.sqrt(e)},o}function Pi(t){this.stream=t}function Li(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Ai(t){return ki(function(){return t})()}function ki(t){var e,n,i,o,a,s,l=Mi(function(t,n){return[(t=e(t,n))[0]*u+o,a-t[1]*u]}),u=150,c=480,h=250,d=0,f=0,p=0,g=0,m=0,v=ri,y=j,b=null,w=null;function _(t){return[(t=i(t[0]*Rt,t[1]*Rt))[0]*u+o,a-t[1]*u]}function S(t){return(t=i.invert((t[0]-o)/u,(a-t[1])/u))&&[t[0]*Dt,t[1]*Dt]}function E(){i=Qn(n=ji(p,g,m),e);var t=e(d,f);return o=c-t[0]*u,a=h+t[1]*u,C()}function C(){return s&&(s.valid=!1,s=null),_}return _.stream=function(t){return s&&(s.valid=!1),(s=Oi(v(n,l(y(t))))).valid=!0,s},_.clipAngle=function(t){return arguments.length?(v=null==t?(b=t,ri):function(t){var e=Math.cos(t),n=e>0,i=x(e)>Mt;return ei(o,function(t){var e,s,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(h,d){var f,p=[h,d],g=o(h,d),m=n?g?0:a(h,d):g?a(h+(h<0?Lt:-Lt),d):0;if(!e&&(u=l=g)&&t.lineStart(),g!==l&&(f=r(e,p),(Bn(e,f)||Bn(p,f))&&(p[0]+=Mt,p[1]+=Mt,g=o(p[0],p[1]))),g!==l)c=0,g?(t.lineStart(),f=r(p,e),t.point(f[0],f[1])):(f=r(e,p),t.point(f[0],f[1]),t.lineEnd()),e=f;else if(i&&e&&n^g){var v;m&s||!(v=r(p,e,!0))||(c=0,n?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||e&&Bn(e,p)||t.point(p[0],p[1]),e=p,l=g,s=m},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return c|(u&&l)<<1}}},Fi(t,6*Rt),n?[0,-t]:[-Lt,t-Lt]);function o(t,n){return Math.cos(t)*Math.cos(n)>e}function r(t,n,i){var o=[1,0,0],r=In(zn(t),zn(n)),a=Nn(r,r),s=r[0],l=a-s*s;if(!l)return!i&&t;var u=e*a/l,c=-e*s/l,h=In(o,r),d=Hn(o,u);Fn(d,Hn(r,c));var f=h,p=Nn(d,f),g=Nn(f,f),m=p*p-g*(Nn(d,d)-1);if(!(m<0)){var v=Math.sqrt(m),y=Hn(f,(-p-v)/g);if(Fn(y,d),y=Vn(y),!i)return y;var b,w=t[0],_=n[0],S=t[1],E=n[1];_<w&&(b=w,w=_,_=b);var C=_-w,T=x(C-Lt)<Mt;if(!T&&E<S&&(b=S,S=E,E=b),T||C<Mt?T?S+E>0^y[1]<(x(y[0]-w)<Mt?S:E):S<=y[1]&&y[1]<=E:C>Lt^(w<=y[0]&&y[0]<=_)){var M=Hn(f,(-p+v)/g);return Fn(M,d),[y,Vn(M)]}}}function a(e,i){var o=n?t:Lt-t,r=0;return e<-o?r|=1:e>o&&(r|=2),i<-o?r|=4:i>o&&(r|=8),r}}((b=+t)*Rt),C()):b},_.clipExtent=function(t){return arguments.length?(w=t,y=t?li(t[0][0],t[0][1],t[1][0],t[1][1]):j,C()):w},_.scale=function(t){return arguments.length?(u=+t,E()):u},_.translate=function(t){return arguments.length?(c=+t[0],h=+t[1],E()):[c,h]},_.center=function(t){return arguments.length?(d=t[0]%360*Rt,f=t[1]%360*Rt,E()):[d*Dt,f*Dt]},_.rotate=function(t){return arguments.length?(p=t[0]%360*Rt,g=t[1]%360*Rt,m=t.length>2?t[2]%360*Rt:0,E()):[p*Dt,g*Dt,m*Dt]},r.rebind(_,l,"precision"),function(){return e=t.apply(this,arguments),_.invert=e.invert&&S,E()}}function Oi(t){return Li(t,function(e,n){t.point(e*Rt,n*Rt)})}function Ri(t,e){return[t,e]}function Di(t,e){return[t>Lt?t-At:t<-Lt?t+At:t,e]}function ji(t,e,n){return t?e||n?Qn(Ni(t),Ii(e,n)):Ni(t):e||n?Ii(e,n):Di}function zi(t){return function(e,n){return[(e+=t)>Lt?e-At:e<-Lt?e+At:e,n]}}function Ni(t){var e=zi(t);return e.invert=zi(-t),e}function Ii(t,e){var n=Math.cos(t),i=Math.sin(t),o=Math.cos(e),r=Math.sin(e);function a(t,e){var a=Math.cos(e),s=Math.cos(t)*a,l=Math.sin(t)*a,u=Math.sin(e),c=u*n+s*i;return[Math.atan2(l*o-c*r,s*n-u*i),It(c*o+l*r)]}return a.invert=function(t,e){var a=Math.cos(e),s=Math.cos(t)*a,l=Math.sin(t)*a,u=Math.sin(e),c=u*o-l*r;return[Math.atan2(l*o+u*r,s*n+c*i),It(c*n-s*i)]},a}function Fi(t,e){var n=Math.cos(t),i=Math.sin(t);return function(o,r,a,s){var l=a*e;null!=o?(o=Hi(n,o),r=Hi(n,r),(a>0?o<r:o>r)&&(o+=a*At)):(o=t+a*At,r=t-.5*l);for(var u,c=o;a>0?c>r:c<r;c-=l)s.point((u=Vn([n,-i*Math.cos(c),-i*Math.sin(c)]))[0],u[1])}}function Hi(t,e){var n=zn(e);n[0]-=t,Gn(n);var i=Nt(-n[1]);return((-n[2]<0?-i:i)+2*Math.PI-Mt)%(2*Math.PI)}function Gi(t,e,n){var i=r.range(t,e-Mt,n).concat(e);return function(t){return i.map(function(e){return[t,e]})}}function Vi(t,e,n){var i=r.range(t,e-Mt,n).concat(e);return function(t){return i.map(function(e){return[e,t]})}}function Bi(t){return t.source}function Ui(t){return t.target}r.geo.path=function(){var t,e,n,i,o,a=4.5;function s(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=n(i)),r.geo.stream(t,o)),i.result()}function l(){return o=null,s}return s.area=function(t){return hi=0,r.geo.stream(t,n(vi)),hi},s.centroid=function(t){return En=Cn=Tn=Mn=Pn=Ln=An=kn=On=0,r.geo.stream(t,n(xi)),On?[An/On,kn/On]:Ln?[Mn/Ln,Pn/Ln]:Tn?[En/Tn,Cn/Tn]:[NaN,NaN]},s.bounds=function(t){return gi=mi=-(fi=pi=1/0),r.geo.stream(t,n(bi)),[[fi,pi],[gi,mi]]},s.projection=function(e){return arguments.length?(n=(t=e)?e.stream||function(t){var e=Mi(function(e,n){return t([e*Dt,n*Dt])});return function(t){return Oi(e(t))}}(e):j,l()):t},s.context=function(t){return arguments.length?(i=null==(e=t)?new function(){var t=wi(4.5),e=[],n={point:i,lineStart:function(){n.point=o},lineEnd:a,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=a,n.point=i},pointRadius:function(e){return t=wi(e),n},result:function(){if(e.length){var t=e.join("");return e=[],t}}};function i(n,i){e.push("M",n,",",i,t)}function o(t,i){e.push("M",t,",",i),n.point=r}function r(t,n){e.push("L",t,",",n)}function a(){n.point=i}function s(){e.push("Z")}return n}:new function(t){var e=4.5,n={point:i,lineStart:function(){n.point=o},lineEnd:a,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=a,n.point=i},pointRadius:function(t){return e=t,n},result:F};function i(n,i){t.moveTo(n+e,i),t.arc(n,i,e,0,At)}function o(e,i){t.moveTo(e,i),n.point=r}function r(e,n){t.lineTo(e,n)}function a(){n.point=i}function s(){t.closePath()}return n}(t),"function"!=typeof a&&i.pointRadius(a),l()):e},s.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),s):a},s.projection(r.geo.albersUsa()).context(null)},r.geo.transform=function(t){return{stream:function(e){var n=new Pi(e);for(var i in t)n[i]=t[i];return n}}},Pi.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},r.geo.projection=Ai,r.geo.projectionMutator=ki,(r.geo.equirectangular=function(){return Ai(Ri)}).raw=Ri.invert=Ri,r.geo.rotation=function(t){function e(e){return(e=t(e[0]*Rt,e[1]*Rt))[0]*=Dt,e[1]*=Dt,e}return t=ji(t[0]%360*Rt,t[1]*Rt,t.length>2?t[2]*Rt:0),e.invert=function(e){return(e=t.invert(e[0]*Rt,e[1]*Rt))[0]*=Dt,e[1]*=Dt,e},e},Di.invert=Ri,r.geo.circle=function(){var t,e,n=[0,0],i=6;function o(){var t="function"==typeof n?n.apply(this,arguments):n,i=ji(-t[0]*Rt,-t[1]*Rt,0).invert,o=[];return e(null,null,1,{point:function(t,e){o.push(t=i(t,e)),t[0]*=Dt,t[1]*=Dt}}),{type:"Polygon",coordinates:[o]}}return o.origin=function(t){return arguments.length?(n=t,o):n},o.angle=function(n){return arguments.length?(e=Fi((t=+n)*Rt,i*Rt),o):t},o.precision=function(n){return arguments.length?(e=Fi(t*Rt,(i=+n)*Rt),o):i},o.angle(90)},r.geo.distance=function(t,e){var n,i=(e[0]-t[0])*Rt,o=t[1]*Rt,r=e[1]*Rt,a=Math.sin(i),s=Math.cos(i),l=Math.sin(o),u=Math.cos(o),c=Math.sin(r),h=Math.cos(r);return Math.atan2(Math.sqrt((n=h*a)*n+(n=u*c-l*h*s)*n),l*c+u*h*s)},r.geo.graticule=function(){var t,e,n,i,o,a,s,l,u,c,h,d,f=10,p=f,g=90,m=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return r.range(Math.ceil(i/g)*g,n,g).map(h).concat(r.range(Math.ceil(l/m)*m,s,m).map(d)).concat(r.range(Math.ceil(e/f)*f,t,f).filter(function(t){return x(t%g)>Mt}).map(u)).concat(r.range(Math.ceil(a/p)*p,o,p).filter(function(t){return x(t%m)>Mt}).map(c))}return y.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(d(s).slice(1),h(n).reverse().slice(1),d(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.majorExtent(t).minorExtent(t):y.minorExtent()},y.majorExtent=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],i>n&&(t=i,i=n,n=t),l>s&&(t=l,l=s,s=t),y.precision(v)):[[i,l],[n,s]]},y.minorExtent=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],o=+n[1][1],e>t&&(n=e,e=t,t=n),a>o&&(n=a,a=o,o=n),y.precision(v)):[[e,a],[t,o]]},y.step=function(t){return arguments.length?y.majorStep(t).minorStep(t):y.minorStep()},y.majorStep=function(t){return arguments.length?(g=+t[0],m=+t[1],y):[g,m]},y.minorStep=function(t){return arguments.length?(f=+t[0],p=+t[1],y):[f,p]},y.precision=function(r){return arguments.length?(v=+r,u=Gi(a,o,90),c=Vi(e,t,v),h=Gi(l,s,90),d=Vi(i,n,v),y):v},y.majorExtent([[-180,-90+Mt],[180,90-Mt]]).minorExtent([[-180,-80-Mt],[180,80+Mt]])},r.geo.greatArc=function(){var t,e,n=Bi,i=Ui;function o(){return{type:"LineString",coordinates:[t||n.apply(this,arguments),e||i.apply(this,arguments)]}}return o.distance=function(){return r.geo.distance(t||n.apply(this,arguments),e||i.apply(this,arguments))},o.source=function(e){return arguments.length?(n=e,t="function"==typeof e?null:e,o):n},o.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,o):i},o.precision=function(){return arguments.length?o:0},o},r.geo.interpolate=function(t,e){return function(t,e,n,i){var o=Math.cos(e),r=Math.sin(e),a=Math.cos(i),s=Math.sin(i),l=o*Math.cos(t),u=o*Math.sin(t),c=a*Math.cos(n),h=a*Math.sin(n),d=2*Math.asin(Math.sqrt(Ht(i-e)+o*a*Ht(n-t))),f=1/Math.sin(d),p=d?function(t){var e=Math.sin(t*=d)*f,n=Math.sin(d-t)*f,i=n*l+e*c,o=n*u+e*h,a=n*r+e*s;return[Math.atan2(o,i)*Dt,Math.atan2(a,Math.sqrt(i*i+o*o))*Dt]}:function(){return[t*Dt,e*Dt]};return p.distance=d,p}(t[0]*Rt,t[1]*Rt,e[0]*Rt,e[1]*Rt)},r.geo.length=function(t){return _i=0,r.geo.stream(t,Wi),_i};var Wi={sphere:F,point:F,lineStart:function(){var t,e,n;function i(i,o){var r=Math.sin(o*=Rt),a=Math.cos(o),s=x((i*=Rt)-t),l=Math.cos(s);_i+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=n*r-e*a*l)*s),e*r+n*a*l),t=i,e=r,n=a}Wi.point=function(o,r){t=o*Rt,e=Math.sin(r*=Rt),n=Math.cos(r),Wi.point=i},Wi.lineEnd=function(){Wi.point=Wi.lineEnd=F}},lineEnd:F,polygonStart:F,polygonEnd:F};function qi(t,e){function n(e,n){var i=Math.cos(e),o=Math.cos(n),r=t(i*o);return[r*o*Math.sin(e),r*Math.sin(n)]}return n.invert=function(t,n){var i=Math.sqrt(t*t+n*n),o=e(i),r=Math.sin(o),a=Math.cos(o);return[Math.atan2(t*r,i*a),Math.asin(i&&n*r/i)]},n}var Yi=qi(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(r.geo.azimuthalEqualArea=function(){return Ai(Yi)}).raw=Yi;var Xi=qi(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},j);function Zi(t,e){var n=Math.cos(t),i=function(t){return Math.tan(Lt/4+t/2)},o=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(i(e)/i(t)),r=n*Math.pow(i(t),o)/o;if(!o)return $i;function a(t,e){r>0?e<-Ot+Mt&&(e=-Ot+Mt):e>Ot-Mt&&(e=Ot-Mt);var n=r/Math.pow(i(e),o);return[n*Math.sin(o*t),r-n*Math.cos(o*t)]}return a.invert=function(t,e){var n=r-e,i=jt(o)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/o,2*Math.atan(Math.pow(r/i,1/o))-Ot]},a}function Qi(t,e){var n=Math.cos(t),i=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),o=n/i+t;if(x(i)<Mt)return Ri;function r(t,e){var n=o-e;return[n*Math.sin(i*t),o-n*Math.cos(i*t)]}return r.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/i,o-jt(i)*Math.sqrt(t*t+n*n)]},r}(r.geo.azimuthalEquidistant=function(){return Ai(Xi)}).raw=Xi,(r.geo.conicConformal=function(){return ui(Zi)}).raw=Zi,(r.geo.conicEquidistant=function(){return ui(Qi)}).raw=Qi;var Ki=qi(function(t){return 1/t},Math.atan);function $i(t,e){return[t,Math.log(Math.tan(Lt/4+e/2))]}function Ji(t){var e,n=Ai(t),i=n.scale,o=n.translate,r=n.clipExtent;return n.scale=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=o.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var a=r.apply(n,arguments);if(a===n){if(e=null==t){var s=Lt*i(),l=o();r([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else e&&(a=null);return a},n.clipExtent(null)}(r.geo.gnomonic=function(){return Ai(Ki)}).raw=Ki,$i.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Ot]},(r.geo.mercator=function(){return Ji($i)}).raw=$i;var to=qi(function(){return 1},Math.asin);(r.geo.orthographic=function(){return Ai(to)}).raw=to;var eo=qi(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});function no(t,e){return[Math.log(Math.tan(Lt/4+e/2)),-t]}function io(t){return t[0]}function oo(t){return t[1]}function ro(t){for(var e=t.length,n=[0,1],i=2,o=2;o<e;o++){for(;i>1&&zt(t[n[i-2]],t[n[i-1]],t[o])<=0;)--i;n[i++]=o}return n.slice(0,i)}function ao(t,e){return t[0]-e[0]||t[1]-e[1]}(r.geo.stereographic=function(){return Ai(eo)}).raw=eo,no.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Ot]},(r.geo.transverseMercator=function(){var t=Ji(no),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90])}).raw=no,r.geom={},r.geom.hull=function(t){var e=io,n=oo;if(arguments.length)return i(t);function i(t){if(t.length<3)return[];var i,o=we(e),r=we(n),a=t.length,s=[],l=[];for(i=0;i<a;i++)s.push([+o.call(this,t[i],i),+r.call(this,t[i],i),i]);for(s.sort(ao),i=0;i<a;i++)l.push([s[i][0],-s[i][1]]);var u=ro(s),c=ro(l),h=c[0]===u[0],d=c[c.length-1]===u[u.length-1],f=[];for(i=u.length-1;i>=0;--i)f.push(t[s[u[i]][2]]);for(i=+h;i<c.length-d;++i)f.push(t[s[c[i]][2]]);return f}return i.x=function(t){return arguments.length?(e=t,i):e},i.y=function(t){return arguments.length?(n=t,i):n},i},r.geom.polygon=function(t){return q(t,so),t};var so=r.geom.polygon.prototype=[];function lo(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function uo(t,e,n,i){var o=t[0],r=n[0],a=e[0]-o,s=i[0]-r,l=t[1],u=n[1],c=e[1]-l,h=i[1]-u,d=(s*(l-u)-h*(o-r))/(h*a-s*c);return[o+d*a,l+d*c]}function co(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}so.area=function(){for(var t,e=-1,n=this.length,i=this[n-1],o=0;++e<n;)t=i,i=this[e],o+=t[1]*i[0]-t[0]*i[1];return.5*o},so.centroid=function(t){var e,n,i=-1,o=this.length,r=0,a=0,s=this[o-1];for(arguments.length||(t=-1/(6*this.area()));++i<o;)e=s,s=this[i],n=e[0]*s[1]-s[0]*e[1],r+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return[r*t,a*t]},so.clip=function(t){for(var e,n,i,o,r,a,s=co(t),l=-1,u=this.length-co(this),c=this[u-1];++l<u;){for(e=t.slice(),t.length=0,o=this[l],r=e[(i=e.length-s)-1],n=-1;++n<i;)lo(a=e[n],c,o)?(lo(r,c,o)||t.push(uo(r,a,c,o)),t.push(a)):lo(r,c,o)&&t.push(uo(r,a,c,o)),r=a;s&&t.push(t[0]),c=o}return t};var ho,fo,po,go,mo,vo=[],yo=[];function bo(t){var e=vo.pop()||new function(){zo(this),this.edge=this.site=this.circle=null};return e.site=t,e}function wo(t){Po(t),po.remove(t),vo.push(t),zo(t)}function _o(t){var e=t.circle,n=e.x,i=e.cy,o={x:n,y:i},r=t.P,a=t.N,s=[t];wo(t);for(var l=r;l.circle&&x(n-l.circle.x)<Mt&&x(i-l.circle.cy)<Mt;)r=l.P,s.unshift(l),wo(l),l=r;s.unshift(l),Po(l);for(var u=a;u.circle&&x(n-u.circle.x)<Mt&&x(i-u.circle.cy)<Mt;)a=u.N,s.push(u),wo(u),u=a;s.push(u),Po(u);var c,h=s.length;for(c=1;c<h;++c)u=s[c],l=s[c-1],Ro(u.edge,l.site,u.site,o);l=s[0],(u=s[h-1]).edge=ko(l.site,u.site,null,o),Mo(l),Mo(u)}function xo(t){for(var e,n,i,o,r=t.x,a=t.y,s=po._;s;)if((i=So(s,a)-r)>Mt)s=s.L;else{if(!((o=r-Eo(s,a))>Mt)){i>-Mt?(e=s.P,n=s):o>-Mt?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}var l=bo(t);if(po.insert(e,l),e||n){if(e===n)return Po(e),n=bo(e.site),po.insert(l,n),l.edge=n.edge=ko(e.site,l.site),Mo(e),void Mo(n);if(n){Po(e),Po(n);var u=e.site,c=u.x,h=u.y,d=t.x-c,f=t.y-h,p=n.site,g=p.x-c,m=p.y-h,v=2*(d*m-f*g),y=d*d+f*f,b=g*g+m*m,w={x:(m*y-f*b)/v+c,y:(d*b-g*y)/v+h};Ro(n.edge,u,p,w),l.edge=ko(u,t,null,w),n.edge=ko(t,p,null,w),Mo(e),Mo(n)}else l.edge=ko(e.site,l.site)}}function So(t,e){var n=t.site,i=n.x,o=n.y,r=o-e;if(!r)return i;var a=t.P;if(!a)return-1/0;var s=(n=a.site).x,l=n.y,u=l-e;if(!u)return s;var c=s-i,h=1/r-1/u,d=c/u;return h?(-d+Math.sqrt(d*d-2*h*(c*c/(-2*u)-l+u/2+o-r/2)))/h+i:(i+s)/2}function Eo(t,e){var n=t.N;if(n)return So(n,e);var i=t.site;return i.y===e?i.x:1/0}function Co(t){this.site=t,this.edges=[]}function To(t,e){return e.angle-t.angle}function Mo(t){var e=t.P,n=t.N;if(e&&n){var i=e.site,o=t.site,r=n.site;if(i!==r){var a=o.x,s=o.y,l=i.x-a,u=i.y-s,c=r.x-a,h=2*(l*(m=r.y-s)-u*c);if(!(h>=-Pt)){var d=l*l+u*u,f=c*c+m*m,p=(m*d-u*f)/h,g=(l*f-c*d)/h,m=g+s,v=yo.pop()||new function(){zo(this),this.x=this.y=this.arc=this.site=this.cy=null};v.arc=t,v.site=o,v.x=p+a,v.y=m+Math.sqrt(p*p+g*g),v.cy=m,t.circle=v;for(var y=null,b=mo._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}mo.insert(y,v),y||(go=v)}}}}function Po(t){var e=t.circle;e&&(e.P||(go=e.N),mo.remove(e),yo.push(e),zo(e),t.circle=null)}function Lo(t,e){var n=t.b;if(n)return!0;var i,o,r=t.a,a=e[0][0],s=e[1][0],l=e[0][1],u=e[1][1],c=t.l,h=t.r,d=c.x,f=c.y,p=h.x,g=h.y,m=(d+p)/2,v=(f+g)/2;if(g===f){if(m<a||m>=s)return;if(d>p){if(r){if(r.y>=u)return}else r={x:m,y:l};n={x:m,y:u}}else{if(r){if(r.y<l)return}else r={x:m,y:u};n={x:m,y:l}}}else if(o=v-(i=(d-p)/(g-f))*m,i<-1||i>1)if(d>p){if(r){if(r.y>=u)return}else r={x:(l-o)/i,y:l};n={x:(u-o)/i,y:u}}else{if(r){if(r.y<l)return}else r={x:(u-o)/i,y:u};n={x:(l-o)/i,y:l}}else if(f<g){if(r){if(r.x>=s)return}else r={x:a,y:i*a+o};n={x:s,y:i*s+o}}else{if(r){if(r.x<a)return}else r={x:s,y:i*s+o};n={x:a,y:i*a+o}}return t.a=r,t.b=n,!0}function Ao(t,e){this.l=t,this.r=e,this.a=this.b=null}function ko(t,e,n,i){var o=new Ao(t,e);return ho.push(o),n&&Ro(o,t,e,n),i&&Ro(o,e,t,i),fo[t.i].edges.push(new Do(o,t,e)),fo[e.i].edges.push(new Do(o,e,t)),o}function Oo(t,e,n){var i=new Ao(t,null);return i.a=e,i.b=n,ho.push(i),i}function Ro(t,e,n,i){t.a||t.b?t.l===n?t.b=i:t.a=i:(t.a=i,t.l=e,t.r=n)}function Do(t,e,n){var i=t.a,o=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(o.x-i.x,i.y-o.y):Math.atan2(i.x-o.x,o.y-i.y)}function jo(){this._=null}function zo(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function No(t,e){var n=e,i=e.R,o=n.U;o?o.L===n?o.L=i:o.R=i:t._=i,i.U=o,n.U=i,n.R=i.L,n.R&&(n.R.U=n),i.L=n}function Io(t,e){var n=e,i=e.L,o=n.U;o?o.L===n?o.L=i:o.R=i:t._=i,i.U=o,n.U=i,n.L=i.R,n.L&&(n.L.U=n),i.R=n}function Fo(t){for(;t.L;)t=t.L;return t}function Ho(t,e){var n,i,o,r=t.sort(Go).pop();for(ho=[],fo=new Array(t.length),po=new jo,mo=new jo;;)if(o=go,r&&(!o||r.y<o.y||r.y===o.y&&r.x<o.x))r.x===n&&r.y===i||(fo[r.i]=new Co(r),xo(r),n=r.x,i=r.y),r=t.pop();else{if(!o)break;_o(o.arc)}e&&(function(t){for(var e,n=ho,i=ai(t[0][0],t[0][1],t[1][0],t[1][1]),o=n.length;o--;)(!Lo(e=n[o],t)||!i(e)||x(e.a.x-e.b.x)<Mt&&x(e.a.y-e.b.y)<Mt)&&(e.a=e.b=null,n.splice(o,1))}(e),function(t){for(var e,n,i,o,r,a,s,l,u,c,h=t[0][0],d=t[1][0],f=t[0][1],p=t[1][1],g=fo,m=g.length;m--;)if((r=g[m])&&r.prepare())for(l=(s=r.edges).length,a=0;a<l;)i=(c=s[a].end()).x,o=c.y,e=(u=s[++a%l].start()).x,n=u.y,(x(i-e)>Mt||x(o-n)>Mt)&&(s.splice(a,0,new Do(Oo(r.site,c,x(i-h)<Mt&&p-o>Mt?{x:h,y:x(e-h)<Mt?n:p}:x(o-p)<Mt&&d-i>Mt?{x:x(n-p)<Mt?e:d,y:p}:x(i-d)<Mt&&o-f>Mt?{x:d,y:x(e-d)<Mt?n:f}:x(o-f)<Mt&&i-h>Mt?{x:x(n-f)<Mt?e:h,y:f}:null),r.site,null)),++l)}(e));var a={cells:fo,edges:ho};return po=mo=ho=fo=null,a}function Go(t,e){return e.y-t.y||e.x-t.x}Co.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)(t=e[n].edge).b&&t.a||e.splice(n,1);return e.sort(To),e.length},Do.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},jo.prototype={insert:function(t,e){var n,i,o;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Fo(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(i=n.U).L?(o=i.R)&&o.C?(n.C=o.C=!1,i.C=!0,t=i):(t===n.R&&(No(this,n),n=(t=n).U),n.C=!1,i.C=!0,Io(this,i)):(o=i.L)&&o.C?(n.C=o.C=!1,i.C=!0,t=i):(t===n.L&&(Io(this,n),n=(t=n).U),n.C=!1,i.C=!0,No(this,i)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,i,o=t.U,r=t.L,a=t.R;if(n=r?a?Fo(a):r:a,o?o.L===t?o.L=n:o.R=n:this._=n,r&&a?(i=n.C,n.C=t.C,n.L=r,r.U=n,n!==a?(o=n.U,n.U=t.U,t=n.R,o.L=t,n.R=a,a.U=n):(n.U=o,o=n,t=n.R)):(i=t.C,t=n),t&&(t.U=o),!i)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===o.L){if((e=o.R).C&&(e.C=!1,o.C=!0,No(this,o),e=o.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Io(this,e),e=o.R),e.C=o.C,o.C=e.R.C=!1,No(this,o),t=this._;break}}else if((e=o.L).C&&(e.C=!1,o.C=!0,Io(this,o),e=o.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,No(this,e),e=o.L),e.C=o.C,o.C=e.L.C=!1,Io(this,o),t=this._;break}e.C=!0,t=o,o=o.U}while(!t.C);t&&(t.C=!1)}}},r.geom.voronoi=function(t){var e=io,n=oo,i=e,o=n,r=Vo;if(t)return a(t);function a(t){var e=new Array(t.length),n=r[0][0],i=r[0][1],o=r[1][0],a=r[1][1];return Ho(s(t),r).cells.forEach(function(r,s){var l=r.edges,u=r.site;(e[s]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):u.x>=n&&u.x<=o&&u.y>=i&&u.y<=a?[[n,a],[o,a],[o,i],[n,i]]:[]).point=t[s]}),e}function s(t){return t.map(function(t,e){return{x:Math.round(i(t,e)/Mt)*Mt,y:Math.round(o(t,e)/Mt)*Mt,i:e}})}return a.links=function(t){return Ho(s(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},a.triangles=function(t){var e=[];return Ho(s(t)).cells.forEach(function(n,i){for(var o,r=n.site,a=n.edges.sort(To),s=-1,l=a.length,u=a[l-1].edge,c=u.l===r?u.r:u.l;++s<l;)u,o=c,c=(u=a[s].edge).l===r?u.r:u.l,i<o.i&&i<c.i&&Bo(r,o,c)<0&&e.push([t[i],t[o.i],t[c.i]])}),e},a.x=function(t){return arguments.length?(i=we(e=t),a):e},a.y=function(t){return arguments.length?(o=we(n=t),a):n},a.clipExtent=function(t){return arguments.length?(r=null==t?Vo:t,a):r===Vo?null:r},a.size=function(t){return arguments.length?a.clipExtent(t&&[[0,0],t]):r===Vo?null:r&&r[1]},a};var Vo=[[-1e6,-1e6],[1e6,1e6]];function Bo(t,e,n){return(t.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-t.y)}function Uo(t){return t.x}function Wo(t){return t.y}function qo(t,e){t=r.rgb(t),e=r.rgb(e);var n=t.r,i=t.g,o=t.b,a=e.r-n,s=e.g-i,l=e.b-o;return function(t){return"#"+fe(Math.round(n+a*t))+fe(Math.round(i+s*t))+fe(Math.round(o+l*t))}}function Yo(t,e){var n,i={},o={};for(n in t)n in e?i[n]=$o(t[n],e[n]):o[n]=t[n];for(n in e)n in t||(o[n]=e[n]);return function(t){for(n in i)o[n]=i[n](t);return o}}function Xo(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Zo(t,e){var n,i,o,r=Qo.lastIndex=Ko.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(n=Qo.exec(t))&&(i=Ko.exec(e));)(o=i.index)>r&&(o=e.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Xo(n,i)})),r=Ko.lastIndex;return r<e.length&&(o=e.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?(e=l[0].x,function(t){return e(t)+""}):function(){return e}:(e=l.length,function(t){for(var n,i=0;i<e;++i)s[(n=l[i]).i]=n.x(t);return s.join("")})}r.geom.delaunay=function(t){return r.geom.voronoi().triangles(t)},r.geom.quadtree=function(t,e,n,i,o){var r,a=io,s=oo;if(r=arguments.length)return a=Uo,s=Wo,3===r&&(o=n,i=e,n=e=0),l(t);function l(t){var l,u,c,h,d,f,p,g,m,v=we(a),y=we(s);if(null!=e)f=e,p=n,g=i,m=o;else if(g=m=-(f=p=1/0),u=[],c=[],d=t.length,r)for(h=0;h<d;++h)(l=t[h]).x<f&&(f=l.x),l.y<p&&(p=l.y),l.x>g&&(g=l.x),l.y>m&&(m=l.y),u.push(l.x),c.push(l.y);else for(h=0;h<d;++h){var b=+v(l=t[h],h),w=+y(l,h);b<f&&(f=b),w<p&&(p=w),b>g&&(g=b),w>m&&(m=w),u.push(b),c.push(w)}var _=g-f,S=m-p;function E(t,e,n,i,o,r,a,s){if(!isNaN(n)&&!isNaN(i))if(t.leaf){var l=t.x,u=t.y;if(null!=l)if(x(l-n)+x(u-i)<.01)C(t,e,n,i,o,r,a,s);else{var c=t.point;t.x=t.y=t.point=null,C(t,c,l,u,o,r,a,s),C(t,e,n,i,o,r,a,s)}else t.x=n,t.y=i,t.point=e}else C(t,e,n,i,o,r,a,s)}function C(t,e,n,i,o,r,a,s){var l=.5*(o+a),u=.5*(r+s),c=n>=l,h=i>=u,d=h<<1|c;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){E(T,t,+v(t,++h),+y(t,h),f,p,g,m)}}),c?o=l:a=l,h?r=u:s=u,E(t,e,n,i,o,r,a,s)}_>S?m=p+_:g=f+S;var T={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){E(T,t,+v(t,++h),+y(t,h),f,p,g,m)}};if(T.visit=function(t){!function t(e,n,i,o,r,a){if(!e(n,i,o,r,a)){var s=.5*(i+r),l=.5*(o+a),u=n.nodes;u[0]&&t(e,u[0],i,o,s,l),u[1]&&t(e,u[1],s,o,r,l),u[2]&&t(e,u[2],i,l,s,a),u[3]&&t(e,u[3],s,l,r,a)}}(t,T,f,p,g,m)},T.find=function(t){return function(t,e,n,i,o,r,a){var s,l=1/0;return function t(u,c,h,d,f){if(!(c>r||h>a||d<i||f<o)){if(p=u.point){var p,g=e-u.x,m=n-u.y,v=g*g+m*m;if(v<l){var y=Math.sqrt(l=v);i=e-y,o=n-y,r=e+y,a=n+y,s=p}}for(var b=u.nodes,w=.5*(c+d),_=.5*(h+f),x=(n>=_)<<1|e>=w,S=x+4;x<S;++x)if(u=b[3&x])switch(3&x){case 0:t(u,c,h,w,_);break;case 1:t(u,w,h,d,_);break;case 2:t(u,c,_,w,f);break;case 3:t(u,w,_,d,f)}}}(t,i,o,r,a),s}(T,t[0],t[1],f,p,g,m)},h=-1,null==e){for(;++h<d;)E(T,t[h],u[h],c[h],f,p,g,m);--h}else t.forEach(T.add);return u=c=t=l=null,T}return l.x=function(t){return arguments.length?(a=t,l):a},l.y=function(t){return arguments.length?(s=t,l):s},l.extent=function(t){return arguments.length?(null==t?e=n=i=o=null:(e=+t[0][0],n=+t[0][1],i=+t[1][0],o=+t[1][1]),l):null==e?null:[[e,n],[i,o]]},l.size=function(t){return arguments.length?(null==t?e=n=i=o=null:(e=n=0,i=+t[0],o=+t[1]),l):null==e?null:[i-e,o-n]},l},r.interpolateRgb=qo,r.interpolateObject=Yo,r.interpolateNumber=Xo,r.interpolateString=Zo;var Qo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ko=new RegExp(Qo.source,"g");function $o(t,e){for(var n,i=r.interpolators.length;--i>=0&&!(n=r.interpolators[i](t,e)););return n}function Jo(t,e){var n,i=[],o=[],r=t.length,a=e.length,s=Math.min(t.length,e.length);for(n=0;n<s;++n)i.push($o(t[n],e[n]));for(;n<r;++n)o[n]=t[n];for(;n<a;++n)o[n]=e[n];return function(t){for(n=0;n<s;++n)o[n]=i[n](t);return o}}r.interpolate=$o,r.interpolators=[function(t,e){var n=typeof e;return("string"===n?be.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?qo:Zo:e instanceof Wt?qo:Array.isArray(e)?Jo:"object"===n&&isNaN(e)?Yo:Xo)(t,e)}],r.interpolateArray=Jo;var tr=function(){return j},er=r.map({linear:tr,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return rr},cubic:function(){return ar},sin:function(){return lr},exp:function(){return ur},circle:function(){return cr},elastic:function(t,e){var n;arguments.length<2&&(e=.45);arguments.length?n=e/At*Math.asin(1/t):(t=1,n=e/4);return function(i){return 1+t*Math.pow(2,-10*i)*Math.sin((i-n)*At/e)}},back:function(t){t||(t=1.70158);return function(e){return e*e*((t+1)*e-t)}},bounce:function(){return hr}}),nr=r.map({in:j,out:ir,"in-out":or,"out-in":function(t){return or(ir(t))}});function ir(t){return function(e){return 1-t(1-e)}}function or(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function rr(t){return t*t}function ar(t){return t*t*t}function sr(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}function lr(t){return 1-Math.cos(t*Ot)}function ur(t){return Math.pow(2,10*(t-1))}function cr(t){return 1-Math.sqrt(1-t*t)}function hr(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function dr(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function fr(t){var e=[t.a,t.b],n=[t.c,t.d],i=gr(e),o=pr(e,n),r=gr(function(t,e,n){return t[0]+=n*e[0],t[1]+=n*e[1],t}(n,e,-o))||0;e[0]*n[1]<n[0]*e[1]&&(e[0]*=-1,e[1]*=-1,i*=-1,o*=-1),this.rotate=(i?Math.atan2(e[1],e[0]):Math.atan2(-n[0],n[1]))*Dt,this.translate=[t.e,t.f],this.scale=[i,r],this.skew=r?Math.atan2(o,r)*Dt:0}function pr(t,e){return t[0]*e[0]+t[1]*e[1]}function gr(t){var e=Math.sqrt(pr(t,t));return e&&(t[0]/=e,t[1]/=e),e}r.ease=function(t){var e=t.indexOf("-"),n=e>=0?t.slice(0,e):t,i=e>=0?t.slice(e+1):"in";return n=er.get(n)||tr,function(t){return function(e){return e<=0?0:e>=1?1:t(e)}}((i=nr.get(i)||j)(n.apply(null,a.call(arguments,1))))},r.interpolateHcl=function(t,e){t=r.hcl(t),e=r.hcl(e);var n=t.h,i=t.c,o=t.l,a=e.h-n,s=e.c-i,l=e.l-o;isNaN(s)&&(s=0,i=isNaN(i)?e.c:i);isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:a<-180&&(a+=360);return function(t){return Kt(n+a*t,i+s*t,o+l*t)+""}},r.interpolateHsl=function(t,e){t=r.hsl(t),e=r.hsl(e);var n=t.h,i=t.s,o=t.l,a=e.h-n,s=e.s-i,l=e.l-o;isNaN(s)&&(s=0,i=isNaN(i)?e.s:i);isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:a<-180&&(a+=360);return function(t){return Xt(n+a*t,i+s*t,o+l*t)+""}},r.interpolateLab=function(t,e){t=r.lab(t),e=r.lab(e);var n=t.l,i=t.a,o=t.b,a=e.l-n,s=e.a-i,l=e.b-o;return function(t){return oe(n+a*t,i+s*t,o+l*t)+""}},r.interpolateRound=dr,r.transform=function(t){var e=l.createElementNS(r.ns.prefix.svg,"g");return(r.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new fr(n?n.matrix:mr)})(t)},fr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var mr={a:1,b:0,c:0,d:1,e:0,f:0};function vr(t){return t.length?t.pop()+",":""}function yr(t,e){var n=[],i=[];return t=r.transform(t),e=r.transform(e),function(t,e,n,i){if(t[0]!==e[0]||t[1]!==e[1]){var o=n.push("translate(",null,",",null,")");i.push({i:o-4,x:Xo(t[0],e[0])},{i:o-2,x:Xo(t[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}(t.translate,e.translate,n,i),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(vr(n)+"rotate(",null,")")-2,x:Xo(t,e)})):e&&n.push(vr(n)+"rotate("+e+")")}(t.rotate,e.rotate,n,i),function(t,e,n,i){t!==e?i.push({i:n.push(vr(n)+"skewX(",null,")")-2,x:Xo(t,e)}):e&&n.push(vr(n)+"skewX("+e+")")}(t.skew,e.skew,n,i),function(t,e,n,i){if(t[0]!==e[0]||t[1]!==e[1]){var o=n.push(vr(n)+"scale(",null,",",null,")");i.push({i:o-4,x:Xo(t[0],e[0])},{i:o-2,x:Xo(t[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(vr(n)+"scale("+e+")")}(t.scale,e.scale,n,i),t=e=null,function(t){for(var e,o=-1,r=i.length;++o<r;)n[(e=i[o]).i]=e.x(t);return n.join("")}}function br(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function wr(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function _r(t){for(var e=t.source,n=t.target,i=function(t,e){if(t===e)return t;var n=xr(t),i=xr(e),o=n.pop(),r=i.pop(),a=null;for(;o===r;)a=o,o=n.pop(),r=i.pop();return a}(e,n),o=[e];e!==i;)e=e.parent,o.push(e);for(var r=o.length;n!==i;)o.splice(r,0,n),n=n.parent;return o}function xr(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function Sr(t){t.fixed|=2}function Er(t){t.fixed&=-7}function Cr(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Tr(t){t.fixed&=-5}r.interpolateTransform=yr,r.layout={},r.layout.bundle=function(){return function(t){for(var e=[],n=-1,i=t.length;++n<i;)e.push(_r(t[n]));return e}},r.layout.chord=function(){var t,e,n,i,o,a,s,l={},u=0;function c(){var l,c,d,f,p,g={},m=[],v=r.range(i),y=[];for(t=[],e=[],l=0,f=-1;++f<i;){for(c=0,p=-1;++p<i;)c+=n[f][p];m.push(c),y.push(r.range(i)),l+=c}for(o&&v.sort(function(t,e){return o(m[t],m[e])}),a&&y.forEach(function(t,e){t.sort(function(t,i){return a(n[e][t],n[e][i])})}),l=(At-u*i)/l,c=0,f=-1;++f<i;){for(d=c,p=-1;++p<i;){var b=v[f],w=y[b][p],_=n[b][w],x=c,S=c+=_*l;g[b+"-"+w]={index:b,subindex:w,startAngle:x,endAngle:S,value:_}}e[b]={index:b,startAngle:d,endAngle:c,value:m[b]},c+=u}for(f=-1;++f<i;)for(p=f-1;++p<i;){var E=g[f+"-"+p],C=g[p+"-"+f];(E.value||C.value)&&t.push(E.value<C.value?{source:C,target:E}:{source:E,target:C})}s&&h()}function h(){t.sort(function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}return l.matrix=function(o){return arguments.length?(i=(n=o)&&n.length,t=e=null,l):n},l.padding=function(n){return arguments.length?(u=n,t=e=null,l):u},l.sortGroups=function(n){return arguments.length?(o=n,t=e=null,l):o},l.sortSubgroups=function(e){return arguments.length?(a=e,t=null,l):a},l.sortChords=function(e){return arguments.length?(s=e,t&&h(),l):s},l.chords=function(){return t||c(),t},l.groups=function(){return e||c(),e},l},r.layout.force=function(){var t,e,n,i,o,a,s={},l=r.dispatch("start","tick","end"),u=[1,1],c=.9,h=Mr,d=Pr,f=-30,p=Lr,g=.1,m=.64,v=[],y=[];function b(t){return function(e,n,i,o){if(e.point!==t){var r=e.cx-t.x,a=e.cy-t.y,s=o-n,l=r*r+a*a;if(s*s/m<l){if(l<p){var u=e.charge/l;t.px-=r*u,t.py-=a*u}return!0}if(e.point&&l&&l<p){u=e.pointCharge/l;t.px-=r*u,t.py-=a*u}}return!e.charge}}function w(t){t.px=r.event.x,t.py=r.event.y,s.resume()}return s.tick=function(){if((n*=.99)<.005)return t=null,l.end({type:"end",alpha:n=0}),!0;var e,s,h,d,p,m,w,_,x,S=v.length,E=y.length;for(s=0;s<E;++s)d=(h=y[s]).source,(m=(_=(p=h.target).x-d.x)*_+(x=p.y-d.y)*x)&&(_*=m=n*o[s]*((m=Math.sqrt(m))-i[s])/m,x*=m,p.x-=_*(w=d.weight+p.weight?d.weight/(d.weight+p.weight):.5),p.y-=x*w,d.x+=_*(w=1-w),d.y+=x*w);if((w=n*g)&&(_=u[0]/2,x=u[1]/2,s=-1,w))for(;++s<S;)(h=v[s]).x+=(_-h.x)*w,h.y+=(x-h.y)*w;if(f)for(!function t(e,n,i){var o=0,r=0;e.charge=0;if(!e.leaf)for(var a,s=e.nodes,l=s.length,u=-1;++u<l;)null!=(a=s[u])&&(t(a,n,i),e.charge+=a.charge,o+=a.charge*a.cx,r+=a.charge*a.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var c=n*i[e.point.index];e.charge+=e.pointCharge=c,o+=c*e.point.x,r+=c*e.point.y}e.cx=o/e.charge;e.cy=r/e.charge}(e=r.geom.quadtree(v),n,a),s=-1;++s<S;)(h=v[s]).fixed||e.visit(b(h));for(s=-1;++s<S;)(h=v[s]).fixed?(h.x=h.px,h.y=h.py):(h.x-=(h.px-(h.px=h.x))*c,h.y-=(h.py-(h.py=h.y))*c);l.tick({type:"tick",alpha:n})},s.nodes=function(t){return arguments.length?(v=t,s):v},s.links=function(t){return arguments.length?(y=t,s):y},s.size=function(t){return arguments.length?(u=t,s):u},s.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,s):h},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(d="function"==typeof t?t:+t,s):d},s.friction=function(t){return arguments.length?(c=+t,s):c},s.charge=function(t){return arguments.length?(f="function"==typeof t?t:+t,s):f},s.chargeDistance=function(t){return arguments.length?(p=t*t,s):Math.sqrt(p)},s.gravity=function(t){return arguments.length?(g=+t,s):g},s.theta=function(t){return arguments.length?(m=t*t,s):Math.sqrt(m)},s.alpha=function(e){return arguments.length?(e=+e,n?e>0?n=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:n=0})):e>0&&(l.start({type:"start",alpha:n=e}),t=Pe(s.tick)),s):n},s.start=function(){var t,e,n,r=v.length,l=y.length,c=u[0],p=u[1];for(t=0;t<r;++t)(n=v[t]).index=t,n.weight=0;for(t=0;t<l;++t)"number"==typeof(n=y[t]).source&&(n.source=v[n.source]),"number"==typeof n.target&&(n.target=v[n.target]),++n.source.weight,++n.target.weight;for(t=0;t<r;++t)n=v[t],isNaN(n.x)&&(n.x=g("x",c)),isNaN(n.y)&&(n.y=g("y",p)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(i=[],"function"==typeof h)for(t=0;t<l;++t)i[t]=+h.call(this,y[t],t);else for(t=0;t<l;++t)i[t]=h;if(o=[],"function"==typeof d)for(t=0;t<l;++t)o[t]=+d.call(this,y[t],t);else for(t=0;t<l;++t)o[t]=d;if(a=[],"function"==typeof f)for(t=0;t<r;++t)a[t]=+f.call(this,v[t],t);else for(t=0;t<r;++t)a[t]=f;function g(n,i){if(!e){for(e=new Array(r),u=0;u<r;++u)e[u]=[];for(u=0;u<l;++u){var o=y[u];e[o.source.index].push(o.target),e[o.target.index].push(o.source)}}for(var a,s=e[t],u=-1,c=s.length;++u<c;)if(!isNaN(a=s[u][n]))return a;return Math.random()*i}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(e||(e=r.behavior.drag().origin(j).on("dragstart.force",Sr).on("drag.force",w).on("dragend.force",Er)),!arguments.length)return e;this.on("mouseover.force",Cr).on("mouseout.force",Tr).call(e)},r.rebind(s,l,"on")};var Mr=20,Pr=1,Lr=1/0;function Ar(t,e){return r.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=zr,t}function kr(t,e){for(var n=[t];null!=(t=n.pop());)if(e(t),(o=t.children)&&(i=o.length))for(var i,o;--i>=0;)n.push(o[i])}function Or(t,e){for(var n=[t],i=[];null!=(t=n.pop());)if(i.push(t),(r=t.children)&&(o=r.length))for(var o,r,a=-1;++a<o;)n.push(r[a]);for(;null!=(t=i.pop());)e(t)}function Rr(t){return t.children}function Dr(t){return t.value}function jr(t,e){return e.value-t.value}function zr(t){return r.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}r.layout.hierarchy=function(){var t=jr,e=Rr,n=Dr;function i(o){var r,a=[o],s=[];for(o.depth=0;null!=(r=a.pop());)if(s.push(r),(u=e.call(i,r,r.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)a.push(c=u[l]),c.parent=r,c.depth=r.depth+1;n&&(r.value=0),r.children=u}else n&&(r.value=+n.call(i,r,r.depth)||0),delete r.children;return Or(o,function(e){var i,o;t&&(i=e.children)&&i.sort(t),n&&(o=e.parent)&&(o.value+=e.value)}),s}return i.sort=function(e){return arguments.length?(t=e,i):t},i.children=function(t){return arguments.length?(e=t,i):e},i.value=function(t){return arguments.length?(n=t,i):n},i.revalue=function(t){return n&&(kr(t,function(t){t.children&&(t.value=0)}),Or(t,function(t){var e;t.children||(t.value=+n.call(i,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},i},r.layout.partition=function(){var t=r.layout.hierarchy(),e=[1,1];function n(n,i){var o=t.call(this,n,i);return function t(e,n,i,o){var r=e.children;if(e.x=n,e.y=e.depth*o,e.dx=i,e.dy=o,r&&(a=r.length)){var a,s,l,u=-1;for(i=e.value?i/e.value:0;++u<a;)t(s=r[u],n,l=s.value*i,o),n+=l}}(o[0],0,e[0],e[1]/function t(e){var n=e.children,i=0;if(n&&(o=n.length))for(var o,r=-1;++r<o;)i=Math.max(i,t(n[r]));return 1+i}(o[0])),o}return n.size=function(t){return arguments.length?(e=t,n):e},Ar(n,t)},r.layout.pie=function(){var t=Number,e=Nr,n=0,i=At,o=0;function a(s){var l,u=s.length,c=s.map(function(e,n){return+t.call(a,e,n)}),h=+("function"==typeof n?n.apply(this,arguments):n),d=("function"==typeof i?i.apply(this,arguments):i)-h,f=Math.min(Math.abs(d)/u,+("function"==typeof o?o.apply(this,arguments):o)),p=f*(d<0?-1:1),g=r.sum(c),m=g?(d-u*p)/g:0,v=r.range(u),y=[];return null!=e&&v.sort(e===Nr?function(t,e){return c[e]-c[t]}:function(t,n){return e(s[t],s[n])}),v.forEach(function(t){y[t]={data:s[t],value:l=c[t],startAngle:h,endAngle:h+=l*m+p,padAngle:f}}),y}return a.value=function(e){return arguments.length?(t=e,a):t},a.sort=function(t){return arguments.length?(e=t,a):e},a.startAngle=function(t){return arguments.length?(n=t,a):n},a.endAngle=function(t){return arguments.length?(i=t,a):i},a.padAngle=function(t){return arguments.length?(o=t,a):o},a};var Nr={};function Ir(t){return t.x}function Fr(t){return t.y}function Hr(t,e,n){t.y0=e,t.y=n}r.layout.stack=function(){var t=j,e=Br,n=Ur,i=Hr,o=Ir,a=Fr;function s(l,u){if(!(f=l.length))return l;var c=l.map(function(e,n){return t.call(s,e,n)}),h=c.map(function(t){return t.map(function(t,e){return[o.call(s,t,e),a.call(s,t,e)]})}),d=e.call(s,h,u);c=r.permute(c,d),h=r.permute(h,d);var f,p,g,m,v=n.call(s,h,u),y=c[0].length;for(g=0;g<y;++g)for(i.call(s,c[0][g],m=v[g],h[0][g][1]),p=1;p<f;++p)i.call(s,c[p][g],m+=h[p-1][g][1],h[p][g][1]);return l}return s.values=function(e){return arguments.length?(t=e,s):t},s.order=function(t){return arguments.length?(e="function"==typeof t?t:Gr.get(t)||Br,s):e},s.offset=function(t){return arguments.length?(n="function"==typeof t?t:Vr.get(t)||Ur,s):n},s.x=function(t){return arguments.length?(o=t,s):o},s.y=function(t){return arguments.length?(a=t,s):a},s.out=function(t){return arguments.length?(i=t,s):i},s};var Gr=r.map({"inside-out":function(t){var e,n,i=t.length,o=t.map(Wr),a=t.map(qr),s=r.range(i).sort(function(t,e){return o[t]-o[e]}),l=0,u=0,c=[],h=[];for(e=0;e<i;++e)n=s[e],l<u?(l+=a[n],c.push(n)):(u+=a[n],h.push(n));return h.reverse().concat(c)},reverse:function(t){return r.range(t.length).reverse()},default:Br}),Vr=r.map({silhouette:function(t){var e,n,i,o=t.length,r=t[0].length,a=[],s=0,l=[];for(n=0;n<r;++n){for(e=0,i=0;e<o;e++)i+=t[e][n][1];i>s&&(s=i),a.push(i)}for(n=0;n<r;++n)l[n]=(s-a[n])/2;return l},wiggle:function(t){var e,n,i,o,r,a,s,l,u,c=t.length,h=t[0],d=h.length,f=[];for(f[0]=l=u=0,n=1;n<d;++n){for(e=0,o=0;e<c;++e)o+=t[e][n][1];for(e=0,r=0,s=h[n][0]-h[n-1][0];e<c;++e){for(i=0,a=(t[e][n][1]-t[e][n-1][1])/(2*s);i<e;++i)a+=(t[i][n][1]-t[i][n-1][1])/s;r+=a*t[e][n][1]}f[n]=l-=o?r/o*s:0,l<u&&(u=l)}for(n=0;n<d;++n)f[n]-=u;return f},expand:function(t){var e,n,i,o=t.length,r=t[0].length,a=1/o,s=[];for(n=0;n<r;++n){for(e=0,i=0;e<o;e++)i+=t[e][n][1];if(i)for(e=0;e<o;e++)t[e][n][1]/=i;else for(e=0;e<o;e++)t[e][n][1]=a}for(n=0;n<r;++n)s[n]=0;return s},zero:Ur});function Br(t){return r.range(t.length)}function Ur(t){for(var e=-1,n=t[0].length,i=[];++e<n;)i[e]=0;return i}function Wr(t){for(var e,n=1,i=0,o=t[0][1],r=t.length;n<r;++n)(e=t[n][1])>o&&(i=n,o=e);return i}function qr(t){return t.reduce(Yr,0)}function Yr(t,e){return t+e[1]}function Xr(t,e){return Zr(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Zr(t,e){for(var n=-1,i=+t[0],o=(t[1]-i)/e,r=[];++n<=e;)r[n]=o*n+i;return r}function Qr(t){return[r.min(t),r.max(t)]}function Kr(t,e){return t.value-e.value}function $r(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Jr(t,e){t._pack_next=e,e._pack_prev=t}function ta(t,e){var n=e.x-t.x,i=e.y-t.y,o=t.r+e.r;return.999*o*o>n*n+i*i}function ea(t){if((e=t.children)&&(l=e.length)){var e,n,i,o,r,a,s,l,u=1/0,c=-1/0,h=1/0,d=-1/0;if(e.forEach(na),(n=e[0]).x=-n.r,n.y=0,b(n),l>1&&((i=e[1]).x=i.r,i.y=0,b(i),l>2))for(oa(n,i,o=e[2]),b(o),$r(n,o),n._pack_prev=o,$r(o,i),i=n._pack_next,r=3;r<l;r++){oa(n,i,o=e[r]);var f=0,p=1,g=1;for(a=i._pack_next;a!==i;a=a._pack_next,p++)if(ta(a,o)){f=1;break}if(1==f)for(s=n._pack_prev;s!==a._pack_prev&&!ta(s,o);s=s._pack_prev,g++);f?(p<g||p==g&&i.r<n.r?Jr(n,i=a):Jr(n=s,i),r--):($r(n,o),i=o,b(o))}var m=(u+c)/2,v=(h+d)/2,y=0;for(r=0;r<l;r++)(o=e[r]).x-=m,o.y-=v,y=Math.max(y,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=y,e.forEach(ia)}function b(t){u=Math.min(t.x-t.r,u),c=Math.max(t.x+t.r,c),h=Math.min(t.y-t.r,h),d=Math.max(t.y+t.r,d)}}function na(t){t._pack_next=t._pack_prev=t}function ia(t){delete t._pack_next,delete t._pack_prev}function oa(t,e,n){var i=t.r+n.r,o=e.x-t.x,r=e.y-t.y;if(i&&(o||r)){var a=e.r+n.r,s=o*o+r*r,l=.5+((i*=i)-(a*=a))/(2*s),u=Math.sqrt(Math.max(0,2*a*(i+s)-(i-=s)*i-a*a))/(2*s);n.x=t.x+l*o+u*r,n.y=t.y+l*r-u*o}else n.x=t.x+i,n.y=t.y}function ra(t,e){return t.parent==e.parent?1:2}function aa(t){var e=t.children;return e.length?e[0]:t.t}function sa(t){var e,n=t.children;return(e=n.length)?n[e-1]:t.t}function la(t,e,n){var i=n/(e.i-t.i);e.c-=i,e.s+=n,t.c+=i,e.z+=n,e.m+=n}function ua(t,e,n){return t.a.parent===e.parent?t.a:n}function ca(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function ha(t,e){var n=t.x+e[3],i=t.y+e[0],o=t.dx-e[1]-e[3],r=t.dy-e[0]-e[2];return o<0&&(n+=o/2,o=0),r<0&&(i+=r/2,r=0),{x:n,y:i,dx:o,dy:r}}function da(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]}function fa(t){return t.rangeExtent?t.rangeExtent():da(t.range())}function pa(t,e,n,i){var o=n(t[0],t[1]),r=i(e[0],e[1]);return function(t){return r(o(t))}}function ga(t,e){var n,i=0,o=t.length-1,r=t[i],a=t[o];return a<r&&(n=i,i=o,o=n,n=r,r=a,a=n),t[i]=e.floor(r),t[o]=e.ceil(a),t}function ma(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:va}r.layout.histogram=function(){var t=!0,e=Number,n=Qr,i=Xr;function o(o,a){for(var s,l,u=[],c=o.map(e,this),h=n.call(this,c,a),d=i.call(this,h,c,a),f=(a=-1,c.length),p=d.length-1,g=t?1:1/f;++a<p;)(s=u[a]=[]).dx=d[a+1]-(s.x=d[a]),s.y=0;if(p>0)for(a=-1;++a<f;)(l=c[a])>=h[0]&&l<=h[1]&&((s=u[r.bisect(d,l,1,p)-1]).y+=g,s.push(o[a]));return u}return o.value=function(t){return arguments.length?(e=t,o):e},o.range=function(t){return arguments.length?(n=we(t),o):n},o.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return Zr(e,t)}:we(t),o):i},o.frequency=function(e){return arguments.length?(t=!!e,o):t},o},r.layout.pack=function(){var t,e=r.layout.hierarchy().sort(Kr),n=0,i=[1,1];function o(o,r){var a=e.call(this,o,r),s=a[0],l=i[0],u=i[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,Or(s,function(t){t.r=+c(t.value)}),Or(s,ea),n){var h=n*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;Or(s,function(t){t.r+=h}),Or(s,ea),Or(s,function(t){t.r-=h})}return function t(e,n,i,o){var r=e.children;e.x=n+=o*e.x;e.y=i+=o*e.y;e.r*=o;if(r)for(var a=-1,s=r.length;++a<s;)t(r[a],n,i,o)}(s,l/2,u/2,t?1:1/Math.max(2*s.r/l,2*s.r/u)),a}return o.size=function(t){return arguments.length?(i=t,o):i},o.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,o):t},o.padding=function(t){return arguments.length?(n=+t,o):n},Ar(o,e)},r.layout.tree=function(){var t=r.layout.hierarchy().sort(null).value(null),e=ra,n=[1,1],i=null;function o(o,r){var u=t.call(this,o,r),c=u[0],h=function(t){var e,n={A:null,children:[t]},i=[n];for(;null!=(e=i.pop());)for(var o,r=e.children,a=0,s=r.length;a<s;++a)i.push((r[a]=o={_:r[a],parent:e,children:(o=r[a].children)&&o.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=o);return n.children[0]}(c);if(Or(h,a),h.parent.m=-h.z,kr(h,s),i)kr(c,l);else{var d=c,f=c,p=c;kr(c,function(t){t.x<d.x&&(d=t),t.x>f.x&&(f=t),t.depth>p.depth&&(p=t)});var g=e(d,f)/2-d.x,m=n[0]/(f.x+e(f,d)/2+g),v=n[1]/(p.depth||1);kr(c,function(t){t.x=(t.x+g)*m,t.y=t.depth*v})}return u}function a(t){var n=t.children,i=t.parent.children,o=t.i?i[t.i-1]:null;if(n.length){!function(t){var e,n=0,i=0,o=t.children,r=o.length;for(;--r>=0;)(e=o[r]).z+=n,e.m+=n,n+=e.s+(i+=e.c)}(t);var r=(n[0].z+n[n.length-1].z)/2;o?(t.z=o.z+e(t._,o._),t.m=t.z-r):t.z=r}else o&&(t.z=o.z+e(t._,o._));t.parent.A=function(t,n,i){if(n){for(var o,r=t,a=t,s=n,l=r.parent.children[0],u=r.m,c=a.m,h=s.m,d=l.m;s=sa(s),r=aa(r),s&&r;)l=aa(l),(a=sa(a)).a=t,(o=s.z+h-r.z-u+e(s._,r._))>0&&(la(ua(s,t,i),t,o),u+=o,c+=o),h+=s.m,u+=r.m,d+=l.m,c+=a.m;s&&!sa(a)&&(a.t=s,a.m+=h-c),r&&!aa(l)&&(l.t=r,l.m+=u-d,i=t)}return i}(t,o,t.parent.A||i[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(t){return arguments.length?(i=null==(n=t)?l:null,o):i?null:n},o.nodeSize=function(t){return arguments.length?(i=null==(n=t)?null:l,o):i?n:null},Ar(o,t)},r.layout.cluster=function(){var t=r.layout.hierarchy().sort(null).value(null),e=ra,n=[1,1],i=!1;function o(o,a){var s,l=t.call(this,o,a),u=l[0],c=0;Or(u,function(t){var n=t.children;n&&n.length?(t.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(n),t.y=function(t){return 1+r.max(t,function(t){return t.y})}(n)):(t.x=s?c+=e(t,s):0,t.y=0,s=t)});var h=function t(e){var n=e.children;return n&&n.length?t(n[0]):e}(u),d=function t(e){var n,i=e.children;return i&&(n=i.length)?t(i[n-1]):e}(u),f=h.x-e(h,d)/2,p=d.x+e(d,h)/2;return Or(u,i?function(t){t.x=(t.x-u.x)*n[0],t.y=(u.y-t.y)*n[1]}:function(t){t.x=(t.x-f)/(p-f)*n[0],t.y=(1-(u.y?t.y/u.y:1))*n[1]}),l}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(t){return arguments.length?(i=null==(n=t),o):i?null:n},o.nodeSize=function(t){return arguments.length?(i=null!=(n=t),o):i?n:null},Ar(o,t)},r.layout.treemap=function(){var t,e=r.layout.hierarchy(),n=Math.round,i=[1,1],o=null,a=ca,s=!1,l="squarify",u=.5*(1+Math.sqrt(5));function c(t,e){for(var n,i,o=-1,r=t.length;++o<r;)i=(n=t[o]).value*(e<0?0:e),n.area=isNaN(i)||i<=0?0:i}function h(t){var e=t.children;if(e&&e.length){var n,i,o,r=a(t),s=[],u=e.slice(),d=1/0,g="slice"===l?r.dx:"dice"===l?r.dy:"slice-dice"===l?1&t.depth?r.dy:r.dx:Math.min(r.dx,r.dy);for(c(u,r.dx*r.dy/t.value),s.area=0;(o=u.length)>0;)s.push(n=u[o-1]),s.area+=n.area,"squarify"!==l||(i=f(s,g))<=d?(u.pop(),d=i):(s.area-=s.pop().area,p(s,g,r,!1),g=Math.min(r.dx,r.dy),s.length=s.area=0,d=1/0);s.length&&(p(s,g,r,!0),s.length=s.area=0),e.forEach(h)}}function d(t){var e=t.children;if(e&&e.length){var n,i=a(t),o=e.slice(),r=[];for(c(o,i.dx*i.dy/t.value),r.area=0;n=o.pop();)r.push(n),r.area+=n.area,null!=n.z&&(p(r,n.z?i.dx:i.dy,i,!o.length),r.length=r.area=0);e.forEach(d)}}function f(t,e){for(var n,i=t.area,o=0,r=1/0,a=-1,s=t.length;++a<s;)(n=t[a].area)&&(n<r&&(r=n),n>o&&(o=n));return e*=e,(i*=i)?Math.max(e*o*u/i,i/(e*r*u)):1/0}function p(t,e,i,o){var r,a=-1,s=t.length,l=i.x,u=i.y,c=e?n(t.area/e):0;if(e==i.dx){for((o||c>i.dy)&&(c=i.dy);++a<s;)(r=t[a]).x=l,r.y=u,r.dy=c,l+=r.dx=Math.min(i.x+i.dx-l,c?n(r.area/c):0);r.z=!0,r.dx+=i.x+i.dx-l,i.y+=c,i.dy-=c}else{for((o||c>i.dx)&&(c=i.dx);++a<s;)(r=t[a]).x=l,r.y=u,r.dx=c,u+=r.dy=Math.min(i.y+i.dy-u,c?n(r.area/c):0);r.z=!1,r.dy+=i.y+i.dy-u,i.x+=c,i.dx-=c}}function g(n){var o=t||e(n),r=o[0];return r.x=r.y=0,r.value?(r.dx=i[0],r.dy=i[1]):r.dx=r.dy=0,t&&e.revalue(r),c([r],r.dx*r.dy/r.value),(t?d:h)(r),s&&(t=o),o}return g.size=function(t){return arguments.length?(i=t,g):i},g.padding=function(t){if(!arguments.length)return o;function e(e){return ha(e,t)}var n;return a=null==(o=t)?ca:"function"==(n=typeof t)?function(e){var n=t.call(g,e,e.depth);return null==n?ca(e):ha(e,"number"==typeof n?[n,n,n,n]:n)}:"number"===n?(t=[t,t,t,t],e):e,g},g.round=function(t){return arguments.length?(n=t?Math.round:Number,g):n!=Number},g.sticky=function(e){return arguments.length?(s=e,t=null,g):s},g.ratio=function(t){return arguments.length?(u=t,g):u},g.mode=function(t){return arguments.length?(l=t+"",g):l},Ar(g,e)},r.random={normal:function(t,e){var n=arguments.length;return n<2&&(e=1),n<1&&(t=0),function(){var n,i,o;do{o=(n=2*Math.random()-1)*n+(i=2*Math.random()-1)*i}while(!o||o>1);return t+e*n*Math.sqrt(-2*Math.log(o)/o)}},logNormal:function(){var t=r.random.normal.apply(r,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=r.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;n<t;n++)e+=Math.random();return e}}},r.scale={};var va={floor:j,ceil:j};function ya(t,e,n,i){var o=[],a=[],s=0,l=Math.min(t.length,e.length)-1;for(t[l]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<=l;)o.push(n(t[s-1],t[s])),a.push(i(e[s-1],e[s]));return function(e){var n=r.bisect(t,e,1,l)-1;return a[n](o[n](e))}}function ba(t,e){return r.rebind(t,e,"range","rangeRound","interpolate","clamp")}function wa(t,e){return ga(t,ma(_a(t,e)[2])),ga(t,ma(_a(t,e)[2])),t}function _a(t,e){null==e&&(e=10);var n=da(t),i=n[1]-n[0],o=Math.pow(10,Math.floor(Math.log(i/e)/Math.LN10)),r=e/i*o;return r<=.15?o*=10:r<=.35?o*=5:r<=.75&&(o*=2),n[0]=Math.ceil(n[0]/o)*o,n[1]=Math.floor(n[1]/o)*o+.5*o,n[2]=o,n}function xa(t,e){return r.range.apply(r,_a(t,e))}function Sa(t,e,n){var i=_a(t,e);if(n){var o=De.exec(n);if(o.shift(),"s"===o[8]){var a=r.formatPrefix(Math.max(x(i[0]),x(i[1])));return o[7]||(o[7]="."+Ca(a.scale(i[2]))),o[8]="f",n=r.format(o.join("")),function(t){return n(a.scale(t))+a.symbol}}o[7]||(o[7]="."+function(t,e){var n=Ca(e[2]);return t in Ea?Math.abs(n-Ca(Math.max(x(e[0]),x(e[1]))))+ +("e"!==t):n-2*("%"===t)}(o[8],i)),n=o.join("")}else n=",."+Ca(i[2])+"f";return r.format(n)}r.scale.linear=function(){return function t(e,n,i,o){var r,a;function s(){var t=Math.min(e.length,n.length)>2?ya:pa,s=o?wr:br;return r=t(e,n,s,i),a=t(n,e,s,$o),l}function l(t){return r(t)}l.invert=function(t){return a(t)};l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e};l.range=function(t){return arguments.length?(n=t,s()):n};l.rangeRound=function(t){return l.range(t).interpolate(dr)};l.clamp=function(t){return arguments.length?(o=t,s()):o};l.interpolate=function(t){return arguments.length?(i=t,s()):i};l.ticks=function(t){return xa(e,t)};l.tickFormat=function(t,n){return Sa(e,t,n)};l.nice=function(t){return wa(e,t),s()};l.copy=function(){return t(e,n,i,o)};return s()}([0,1],[0,1],$o,!1)};var Ea={s:1,g:1,p:1,r:1,e:1};function Ca(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}r.scale.log=function(){return function t(e,n,i,o){function a(t){return(i?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function s(t){return i?Math.pow(n,t):-Math.pow(n,-t)}function l(t){return e(a(t))}l.invert=function(t){return s(e.invert(t))};l.domain=function(t){return arguments.length?(i=t[0]>=0,e.domain((o=t.map(Number)).map(a)),l):o};l.base=function(t){return arguments.length?(n=+t,e.domain(o.map(a)),l):n};l.nice=function(){var t=ga(o.map(a),i?Math:Ma);return e.domain(t),o=t.map(s),l};l.ticks=function(){var t=da(o),e=[],r=t[0],l=t[1],u=Math.floor(a(r)),c=Math.ceil(a(l)),h=n%1?2:n;if(isFinite(c-u)){if(i){for(;u<c;u++)for(var d=1;d<h;d++)e.push(s(u)*d);e.push(s(u))}else for(e.push(s(u));u++<c;)for(var d=h-1;d>0;d--)e.push(s(u)*d);for(u=0;e[u]<r;u++);for(c=e.length;e[c-1]>l;c--);e=e.slice(u,c)}return e};l.tickFormat=function(t,e){if(!arguments.length)return Ta;arguments.length<2?e=Ta:"function"!=typeof e&&(e=r.format(e));var i=Math.max(1,n*t/l.ticks().length);return function(t){var o=t/s(Math.round(a(t)));return o*n<n-.5&&(o*=n),o<=i?e(t):""}};l.copy=function(){return t(e.copy(),n,i,o)};return ba(l,e)}(r.scale.linear().domain([0,1]),10,!0,[1,10])};var Ta=r.format(".0e"),Ma={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function Pa(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}r.scale.pow=function(){return function t(e,n,i){var o=Pa(n),r=Pa(1/n);function a(t){return e(o(t))}a.invert=function(t){return r(e.invert(t))};a.domain=function(t){return arguments.length?(e.domain((i=t.map(Number)).map(o)),a):i};a.ticks=function(t){return xa(i,t)};a.tickFormat=function(t,e){return Sa(i,t,e)};a.nice=function(t){return a.domain(wa(i,t))};a.exponent=function(t){return arguments.length?(o=Pa(n=t),r=Pa(1/n),e.domain(i.map(o)),a):n};a.copy=function(){return t(e.copy(),n,i)};return ba(a,e)}(r.scale.linear(),1,[0,1])},r.scale.sqrt=function(){return r.scale.pow().exponent(.5)},r.scale.ordinal=function(){return function t(e,n){var i,o,a;function s(t){return o[((i.get(t)||("range"===n.t?i.set(t,e.push(t)):NaN))-1)%o.length]}function l(t,n){return r.range(e.length).map(function(e){return t+n*e})}s.domain=function(t){if(!arguments.length)return e;e=[],i=new E;for(var o,r=-1,a=t.length;++r<a;)i.has(o=t[r])||i.set(o,e.push(o));return s[n.t].apply(s,n.a)};s.range=function(t){return arguments.length?(o=t,a=0,n={t:"range",a:arguments},s):o};s.rangePoints=function(t,i){arguments.length<2&&(i=0);var r=t[0],u=t[1],c=e.length<2?(r=(r+u)/2,0):(u-r)/(e.length-1+i);return o=l(r+c*i/2,c),a=0,n={t:"rangePoints",a:arguments},s};s.rangeRoundPoints=function(t,i){arguments.length<2&&(i=0);var r=t[0],u=t[1],c=e.length<2?(r=u=Math.round((r+u)/2),0):(u-r)/(e.length-1+i)|0;return o=l(r+Math.round(c*i/2+(u-r-(e.length-1+i)*c)/2),c),a=0,n={t:"rangeRoundPoints",a:arguments},s};s.rangeBands=function(t,i,r){arguments.length<2&&(i=0),arguments.length<3&&(r=i);var u=t[1]<t[0],c=t[u-0],h=t[1-u],d=(h-c)/(e.length-i+2*r);return o=l(c+d*r,d),u&&o.reverse(),a=d*(1-i),n={t:"rangeBands",a:arguments},s};s.rangeRoundBands=function(t,i,r){arguments.length<2&&(i=0),arguments.length<3&&(r=i);var u=t[1]<t[0],c=t[u-0],h=t[1-u],d=Math.floor((h-c)/(e.length-i+2*r));return o=l(c+Math.round((h-c-(e.length-i)*d)/2),d),u&&o.reverse(),a=Math.round(d*(1-i)),n={t:"rangeRoundBands",a:arguments},s};s.rangeBand=function(){return a};s.rangeExtent=function(){return da(n.a[0])};s.copy=function(){return t(e,n)};return s.domain(e)}([],{t:"range",a:[[]]})},r.scale.category10=function(){return r.scale.ordinal().range(La)},r.scale.category20=function(){return r.scale.ordinal().range(Aa)},r.scale.category20b=function(){return r.scale.ordinal().range(ka)},r.scale.category20c=function(){return r.scale.ordinal().range(Oa)};var La=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(he),Aa=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(he),ka=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(he),Oa=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(he);function Ra(){return 0}r.scale.quantile=function(){return function t(e,n){var i;function o(){var t=0,o=n.length;for(i=[];++t<o;)i[t-1]=r.quantile(e,t/o);return a}function a(t){if(!isNaN(t=+t))return n[r.bisect(i,t)]}a.domain=function(t){return arguments.length?(e=t.map(v).filter(y).sort(m),o()):e};a.range=function(t){return arguments.length?(n=t,o()):n};a.quantiles=function(){return i};a.invertExtent=function(t){return(t=n.indexOf(t))<0?[NaN,NaN]:[t>0?i[t-1]:e[0],t<i.length?i[t]:e[e.length-1]]};a.copy=function(){return t(e,n)};return o()}([],[])},r.scale.quantize=function(){return function t(e,n,i){var o,r;function a(t){return i[Math.max(0,Math.min(r,Math.floor(o*(t-e))))]}function s(){return o=i.length/(n-e),r=i.length-1,a}a.domain=function(t){return arguments.length?(e=+t[0],n=+t[t.length-1],s()):[e,n]};a.range=function(t){return arguments.length?(i=t,s()):i};a.invertExtent=function(t){return[t=(t=i.indexOf(t))<0?NaN:t/o+e,t+1/o]};a.copy=function(){return t(e,n,i)};return s()}(0,1,[0,1])},r.scale.threshold=function(){return function t(e,n){function i(t){if(t<=t)return n[r.bisect(e,t)]}i.domain=function(t){return arguments.length?(e=t,i):e};i.range=function(t){return arguments.length?(n=t,i):n};i.invertExtent=function(t){return t=n.indexOf(t),[e[t-1],e[t]]};i.copy=function(){return t(e,n)};return i}([.5],[0,1])},r.scale.identity=function(){return function t(e){function n(t){return+t}n.invert=n;n.domain=n.range=function(t){return arguments.length?(e=t.map(n),n):e};n.ticks=function(t){return xa(e,t)};n.tickFormat=function(t,n){return Sa(e,t,n)};n.copy=function(){return t(e)};return n}([0,1])},r.svg={},r.svg.arc=function(){var t=ja,e=za,n=Ra,i=Da,o=Na,r=Ia,a=Fa;function s(){var s=Math.max(0,+t.apply(this,arguments)),u=Math.max(0,+e.apply(this,arguments)),c=o.apply(this,arguments)-Ot,h=r.apply(this,arguments)-Ot,d=Math.abs(h-c),f=c>h?0:1;if(u<s&&(p=u,u=s,s=p),d>=kt)return l(u,f)+(s?l(s,1-f):"")+"Z";var p,g,m,v,y,b,w,_,x,S,E,C,T=0,M=0,P=[];if((v=(+a.apply(this,arguments)||0)/2)&&(m=i===Da?Math.sqrt(s*s+u*u):+i.apply(this,arguments),f||(M*=-1),u&&(M=It(m/u*Math.sin(v))),s&&(T=It(m/s*Math.sin(v)))),u){y=u*Math.cos(c+M),b=u*Math.sin(c+M),w=u*Math.cos(h-M),_=u*Math.sin(h-M);var L=Math.abs(h-c-2*M)<=Lt?0:1;if(M&&Ha(y,b,w,_)===f^L){var A=(c+h)/2;y=u*Math.cos(A),b=u*Math.sin(A),w=_=null}}else y=b=0;if(s){x=s*Math.cos(h-T),S=s*Math.sin(h-T),E=s*Math.cos(c+T),C=s*Math.sin(c+T);var k=Math.abs(c-h+2*T)<=Lt?0:1;if(T&&Ha(x,S,E,C)===1-f^k){var O=(c+h)/2;x=s*Math.cos(O),S=s*Math.sin(O),E=C=null}}else x=S=0;if(d>Mt&&(p=Math.min(Math.abs(u-s)/2,+n.apply(this,arguments)))>.001){g=s<u^f?0:1;var R=p,D=p;if(d<Lt){var j=null==E?[x,S]:null==w?[y,b]:uo([y,b],[E,C],[w,_],[x,S]),z=y-j[0],N=b-j[1],I=w-j[0],F=_-j[1],H=1/Math.sin(Math.acos((z*I+N*F)/(Math.sqrt(z*z+N*N)*Math.sqrt(I*I+F*F)))/2),G=Math.sqrt(j[0]*j[0]+j[1]*j[1]);D=Math.min(p,(s-G)/(H-1)),R=Math.min(p,(u-G)/(H+1))}if(null!=w){var V=Ga(null==E?[x,S]:[E,C],[y,b],u,R,f),B=Ga([w,_],[x,S],u,R,f);p===R?P.push("M",V[0],"A",R,",",R," 0 0,",g," ",V[1],"A",u,",",u," 0 ",1-f^Ha(V[1][0],V[1][1],B[1][0],B[1][1]),",",f," ",B[1],"A",R,",",R," 0 0,",g," ",B[0]):P.push("M",V[0],"A",R,",",R," 0 1,",g," ",B[0])}else P.push("M",y,",",b);if(null!=E){var U=Ga([y,b],[E,C],s,-D,f),W=Ga([x,S],null==w?[y,b]:[w,_],s,-D,f);p===D?P.push("L",W[0],"A",D,",",D," 0 0,",g," ",W[1],"A",s,",",s," 0 ",f^Ha(W[1][0],W[1][1],U[1][0],U[1][1]),",",1-f," ",U[1],"A",D,",",D," 0 0,",g," ",U[0]):P.push("L",W[0],"A",D,",",D," 0 0,",g," ",U[0])}else P.push("L",x,",",S)}else P.push("M",y,",",b),null!=w&&P.push("A",u,",",u," 0 ",L,",",f," ",w,",",_),P.push("L",x,",",S),null!=E&&P.push("A",s,",",s," 0 ",k,",",1-f," ",E,",",C);return P.push("Z"),P.join("")}function l(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}return s.innerRadius=function(e){return arguments.length?(t=we(e),s):t},s.outerRadius=function(t){return arguments.length?(e=we(t),s):e},s.cornerRadius=function(t){return arguments.length?(n=we(t),s):n},s.padRadius=function(t){return arguments.length?(i=t==Da?Da:we(t),s):i},s.startAngle=function(t){return arguments.length?(o=we(t),s):o},s.endAngle=function(t){return arguments.length?(r=we(t),s):r},s.padAngle=function(t){return arguments.length?(a=we(t),s):a},s.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+o.apply(this,arguments)+ +r.apply(this,arguments))/2-Ot;return[Math.cos(i)*n,Math.sin(i)*n]},s};var Da="auto";function ja(t){return t.innerRadius}function za(t){return t.outerRadius}function Na(t){return t.startAngle}function Ia(t){return t.endAngle}function Fa(t){return t&&t.padAngle}function Ha(t,e,n,i){return(t-n)*e-(e-i)*t>0?0:1}function Ga(t,e,n,i,o){var r=t[0]-e[0],a=t[1]-e[1],s=(o?i:-i)/Math.sqrt(r*r+a*a),l=s*a,u=-s*r,c=t[0]+l,h=t[1]+u,d=e[0]+l,f=e[1]+u,p=(c+d)/2,g=(h+f)/2,m=d-c,v=f-h,y=m*m+v*v,b=n-i,w=c*f-d*h,_=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-w*w)),x=(w*v-m*_)/y,S=(-w*m-v*_)/y,E=(w*v+m*_)/y,C=(-w*m+v*_)/y,T=x-p,M=S-g,P=E-p,L=C-g;return T*T+M*M>P*P+L*L&&(x=E,S=C),[[x-l,S-u],[x*n/b,S*n/b]]}function Va(t){var e=io,n=oo,i=Kn,o=Ua,r=o.key,a=.7;function s(r){var s,l=[],u=[],c=-1,h=r.length,d=we(e),f=we(n);function p(){l.push("M",o(t(u),a))}for(;++c<h;)i.call(this,s=r[c],c)?u.push([+d.call(this,s,c),+f.call(this,s,c)]):u.length&&(p(),u=[]);return u.length&&p(),l.length?l.join(""):null}return s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(n=t,s):n},s.defined=function(t){return arguments.length?(i=t,s):i},s.interpolate=function(t){return arguments.length?(r="function"==typeof t?o=t:(o=Ba.get(t)||Ua).key,s):r},s.tension=function(t){return arguments.length?(a=t,s):a},s}r.svg.line=function(){return Va(j)};var Ba=r.map({linear:Ua,"linear-closed":Wa,step:function(t){var e=0,n=t.length,i=t[0],o=[i[0],",",i[1]];for(;++e<n;)o.push("H",(i[0]+(i=t[e])[0])/2,"V",i[1]);n>1&&o.push("H",i[0]);return o.join("")},"step-before":qa,"step-after":Ya,basis:Qa,"basis-open":function(t){if(t.length<4)return Ua(t);var e,n=[],i=-1,o=t.length,r=[0],a=[0];for(;++i<3;)e=t[i],r.push(e[0]),a.push(e[1]);n.push(Ka(ts,r)+","+Ka(ts,a)),--i;for(;++i<o;)e=t[i],r.shift(),r.push(e[0]),a.shift(),a.push(e[1]),es(n,r,a);return n.join("")},"basis-closed":function(t){var e,n,i=-1,o=t.length,r=o+4,a=[],s=[];for(;++i<4;)n=t[i%o],a.push(n[0]),s.push(n[1]);e=[Ka(ts,a),",",Ka(ts,s)],--i;for(;++i<r;)n=t[i%o],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),es(e,a,s);return e.join("")},bundle:function(t,e){var n=t.length-1;if(n)for(var i,o,r=t[0][0],a=t[0][1],s=t[n][0]-r,l=t[n][1]-a,u=-1;++u<=n;)i=t[u],o=u/n,i[0]=e*i[0]+(1-e)*(r+o*s),i[1]=e*i[1]+(1-e)*(a+o*l);return Qa(t)},cardinal:function(t,e){return t.length<3?Ua(t):t[0]+Xa(t,Za(t,e))},"cardinal-open":function(t,e){return t.length<4?Ua(t):t[1]+Xa(t.slice(1,-1),Za(t,e))},"cardinal-closed":function(t,e){return t.length<3?Wa(t):t[0]+Xa((t.push(t[0]),t),Za([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?Ua(t):t[0]+Xa(t,function(t){var e,n,i,o,r=[],a=function(t){var e=0,n=t.length-1,i=[],o=t[0],r=t[1],a=i[0]=ns(o,r);for(;++e<n;)i[e]=(a+(a=ns(o=r,r=t[e+1])))/2;return i[e]=a,i}(t),s=-1,l=t.length-1;for(;++s<l;)e=ns(t[s],t[s+1]),x(e)<Mt?a[s]=a[s+1]=0:(n=a[s]/e,i=a[s+1]/e,(o=n*n+i*i)>9&&(o=3*e/Math.sqrt(o),a[s]=o*n,a[s+1]=o*i));s=-1;for(;++s<=l;)o=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),r.push([o||0,a[s]*o||0]);return r}(t))}});function Ua(t){return t.length>1?t.join("L"):t+"Z"}function Wa(t){return t.join("L")+"Z"}function qa(t){for(var e=0,n=t.length,i=t[0],o=[i[0],",",i[1]];++e<n;)o.push("V",(i=t[e])[1],"H",i[0]);return o.join("")}function Ya(t){for(var e=0,n=t.length,i=t[0],o=[i[0],",",i[1]];++e<n;)o.push("H",(i=t[e])[0],"V",i[1]);return o.join("")}function Xa(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Ua(t);var n=t.length!=e.length,i="",o=t[0],r=t[1],a=e[0],s=a,l=1;if(n&&(i+="Q"+(r[0]-2*a[0]/3)+","+(r[1]-2*a[1]/3)+","+r[0]+","+r[1],o=t[1],l=2),e.length>1){s=e[1],r=t[l],l++,i+="C"+(o[0]+a[0])+","+(o[1]+a[1])+","+(r[0]-s[0])+","+(r[1]-s[1])+","+r[0]+","+r[1];for(var u=2;u<e.length;u++,l++)r=t[l],s=e[u],i+="S"+(r[0]-s[0])+","+(r[1]-s[1])+","+r[0]+","+r[1]}if(n){var c=t[l];i+="Q"+(r[0]+2*s[0]/3)+","+(r[1]+2*s[1]/3)+","+c[0]+","+c[1]}return i}function Za(t,e){for(var n,i=[],o=(1-e)/2,r=t[0],a=t[1],s=1,l=t.length;++s<l;)n=r,r=a,a=t[s],i.push([o*(a[0]-n[0]),o*(a[1]-n[1])]);return i}function Qa(t){if(t.length<3)return Ua(t);var e=1,n=t.length,i=t[0],o=i[0],r=i[1],a=[o,o,o,(i=t[1])[0]],s=[r,r,r,i[1]],l=[o,",",r,"L",Ka(ts,a),",",Ka(ts,s)];for(t.push(t[n-1]);++e<=n;)i=t[e],a.shift(),a.push(i[0]),s.shift(),s.push(i[1]),es(l,a,s);return t.pop(),l.push("L",i),l.join("")}function Ka(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}Ba.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var $a=[0,2/3,1/3,0],Ja=[0,1/3,2/3,0],ts=[0,1/6,2/3,1/6];function es(t,e,n){t.push("C",Ka($a,e),",",Ka($a,n),",",Ka(Ja,e),",",Ka(Ja,n),",",Ka(ts,e),",",Ka(ts,n))}function ns(t,e){return(e[1]-t[1])/(e[0]-t[0])}function is(t){for(var e,n,i,o=-1,r=t.length;++o<r;)n=(e=t[o])[0],i=e[1]-Ot,e[0]=n*Math.cos(i),e[1]=n*Math.sin(i);return t}function os(t){var e=io,n=io,i=0,o=oo,r=Kn,a=Ua,s=a.key,l=a,u="L",c=.7;function h(s){var h,d,f,p=[],g=[],m=[],v=-1,y=s.length,b=we(e),w=we(i),_=e===n?function(){return d}:we(n),x=i===o?function(){return f}:we(o);function S(){p.push("M",a(t(m),c),u,l(t(g.reverse()),c),"Z")}for(;++v<y;)r.call(this,h=s[v],v)?(g.push([d=+b.call(this,h,v),f=+w.call(this,h,v)]),m.push([+_.call(this,h,v),+x.call(this,h,v)])):g.length&&(S(),g=[],m=[]);return g.length&&S(),p.length?p.join(""):null}return h.x=function(t){return arguments.length?(e=n=t,h):n},h.x0=function(t){return arguments.length?(e=t,h):e},h.x1=function(t){return arguments.length?(n=t,h):n},h.y=function(t){return arguments.length?(i=o=t,h):o},h.y0=function(t){return arguments.length?(i=t,h):i},h.y1=function(t){return arguments.length?(o=t,h):o},h.defined=function(t){return arguments.length?(r=t,h):r},h.interpolate=function(t){return arguments.length?(s="function"==typeof t?a=t:(a=Ba.get(t)||Ua).key,l=a.reverse||a,u=a.closed?"M":"L",h):s},h.tension=function(t){return arguments.length?(c=t,h):c},h}function rs(t){return t.radius}function as(t){return[t.x,t.y]}function ss(){return 64}function ls(){return"circle"}function us(t){var e=Math.sqrt(t/Lt);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}r.svg.line.radial=function(){var t=Va(is);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},qa.reverse=Ya,Ya.reverse=qa,r.svg.area=function(){return os(j)},r.svg.area.radial=function(){var t=os(is);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},r.svg.chord=function(){var t=Bi,e=Ui,n=rs,i=Na,o=Ia;function r(n,i){var o=a(this,t,n,i),r=a(this,e,n,i);return"M"+o.p0+s(o.r,o.p1,o.a1-o.a0)+(function(t,e){return t.a0==e.a0&&t.a1==e.a1}(o,r)?l(o.r,o.p1,o.r,o.p0):l(o.r,o.p1,r.r,r.p0)+s(r.r,r.p1,r.a1-r.a0)+l(r.r,r.p1,o.r,o.p0))+"Z"}function a(t,e,r,a){var s=e.call(t,r,a),l=n.call(t,s,a),u=i.call(t,s,a)-Ot,c=o.call(t,s,a)-Ot;return{r:l,a0:u,a1:c,p0:[l*Math.cos(u),l*Math.sin(u)],p1:[l*Math.cos(c),l*Math.sin(c)]}}function s(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Lt)+",1 "+e}function l(t,e,n,i){return"Q 0,0 "+i}return r.radius=function(t){return arguments.length?(n=we(t),r):n},r.source=function(e){return arguments.length?(t=we(e),r):t},r.target=function(t){return arguments.length?(e=we(t),r):e},r.startAngle=function(t){return arguments.length?(i=we(t),r):i},r.endAngle=function(t){return arguments.length?(o=we(t),r):o},r},r.svg.diagonal=function(){var t=Bi,e=Ui,n=as;function i(i,o){var r=t.call(this,i,o),a=e.call(this,i,o),s=(r.y+a.y)/2,l=[r,{x:r.x,y:s},{x:a.x,y:s},a];return"M"+(l=l.map(n))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return i.source=function(e){return arguments.length?(t=we(e),i):t},i.target=function(t){return arguments.length?(e=we(t),i):e},i.projection=function(t){return arguments.length?(n=t,i):n},i},r.svg.diagonal.radial=function(){var t=r.svg.diagonal(),e=as,n=t.projection;return t.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),n=e[0],i=e[1]-Ot;return[n*Math.cos(i),n*Math.sin(i)]}}(e=t)):e},t},r.svg.symbol=function(){var t=ls,e=ss;function n(n,i){return(cs.get(t.call(this,n,i))||us)(e.call(this,n,i))}return n.type=function(e){return arguments.length?(t=we(e),n):t},n.size=function(t){return arguments.length?(e=we(t),n):e},n};var cs=r.map({circle:us,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*ds)),n=e*ds;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/hs),n=e*hs/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/hs),n=e*hs/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});r.svg.symbolTypes=cs.keys();var hs=Math.sqrt(3),ds=Math.tan(30*Rt);K.transition=function(t){for(var e,n,i=ms||++bs,o=xs(t),r=[],a=vs||{time:Date.now(),ease:sr,delay:0,duration:250},s=-1,l=this.length;++s<l;){r.push(e=[]);for(var u=this[s],c=-1,h=u.length;++c<h;)(n=u[c])&&Ss(n,c,o,i,a),e.push(n)}return gs(r,o,i)},K.interrupt=function(t){return this.each(null==t?fs:ps(xs(t)))};var fs=ps(xs());function ps(t){return function(){var e,n,i;(e=this[t])&&(i=e[n=e.active])&&(i.timer.c=null,i.timer.t=NaN,--e.count?delete e[n]:delete this[t],e.active+=.5,i.event&&i.event.interrupt.call(this,this.__data__,i.index))}}function gs(t,e,n){return q(t,ys),t.namespace=e,t.id=n,t}var ms,vs,ys=[],bs=0;function ws(t,e,n,i){var o=t.id,r=t.namespace;return pt(t,"function"==typeof n?function(t,a,s){t[r][o].tween.set(e,i(n.call(t,t.__data__,a,s)))}:(n=i(n),function(t){t[r][o].tween.set(e,n)}))}function _s(t){return null==t&&(t=""),function(){this.textContent=t}}function xs(t){return null==t?"__transition__":"__transition_"+t+"__"}function Ss(t,e,n,i,o){var r,a,s,l,u,c=t[n]||(t[n]={active:0,count:0}),h=c[i];function d(n){var o=c.active,d=c[o];for(var p in d&&(d.timer.c=null,d.timer.t=NaN,--c.count,delete c[o],d.event&&d.event.interrupt.call(t,t.__data__,d.index)),c)if(+p<i){var g=c[p];g.timer.c=null,g.timer.t=NaN,--c.count,delete c[p]}a.c=f,Pe(function(){return a.c&&f(n||1)&&(a.c=null,a.t=NaN),1},0,r),c.active=i,h.event&&h.event.start.call(t,t.__data__,e),u=[],h.tween.forEach(function(n,i){(i=i.call(t,t.__data__,e))&&u.push(i)}),l=h.ease,s=h.duration}function f(o){for(var r=o/s,a=l(r),d=u.length;d>0;)u[--d].call(t,a);if(r>=1)return h.event&&h.event.end.call(t,t.__data__,e),--c.count?delete c[i]:delete t[n],1}h||(r=o.time,a=Pe(function(t){var e=h.delay;if(a.t=e+r,e<=t)return d(t-e);a.c=d},0,r),h=c[i]={tween:new E,time:r,timer:a,delay:o.delay,duration:o.duration,ease:o.ease,index:e},o=null,++c.count)}ys.call=K.call,ys.empty=K.empty,ys.node=K.node,ys.size=K.size,r.transition=function(t,e){return t&&t.transition?ms?t.transition(e):t:r.selection().transition(t)},r.transition.prototype=ys,ys.select=function(t){var e,n,i,o=this.id,r=this.namespace,a=[];t=$(t);for(var s=-1,l=this.length;++s<l;){a.push(e=[]);for(var u=this[s],c=-1,h=u.length;++c<h;)(i=u[c])&&(n=t.call(i,i.__data__,c,s))?("__data__"in i&&(n.__data__=i.__data__),Ss(n,c,r,o,i[r][o]),e.push(n)):e.push(null)}return gs(a,r,o)},ys.selectAll=function(t){var e,n,i,o,r,a=this.id,s=this.namespace,l=[];t=J(t);for(var u=-1,c=this.length;++u<c;)for(var h=this[u],d=-1,f=h.length;++d<f;)if(i=h[d]){r=i[s][a],n=t.call(i,i.__data__,d,u),l.push(e=[]);for(var p=-1,g=n.length;++p<g;)(o=n[p])&&Ss(o,p,s,a,r),e.push(o)}return gs(l,s,a)},ys.filter=function(t){var e,n,i=[];"function"!=typeof t&&(t=ft(t));for(var o=0,r=this.length;o<r;o++){i.push(e=[]);for(var a,s=0,l=(a=this[o]).length;s<l;s++)(n=a[s])&&t.call(n,n.__data__,s,o)&&e.push(n)}return gs(i,this.namespace,this.id)},ys.tween=function(t,e){var n=this.id,i=this.namespace;return arguments.length<2?this.node()[i][n].tween.get(t):pt(this,null==e?function(e){e[i][n].tween.remove(t)}:function(o){o[i][n].tween.set(t,e)})},ys.attr=function(t,e){if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var n="transform"==t?yr:$o,i=r.ns.qualify(t);function o(){this.removeAttribute(i)}function a(){this.removeAttributeNS(i.space,i.local)}return ws(this,"attr."+t,e,i.local?function(t){return null==t?a:(t+="",function(){var e,o=this.getAttributeNS(i.space,i.local);return o!==t&&(e=n(o,t),function(t){this.setAttributeNS(i.space,i.local,e(t))})})}:function(t){return null==t?o:(t+="",function(){var e,o=this.getAttribute(i);return o!==t&&(e=n(o,t),function(t){this.setAttribute(i,e(t))})})})},ys.attrTween=function(t,e){var n=r.ns.qualify(t);return this.tween("attr."+t,n.local?function(t,i){var o=e.call(this,t,i,this.getAttributeNS(n.space,n.local));return o&&function(t){this.setAttributeNS(n.space,n.local,o(t))}}:function(t,i){var o=e.call(this,t,i,this.getAttribute(n));return o&&function(t){this.setAttribute(n,o(t))}})},ys.style=function(t,e,n){var i=arguments.length;if(i<3){if("string"!=typeof t){for(n in i<2&&(e=""),t)this.style(n,t[n],e);return this}n=""}function o(){this.style.removeProperty(t)}return ws(this,"style."+t,e,function(e){return null==e?o:(e+="",function(){var i,o=c(this).getComputedStyle(this,null).getPropertyValue(t);return o!==e&&(i=$o(o,e),function(e){this.style.setProperty(t,i(e),n)})})})},ys.styleTween=function(t,e,n){return arguments.length<3&&(n=""),this.tween("style."+t,function(i,o){var r=e.call(this,i,o,c(this).getComputedStyle(this,null).getPropertyValue(t));return r&&function(e){this.style.setProperty(t,r(e),n)}})},ys.text=function(t){return ws(this,"text",t,_s)},ys.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},ys.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=r.ease.apply(r,arguments)),pt(this,function(i){i[n][e].ease=t}))},ys.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:pt(this,"function"==typeof t?function(i,o,r){i[n][e].delay=+t.call(i,i.__data__,o,r)}:(t=+t,function(i){i[n][e].delay=t}))},ys.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:pt(this,"function"==typeof t?function(i,o,r){i[n][e].duration=Math.max(1,t.call(i,i.__data__,o,r))}:(t=Math.max(1,t),function(i){i[n][e].duration=t}))},ys.each=function(t,e){var n=this.id,i=this.namespace;if(arguments.length<2){var o=vs,a=ms;try{ms=n,pt(this,function(e,o,r){vs=e[i][n],t.call(e,e.__data__,o,r)})}finally{vs=o,ms=a}}else pt(this,function(o){var a=o[i][n];(a.event||(a.event=r.dispatch("start","end","interrupt"))).on(t,e)});return this},ys.transition=function(){for(var t,e,n,i=this.id,o=++bs,r=this.namespace,a=[],s=0,l=this.length;s<l;s++){a.push(t=[]);for(var u,c=0,h=(u=this[s]).length;c<h;c++)(e=u[c])&&Ss(e,c,r,o,{time:(n=e[r][i]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),t.push(e)}return gs(a,r,o)},r.svg.axis=function(){var t,e=r.scale.linear(),n=Es,i=6,o=6,a=3,l=[10],u=null;function c(s){s.each(function(){var s,c=r.select(this),h=this.__chart__||e,d=this.__chart__=e.copy(),f=null==u?d.ticks?d.ticks.apply(d,l):d.domain():u,p=null==t?d.tickFormat?d.tickFormat.apply(d,l):j:t,g=c.selectAll(".tick").data(f,d),m=g.enter().insert("g",".domain").attr("class","tick").style("opacity",Mt),v=r.transition(g.exit()).style("opacity",Mt).remove(),y=r.transition(g.order()).style("opacity",1),b=Math.max(i,0)+a,w=fa(d),_=c.selectAll(".domain").data([0]),x=(_.enter().append("path").attr("class","domain"),r.transition(_));m.append("line"),m.append("text");var S,E,C,T,M=m.select("line"),P=y.select("line"),L=g.select("text").text(p),A=m.select("text"),k=y.select("text"),O="top"===n||"left"===n?-1:1;if("bottom"===n||"top"===n?(s=Ts,S="x",C="y",E="x2",T="y2",L.attr("dy",O<0?"0em":".71em").style("text-anchor","middle"),x.attr("d","M"+w[0]+","+O*o+"V0H"+w[1]+"V"+O*o)):(s=Ms,S="y",C="x",E="y2",T="x2",L.attr("dy",".32em").style("text-anchor",O<0?"end":"start"),x.attr("d","M"+O*o+","+w[0]+"H0V"+w[1]+"H"+O*o)),M.attr(T,O*i),A.attr(C,O*b),P.attr(E,0).attr(T,O*i),k.attr(S,0).attr(C,O*b),d.rangeBand){var R=d,D=R.rangeBand()/2;h=d=function(t){return R(t)+D}}else h.rangeBand?h=d:v.call(s,d,h);m.call(s,h,d),y.call(s,d,d)})}return c.scale=function(t){return arguments.length?(e=t,c):e},c.orient=function(t){return arguments.length?(n=t in Cs?t+"":Es,c):n},c.ticks=function(){return arguments.length?(l=s(arguments),c):l},c.tickValues=function(t){return arguments.length?(u=t,c):u},c.tickFormat=function(e){return arguments.length?(t=e,c):t},c.tickSize=function(t){var e=arguments.length;return e?(i=+t,o=+arguments[e-1],c):i},c.innerTickSize=function(t){return arguments.length?(i=+t,c):i},c.outerTickSize=function(t){return arguments.length?(o=+t,c):o},c.tickPadding=function(t){return arguments.length?(a=+t,c):a},c.tickSubdivide=function(){return arguments.length&&c},c};var Es="bottom",Cs={top:1,right:1,bottom:1,left:1};function Ts(t,e,n){t.attr("transform",function(t){var i=e(t);return"translate("+(isFinite(i)?i:n(t))+",0)"})}function Ms(t,e,n){t.attr("transform",function(t){var i=e(t);return"translate(0,"+(isFinite(i)?i:n(t))+")"})}r.svg.brush=function(){var t,e,n=U(d,"brushstart","brush","brushend"),i=null,o=null,a=[0,0],s=[0,0],l=!0,u=!0,h=Ls[0];function d(t){t.each(function(){var t=r.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",m).on("touchstart.brush",m),e=t.selectAll(".background").data([0]);e.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var n=t.selectAll(".resize").data(h,j);n.exit().remove(),n.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Ps[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),n.style("display",d.empty()?"none":null);var a,s=r.transition(t),l=r.transition(e);i&&(a=fa(i),l.attr("x",a[0]).attr("width",a[1]-a[0]),p(s)),o&&(a=fa(o),l.attr("y",a[0]).attr("height",a[1]-a[0]),g(s)),f(s)})}function f(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+a[+/e$/.test(t)]+","+s[+/^s/.test(t)]+")"})}function p(t){t.select(".extent").attr("x",a[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",a[1]-a[0])}function g(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function m(){var h,m,v=this,y=r.select(r.event.target),b=n.of(v,arguments),w=r.select(v),_=y.datum(),x=!/^(n|s)$/.test(_)&&i,S=!/^(e|w)$/.test(_)&&o,E=y.classed("extent"),C=St(v),T=r.mouse(v),M=r.select(c(v)).on("keydown.brush",function(){32==r.event.keyCode&&(E||(h=null,T[0]-=a[1],T[1]-=s[1],E=2),V())}).on("keyup.brush",function(){32==r.event.keyCode&&2==E&&(T[0]+=a[1],T[1]+=s[1],E=0,V())});if(r.event.changedTouches?M.on("touchmove.brush",A).on("touchend.brush",O):M.on("mousemove.brush",A).on("mouseup.brush",O),w.interrupt().selectAll("*").interrupt(),E)T[0]=a[0]-T[0],T[1]=s[0]-T[1];else if(_){var P=+/w$/.test(_),L=+/^n/.test(_);m=[a[1-P]-T[0],s[1-L]-T[1]],T[0]=a[P],T[1]=s[L]}else r.event.altKey&&(h=T.slice());function A(){var t=r.mouse(v),e=!1;m&&(t[0]+=m[0],t[1]+=m[1]),E||(r.event.altKey?(h||(h=[(a[0]+a[1])/2,(s[0]+s[1])/2]),T[0]=a[+(t[0]<h[0])],T[1]=s[+(t[1]<h[1])]):h=null),x&&k(t,i,0)&&(p(w),e=!0),S&&k(t,o,1)&&(g(w),e=!0),e&&(f(w),b({type:"brush",mode:E?"move":"resize"}))}function k(n,i,o){var r,c,d=fa(i),f=d[0],p=d[1],g=T[o],m=o?s:a,v=m[1]-m[0];if(E&&(f-=g,p-=v+g),r=(o?u:l)?Math.max(f,Math.min(p,n[o])):n[o],E?c=(r+=g)+v:(h&&(g=Math.max(f,Math.min(p,2*h[o]-r))),g<r?(c=r,r=g):c=g),m[0]!=r||m[1]!=c)return o?e=null:t=null,m[0]=r,m[1]=c,!0}function O(){A(),w.style("pointer-events","all").selectAll(".resize").style("display",d.empty()?"none":null),r.select("body").style("cursor",null),M.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),b({type:"brushend"})}w.style("pointer-events","none").selectAll(".resize").style("display",null),r.select("body").style("cursor",y.style("cursor")),b({type:"brushstart"}),A()}return d.event=function(i){i.each(function(){var i=n.of(this,arguments),o={x:a,y:s,i:t,j:e},l=this.__chart__||o;this.__chart__=o,ms?r.select(this).transition().each("start.brush",function(){t=l.i,e=l.j,a=l.x,s=l.y,i({type:"brushstart"})}).tween("brush:brush",function(){var n=Jo(a,o.x),r=Jo(s,o.y);return t=e=null,function(t){a=o.x=n(t),s=o.y=r(t),i({type:"brush",mode:"resize"})}}).each("end.brush",function(){t=o.i,e=o.j,i({type:"brush",mode:"resize"}),i({type:"brushend"})}):(i({type:"brushstart"}),i({type:"brush",mode:"resize"}),i({type:"brushend"}))})},d.x=function(t){return arguments.length?(h=Ls[!(i=t)<<1|!o],d):i},d.y=function(t){return arguments.length?(h=Ls[!i<<1|!(o=t)],d):o},d.clamp=function(t){return arguments.length?(i&&o?(l=!!t[0],u=!!t[1]):i?l=!!t:o&&(u=!!t),d):i&&o?[l,u]:i?l:o?u:null},d.extent=function(n){var r,l,u,c,h;return arguments.length?(i&&(r=n[0],l=n[1],o&&(r=r[0],l=l[0]),t=[r,l],i.invert&&(r=i(r),l=i(l)),l<r&&(h=r,r=l,l=h),r==a[0]&&l==a[1]||(a=[r,l])),o&&(u=n[0],c=n[1],i&&(u=u[1],c=c[1]),e=[u,c],o.invert&&(u=o(u),c=o(c)),c<u&&(h=u,u=c,c=h),u==s[0]&&c==s[1]||(s=[u,c])),d):(i&&(t?(r=t[0],l=t[1]):(r=a[0],l=a[1],i.invert&&(r=i.invert(r),l=i.invert(l)),l<r&&(h=r,r=l,l=h))),o&&(e?(u=e[0],c=e[1]):(u=s[0],c=s[1],o.invert&&(u=o.invert(u),c=o.invert(c)),c<u&&(h=u,u=c,c=h))),i&&o?[[r,u],[l,c]]:i?[r,l]:o&&[u,c])},d.clear=function(){return d.empty()||(a=[0,0],s=[0,0],t=e=null),d},d.empty=function(){return!!i&&a[0]==a[1]||!!o&&s[0]==s[1]},r.rebind(d,n,"on")};var Ps={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ls=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],As=Ne.format=dn.timeFormat,ks=As.utc,Os=ks("%Y-%m-%dT%H:%M:%S.%LZ");function Rs(t){return t.toISOString()}function Ds(t,e,n){function i(e){return t(e)}function o(t,n){var i=(t[1]-t[0])/n,o=r.bisect(zs,i);return o==zs.length?[e.year,_a(t.map(function(t){return t/31536e6}),n)[2]]:o?e[i/zs[o-1]<zs[o]/i?o-1:o]:[Fs,_a(t,n)[2]]}return i.invert=function(e){return js(t.invert(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain().map(js)},i.nice=function(t,e){var n=i.domain(),r=da(n),a=null==t?o(r,10):"number"==typeof t&&o(r,t);function s(n){return!isNaN(n)&&!t.range(n,js(+n+1),e).length}return a&&(t=a[0],e=a[1]),i.domain(ga(n,e>1?{floor:function(e){for(;s(e=t.floor(e));)e=js(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=js(+e+1);return e}}:t))},i.ticks=function(t,e){var n=da(i.domain()),r=null==t?o(n,10):"number"==typeof t?o(n,t):!t.range&&[{range:t},e];return r&&(t=r[0],e=r[1]),t.range(n[0],js(+n[1]+1),e<1?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Ds(t.copy(),e,n)},ba(i,t)}function js(t){return new Date(t)}As.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Rs:Os,Rs.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Rs.toString=Os.toString,Ne.second=Ge(function(t){return new Ie(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),Ne.seconds=Ne.second.range,Ne.seconds.utc=Ne.second.utc.range,Ne.minute=Ge(function(t){return new Ie(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),Ne.minutes=Ne.minute.range,Ne.minutes.utc=Ne.minute.utc.range,Ne.hour=Ge(function(t){var e=t.getTimezoneOffset()/60;return new Ie(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),Ne.hours=Ne.hour.range,Ne.hours.utc=Ne.hour.utc.range,Ne.month=Ge(function(t){return(t=Ne.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),Ne.months=Ne.month.range,Ne.months.utc=Ne.month.utc.range;var zs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ns=[[Ne.second,1],[Ne.second,5],[Ne.second,15],[Ne.second,30],[Ne.minute,1],[Ne.minute,5],[Ne.minute,15],[Ne.minute,30],[Ne.hour,1],[Ne.hour,3],[Ne.hour,6],[Ne.hour,12],[Ne.day,1],[Ne.day,2],[Ne.week,1],[Ne.month,1],[Ne.month,3],[Ne.year,1]],Is=As.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Kn]]),Fs={range:function(t,e,n){return r.range(Math.ceil(t/n)*n,+e,n).map(js)},floor:j,ceil:j};Ns.year=Ne.year,Ne.scale=function(){return Ds(r.scale.linear(),Ns,Is)};var Hs=Ns.map(function(t){return[t[0].utc,t[1]]}),Gs=ks.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Kn]]);function Vs(t){return JSON.parse(t.responseText)}function Bs(t){var e=l.createRange();return e.selectNode(l.body),e.createContextualFragment(t.responseText)}Hs.year=Ne.year.utc,Ne.scale.utc=function(){return Ds(r.scale.linear(),Hs,Gs)},r.text=_e(function(t){return t.responseText}),r.json=function(t,e){return xe(t,"application/json",Vs,e)},r.html=function(t,e){return xe(t,"text/html",Bs,e)},r.xml=_e(function(t){return t.responseXML}),this.d3=r,void 0===(o="function"==typeof(i=r)?i.call(e,n,e,t):i)||(t.exports=o)}()},function(t,e,n){(t.exports=n(25)(!1)).push([t.i,"/*-- Chart --*/\n.c3 svg {\n font: 10px sans-serif;\n -webkit-tap-highlight-color: transparent; }\n\n.c3 path, .c3 line {\n fill: none;\n stroke: #000; }\n\n.c3 text {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none; }\n\n.c3-legend-item-tile,\n.c3-xgrid-focus,\n.c3-ygrid,\n.c3-event-rect,\n.c3-bars path {\n shape-rendering: crispEdges; }\n\n.c3-chart-arc path {\n stroke: #fff; }\n\n.c3-chart-arc rect {\n stroke: white;\n stroke-width: 1; }\n\n.c3-chart-arc text {\n fill: #fff;\n font-size: 13px; }\n\n/*-- Axis --*/\n/*-- Grid --*/\n.c3-grid line {\n stroke: #aaa; }\n\n.c3-grid text {\n fill: #aaa; }\n\n.c3-xgrid, .c3-ygrid {\n stroke-dasharray: 3 3; }\n\n/*-- Text on Chart --*/\n.c3-text.c3-empty {\n fill: #808080;\n font-size: 2em; }\n\n/*-- Line --*/\n.c3-line {\n stroke-width: 1px; }\n\n/*-- Point --*/\n.c3-circle._expanded_ {\n stroke-width: 1px;\n stroke: white; }\n\n.c3-selected-circle {\n fill: white;\n stroke-width: 2px; }\n\n/*-- Bar --*/\n.c3-bar {\n stroke-width: 0; }\n\n.c3-bar._expanded_ {\n fill-opacity: 1;\n fill-opacity: 0.75; }\n\n/*-- Focus --*/\n.c3-target.c3-focused {\n opacity: 1; }\n\n.c3-target.c3-focused path.c3-line, .c3-target.c3-focused path.c3-step {\n stroke-width: 2px; }\n\n.c3-target.c3-defocused {\n opacity: 0.3 !important; }\n\n/*-- Region --*/\n.c3-region {\n fill: steelblue;\n fill-opacity: .1; }\n\n/*-- Brush --*/\n.c3-brush .extent {\n fill-opacity: .1; }\n\n/*-- Select - Drag --*/\n/*-- Legend --*/\n.c3-legend-item {\n font-size: 12px; }\n\n.c3-legend-item-hidden {\n opacity: 0.15; }\n\n.c3-legend-background {\n opacity: 0.75;\n fill: white;\n stroke: lightgray;\n stroke-width: 1; }\n\n/*-- Title --*/\n.c3-title {\n font: 14px sans-serif; }\n\n/*-- Tooltip --*/\n.c3-tooltip-container {\n z-index: 10; }\n\n.c3-tooltip {\n border-collapse: collapse;\n border-spacing: 0;\n background-color: #fff;\n empty-cells: show;\n -webkit-box-shadow: 7px 7px 12px -9px #777777;\n -moz-box-shadow: 7px 7px 12px -9px #777777;\n box-shadow: 7px 7px 12px -9px #777777;\n opacity: 0.9; }\n\n.c3-tooltip tr {\n border: 1px solid #CCC; }\n\n.c3-tooltip th {\n background-color: #aaa;\n font-size: 14px;\n padding: 2px 5px;\n text-align: left;\n color: #FFF; }\n\n.c3-tooltip td {\n font-size: 13px;\n padding: 3px 6px;\n background-color: #fff;\n border-left: 1px dotted #999; }\n\n.c3-tooltip td > span {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin-right: 6px; }\n\n.c3-tooltip td.value {\n text-align: right; }\n\n/*-- Area --*/\n.c3-area {\n stroke-width: 0;\n opacity: 0.2; }\n\n/*-- Arc --*/\n.c3-chart-arcs-title {\n dominant-baseline: middle;\n font-size: 1.3em; }\n\n.c3-chart-arcs .c3-chart-arcs-background {\n fill: #e0e0e0;\n stroke: #FFF; }\n\n.c3-chart-arcs .c3-chart-arcs-gauge-unit {\n fill: #000;\n font-size: 16px; }\n\n.c3-chart-arcs .c3-chart-arcs-gauge-max {\n fill: #777; }\n\n.c3-chart-arcs .c3-chart-arcs-gauge-min {\n fill: #777; }\n\n.c3-chart-arc .c3-gauge-value {\n fill: #000;\n /* font-size: 28px !important;*/ }\n\n.c3-chart-arc.c3-target g path {\n opacity: 1; }\n\n.c3-chart-arc.c3-target.c3-focused g path {\n opacity: 1; }\n",""])},function(t,e,n){(t.exports=n(25)(!1)).push([t.i,".chart text {\n fill: white;\n}\n.chart line {\n stroke: white;\n}\n.chart path {\n stroke: white;\n}\n.c3 path,\n.c3 line {\n stroke: white;\n}\n\n.c3-tooltip,\n.c3-tooltip td {\n background: rgba(0,0,0,0.8);\n}\n.c3-tooltip th {\n font-family: 'Roboto', sans-serif;\n background: black;\n}\n",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=p(n(65)),o=p(n(12)),r=p(n(7)),a=p(n(8)),s=p(n(13)),l=p(n(14)),u=n(2),c=p(u),h=(n(21),n(17),n(11)),d=p(n(178));n(179),n(180);var f=n(181);function p(t){return t&&t.__esModule?t:{default:t}}var g=function(t){function e(){return(0,r.default)(this,e),(0,s.default)(this,(e.__proto__||(0,o.default)(e)).apply(this,arguments))}return(0,l.default)(e,t),(0,a.default)(e,[{key:"render",value:function(){var t=this.props.payload.data,e=t.paper,n=t.citations;if(!n.length)return null;var o={},r=(0,i.default)({},f.initialInstitutionLookup);n.forEach(function(t){t.addresses.forEach(function(t){var e=t.country;if(e)switch(e in o?o[e]+=1:o[e]=1,t.type){case"company":case"edu":case"gov":r[t.type]+=1;break;case"mil":r.gov+=1;break;default:console.log("weird institution type",t)}})});var a=(0,h.toTuples)(o).sort(function(t,e){return e[1]-t[1]}),s=a.slice(0,10),l=a.slice(10).reduce(function(t,e){return t+e[1]},0);l>0&&s.push([f.otherCountriesLabel,l]);var u=(0,h.toTuples)(r).map(function(t){return[f.institutionOrder[t[0]],t]}).sort(function(t,e){return t[0]-e[0]}).map(function(t){return t[1]}).map(function(t){return[f.institutionLabels[t[0]],t[1]]});f.rainbow;return c.default.createElement("div",{className:"chart"},c.default.createElement("div",null,c.default.createElement(d.default,{data:{columns:s,type:"pie"},color:{pattern:f.rainbow},tooltip:{format:{value:function(t){return t}}},size:{height:s.length<4?316:336}}),c.default.createElement("span",{className:"chartCaption"},n.length+" verified "+e.name+" dataset citations by country")),c.default.createElement("div",null,c.default.createElement(d.default,{data:{columns:u,type:"pie"},color:{pattern:f.institutionColors},tooltip:{format:{value:function(t){return t}}},size:{height:316}}),c.default.createElement("span",{className:"chartCaption"},n.length+" verified "+e.name+" dataset citations by organization type")))}}]),e}(u.Component);e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.store=void 0;var i=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(n(462));var r=(0,i.combineReducers)({api:function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}});var a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||i.compose;return(0,i.createStore)(r,t,e((0,i.applyMiddleware)(o.default)))}({});e.store=a},function(t,e,n){"use strict";function i(t){return function(e){var n=e.dispatch,i=e.getState;return function(e){return function(o){return"function"==typeof o?o(n,i,t):e(o)}}}}Object.defineProperty(e,"__esModule",{value:!0});var o=i();o.withExtraArgument=i,e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=u(n(65)),o=u(n(464)),r=u(n(45)),a=u(n(7)),s=u(n(8));e.default=function(t,e){var n=e.data;if(!n)return;return new p(t,n)};var l=u(n(182));function u(t){return t&&t.__esModule?t:{default:t}}n(467);var c={edu:{color:"rgb(245, 246, 150)",fillColor:"rgb(245, 246, 150)",opacity:.5,weight:"1"},company:{color:"rgb(50, 100, 246)",fillColor:"rgb(50, 100, 246)",opacity:1,weight:"2"},gov:{color:"rgb(245, 150, 100)",fillColor:"rgb(245, 150, 150)",opacity:1,weight:"2"},mil:{color:"rgb(245, 0, 0)",fillColor:"rgb(245, 0, 0)",opacity:1,weight:"2"}},h=["edu","company","gov"],d={all:0,edu:1,company:2,gov:3,mil:3},f=l.default.icon({iconUrl:"/assets/img/reddot.png",iconSize:[17,17],iconAnchor:[8,8],popupAnchor:[0,-5]}),p=function(){function t(e,n){var i=this;(0,a.default)(this,t);var o=n.paper,r=n.citations;this.el=e,this.paper=o,this.markers=[],this.arcs=[],this.filter=d.all,o.addresses&&o.addresses.length?this.source=[o.addresses[0].lat,o.addresses[0].lng].map(function(t){return parseFloat(t)||0}):(console.error("No address found for root paper"),this.source=[0,0]),this.citationsByAddress={},this.citations=r,this.citations.forEach(function(t){t.addresses&&t.addresses.forEach(function(e){e.name in i.citationsByAddress||(i.citationsByAddress[e.name]={address:e,citations:[]}),i.citationsByAddress[e.name].citations.push(t)})}),this.build(),this.bind(),this.buildMarkers(),this.rootMarker.openPopup()}return(0,s.default)(t,[{key:"build",value:function(){this.map=l.default.map(this.el).setView([25,0],2),l.default.tileLayer("https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',maxZoom:18,id:"mapbox.dark",style:"mapbox://styles/mapbox/dark-v9",accessToken:"pk.eyJ1IjoiZmFuc2FsY3kiLCJhIjoiY2pvN3I1czJwMHF5NDNrbWRoMWpteHlrdCJ9.kMpM5syQUhVjKkn1iVx9fg"}).addTo(this.map)}},{key:"bind",value:function(){var t=this,e=document.createElement("div");function n(t){t.stopPropagation()}e.classList.add("map_cover"),e.innerHTML="<div class='cover_message'>Click here to explore the map</div>",e.querySelector("div").addEventListener("click",function(){t.map.scrollWheelZoom.enable(),e.parentNode===t.el&&t.el.removeChild(e)}),e.querySelector("div").addEventListener("touchstart",function(t){t.stopPropagation()}),e.querySelector("div").addEventListener("tap",function(n){n.stopPropagation(),t.map.scrollWheelZoom.enable(),e.parentNode===t.el&&t.el.removeChild(e)}),e.addEventListener("mousewheel",n,!0),e.addEventListener("DOMMouseScroll",n,!0),this.map.scrollWheelZoom.disable(),this.map.on("focus",function(){t.map.scrollWheelZoom.enable(),e.parentNode===t.el&&t.el.removeChild(e)}),this.map.on("blur",function(){t.map.scrollWheelZoom.disable()}),this.el.appendChild(e),h.forEach(function(e){var n=e.substr(0,3),i=document.querySelector(".map-legend ."+n);i.addEventListener("click",function(){t.filterMarkers(i,e)})})}},{key:"filterMarkers",value:function(t,e){var n=document.querySelector(".map-legend .active");n&&n.classList.remove("active");var i=d[e];this.filter===i?this.filter=d.all:(this.filter=i,t.classList.add("active")),this.buildMarkers()}},{key:"resetMarkers",value:function(){this.arcs.forEach(function(t){return t.remove()}),this.markers.forEach(function(t){return t.remove()}),this.markers=[],this.arcs=[]}},{key:"buildMarkers",value:function(){var t=this;this.resetMarkers(),(0,r.default)(this.citationsByAddress).map(function(e){var n=t.citationsByAddress[e],r=n.citations,a=n.address;if(!t.filter||d[a.type]===t.filter){var s=[a.lat,a.lng].map(function(t){return parseFloat(t)});if(!(0,o.default)(s[0])&&!(0,o.default)(s[1])){t.addMarker(s,r);var l=(0,i.default)({},c[a.type]),u=Math.min(r.length,5),h=.5+Math.min(r.length/5,.5);"edu"!==a.type&&(u+=1,h=1),l.weight=String(u),l.opacity=h,t.addArc(t.source,s,l)}}}),this.rootMarker=this.addMarker(this.source,[this.paper])}},{key:"addMarker",value:function(t,e){var n=l.default.marker(t,{icon:f}).addTo(this.map),i=e.map(function(t){var e=t.title,n=t.addresses,i=t.year,o=t.pdf,r=t.doi,a=["<b>",e,"</b>"];o&&o.length?(a.unshift("<a href='"+o[0]+"' target='_blank'>"),a.push("</a>")):r&&r.length&&(a.unshift("<a href='"+r[0]+"' target='_blank'>"),a.push("</a>")),i&&a.push(" ("+i+")");var s=n.map(function(t){return t.name}).join("<br/>");return a.push("<br>"),a.push(s),a.join("")});return n.bindPopup(i.join("<br><br>")),this.markers.push(n),n}},{key:"addArc",value:function(t,e,n){var i=l.default.bezier({path:[[{lat:t[0],lng:t[1]},{lat:e[0],lng:e[1]}]]},n).addTo(this.map);this.arcs.push(i)}}]),t}()},function(t,e,n){t.exports={default:n(465),__esModule:!0}},function(t,e,n){n(466),t.exports=n(3).Number.isNaN},function(t,e,n){var i=n(4);i(i.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.noop=e.Bezier=void 0;var i=function(t){return t&&t.__esModule?t:{default:t}}(n(182));i.default.SVG.include({_updatecurve:function(t){var e=this._curvePointsToPath(t._points);if(this._setPath(t,e),t.options.animate){var n=t._path,i=n.getTotalLength();t.options.dashArray||(n.style.strokeDasharray=i+" "+i),t._initialUpdate&&(n.animate([{strokeDashoffset:i},{strokeDashoffset:0}],t.options.animate),t._initialUpdate=!1)}return e},_curvePointsToPath:function(t){for(var e=void 0,n="",i=0;i<t.length;i++)"string"==typeof(e=t[i])||e instanceof String?n+=e:n+=e.x+","+e.y+" ";return n||"M0 0"}});var o=i.default.Path.extend({options:{},initialize:function(t,e,n){t.mid&&void 0!==t.mid[0]||(t.mid=this.getMidPoint(t.from,t.to,t.from.deep?t.from.deep:4,t.from.slide)),i.default.setOptions(this,n),this._initialUpdate=!0,this.setPath(t),this.icon=e},onAdd:function(t){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this),t.on("zoom",function(){})},getPath:function(){return this._coords},setPath:function(t){return this._setPath(t),this.redraw()},getBounds:function(){return this._bounds},getMidPoint:function(t,e,n){var i=3.14;"RIGHT_ROUND"===(arguments.length>3&&void 0!==arguments[3]?arguments[3]:"LEFT_ROUND")&&(i*=-1);var o=t,r=e,a=r.lng-o.lng,s=r.lat-o.lat,l=Math.sqrt(Math.pow(a,2)+Math.pow(s,2)),u=Math.atan2(s,a),c=i/(n||4),h=l/2/Math.cos(c),d=u+c,f=h*Math.cos(d)+o.lng,p=[h*Math.sin(d)+o.lat,f];return[].push(o,p,r),p},_setPath:function(t){this._coords=t,this._bounds=this._computeBounds()},_computeBounds:function(){var t=new i.default.LatLngBounds;return t.extend(this._coords.from),t.extend(this._coords.to),t.extend(this._coords.mid),t},getCenter:function(){return this._bounds.getCenter()},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updatecurve(this)},_project:function(){this._points=[],this._points.push("M");var t=this._map.latLngToLayerPoint(this._coords.from);this._points.push(t),this._coords.mid&&(this._points.push("Q"),t=this._map.latLngToLayerPoint(this._coords.mid),this._points.push(t)),t=this._map.latLngToLayerPoint(this._coords.to),this._points.push(t)}});i.default.bezier=function(t,e){for(var n=[],r=0;t.path.length>r;r++)for(var a=!1,s=0;t.path[r].length>s;s++){var l=t.path[r][s];if(a){var u={from:a,to:l};n.push(new o(u,t.icon,e))}a=t.path[r][s]}return i.default.layerGroup(n)},e.Bezier=o,e.noop=function(){}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModalImage=void 0;var i=function(t){return t&&t.__esModule?t:{default:t}}(n(469));n(470),e.ModalImage=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=h(n(12)),o=h(n(7)),r=h(n(8)),a=h(n(13)),s=h(n(14)),l=n(2),u=h(l),c=(n(21),n(17),n(89),n(11));n(51),h(n(176));function h(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(){var t,n,r,s;(0,o.default)(this,e);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=(0,a.default)(this,(t=e.__proto__||(0,i.default)(e)).call.apply(t,[this].concat(u))),r.state={visible:!1,images:[],index:0},s=n,(0,a.default)(r,s)}return(0,s.default)(e,t),(0,r.default)(e,[{key:"componentDidMount",value:function(){var t=this,e=(0,c.toArray)(document.querySelectorAll(".image img"));e.forEach(function(e,n){e.addEventListener("click",function(){return t.loadImage(n)})}),this.setState({images:e}),document.body.addEventListener("keydown",function(e){if(document.activeElement&&document.activeElement!==document.body)return null;switch(e.keyCode){case 27:t.close();break;case 37:t.prev();break;case 39:t.next()}})}},{key:"loadImage",value:function(t){var e=this.state.images;e.length&&(t<0||t>=e.length||this.setState({visible:!0,index:t}))}},{key:"prev",value:function(){var t=this.state,e=t.index,n=t.images;n.length&&this.setState({index:(n.length+e-1)%n.length})}},{key:"next",value:function(){var t=this.state,e=t.index,n=t.images;n.length&&this.setState({index:(e+1)%n.length})}},{key:"close",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var t=this,e=this.state,n=e.images,i=e.index,o=e.visible;if(!n.length)return null;var r=n[i],a=null,s=r.nextSibling;return s&&s.classList.contains("caption")&&(a=s.innerText),u.default.createElement("div",{className:o?"modal visible":"modal"},u.default.createElement("div",{className:"inner",onClick:function(){return t.close()}},u.default.createElement("div",{className:"centered",onClick:function(t){return t.stopPropagation()}},u.default.createElement("img",{src:r.src}),a&&u.default.createElement("div",{className:"caption"},a))),u.default.createElement("div",{onClick:function(){return t.prev()},className:"prev","aria-label":"Previous image",alt:"Previous image"},u.default.createElement("img",{src:"/assets/img/arrow-left.png"})),u.default.createElement("div",{onClick:function(){return t.next()},className:"next","aria-label":"Next image",alt:"Next image"},u.default.createElement("img",{src:"/assets/img/arrow-right.png"})),u.default.createElement("div",{onClick:function(){return t.close()},className:"close","aria-label":"Close",alt:"Close"},u.default.createElement("img",{src:"/assets/img/close.png"})))}}]),e}(l.Component);e.default=d},function(t,e,n){var i=n(471);"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(26)(i,o);i.locals&&(t.exports=i.locals)},function(t,e,n){(t.exports=n(25)(!1)).push([t.i,".modal {\n position: fixed;\n top: 0; left: 0; width: 100%; height: 100%;\n background: rgba(0,0,0,0.9);\n color: white;\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0;\n pointer-events: none;\n z-index: -9999999;\n transition: opacity 0.2s cubic-bezier(0,0,1,1);\n}\n.modal.visible {\n opacity: 1;\n pointer-events: auto;\n z-index: 9999999;\n}\n.modal .inner {\n position: absolute;\n top: 0; left: 0;\n width: 100%; height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.modal img {\n max-width: 85vw;\n max-height: 90vh;\n}\n.modal .caption {\n display: block;\n text-align: center;\n background: black;\n padding: 10px;\n}\n.modal .prev span,\n.modal .next span,\n.modal .close span {\n background: #222;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n text-align: center;\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: 0 1px 2px rgba(255,255,255,0.4);\n transition: all 0.2s cubic-bezier(0,0,1,1);\n user-select: none;\n}\n.desktop .modal .prev:hover span,\n.desktop .modal .prev:hover span,\n.desktop .modal .prev:hover span {\n background: #000;\n box-shadow: 0 1px 2px rgba(255,255,255,0.6);\n}\n.modal .prev,\n.modal .next,\n.modal .close {\n position: absolute;\n top: 0;\n padding: 20px;\n width: 8%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n transition: all 0.1s cubic-bezier(0,0,0,1);\n z-index: 99999999;\n}\n.modal .prev {\n left: 0;\n}\n.modal .next {\n right: 0;\n}\n.modal .prev img,\n.modal .next img {\n max-width: 40px;\n max-height: 100%;\n}\n\n.modal .close {\n position: absolute;\n top: 0; right: 0;\n width: 80px;\n height: 80px;\n max-width: 10vw;\n max-height: 10vw;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n transition: all 0.1s cubic-bezier(0,0,0,1);\n padding: 20px;\n}\n.modal .close img {\n width: 100%;\n height: 100%;\n}\n\n.desktop .modal .prev:hover {\n width: 9%;\n left: -10px;\n}\n.desktop .modal .next:hover {\n width: 9%;\n right: -10px;\n}\n.desktop .modal .close:hover {\n padding: 10px;\n}\n\n@media all and (max-device-width: 1024px) {\n .modal img {\n max-width: 100vw;\n max-height: 90vh;\n }\n}",""])}]); \ No newline at end of file
diff --git a/site/public/assets/js/vendor/draco/draco_decoder.js b/site/public/assets/js/vendor/draco/draco_decoder.js
new file mode 100644
index 00000000..12cea320
--- /dev/null
+++ b/site/public/assets/js/vendor/draco/draco_decoder.js
@@ -0,0 +1,32 @@
+var DracoDecoderModule = function(DracoDecoderModule) {
+ DracoDecoderModule = DracoDecoderModule || {};
+
+var Module=typeof DracoDecoderModule!=="undefined"?DracoDecoderModule:{};var isRuntimeInitialized=false;var isModuleParsed=false;Module["onRuntimeInitialized"]=(function(){isRuntimeInitialized=true;if(isModuleParsed){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}});Module["onModuleParsed"]=(function(){isModuleParsed=true;if(isRuntimeInitialized){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}});function isVersionSupported(versionString){if(typeof versionString!=="string")return false;const version=versionString.split(".");if(version.length<2||version.length>3)return false;if(version[0]==1&&version[1]>=0&&version[1]<=3)return true;if(version[0]!=0||version[1]>10)return false;return true}Module["isVersionSupported"]=isVersionSupported;var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=(function(status,toThrow){throw toThrow});Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){var nodeFS;var nodePath;Module["read"]=function shell_read(filename,binary){var ret;ret=tryParseAsDataURI(filename);if(!ret){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);ret=nodeFS["readFileSync"](filename)}return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}Module["arguments"]=process["argv"].slice(2);process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));process["on"]("unhandledRejection",(function(reason,p){process["exit"](1)}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){Module["read"]=function shell_read(f){var data=tryParseAsDataURI(f);if(data){return intArrayToString(data)}return read(f)}}Module["readBinary"]=function readBinary(f){var data;data=tryParseAsDataURI(f);if(data){return data}if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=(function(status,toThrow){quit(status)})}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=(function(title){document.title=title})}Module["print"]=typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null;Module["printErr"]=typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||Module["print"];Module.print=Module["print"];Module.printErr=Module["printErr"];for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var STACK_ALIGN=16;function staticAlloc(size){assert(!staticSealed);var ret=STATICTOP;STATICTOP=STATICTOP+size+15&-16;return ret}function dynamicAlloc(size){assert(DYNAMICTOP_PTR);var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;if(end>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){HEAP32[DYNAMICTOP_PTR>>2]=ret;return 0}}return ret}function alignMemory(size,factor){if(!factor)factor=STACK_ALIGN;var ret=size=Math.ceil(size/factor)*factor;return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;Module.printErr(text)}}var jsCallStartIndex=1;var functionPointers=new Array(0);var funcWrappers={};function dynCall(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}var GLOBAL_BASE=8;var ABORT=0;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}var JSfuncs={"stackSave":(function(){stackSave()}),"stackRestore":(function(){stackRestore()}),"arrayToC":(function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};function ccall(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);if(returnType==="string")ret=Pointer_stringify(ret);if(returnType==="boolean")ret=Boolean(ret);if(stack!==0){stackRestore(stack)}return ret}function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var ALLOC_STATIC=2;var ALLOC_NONE=4;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:staticAlloc,stackAlloc,staticAlloc,dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var stop;ptr=ret;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr<stop;ptr+=4){HEAP32[ptr>>2]=0}stop=ret+size;while(ptr<stop){HEAP8[ptr++>>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i<size){var curr=slab[i];type=singleType||types[i];if(type===0){i++;continue}if(type=="i64")type="i32";setValue(ret+i,curr,type);if(previousType!==type){typeSize=getNativeTypeSize(type);previousType=type}i+=typeSize}return ret}function Pointer_stringify(ptr,length){if(length===0||!ptr)return"";var hasUtf=0;var t;var i=0;while(1){t=HEAPU8[ptr+i>>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return UTF8ToString(ptr)}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx){var endPtr=idx;while(u8Array[endPtr])++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}}function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function demangle(func){return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}var WASM_PAGE_SIZE=65536;var ASMJS_PAGE_SIZE=16777216;var MIN_TOTAL_MEMORY=16777216;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBuffer(buf){Module["buffer"]=buffer=buf}function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed;var STACK_BASE,STACKTOP,STACK_MAX;var DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0;staticSealed=false;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}if(!Module["reallocBuffer"])Module["reallocBuffer"]=(function(size){var ret;try{if(ArrayBuffer.transfer){ret=ArrayBuffer.transfer(buffer,size)}else{var oldHEAP8=HEAP8;ret=new ArrayBuffer(size);var temp=new Int8Array(ret);temp.set(oldHEAP8)}}catch(e){return false}var success=_emscripten_replace_memory(ret);if(!success)return false;return ret});function enlargeMemory(){var PAGE_MULTIPLE=Module["usingWasm"]?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE;var LIMIT=2147483648-PAGE_MULTIPLE;if(HEAP32[DYNAMICTOP_PTR>>2]>LIMIT){return false}var OLD_TOTAL_MEMORY=TOTAL_MEMORY;TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);while(TOTAL_MEMORY<HEAP32[DYNAMICTOP_PTR>>2]){if(TOTAL_MEMORY<=536870912){TOTAL_MEMORY=alignUp(2*TOTAL_MEMORY,PAGE_MULTIPLE)}else{TOTAL_MEMORY=Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,PAGE_MULTIPLE),LIMIT)}}var replacement=Module["reallocBuffer"](TOTAL_MEMORY);if(!replacement||replacement.byteLength!=TOTAL_MEMORY){TOTAL_MEMORY=OLD_TOTAL_MEMORY;return false}updateGlobalBuffer(replacement);updateGlobalBufferViews();return true}var byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);byteLength(new ArrayBuffer(4))}catch(e){byteLength=(function(buffer){return buffer.byteLength})}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(TOTAL_MEMORY<TOTAL_STACK)Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")");if(Module["buffer"]){buffer=Module["buffer"]}else{{buffer=new ArrayBuffer(TOTAL_MEMORY)}Module["buffer"]=buffer}updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}HEAP32[0]=1668509029;HEAP16[1]=25459;if(HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPreMain(cb){__ATMAIN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_round=Math.round;var Math_min=Math.min;var Math_max=Math.max;var Math_clz32=Math.clz32;var Math_trunc=Math.trunc;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}STATIC_BASE=GLOBAL_BASE;STATICTOP=STATIC_BASE+18400;__ATINIT__.push();memoryInitializer="data:application/octet-stream;base64,uBIAAAATAAAYAAAAAAAAAJASAAAnEwAAuBIAAEQTAAAYAAAAAAAAALgSAABtEwAAQAAAAAAAAACQEgAAiRMAALgSAAAdFAAAMAAAAAAAAACQEgAAPxQAALgSAABkFAAAMAAAAAAAAAC4EgAA+SAAAFgAAAAAAAAAuBIAAJQUAACQAAAAAAAAALgSAADtFAAAoAAAAAAAAAC4EgAAQRUAALAAAAAAAAAAuBIAAHUVAADAAAAAAAAAAJASAACgFQAAuBIAAMQVAADYAAAAAAAAAJASAABiFgAAuBIAAAAXAADwAAAAAAAAALgSAACYFwAAkAAAAAAAAAC4EgAAIRgAAPAAAAAAAAAAuBIAALsYAADwAAAAAAAAALgSAABNGQAA8AAAAAAAAAC4EgAA8xkAAPAAAAAAAAAAuBIAAI4aAADwAAAAAAAAALgSAAAkGwAAYAEAAAAAAACQEgAAzxsAALgSAAB6HAAAeAEAAAAAAAC4EgAAHx0AAJAAAAAAAAAAuBIAALUdAAB4AQAAAAAAALgSAABcHgAAeAEAAAAAAAC4EgAA+x4AAHgBAAAAAAAAuBIAAK4fAAB4AQAAAAAAALgSAABWIAAAeAEAAAAAAAC4EgAAuS0AAHAAAAAAAAAAuBIAACUhAAD4AQAAAAAAALgSAACWIQAAoAAAAAAAAAC4EgAAAiIAABgCAAAAAAAAkBIAALgiAAC4EgAAbiMAADACAAAAAAAAuBIAAB4kAAD4AQAAAAAAALgSAAC/JAAAUAIAAAAAAACQEgAAgiUAALgSAABFJgAAaAIAAAAAAAC4EgAAAicAAPgBAAAAAAAAuBIAALAnAACIAgAAAAAAALgSAAAUKAAAoAAAAAAAAAC4EgAAcygAAKgCAAAAAAAAkBIAABwpAAC4EgAAxSkAAMACAAAAAAAAuBIAAGgqAACIAgAAAAAAALgSAAD8KgAA4AIAAAAAAACQEgAAsisAALgSAABoLAAA+AIAAAAAAAC4EgAAGC0AAIgCAAAAAAAAuBIAAOQtAABwAAAAAAAAALgS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mRsZQBSZW1vdGUgSS9PIGVycm9yAFF1b3RhIGV4Y2VlZGVkAE5vIG1lZGl1bSBmb3VuZABXcm9uZyBtZWRpdW0gdHlwZQBObyBlcnJvciBpbmZvcm1hdGlvbgAAJWQAdGVybWluYXRpbmcgd2l0aCAlcyBleGNlcHRpb24gb2YgdHlwZSAlczogJXMAdGVybWluYXRpbmcgd2l0aCAlcyBleGNlcHRpb24gb2YgdHlwZSAlcwB0ZXJtaW5hdGluZyB3aXRoICVzIGZvcmVpZ24gZXhjZXB0aW9uAHRlcm1pbmF0aW5nAHVuY2F1Z2h0AFN0OWV4Y2VwdGlvbgBOMTBfX2N4eGFiaXYxMTZfX3NoaW1fdHlwZV9pbmZvRQBTdDl0eXBlX2luZm8ATjEwX19jeHhhYml2MTIwX19zaV9jbGFzc190eXBlX2luZm9FAE4xMF9fY3h4YWJpdjExN19fY2xhc3NfdHlwZV9pbmZvRQBwdGhyZWFkX29uY2UgZmFpbHVyZSBpbiBfX2N4YV9nZXRfZ2xvYmFsc19mYXN0KCkAY2Fubm90IGNyZWF0ZSBwdGhyZWFkIGtleSBmb3IgX19jeGFfZ2V0X2dsb2JhbHMoKQBjYW5ub3QgemVybyBvdXQgdGhyZWFkIHZhbHVlIGZvciBfX2N4YV9nZXRfZ2xvYmFscygpAHRlcm1pbmF0ZV9oYW5kbGVyIHVuZXhwZWN0ZWRseSByZXR1cm5lZABTdDExbG9naWNfZXJyb3IAU3QxMmxlbmd0aF9lcnJvcgBOMTBfX2N4eGFiaXYxMTlfX3BvaW50ZXJfdHlwZV9pbmZvRQBOMTBfX2N4eGFiaXYxMTdfX3BiYXNlX3R5cGVfaW5mb0U=";var tempDoublePtr=STATICTOP;STATICTOP+=16;function ___cxa_allocate_exception(size){return _malloc(size)}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:(function(adjusted){if(!adjusted||EXCEPTIONS.infos[adjusted])return adjusted;for(var ptr in EXCEPTIONS.infos){var info=EXCEPTIONS.infos[ptr];if(info.adjusted===adjusted){return ptr}}return adjusted}),addRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount++}),decRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];assert(info.refcount>0);info.refcount--;if(info.refcount===0&&!info.rethrown){if(info.destructor){Module["dynCall_vi"](info.destructor,ptr)}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}}),clearRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0})};function ___cxa_begin_catch(ptr){var info=EXCEPTIONS.infos[ptr];if(info&&!info.caught){info.caught=true;__ZSt18uncaught_exceptionv.uncaught_exception--}if(info)info.rethrown=false;EXCEPTIONS.caught.push(ptr);EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(ptr));return ptr}function ___cxa_pure_virtual(){ABORT=true;throw"Pure virtual function called!"}function ___resumeException(ptr){if(!EXCEPTIONS.last){EXCEPTIONS.last=ptr}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var thrown=EXCEPTIONS.last;if(!thrown){return(setTempRet0(0),0)|0}var info=EXCEPTIONS.infos[thrown];var throwntype=info.type;if(!throwntype){return(setTempRet0(0),thrown)|0}var typeArray=Array.prototype.slice.call(arguments);var pointer=Module["___cxa_is_pointer_type"](throwntype);if(!___cxa_find_matching_catch.buffer)___cxa_find_matching_catch.buffer=_malloc(4);HEAP32[___cxa_find_matching_catch.buffer>>2]=thrown;thrown=___cxa_find_matching_catch.buffer;for(var i=0;i<typeArray.length;i++){if(typeArray[i]&&Module["___cxa_can_catch"](typeArray[i],throwntype,thrown)){thrown=HEAP32[thrown>>2];info.adjusted=thrown;return(setTempRet0(typeArray[i]),thrown)|0}}thrown=HEAP32[thrown>>2];return(setTempRet0(throwntype),thrown)|0}function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:ptr,type:type,destructor:destructor,refcount:0,caught:false,rethrown:false};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC);function ___gxx_personality_v0(){}var SYSCALLS={varargs:0,get:(function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret}),getStr:(function(){var ret=Pointer_stringify(SYSCALLS.get());return ret}),get64:(function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low}),getZero:(function(){assert(SYSCALLS.get()===0)})};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function flush_NO_FILESYSTEM(){var fflush=Module["_fflush"];if(fflush)fflush(0);var printChar=___syscall146.printChar;if(!printChar)return;var buffers=___syscall146.buffers;if(buffers[1].length)printChar(1,10);if(buffers[2].length)printChar(2,10)}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;if(!___syscall146.buffers){___syscall146.buffers=[null,[],[]];___syscall146.printChar=(function(stream,curr){var buffer=___syscall146.buffers[stream];assert(buffer);if(curr===0||curr===10){(stream===1?Module["print"]:Module["printErr"])(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}})}for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j<len;j++){___syscall146.printChar(stream,HEAPU8[ptr+j])}ret+=len}return ret}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall54(which,varargs){SYSCALLS.varargs=varargs;try{return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _abort(){Module["abort"]()}var _llvm_floor_f64=Math_floor;function _llvm_trap(){abort("trap!")}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}var PTHREAD_SPECIFIC={};function _pthread_getspecific(key){return PTHREAD_SPECIFIC[key]||0}var PTHREAD_SPECIFIC_NEXT_KEY=1;var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _pthread_key_create(key,destructor){if(key==0){return ERRNO_CODES.EINVAL}HEAP32[key>>2]=PTHREAD_SPECIFIC_NEXT_KEY;PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0;PTHREAD_SPECIFIC_NEXT_KEY++;return 0}function _pthread_once(ptr,func){if(!_pthread_once.seen)_pthread_once.seen={};if(ptr in _pthread_once.seen)return;Module["dynCall_v"](func);_pthread_once.seen[ptr]=1}function _pthread_setspecific(key,value){if(!(key in PTHREAD_SPECIFIC)){return ERRNO_CODES.EINVAL}PTHREAD_SPECIFIC[key]=value;return 0}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}DYNAMICTOP_PTR=staticAlloc(4);STACK_BASE=STACKTOP=alignMemory(STATICTOP);STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;staticSealed=true;var ASSERTIONS=false;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}function intArrayToString(array){var ret=[];for(var i=0;i<array.length;i++){var chr=array[i];if(chr>255){if(ASSERTIONS){assert(false,"Character code "+chr+" ("+String.fromCharCode(chr)+") at offset "+i+" not in 0x00-0xFF.")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var decodeBase64=typeof atob==="function"?atob:(function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i<input.length);return output});function intArrayFromBase64(s){if(typeof ENVIRONMENT_IS_NODE==="boolean"&&ENVIRONMENT_IS_NODE){var buf;try{buf=Buffer.from(s,"base64")}catch(_){buf=new Buffer(s,"base64")}return new Uint8Array(buf.buffer,buf.byteOffset,buf.byteLength)}try{var decoded=decodeBase64(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i<decoded.length;++i){bytes[i]=decoded.charCodeAt(i)}return bytes}catch(_){throw new Error("Converting base64 string to bytes failed.")}}function tryParseAsDataURI(filename){if(!isDataURI(filename)){return}return intArrayFromBase64(filename.slice(dataURIPrefix.length))}function invoke_ii(index,a1){try{return Module["dynCall_ii"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iii(index,a1,a2){try{return Module["dynCall_iii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiii(index,a1,a2,a3){try{return Module["dynCall_iiii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){try{return Module["dynCall_iiiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_v(index){try{Module["dynCall_v"](index)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vi(index,a1){try{Module["dynCall_vi"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vii(index,a1,a2){try{Module["dynCall_vii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viii(index,a1,a2,a3){try{Module["dynCall_viii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiii(index,a1,a2,a3,a4){try{Module["dynCall_viiii"](index,a1,a2,a3,a4)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){try{Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){try{Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}Module.asmGlobalArg={"Math":Math,"Int8Array":Int8Array,"Int16Array":Int16Array,"Int32Array":Int32Array,"Uint8Array":Uint8Array,"Uint16Array":Uint16Array,"Uint32Array":Uint32Array,"Float32Array":Float32Array,"Float64Array":Float64Array,"NaN":NaN,"Infinity":Infinity,"byteLength":byteLength};Module.asmLibraryArg={"abort":abort,"assert":assert,"enlargeMemory":enlargeMemory,"getTotalMemory":getTotalMemory,"abortOnCannotGrowMemory":abortOnCannotGrowMemory,"invoke_ii":invoke_ii,"invoke_iii":invoke_iii,"invoke_iiii":invoke_iiii,"invoke_iiiiiii":invoke_iiiiiii,"invoke_v":invoke_v,"invoke_vi":invoke_vi,"invoke_vii":invoke_vii,"invoke_viii":invoke_viii,"invoke_viiii":invoke_viiii,"invoke_viiiii":invoke_viiiii,"invoke_viiiiii":invoke_viiiiii,"__ZSt18uncaught_exceptionv":__ZSt18uncaught_exceptionv,"___cxa_allocate_exception":___cxa_allocate_exception,"___cxa_begin_catch":___cxa_begin_catch,"___cxa_find_matching_catch":___cxa_find_matching_catch,"___cxa_pure_virtual":___cxa_pure_virtual,"___cxa_throw":___cxa_throw,"___gxx_personality_v0":___gxx_personality_v0,"___resumeException":___resumeException,"___setErrNo":___setErrNo,"___syscall140":___syscall140,"___syscall146":___syscall146,"___syscall54":___syscall54,"___syscall6":___syscall6,"_abort":_abort,"_emscripten_memcpy_big":_emscripten_memcpy_big,"_llvm_floor_f64":_llvm_floor_f64,"_llvm_trap":_llvm_trap,"_pthread_getspecific":_pthread_getspecific,"_pthread_key_create":_pthread_key_create,"_pthread_once":_pthread_once,"_pthread_setspecific":_pthread_setspecific,"flush_NO_FILESYSTEM":flush_NO_FILESYSTEM,"DYNAMICTOP_PTR":DYNAMICTOP_PTR,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX,"cttz_i8":cttz_i8};// EMSCRIPTEN_START_ASM
+var asm=(/** @suppress {uselessCode} */ function(global,env,buffer) {
+"almost asm";var a=global.Int8Array;var b=new a(buffer);var c=global.Int16Array;var d=new c(buffer);var e=global.Int32Array;var f=new e(buffer);var g=global.Uint8Array;var h=new g(buffer);var i=global.Uint16Array;var j=new i(buffer);var k=global.Uint32Array;var l=new k(buffer);var m=global.Float32Array;var n=new m(buffer);var o=global.Float64Array;var p=new o(buffer);var q=global.byteLength;var r=env.DYNAMICTOP_PTR|0;var s=env.tempDoublePtr|0;var t=env.ABORT|0;var u=env.STACKTOP|0;var v=env.STACK_MAX|0;var w=env.cttz_i8|0;var x=0;var y=0;var z=0;var A=0;var B=global.NaN,C=global.Infinity;var D=0,E=0,F=0,G=0,H=0.0;var I=0;var J=global.Math.floor;var K=global.Math.abs;var L=global.Math.sqrt;var M=global.Math.pow;var N=global.Math.cos;var O=global.Math.sin;var P=global.Math.tan;var Q=global.Math.acos;var R=global.Math.asin;var S=global.Math.atan;var T=global.Math.atan2;var U=global.Math.exp;var V=global.Math.log;var W=global.Math.ceil;var X=global.Math.imul;var Y=global.Math.min;var Z=global.Math.max;var _=global.Math.clz32;var $=global.Math.fround;var aa=env.abort;var ba=env.assert;var ca=env.enlargeMemory;var da=env.getTotalMemory;var ea=env.abortOnCannotGrowMemory;var fa=env.invoke_ii;var ga=env.invoke_iii;var ha=env.invoke_iiii;var ia=env.invoke_iiiiiii;var ja=env.invoke_v;var ka=env.invoke_vi;var la=env.invoke_vii;var ma=env.invoke_viii;var na=env.invoke_viiii;var oa=env.invoke_viiiii;var pa=env.invoke_viiiiii;var qa=env.__ZSt18uncaught_exceptionv;var ra=env.___cxa_allocate_exception;var sa=env.___cxa_begin_catch;var ta=env.___cxa_find_matching_catch;var ua=env.___cxa_pure_virtual;var va=env.___cxa_throw;var wa=env.___gxx_personality_v0;var xa=env.___resumeException;var ya=env.___setErrNo;var za=env.___syscall140;var Aa=env.___syscall146;var Ba=env.___syscall54;var Ca=env.___syscall6;var Da=env._abort;var Ea=env._emscripten_memcpy_big;var Fa=env._llvm_floor_f64;var Ga=env._llvm_trap;var Ha=env._pthread_getspecific;var Ia=env._pthread_key_create;var Ja=env._pthread_once;var Ka=env._pthread_setspecific;var La=env.flush_NO_FILESYSTEM;var Ma=$(0);const Na=$(0);function Oa(newBuffer){if(q(newBuffer)&16777215||q(newBuffer)<=16777215||q(newBuffer)>2147483648)return false;b=new a(newBuffer);d=new c(newBuffer);f=new e(newBuffer);h=new g(newBuffer);j=new i(newBuffer);l=new k(newBuffer);n=new m(newBuffer);p=new o(newBuffer);buffer=newBuffer;return true}
+// EMSCRIPTEN_START_FUNCS
+function xc(a,c,d){a=a|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)>>>0){g=0;return g|0}y=j;v=f[y>>2]|0;C=f[y+4>>2]|0;y=l;B=f[y>>2]|0;z=f[y+4>>2]|0;y=Xl(v|0,C|0,B|0,z|0)|0;x=I;A=u&255;u=al(A|0,0,i|0,0)|0;E=I;if((x|0)<(E|0)|(x|0)==(E|0)&y>>>0<u>>>0){g=0;return g|0}if(!i)D=20;else{u=0;y=B;B=z;z=C;C=v;while(1){v=Vl(y|0,B|0,A|0,0)|0;E=I;if((z|0)<(E|0)|(z|0)==(E|0)&C>>>0<v>>>0){F=y;G=B}else{Ef(k+(u<<2)|0,(f[d>>2]|0)+y|0,w|0)|0;v=l;E=Vl(f[v>>2]|0,f[v+4>>2]|0,A|0,0)|0;v=I;x=l;f[x>>2]=E;f[x+4>>2]=v;F=E;G=v}v=u+1|0;if((v|0)==(i|0)){D=19;break a}E=j;u=v;y=F;B=G;z=f[E+4>>2]|0;C=f[E>>2]|0}}}else if(yh(i,e,d,k)|0)D=19;else{g=0;return g|0}while(0);do if((D|0)==19)if(!i)D=20;else{G=a+20|0;F=f[G>>2]|0;if(F|0?Pa[f[(f[F>>2]|0)+32>>2]&127](F)|0:0){H=G;J=1;break}ok(k,i,k);H=G;J=1}while(0);if((D|0)==20){H=a+20|0;J=0}a=f[H>>2]|0;if(a|0){if(!(Qa[f[(f[a>>2]|0)+40>>2]&127](a,d)|0)){g=0;return g|0}if(J?(J=f[H>>2]|0,!(Sa[f[(f[J>>2]|0)+44>>2]&31](J,k,k,i,e,f[c>>2]|0)|0)):0){g=0;return g|0}}g=1;return g|0}function yc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)mp(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;dn(e,13708);f[e>>2]=4852;va(e|0,1176,105)}e=Yk(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)mp(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0<c>>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){o=d;while(1){e=f[o+4>>2]|0;if(!i)if(e>>>0<c>>>0)p=e;else p=(e>>>0)%(c>>>0)|0;else p=e&h;if((p|0)==(k|0))break;q=(f[a>>2]|0)+(p<<2)|0;if(!(f[q>>2]|0))break b;e=f[o>>2]|0;c:do if(!e)r=o;else{s=o+8|0;t=b[s+11>>0]|0;u=t<<24>>24<0;v=t&255;t=u?f[o+12>>2]|0:v;w=(t|0)==0;if(u){u=o;x=e;while(1){y=x+8|0;z=b[y+11>>0]|0;A=z<<24>>24<0;if((t|0)!=((A?f[x+12>>2]|0:z&255)|0)){r=u;break c}if(!w?fj(f[s>>2]|0,A?f[y>>2]|0:y,t)|0:0){r=u;break c}y=f[x>>2]|0;if(!y){r=x;break c}else{A=x;x=y;u=A}}}if(w){u=o;x=e;while(1){A=b[x+8+11>>0]|0;if((A<<24>>24<0?f[x+12>>2]|0:A&255)|0){r=u;break c}A=f[x>>2]|0;if(!A){r=x;break c}else{y=x;x=A;u=y}}}u=o;x=e;while(1){w=x+8|0;y=b[w+11>>0]|0;A=y<<24>>24<0;if((t|0)!=((A?f[x+12>>2]|0:y&255)|0)){r=u;break c}y=A?f[w>>2]|0:w;if((b[y>>0]|0)==(f[s>>2]&255)<<24>>24){B=s;C=v;D=y}else{r=u;break c}while(1){C=C+-1|0;B=B+1|0;if(!C)break;D=D+1|0;if((b[B>>0]|0)!=(b[D>>0]|0)){r=u;break c}}y=f[x>>2]|0;if(!y){r=x;break}else{w=x;x=y;u=w}}}while(0);f[j>>2]=f[r>>2];f[r>>2]=f[f[(f[a>>2]|0)+(p<<2)>>2]>>2];f[f[(f[a>>2]|0)+(p<<2)>>2]>>2]=o;e=f[g>>2]|0;if(!e){E=43;break a}else o=e}d=f[o>>2]|0;if(!d){E=43;break a}else{g=o;j=o}}f[q>>2]=j;m=f[o>>2]|0;if(!m){E=43;break}else{k=p;l=o;n=o}}if((E|0)==43)return}function zc(a,c,e,g,h){a=a|0;c=c|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;i=u;u=u+32|0;j=i+12|0;k=i;f[c+40>>2]=e;e=c+32|0;f[e>>2]=g;f[c+4>>2]=h;fc(a,g,j);if(f[a>>2]|0){u=i;return}g=a+4|0;h=g+11|0;if((b[h>>0]|0)<0)mp(f[g>>2]|0);l=b[j+7>>0]|0;if((Pa[f[(f[c>>2]|0)+8>>2]&127](c)|0)!=(l&255|0)){m=Yk(64)|0;f[k>>2]=m;f[k+8>>2]=-2147483584;f[k+4>>2]=50;n=m;o=13342;p=n+50|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[m+50>>0]=0;f[a>>2]=-1;zh(g,k);if((b[k+11>>0]|0)<0)mp(f[k>>2]|0);u=i;return}m=b[j+5>>0]|0;b[c+36>>0]=m;q=b[j+6>>0]|0;b[c+37>>0]=q;if((m+-1&255)>1){r=Yk(32)|0;f[k>>2]=r;f[k+8>>2]=-2147483616;f[k+4>>2]=22;n=r;o=13393;p=n+22|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[r+22>>0]=0;f[a>>2]=-5;zh(g,k);if((b[k+11>>0]|0)<0)mp(f[k>>2]|0);u=i;return}r=q&255;if(m<<24>>24==2&(l<<24>>24==0?3:2)>>>0<r>>>0){l=Yk(32)|0;f[k>>2]=l;f[k+8>>2]=-2147483616;f[k+4>>2]=22;n=l;o=13416;p=n+22|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[l+22>>0]=0;f[a>>2]=-5;zh(g,k);if((b[k+11>>0]|0)<0)mp(f[k>>2]|0);u=i;return}l=((m&255)<<8|r)&65535;d[(f[e>>2]|0)+38>>1]=l;if((l&65535)>258?(d[j+10>>1]|0)<0:0){Pd(a,c);if(f[a>>2]|0){u=i;return}if((b[h>>0]|0)<0)mp(f[g>>2]|0)}if(!(Pa[f[(f[c>>2]|0)+12>>2]&127](c)|0)){h=Yk(48)|0;f[k>>2]=h;f[k+8>>2]=-2147483600;f[k+4>>2]=33;n=h;o=13439;p=n+33|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[h+33>>0]=0;f[a>>2]=-1;zh(g,k);if((b[k+11>>0]|0)<0)mp(f[k>>2]|0);u=i;return}if(!(Pa[f[(f[c>>2]|0)+20>>2]&127](c)|0)){h=Yk(32)|0;f[k>>2]=h;f[k+8>>2]=-2147483616;f[k+4>>2]=31;n=h;o=13473;p=n+31|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[h+31>>0]=0;f[a>>2]=-1;zh(g,k);if((b[k+11>>0]|0)<0)mp(f[k>>2]|0);u=i;return}if(Pa[f[(f[c>>2]|0)+24>>2]&127](c)|0){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=i;return}c=Yk(48)|0;f[k>>2]=c;f[k+8>>2]=-2147483600;f[k+4>>2]=34;n=c;o=13505;p=n+34|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[c+34>>0]=0;f[a>>2]=-1;zh(g,k);if((b[k+11>>0]|0)<0)mp(f[k>>2]|0);u=i;return}function Ac(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c=u;u=u+48|0;d=c+32|0;e=c+28|0;g=c+16|0;h=c;i=a+16|0;j=f[i>>2]|0;if(j|0){k=f[b>>2]|0;l=i;m=j;a:while(1){j=m;while(1){if((f[j+16>>2]|0)>=(k|0))break;n=f[j+4>>2]|0;if(!n){o=l;break a}else j=n}m=f[j>>2]|0;if(!m){o=j;break}else l=j}if((o|0)!=(i|0)?(k|0)>=(f[o+16>>2]|0):0){p=o;q=p+20|0;u=c;return q|0}}Nn(g);f[h>>2]=f[b>>2];b=h+4|0;f[h+8>>2]=0;o=h+12|0;f[o>>2]=0;k=h+8|0;f[b>>2]=k;l=f[g>>2]|0;m=g+4|0;if((l|0)!=(m|0)){n=k;r=l;while(1){l=r+16|0;f[e>>2]=n;f[d>>2]=f[e>>2];Hf(b,d,l,l)|0;l=f[r+4>>2]|0;if(!l){s=r+8|0;t=f[s>>2]|0;if((f[t>>2]|0)==(r|0))v=t;else{t=s;do{s=f[t>>2]|0;t=s+8|0;w=f[t>>2]|0}while((f[w>>2]|0)!=(s|0));v=w}}else{t=l;while(1){j=f[t>>2]|0;if(!j)break;else t=j}v=t}if((v|0)==(m|0))break;else r=v}}v=a+12|0;r=f[i>>2]|0;do if(r){d=f[h>>2]|0;e=a+16|0;n=r;while(1){l=f[n+16>>2]|0;if((d|0)<(l|0)){j=f[n>>2]|0;if(!j){x=23;break}else{y=n;z=j}}else{if((l|0)>=(d|0)){x=27;break}A=n+4|0;l=f[A>>2]|0;if(!l){x=26;break}else{y=A;z=l}}e=y;n=z}if((x|0)==23){B=n;C=n;break}else if((x|0)==26){B=n;C=A;break}else if((x|0)==27){B=n;C=e;break}}else{B=i;C=i}while(0);i=f[C>>2]|0;if(!i){x=Yk(32)|0;f[x+16>>2]=f[h>>2];A=x+20|0;f[A>>2]=f[b>>2];z=x+24|0;y=f[h+8>>2]|0;f[z>>2]=y;r=f[o>>2]|0;f[x+28>>2]=r;if(!r)f[A>>2]=z;else{f[y+8>>2]=z;f[b>>2]=k;f[k>>2]=0;f[o>>2]=0}f[x>>2]=0;f[x+4>>2]=0;f[x+8>>2]=B;f[C>>2]=x;B=f[f[v>>2]>>2]|0;if(!B)D=x;else{f[v>>2]=B;D=f[C>>2]|0}Cd(f[a+16>>2]|0,D);D=a+20|0;f[D>>2]=(f[D>>2]|0)+1;E=x}else E=i;Oh(h+4|0,f[k>>2]|0);Oh(g,f[m>>2]|0);p=E;q=p+20|0;u=c;return q|0}function Bc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;c=i;e=i;while(1){j=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;c=(X(j>>>24^j,1540483477)|0)^(X(c,1540483477)|0);e=e+-4|0;if(e>>>0<=3)break;else d=d+4|0}d=i+-4|0;e=d&-4;k=d-e|0;l=g+(e+4)|0;m=c}else{k=i;l=g;m=i}switch(k|0){case 3:{n=h[l+2>>0]<<16^m;o=6;break}case 2:{n=m;o=6;break}case 1:{p=m;o=7;break}default:q=m}if((o|0)==6){p=h[l+1>>0]<<8^n;o=7}if((o|0)==7)q=X(p^h[l>>0],1540483477)|0;l=X(q>>>13^q,1540483477)|0;q=l>>>15^l;l=f[a+4>>2]|0;if(!l){r=0;return r|0}p=l+-1|0;n=(p&l|0)==0;if(!n)if(q>>>0<l>>>0)s=q;else s=(q>>>0)%(l>>>0)|0;else s=q&p;m=f[(f[a>>2]|0)+(s<<2)>>2]|0;if(!m){r=0;return r|0}a=f[m>>2]|0;if(!a){r=0;return r|0}m=(i|0)==0;if(n){n=a;a:while(1){k=f[n+4>>2]|0;c=(q|0)==(k|0);if(!(c|(k&p|0)==(s|0))){r=0;o=40;break}do if(c?(k=n+8|0,e=b[k+11>>0]|0,d=e<<24>>24<0,j=e&255,((d?f[n+12>>2]|0:j)|0)==(i|0)):0){e=f[k>>2]|0;t=d?e:k;if(d){if(m){r=n;o=40;break a}if(!(fj(t,g,i)|0)){r=n;o=40;break a}else break}if(m){r=n;o=40;break a}if((b[g>>0]|0)==(e&255)<<24>>24){e=k;k=j;j=g;do{k=k+-1|0;e=e+1|0;if(!k){r=n;o=40;break a}j=j+1|0}while((b[e>>0]|0)==(b[j>>0]|0))}}while(0);n=f[n>>2]|0;if(!n){r=0;o=40;break}}if((o|0)==40)return r|0}else u=a;b:while(1){a=f[u+4>>2]|0;do if((q|0)==(a|0)){n=u+8|0;p=b[n+11>>0]|0;c=p<<24>>24<0;j=p&255;if(((c?f[u+12>>2]|0:j)|0)==(i|0)){p=f[n>>2]|0;e=c?p:n;if(c){if(m){r=u;o=40;break b}if(!(fj(e,g,i)|0)){r=u;o=40;break b}else break}if(m){r=u;o=40;break b}if((b[g>>0]|0)==(p&255)<<24>>24){p=n;n=j;j=g;do{n=n+-1|0;p=p+1|0;if(!n){r=u;o=40;break b}j=j+1|0}while((b[p>>0]|0)==(b[j>>0]|0))}}}else{if(a>>>0<l>>>0)v=a;else v=(a>>>0)%(l>>>0)|0;if((v|0)!=(s|0)){r=0;o=40;break b}}while(0);u=f[u>>2]|0;if(!u){r=0;o=40;break}}if((o|0)==40)return r|0;return 0}function Cc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;c=i;e=i;while(1){j=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;c=(X(j>>>24^j,1540483477)|0)^(X(c,1540483477)|0);e=e+-4|0;if(e>>>0<=3)break;else d=d+4|0}d=i+-4|0;e=d&-4;k=d-e|0;l=g+(e+4)|0;m=c}else{k=i;l=g;m=i}switch(k|0){case 3:{n=h[l+2>>0]<<16^m;o=6;break}case 2:{n=m;o=6;break}case 1:{p=m;o=7;break}default:q=m}if((o|0)==6){p=h[l+1>>0]<<8^n;o=7}if((o|0)==7)q=X(p^h[l>>0],1540483477)|0;l=X(q>>>13^q,1540483477)|0;q=l>>>15^l;l=f[a+4>>2]|0;if(!l){r=0;return r|0}p=l+-1|0;n=(p&l|0)==0;if(!n)if(q>>>0<l>>>0)s=q;else s=(q>>>0)%(l>>>0)|0;else s=q&p;m=f[(f[a>>2]|0)+(s<<2)>>2]|0;if(!m){r=0;return r|0}a=f[m>>2]|0;if(!a){r=0;return r|0}m=(i|0)==0;if(n){n=a;a:while(1){k=f[n+4>>2]|0;c=(k|0)==(q|0);if(!(c|(k&p|0)==(s|0))){r=0;o=40;break}do if(c?(k=n+8|0,e=b[k+11>>0]|0,d=e<<24>>24<0,j=e&255,((d?f[n+12>>2]|0:j)|0)==(i|0)):0){e=f[k>>2]|0;t=d?e:k;if(d){if(m){r=n;o=40;break a}if(!(fj(t,g,i)|0)){r=n;o=40;break a}else break}if(m){r=n;o=40;break a}if((b[g>>0]|0)==(e&255)<<24>>24){e=k;k=j;j=g;do{k=k+-1|0;e=e+1|0;if(!k){r=n;o=40;break a}j=j+1|0}while((b[e>>0]|0)==(b[j>>0]|0))}}while(0);n=f[n>>2]|0;if(!n){r=0;o=40;break}}if((o|0)==40)return r|0}else u=a;b:while(1){a=f[u+4>>2]|0;do if((a|0)==(q|0)){n=u+8|0;p=b[n+11>>0]|0;c=p<<24>>24<0;j=p&255;if(((c?f[u+12>>2]|0:j)|0)==(i|0)){p=f[n>>2]|0;e=c?p:n;if(c){if(m){r=u;o=40;break b}if(!(fj(e,g,i)|0)){r=u;o=40;break b}else break}if(m){r=u;o=40;break b}if((b[g>>0]|0)==(p&255)<<24>>24){p=n;n=j;j=g;do{n=n+-1|0;p=p+1|0;if(!n){r=u;o=40;break b}j=j+1|0}while((b[p>>0]|0)==(b[j>>0]|0))}}}else{if(a>>>0<l>>>0)v=a;else v=(a>>>0)%(l>>>0)|0;if((v|0)!=(s|0)){r=0;o=40;break b}}while(0);u=f[u>>2]|0;if(!u){r=0;o=40;break}}if((o|0)==40)return r|0;return 0}function Dc(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;h=a+4|0;i=f[c>>2]|0;c=i;do if((i|0)!=(h|0)){j=i+16|0;k=b[j+11>>0]|0;l=k<<24>>24<0;m=l?f[i+20>>2]|0:k&255;k=b[g+11>>0]|0;n=k<<24>>24<0;o=n?f[g+4>>2]|0:k&255;k=m>>>0<o>>>0;p=k?m:o;if((p|0)!=0?(q=fj(n?f[g>>2]|0:g,l?f[j>>2]|0:j,p)|0,(q|0)!=0):0){if((q|0)<0)break}else r=4;if((r|0)==4?o>>>0<m>>>0:0)break;q=o>>>0<m>>>0?o:m;if((q|0)!=0?(m=fj(l?f[j>>2]|0:j,n?f[g>>2]|0:g,q)|0,(m|0)!=0):0){if((m|0)>=0)r=37}else r=21;if((r|0)==21?!k:0)r=37;if((r|0)==37){f[d>>2]=c;f[e>>2]=c;s=e;return s|0}k=f[i+4>>2]|0;m=(k|0)==0;if(m){q=i+8|0;j=f[q>>2]|0;if((f[j>>2]|0)==(i|0))t=j;else{j=q;do{q=f[j>>2]|0;j=q+8|0;l=f[j>>2]|0}while((f[l>>2]|0)!=(q|0));t=l}}else{j=k;while(1){l=f[j>>2]|0;if(!l)break;else j=l}t=j}do if((t|0)!=(h|0)){k=t+16|0;l=b[k+11>>0]|0;q=l<<24>>24<0;p=q?f[t+20>>2]|0:l&255;l=p>>>0<o>>>0?p:o;if((l|0)!=0?(u=fj(n?f[g>>2]|0:g,q?f[k>>2]|0:k,l)|0,(u|0)!=0):0){if((u|0)<0)break}else r=31;if((r|0)==31?o>>>0<p>>>0:0)break;s=Xe(a,d,g)|0;return s|0}while(0);if(m){f[d>>2]=c;s=i+4|0;return s|0}else{f[d>>2]=t;s=t;return s|0}}while(0);t=f[i>>2]|0;do if((f[a>>2]|0)==(i|0))v=c;else{if(!t){h=i;while(1){e=f[h+8>>2]|0;if((f[e>>2]|0)==(h|0))h=e;else{w=e;break}}}else{h=t;while(1){m=f[h+4>>2]|0;if(!m){w=h;break}else h=m}}h=w;m=w+16|0;e=b[g+11>>0]|0;o=e<<24>>24<0;n=o?f[g+4>>2]|0:e&255;e=b[m+11>>0]|0;j=e<<24>>24<0;p=j?f[w+20>>2]|0:e&255;e=n>>>0<p>>>0?n:p;if((e|0)!=0?(u=fj(j?f[m>>2]|0:m,o?f[g>>2]|0:g,e)|0,(u|0)!=0):0){if((u|0)<0){v=h;break}}else r=13;if((r|0)==13?p>>>0<n>>>0:0){v=h;break}s=Xe(a,d,g)|0;return s|0}while(0);if(!t){f[d>>2]=i;s=i;return s|0}else{f[d>>2]=v;s=v+4|0;return s|0}return 0}function Ec(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;e=b+12|0;g=f[e>>2]|0;h=(f[c>>2]|0)-g|0;i=c+4|0;j=(f[i>>2]|0)-g|0;k=c;f[k>>2]=h;f[k+4>>2]=j;k=(h|0)>-1;l=(j|0)>-1;m=f[e>>2]|0;n=((l?j:0-j|0)+(k?h:0-h|0)|0)<=(m|0);if(n){o=h;p=j}else{if(k)if(!l)if((h|0)<1){q=-1;r=-1}else s=6;else{q=1;r=1}else if((j|0)<1){q=-1;r=-1}else s=6;if((s|0)==6){q=(h|0)>0?1:-1;r=(j|0)>0?1:-1}l=X(m,q)|0;k=X(m,r)|0;m=(h<<1)-l|0;f[c>>2]=m;h=(j<<1)-k|0;f[i>>2]=h;if((X(q,r)|0)>-1){r=0-h|0;f[c>>2]=r;t=0-m|0;u=r}else{f[c>>2]=h;t=m;u=h}h=(u+l|0)/2|0;f[c>>2]=h;l=(t+k|0)/2|0;f[i>>2]=l;o=h;p=l}if(!o)v=(p|0)==0;else v=(o|0)<0&(p|0)<1;if(!o)w=(p|0)==0?0:(p|0)>0?3:1;else w=(o|0)>0?(p>>31)+2|0:(p|0)<1?0:3;if(v){x=1;y=o;z=p}else{switch(w|0){case 1:{A=p;B=0-o|0;break}case 2:{A=0-o|0;B=0-p|0;break}case 3:{A=0-p|0;B=o;break}default:{A=o;B=p}}p=c;f[p>>2]=A;f[p+4>>2]=B;x=0;y=A;z=B}B=(f[d>>2]|0)+y|0;f[a>>2]=B;y=(f[d+4>>2]|0)+z|0;z=a+4|0;f[z>>2]=y;d=f[e>>2]|0;if((d|0)>=(B|0))if((B|0)<(0-d|0))C=(f[b+4>>2]|0)+B|0;else C=B;else C=B-(f[b+4>>2]|0)|0;f[a>>2]=C;if((d|0)>=(y|0))if((y|0)<(0-d|0))D=(f[b+4>>2]|0)+y|0;else D=y;else D=y-(f[b+4>>2]|0)|0;f[z>>2]=D;if(x){E=C;F=D}else{switch((4-w|0)%4|0|0){case 1:{G=D;H=0-C|0;break}case 2:{G=0-C|0;H=0-D|0;break}case 3:{G=0-D|0;H=C;break}default:{G=C;H=D}}D=a;f[D>>2]=G;f[D+4>>2]=H;E=G;F=H}if(n){I=E;J=F;K=I+g|0;L=J+g|0;M=a;N=M;f[N>>2]=K;O=M+4|0;P=O;f[P>>2]=L;return}if((E|0)>-1)if((F|0)<=-1)if((E|0)<1){Q=-1;R=-1}else s=42;else{Q=1;R=1}else if((F|0)<1){Q=-1;R=-1}else s=42;if((s|0)==42){Q=(E|0)>0?1:-1;R=(F|0)>0?1:-1}s=X(d,Q)|0;n=X(d,R)|0;d=(E<<1)-s|0;f[a>>2]=d;E=(F<<1)-n|0;f[z>>2]=E;if((X(Q,R)|0)>-1){R=0-E|0;f[a>>2]=R;S=0-d|0;T=R}else{f[a>>2]=E;S=d;T=E}E=(T+s|0)/2|0;f[a>>2]=E;s=(S+n|0)/2|0;f[z>>2]=s;I=E;J=s;K=I+g|0;L=J+g|0;M=a;N=M;f[N>>2]=K;O=M+4|0;P=O;f[P>>2]=L;return}function Fc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;g=u;u=u+64|0;i=g;j=i;k=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));a:do if(Vc(i,d)|0?td(i,d)|0:0){j=(a|0)==0;if(!j){if(!(f[i+12>>2]|0)){l=0;break}yf(d,0,0)|0;if(!j){j=i+48|0;k=i+44|0;m=i+40|0;n=i+16|0;o=i+28|0;p=(c|0)>0;q=d+36|0;r=d+32|0;s=d+24|0;t=d+28|0;v=0;w=0;x=f[j>>2]|0;while(1){b:do if(x>>>0<16384){y=f[k>>2]|0;z=x;while(1){if((y|0)<=0){A=z;break b}B=f[m>>2]|0;y=y+-1|0;f[k>>2]=y;C=z<<8|h[B+y>>0];f[j>>2]=C;if(C>>>0>=16384){A=C;break}else z=C}}else A=x;while(0);z=A&4095;y=f[(f[n>>2]|0)+(z<<2)>>2]|0;C=f[o>>2]|0;x=(X(f[C+(y<<3)>>2]|0,A>>>12)|0)+z-(f[C+(y<<3)+4>>2]|0)|0;f[j>>2]=x;c:do if(p){if((y|0)>0){D=0;E=w}else{C=(b[q>>0]|0)==0;z=0;B=w;while(1){if(C){l=0;break a}F=B+1|0;f[e+(B<<2)>>2]=0;z=z+1|0;if((z|0)>=(c|0)){G=F;break c}else B=F}}while(1){if(!(b[q>>0]|0)){l=0;break a}B=f[s>>2]|0;z=f[t>>2]|0;C=0;F=0;H=f[r>>2]|0;while(1){I=B+(H>>>3)|0;if(I>>>0<z>>>0){J=(h[I>>0]|0)>>>(H&7)&1;I=H+1|0;f[r>>2]=I;K=J;L=I}else{K=0;L=H}C=K<<F|C;F=F+1|0;if((F|0)==(y|0))break;else H=L}H=E+1|0;f[e+(E<<2)>>2]=C;D=D+1|0;if((D|0)>=(c|0)){G=H;break}else E=H}}else G=w;while(0);v=v+c|0;if(v>>>0>=a>>>0)break;else w=G}}}else yf(d,0,0)|0;_j(d);l=1}else l=0;while(0);d=f[i+28>>2]|0;if(d|0){G=i+32|0;a=f[G>>2]|0;if((a|0)!=(d|0))f[G>>2]=a+(~((a+-8-d|0)>>>3)<<3);mp(d)}d=f[i+16>>2]|0;if(d|0){a=i+20|0;G=f[a>>2]|0;if((G|0)!=(d|0))f[a>>2]=G+(~((G+-4-d|0)>>>2)<<2);mp(d)}d=f[i>>2]|0;if(!d){u=g;return l|0}G=i+4|0;i=f[G>>2]|0;if((i|0)!=(d|0))f[G>>2]=i+(~((i+-4-d|0)>>>2)<<2);mp(d);u=g;return l|0}function Gc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=a;h=b;i=h;j=c;k=d;l=k;if(!i){m=(e|0)!=0;if(!l){if(m){f[e>>2]=(g>>>0)%(j>>>0);f[e+4>>2]=0}n=0;o=(g>>>0)/(j>>>0)>>>0;return (I=n,o)|0}else{if(!m){n=0;o=0;return (I=n,o)|0}f[e>>2]=a|0;f[e+4>>2]=b&0;n=0;o=0;return (I=n,o)|0}}m=(l|0)==0;do if(j){if(!m){p=(_(l|0)|0)-(_(i|0)|0)|0;if(p>>>0<=31){q=p+1|0;r=31-p|0;s=p-31>>31;t=q;u=g>>>(q>>>0)&s|i<<r;v=i>>>(q>>>0)&s;w=0;x=g<<r;break}if(!e){n=0;o=0;return (I=n,o)|0}f[e>>2]=a|0;f[e+4>>2]=h|b&0;n=0;o=0;return (I=n,o)|0}r=j-1|0;if(r&j|0){s=(_(j|0)|0)+33-(_(i|0)|0)|0;q=64-s|0;p=32-s|0;y=p>>31;z=s-32|0;A=z>>31;t=s;u=p-1>>31&i>>>(z>>>0)|(i<<p|g>>>(s>>>0))&A;v=A&i>>>(s>>>0);w=g<<q&y;x=(i<<q|g>>>(z>>>0))&y|g<<p&s-33>>31;break}if(e|0){f[e>>2]=r&g;f[e+4>>2]=0}if((j|0)==1){n=h|b&0;o=a|0|0;return (I=n,o)|0}else{r=qk(j|0)|0;n=i>>>(r>>>0)|0;o=i<<32-r|g>>>(r>>>0)|0;return (I=n,o)|0}}else{if(m){if(e|0){f[e>>2]=(i>>>0)%(j>>>0);f[e+4>>2]=0}n=0;o=(i>>>0)/(j>>>0)>>>0;return (I=n,o)|0}if(!g){if(e|0){f[e>>2]=0;f[e+4>>2]=(i>>>0)%(l>>>0)}n=0;o=(i>>>0)/(l>>>0)>>>0;return (I=n,o)|0}r=l-1|0;if(!(r&l)){if(e|0){f[e>>2]=a|0;f[e+4>>2]=r&i|b&0}n=0;o=i>>>((qk(l|0)|0)>>>0);return (I=n,o)|0}r=(_(l|0)|0)-(_(i|0)|0)|0;if(r>>>0<=30){s=r+1|0;p=31-r|0;t=s;u=i<<p|g>>>(s>>>0);v=i>>>(s>>>0);w=0;x=g<<p;break}if(!e){n=0;o=0;return (I=n,o)|0}f[e>>2]=a|0;f[e+4>>2]=h|b&0;n=0;o=0;return (I=n,o)|0}while(0);if(!t){B=x;C=w;D=v;E=u;F=0;G=0}else{b=c|0|0;c=k|d&0;d=Vl(b|0,c|0,-1,-1)|0;k=I;h=x;x=w;w=v;v=u;u=t;t=0;do{a=h;h=x>>>31|h<<1;x=t|x<<1;g=v<<1|a>>>31|0;a=v>>>31|w<<1|0;Xl(d|0,k|0,g|0,a|0)|0;i=I;l=i>>31|((i|0)<0?-1:0)<<1;t=l&1;v=Xl(g|0,a|0,l&b|0,(((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1)&c|0)|0;w=I;u=u-1|0}while((u|0)!=0);B=h;C=x;D=w;E=v;F=0;G=t}t=C;C=0;if(e|0){f[e>>2]=E;f[e+4>>2]=D}n=(t|0)>>>31|(B|C)<<1|(C<<1|t>>>31)&0|F;o=(t<<1|0>>>31)&-2|G;return (I=n,o)|0}function Hc(a,b){a=a|0;b=b|0;var c=0;if(!(zd(a,b)|0)){c=0;return c|0}if(!(zd(a+16|0,b)|0)){c=0;return c|0}if(!(zd(a+32|0,b)|0)){c=0;return c|0}if(!(zd(a+48|0,b)|0)){c=0;return c|0}if(!(zd(a+64|0,b)|0)){c=0;return c|0}if(!(zd(a+80|0,b)|0)){c=0;return c|0}if(!(zd(a+96|0,b)|0)){c=0;return c|0}if(!(zd(a+112|0,b)|0)){c=0;return c|0}if(!(zd(a+128|0,b)|0)){c=0;return c|0}if(!(zd(a+144|0,b)|0)){c=0;return c|0}if(!(zd(a+160|0,b)|0)){c=0;return c|0}if(!(zd(a+176|0,b)|0)){c=0;return c|0}if(!(zd(a+192|0,b)|0)){c=0;return c|0}if(!(zd(a+208|0,b)|0)){c=0;return c|0}if(!(zd(a+224|0,b)|0)){c=0;return c|0}if(!(zd(a+240|0,b)|0)){c=0;return c|0}if(!(zd(a+256|0,b)|0)){c=0;return c|0}if(!(zd(a+272|0,b)|0)){c=0;return c|0}if(!(zd(a+288|0,b)|0)){c=0;return c|0}if(!(zd(a+304|0,b)|0)){c=0;return c|0}if(!(zd(a+320|0,b)|0)){c=0;return c|0}if(!(zd(a+336|0,b)|0)){c=0;return c|0}if(!(zd(a+352|0,b)|0)){c=0;return c|0}if(!(zd(a+368|0,b)|0)){c=0;return c|0}if(!(zd(a+384|0,b)|0)){c=0;return c|0}if(!(zd(a+400|0,b)|0)){c=0;return c|0}if(!(zd(a+416|0,b)|0)){c=0;return c|0}if(!(zd(a+432|0,b)|0)){c=0;return c|0}if(!(zd(a+448|0,b)|0)){c=0;return c|0}if(!(zd(a+464|0,b)|0)){c=0;return c|0}if(!(zd(a+480|0,b)|0)){c=0;return c|0}if(!(zd(a+496|0,b)|0)){c=0;return c|0}c=zd(a+512|0,b)|0;return c|0}function Ic(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)mp(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;dn(d,13708);f[d>>2]=4852;va(d|0,1176,105)}d=Yk(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)mp(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0<b>>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){b:do if(h){e=k;c=l;i=m;while(1){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0))break;o=(f[a>>2]|0)+(n<<2)|0;if(!(f[o>>2]|0)){p=d;q=i;r=n;s=o;break b}o=d+8|0;t=d;while(1){u=f[t>>2]|0;if(!u)break;if((f[o>>2]|0)==(f[u+8>>2]|0))t=u;else break}f[i>>2]=u;f[t>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;o=f[e>>2]|0;if(!o){v=37;break a}else d=o}c=f[d>>2]|0;if(!c){v=37;break a}else{e=d;i=d}}}else{i=k;e=l;c=m;while(1){o=e;while(1){w=f[o+4>>2]|0;if(w>>>0<b>>>0)x=w;else x=(w>>>0)%(b>>>0)|0;if((x|0)==(j|0))break;w=(f[a>>2]|0)+(x<<2)|0;if(!(f[w>>2]|0)){p=o;q=c;r=x;s=w;break b}w=o+8|0;y=o;while(1){z=f[y>>2]|0;if(!z)break;if((f[w>>2]|0)==(f[z+8>>2]|0))y=z;else break}f[c>>2]=z;f[y>>2]=f[f[(f[a>>2]|0)+(x<<2)>>2]>>2];f[f[(f[a>>2]|0)+(x<<2)>>2]>>2]=o;w=f[i>>2]|0;if(!w){v=37;break a}else o=w}e=f[o>>2]|0;if(!e){v=37;break a}else{i=o;c=o}}}while(0);f[s>>2]=q;l=f[p>>2]|0;if(!l){v=37;break}else{j=r;k=p;m=p}}if((v|0)==37)return}function Jc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;d=u;u=u+32|0;e=d+24|0;g=d+20|0;h=d+8|0;i=d+4|0;j=d;f[e>>2]=0;Nh(e,f[a>>2]|0)|0;a:do if(f[e>>2]|0){k=0;while(1){k=k+1|0;if(!(Xc(a,c)|0)){l=0;break}if(k>>>0>=(f[e>>2]|0)>>>0)break a}u=d;return l|0}while(0);f[g>>2]=0;Nh(g,f[a>>2]|0)|0;b:do if(!(f[g>>2]|0))m=1;else{e=h+11|0;k=0;while(1){f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;o=f[a>>2]|0;p=o+8|0;q=f[p+4>>2]|0;r=o+16|0;s=r;t=f[s>>2]|0;v=f[s+4>>2]|0;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=k+(~((k+-4-j|0)>>>2)<<2);n=e}else n=e;else{Og(h,e-l|0);n=f[g>>2]|0}l=e>>>0>1073741823?-1:e<<2;h=jp(l)|0;Dh(h|0,0,l|0)|0;if((n|0)>0){l=a+16|0;j=a+32|0;k=a+12|0;i=0;do{m=f[h+(i<<2)>>2]|0;o=f[l>>2]|0;if((m|0)>(o|0)){p=f[j>>2]|0;f[p+(i<<2)>>2]=o;q=p}else{p=f[k>>2]|0;o=f[j>>2]|0;f[o+(i<<2)>>2]=(m|0)<(p|0)?p:m;q=o}i=i+1|0;r=f[g>>2]|0}while((i|0)<(r|0));if((r|0)>0){i=a+20|0;j=0;do{o=(f[b+(j<<2)>>2]|0)+(f[q+(j<<2)>>2]|0)|0;m=c+(j<<2)|0;f[m>>2]=o;if((o|0)<=(f[l>>2]|0)){if((o|0)<(f[k>>2]|0)){s=(f[i>>2]|0)+o|0;t=18}}else{s=o-(f[i>>2]|0)|0;t=18}if((t|0)==18){t=0;f[m>>2]=s}j=j+1|0;m=f[g>>2]|0}while((j|0)<(m|0));u=m}else u=r}else u=n;if((e|0)>=(d|0)){kp(h);return 1}n=0-e|0;r=a+16|0;j=a+32|0;s=a+12|0;i=a+20|0;a=e;k=u;while(1){u=c+(a<<2)|0;l=u+(n<<2)|0;q=b+(a<<2)|0;if((k|0)>0){m=0;do{o=f[l+(m<<2)>>2]|0;p=f[r>>2]|0;if((o|0)>(p|0)){v=f[j>>2]|0;f[v+(m<<2)>>2]=p;w=v}else{v=f[s>>2]|0;p=f[j>>2]|0;f[p+(m<<2)>>2]=(o|0)<(v|0)?v:o;w=p}m=m+1|0;x=f[g>>2]|0}while((m|0)<(x|0));if((x|0)>0){m=0;do{l=(f[q+(m<<2)>>2]|0)+(f[w+(m<<2)>>2]|0)|0;p=u+(m<<2)|0;f[p>>2]=l;if((l|0)<=(f[r>>2]|0)){if((l|0)<(f[s>>2]|0)){y=(f[i>>2]|0)+l|0;t=33}}else{y=l-(f[i>>2]|0)|0;t=33}if((t|0)==33){t=0;f[p>>2]=y}m=m+1|0;p=f[g>>2]|0}while((m|0)<(p|0));z=p}else z=x}else z=k;a=a+e|0;if((a|0)>=(d|0))break;else k=z}kp(h);return 1}function Lc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;d=u;u=u+16|0;e=d;g=a+68|0;f[g>>2]=(f[g>>2]|0)+1;g=(f[a+8+(b*12|0)+4>>2]|0)-(f[a+8+(b*12|0)>>2]|0)|0;h=g>>2;if((g|0)<=0){u=d;return}g=a+4|0;i=a+56|0;j=a+72|0;k=f[c>>2]|0;c=k+4|0;l=k+8|0;m=a+76|0;n=0;o=f[a+44+(b<<2)>>2]|0;while(1){b=(o|0)==-1;p=b?-1:(o>>>0)/3|0;q=(f[i>>2]|0)+(p>>>5<<2)|0;f[q>>2]=f[q>>2]|1<<(p&31);f[j>>2]=(f[j>>2]|0)+1;do if(n){if(b)r=-1;else r=f[(f[(f[a>>2]|0)+96>>2]|0)+(((o|0)/3|0)*12|0)+(((o|0)%3|0)<<2)>>2]|0;f[m>>2]=r;f[e>>2]=r;p=f[c>>2]|0;if(p>>>0<(f[l>>2]|0)>>>0){f[p>>2]=r;f[c>>2]=p+4}else dh(k,e);if(!(n&1)){p=o+1|0;if(b){s=-1;break}t=((p>>>0)%3|0|0)==0?o+-2|0:p;v=35;break}if(!b)if(!((o>>>0)%3|0)){t=o+2|0;v=35;break}else{t=o+-1|0;v=35;break}else s=-1}else{if(b)w=-1;else w=f[(f[(f[a>>2]|0)+96>>2]|0)+(((o|0)/3|0)*12|0)+(((o|0)%3|0)<<2)>>2]|0;f[e>>2]=w;p=f[c>>2]|0;if(p>>>0<(f[l>>2]|0)>>>0){f[p>>2]=w;f[c>>2]=p+4}else dh(k,e);p=o+1|0;if(!b?(q=((p>>>0)%3|0|0)==0?o+-2|0:p,(q|0)!=-1):0)x=f[(f[(f[a>>2]|0)+96>>2]|0)+(((q|0)/3|0)*12|0)+(((q|0)%3|0)<<2)>>2]|0;else x=-1;f[e>>2]=x;q=f[c>>2]|0;if(q>>>0<(f[l>>2]|0)>>>0){f[q>>2]=x;f[c>>2]=q+4}else dh(k,e);if(!b?(q=(((o>>>0)%3|0|0)==0?2:-1)+o|0,(q|0)!=-1):0)y=f[(f[(f[a>>2]|0)+96>>2]|0)+(((q|0)/3|0)*12|0)+(((q|0)%3|0)<<2)>>2]|0;else y=-1;f[m>>2]=y;f[e>>2]=y;q=f[c>>2]|0;if(q>>>0<(f[l>>2]|0)>>>0){f[q>>2]=y;f[c>>2]=q+4}else dh(k,e);t=o;v=35}while(0);if((v|0)==35){v=0;if((t|0)==-1)s=-1;else s=f[(f[(f[g>>2]|0)+12>>2]|0)+(t<<2)>>2]|0}n=n+1|0;if((n|0)>=(h|0))break;else o=s}u=d;return}function Mc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;c=a+148|0;d=f[b>>2]|0;b=(d|0)==-1;e=d+1|0;do if(!b){g=((e>>>0)%3|0|0)==0?d+-2|0:e;if(!((d>>>0)%3|0)){h=d+2|0;i=g;break}else{h=d+-1|0;i=g;break}}else{h=-1;i=-1}while(0);g=a+184|0;j=f[g>>2]|0;switch(j|0){case 1:case 0:{if((i|0)==-1)k=-1;else k=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;l=f[a+156>>2]|0;m=l+(k<<2)|0;f[m>>2]=(f[m>>2]|0)+1;if((h|0)==-1){n=1;o=-1;p=l;q=28}else{n=1;o=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;p=l;q=28}break}case 5:{if(b)r=-1;else r=f[(f[f[c>>2]>>2]|0)+(d<<2)>>2]|0;l=f[a+156>>2]|0;m=l+(r<<2)|0;f[m>>2]=(f[m>>2]|0)+1;if((i|0)==-1)s=-1;else s=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;m=l+(s<<2)|0;f[m>>2]=(f[m>>2]|0)+1;if((h|0)==-1){n=2;o=-1;p=l;q=28}else{n=2;o=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;p=l;q=28}break}case 3:{if(b)t=-1;else t=f[(f[f[c>>2]>>2]|0)+(d<<2)>>2]|0;l=f[a+156>>2]|0;m=l+(t<<2)|0;f[m>>2]=(f[m>>2]|0)+1;if((i|0)==-1)u=-1;else u=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;m=l+(u<<2)|0;f[m>>2]=(f[m>>2]|0)+2;if((h|0)==-1){n=1;o=-1;p=l;q=28}else{n=1;o=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;p=l;q=28}break}case 7:{if(b)v=-1;else v=f[(f[f[c>>2]>>2]|0)+(d<<2)>>2]|0;l=f[a+156>>2]|0;m=l+(v<<2)|0;f[m>>2]=(f[m>>2]|0)+2;if((i|0)==-1)w=-1;else w=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;i=l+(w<<2)|0;f[i>>2]=(f[i>>2]|0)+2;if((h|0)==-1){n=2;o=-1;p=l;q=28}else{n=2;o=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;p=l;q=28}break}default:x=j}if((q|0)==28){q=p+(o<<2)|0;f[q>>2]=(f[q>>2]|0)+n;x=f[g>>2]|0}switch(x|0){case 5:case 0:break;default:{f[a+188>>2]=-1;return}}x=f[c>>2]|0;if(!b?(b=((e>>>0)%3|0|0)==0?d+-2|0:e,(b|0)!=-1):0)y=f[(f[x>>2]|0)+(b<<2)>>2]|0;else y=-1;f[a+188>>2]=(f[(f[a+156>>2]|0)+(y<<2)>>2]|0)<6?5:0;return}function Nc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s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}}f[h>>2]=z;f[e>>2]=f[h>>2];Lc(a,b,e);G=f[j>>2]|0;H=f[k>>2]|0}else{G=B;H=l}A=A+1|0;if(A>>>0>=((H-G|0)/12|0)>>>0){i=1;break}else{B=G;l=H}}u=d;return i|0}function Oc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){g=0;return g|0}i=a+12|0;do if((e&65535)<512){j=c+8|0;k=f[j>>2]|0;l=f[j+4>>2]|0;j=c+16|0;m=j;n=f[m>>2]|0;o=Vl(n|0,f[m+4>>2]|0,4,0)|0;m=I;if((l|0)<(m|0)|(l|0)==(m|0)&k>>>0<o>>>0){g=0;return g|0}else{o=(f[c>>2]|0)+n|0;n=h[o>>0]|h[o+1>>0]<<8|h[o+2>>0]<<16|h[o+3>>0]<<24;b[i>>0]=n;b[i+1>>0]=n>>8;b[i+2>>0]=n>>16;b[i+3>>0]=n>>24;o=j;k=Vl(f[o>>2]|0,f[o+4>>2]|0,4,0)|0;o=j;f[o>>2]=k;f[o+4>>2]=I;p=n;break}}else if(Nh(i,c)|0){p=f[i>>2]|0;break}else{g=0;return g|0}while(0);e=a+4|0;n=f[e>>2]|0;o=f[a>>2]|0;k=n-o>>2;j=o;o=n;if(p>>>0<=k>>>0)if(p>>>0<k>>>0?(n=j+(p<<2)|0,(n|0)!=(o|0)):0){f[e>>2]=o+(~((o+-4-n|0)>>>2)<<2);q=p}else q=p;else{Og(a,p-k|0);q=f[i>>2]|0}if(!q){g=1;return g|0}k=c+8|0;p=c+16|0;n=0;o=q;a:while(1){q=k;e=f[q>>2]|0;j=f[q+4>>2]|0;q=p;m=f[q>>2]|0;l=f[q+4>>2]|0;if(!((j|0)>(l|0)|(j|0)==(l|0)&e>>>0>m>>>0)){g=0;r=23;break}q=f[c>>2]|0;s=b[q+m>>0]|0;t=Vl(m|0,l|0,1,0)|0;l=I;m=p;f[m>>2]=t;f[m+4>>2]=l;m=s&255;u=m&3;v=m>>>2;switch(s&3){case 3:{s=v+n|0;if(s>>>0>=o>>>0){g=0;r=23;break a}Dh((f[a>>2]|0)+(n<<2)|0,0,(m&252)+4|0)|0;w=s;break}case 0:{x=v;r=20;break}default:{s=v;v=0;m=l;l=t;while(1){if(!((j|0)>(m|0)|(j|0)==(m|0)&e>>>0>l>>>0)){g=0;r=23;break a}t=b[q+l>>0]|0;l=Vl(l|0,m|0,1,0)|0;m=I;y=p;f[y>>2]=l;f[y+4>>2]=m;y=(t&255)<<(v<<3|6)|s;v=v+1|0;if((v|0)>=(u|0)){x=y;r=20;break}else s=y}}}if((r|0)==20){r=0;f[(f[a>>2]|0)+(n<<2)>>2]=x;w=n}n=w+1|0;o=f[i>>2]|0;if(n>>>0>=o>>>0){r=22;break}}if((r|0)==22){g=Nf(a+16|0,f[a>>2]|0,o)|0;return g|0}else if((r|0)==23)return g|0;return 0}function Pc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){g=0;return g|0}i=a+12|0;do if((e&65535)<512){j=c+8|0;k=f[j>>2]|0;l=f[j+4>>2]|0;j=c+16|0;m=j;n=f[m>>2]|0;o=Vl(n|0,f[m+4>>2]|0,4,0)|0;m=I;if((l|0)<(m|0)|(l|0)==(m|0)&k>>>0<o>>>0){g=0;return g|0}else{o=(f[c>>2]|0)+n|0;n=h[o>>0]|h[o+1>>0]<<8|h[o+2>>0]<<16|h[o+3>>0]<<24;b[i>>0]=n;b[i+1>>0]=n>>8;b[i+2>>0]=n>>16;b[i+3>>0]=n>>24;o=j;k=Vl(f[o>>2]|0,f[o+4>>2]|0,4,0)|0;o=j;f[o>>2]=k;f[o+4>>2]=I;p=n;break}}else if(Nh(i,c)|0){p=f[i>>2]|0;break}else{g=0;return g|0}while(0);e=a+4|0;n=f[e>>2]|0;o=f[a>>2]|0;k=n-o>>2;j=o;o=n;if(p>>>0<=k>>>0)if(p>>>0<k>>>0?(n=j+(p<<2)|0,(n|0)!=(o|0)):0){f[e>>2]=o+(~((o+-4-n|0)>>>2)<<2);q=p}else q=p;else{Og(a,p-k|0);q=f[i>>2]|0}if(!q){g=1;return g|0}k=c+8|0;p=c+16|0;n=0;o=q;a:while(1){q=k;e=f[q>>2]|0;j=f[q+4>>2]|0;q=p;m=f[q>>2]|0;l=f[q+4>>2]|0;if(!((j|0)>(l|0)|(j|0)==(l|0)&e>>>0>m>>>0)){g=0;r=23;break}q=f[c>>2]|0;s=b[q+m>>0]|0;t=Vl(m|0,l|0,1,0)|0;l=I;m=p;f[m>>2]=t;f[m+4>>2]=l;m=s&255;u=m&3;v=m>>>2;switch(s&3){case 3:{s=v+n|0;if(s>>>0>=o>>>0){g=0;r=23;break a}Dh((f[a>>2]|0)+(n<<2)|0,0,(m&252)+4|0)|0;w=s;break}case 0:{x=v;r=20;break}default:{s=v;v=0;m=l;l=t;while(1){if(!((j|0)>(m|0)|(j|0)==(m|0)&e>>>0>l>>>0)){g=0;r=23;break a}t=b[q+l>>0]|0;l=Vl(l|0,m|0,1,0)|0;m=I;y=p;f[y>>2]=l;f[y+4>>2]=m;y=(t&255)<<(v<<3|6)|s;v=v+1|0;if((v|0)>=(u|0)){x=y;r=20;break}else s=y}}}if((r|0)==20){r=0;f[(f[a>>2]|0)+(n<<2)>>2]=x;w=n}n=w+1|0;o=f[i>>2]|0;if(n>>>0>=o>>>0){r=22;break}}if((r|0)==22){g=Qf(a+16|0,f[a>>2]|0,o)|0;return g|0}else if((r|0)==23)return g|0;return 0}function Qc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){g=0;return g|0}i=a+12|0;do if((e&65535)<512){j=c+8|0;k=f[j>>2]|0;l=f[j+4>>2]|0;j=c+16|0;m=j;n=f[m>>2]|0;o=Vl(n|0,f[m+4>>2]|0,4,0)|0;m=I;if((l|0)<(m|0)|(l|0)==(m|0)&k>>>0<o>>>0){g=0;return g|0}else{o=(f[c>>2]|0)+n|0;n=h[o>>0]|h[o+1>>0]<<8|h[o+2>>0]<<16|h[o+3>>0]<<24;b[i>>0]=n;b[i+1>>0]=n>>8;b[i+2>>0]=n>>16;b[i+3>>0]=n>>24;o=j;k=Vl(f[o>>2]|0,f[o+4>>2]|0,4,0)|0;o=j;f[o>>2]=k;f[o+4>>2]=I;p=n;break}}else if(Nh(i,c)|0){p=f[i>>2]|0;break}else{g=0;return g|0}while(0);e=a+4|0;n=f[e>>2]|0;o=f[a>>2]|0;k=n-o>>2;j=o;o=n;if(p>>>0<=k>>>0)if(p>>>0<k>>>0?(n=j+(p<<2)|0,(n|0)!=(o|0)):0){f[e>>2]=o+(~((o+-4-n|0)>>>2)<<2);q=p}else q=p;else{Og(a,p-k|0);q=f[i>>2]|0}if(!q){g=1;return g|0}k=c+8|0;p=c+16|0;n=0;o=q;a:while(1){q=k;e=f[q>>2]|0;j=f[q+4>>2]|0;q=p;m=f[q>>2]|0;l=f[q+4>>2]|0;if(!((j|0)>(l|0)|(j|0)==(l|0)&e>>>0>m>>>0)){g=0;r=23;break}q=f[c>>2]|0;s=b[q+m>>0]|0;t=Vl(m|0,l|0,1,0)|0;l=I;m=p;f[m>>2]=t;f[m+4>>2]=l;m=s&255;u=m&3;v=m>>>2;switch(s&3){case 3:{s=v+n|0;if(s>>>0>=o>>>0){g=0;r=23;break a}Dh((f[a>>2]|0)+(n<<2)|0,0,(m&252)+4|0)|0;w=s;break}case 0:{x=v;r=20;break}default:{s=v;v=0;m=l;l=t;while(1){if(!((j|0)>(m|0)|(j|0)==(m|0)&e>>>0>l>>>0)){g=0;r=23;break a}t=b[q+l>>0]|0;l=Vl(l|0,m|0,1,0)|0;m=I;y=p;f[y>>2]=l;f[y+4>>2]=m;y=(t&255)<<(v<<3|6)|s;v=v+1|0;if((v|0)>=(u|0)){x=y;r=20;break}else s=y}}}if((r|0)==20){r=0;f[(f[a>>2]|0)+(n<<2)>>2]=x;w=n}n=w+1|0;o=f[i>>2]|0;if(n>>>0>=o>>>0){r=22;break}}if((r|0)==22){g=Rf(a+16|0,f[a>>2]|0,o)|0;return g|0}else if((r|0)==23)return g|0;return 0}function Rc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){g=0;return g|0}i=a+12|0;do if((e&65535)<512){j=c+8|0;k=f[j>>2]|0;l=f[j+4>>2]|0;j=c+16|0;m=j;n=f[m>>2]|0;o=Vl(n|0,f[m+4>>2]|0,4,0)|0;m=I;if((l|0)<(m|0)|(l|0)==(m|0)&k>>>0<o>>>0){g=0;return g|0}else{o=(f[c>>2]|0)+n|0;n=h[o>>0]|h[o+1>>0]<<8|h[o+2>>0]<<16|h[o+3>>0]<<24;b[i>>0]=n;b[i+1>>0]=n>>8;b[i+2>>0]=n>>16;b[i+3>>0]=n>>24;o=j;k=Vl(f[o>>2]|0,f[o+4>>2]|0,4,0)|0;o=j;f[o>>2]=k;f[o+4>>2]=I;p=n;break}}else if(Nh(i,c)|0){p=f[i>>2]|0;break}else{g=0;return g|0}while(0);e=a+4|0;n=f[e>>2]|0;o=f[a>>2]|0;k=n-o>>2;j=o;o=n;if(p>>>0<=k>>>0)if(p>>>0<k>>>0?(n=j+(p<<2)|0,(n|0)!=(o|0)):0){f[e>>2]=o+(~((o+-4-n|0)>>>2)<<2);q=p}else q=p;else{Og(a,p-k|0);q=f[i>>2]|0}if(!q){g=1;return g|0}k=c+8|0;p=c+16|0;n=0;o=q;a:while(1){q=k;e=f[q>>2]|0;j=f[q+4>>2]|0;q=p;m=f[q>>2]|0;l=f[q+4>>2]|0;if(!((j|0)>(l|0)|(j|0)==(l|0)&e>>>0>m>>>0)){g=0;r=23;break}q=f[c>>2]|0;s=b[q+m>>0]|0;t=Vl(m|0,l|0,1,0)|0;l=I;m=p;f[m>>2]=t;f[m+4>>2]=l;m=s&255;u=m&3;v=m>>>2;switch(s&3){case 3:{s=v+n|0;if(s>>>0>=o>>>0){g=0;r=23;break a}Dh((f[a>>2]|0)+(n<<2)|0,0,(m&252)+4|0)|0;w=s;break}case 0:{x=v;r=20;break}default:{s=v;v=0;m=l;l=t;while(1){if(!((j|0)>(m|0)|(j|0)==(m|0)&e>>>0>l>>>0)){g=0;r=23;break a}t=b[q+l>>0]|0;l=Vl(l|0,m|0,1,0)|0;m=I;y=p;f[y>>2]=l;f[y+4>>2]=m;y=(t&255)<<(v<<3|6)|s;v=v+1|0;if((v|0)>=(u|0)){x=y;r=20;break}else s=y}}}if((r|0)==20){r=0;f[(f[a>>2]|0)+(n<<2)>>2]=x;w=n}n=w+1|0;o=f[i>>2]|0;if(n>>>0>=o>>>0){r=22;break}}if((r|0)==22){g=Uf(a+16|0,f[a>>2]|0,o)|0;return g|0}else if((r|0)==23)return g|0;return 0}function Sc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){g=0;return g|0}i=a+12|0;do if((e&65535)<512){j=c+8|0;k=f[j>>2]|0;l=f[j+4>>2]|0;j=c+16|0;m=j;n=f[m>>2]|0;o=Vl(n|0,f[m+4>>2]|0,4,0)|0;m=I;if((l|0)<(m|0)|(l|0)==(m|0)&k>>>0<o>>>0){g=0;return g|0}else{o=(f[c>>2]|0)+n|0;n=h[o>>0]|h[o+1>>0]<<8|h[o+2>>0]<<16|h[o+3>>0]<<24;b[i>>0]=n;b[i+1>>0]=n>>8;b[i+2>>0]=n>>16;b[i+3>>0]=n>>24;o=j;k=Vl(f[o>>2]|0,f[o+4>>2]|0,4,0)|0;o=j;f[o>>2]=k;f[o+4>>2]=I;p=n;break}}else if(Nh(i,c)|0){p=f[i>>2]|0;break}else{g=0;return g|0}while(0);e=a+4|0;n=f[e>>2]|0;o=f[a>>2]|0;k=n-o>>2;j=o;o=n;if(p>>>0<=k>>>0)if(p>>>0<k>>>0?(n=j+(p<<2)|0,(n|0)!=(o|0)):0){f[e>>2]=o+(~((o+-4-n|0)>>>2)<<2);q=p}else q=p;else{Og(a,p-k|0);q=f[i>>2]|0}if(!q){g=1;return g|0}k=c+8|0;p=c+16|0;n=0;o=q;a:while(1){q=k;e=f[q>>2]|0;j=f[q+4>>2]|0;q=p;m=f[q>>2]|0;l=f[q+4>>2]|0;if(!((j|0)>(l|0)|(j|0)==(l|0)&e>>>0>m>>>0)){g=0;r=23;break}q=f[c>>2]|0;s=b[q+m>>0]|0;t=Vl(m|0,l|0,1,0)|0;l=I;m=p;f[m>>2]=t;f[m+4>>2]=l;m=s&255;u=m&3;v=m>>>2;switch(s&3){case 3:{s=v+n|0;if(s>>>0>=o>>>0){g=0;r=23;break a}Dh((f[a>>2]|0)+(n<<2)|0,0,(m&252)+4|0)|0;w=s;break}case 0:{x=v;r=20;break}default:{s=v;v=0;m=l;l=t;while(1){if(!((j|0)>(m|0)|(j|0)==(m|0)&e>>>0>l>>>0)){g=0;r=23;break a}t=b[q+l>>0]|0;l=Vl(l|0,m|0,1,0)|0;m=I;y=p;f[y>>2]=l;f[y+4>>2]=m;y=(t&255)<<(v<<3|6)|s;v=v+1|0;if((v|0)>=(u|0)){x=y;r=20;break}else s=y}}}if((r|0)==20){r=0;f[(f[a>>2]|0)+(n<<2)>>2]=x;w=n}n=w+1|0;o=f[i>>2]|0;if(n>>>0>=o>>>0){r=22;break}}if((r|0)==22){g=Tf(a+16|0,f[a>>2]|0,o)|0;return g|0}else if((r|0)==23)return g|0;return 0}function Tc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;c=a+148|0;d=f[b>>2]|0;b=(d|0)==-1;e=d+1|0;do if(!b){g=((e>>>0)%3|0|0)==0?d+-2|0:e;if(!((d>>>0)%3|0)){h=d+2|0;i=g;break}else{h=d+-1|0;i=g;break}}else{h=-1;i=-1}while(0);switch(f[a+168>>2]|0){case 1:case 0:{if((i|0)==-1)j=-1;else j=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;e=f[a+156>>2]|0;g=e+(j<<2)|0;f[g>>2]=(f[g>>2]|0)+1;if((h|0)==-1){k=1;l=-1;m=e;n=28}else{k=1;l=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;m=e;n=28}break}case 5:{if(b)o=-1;else o=f[(f[f[c>>2]>>2]|0)+(d<<2)>>2]|0;e=f[a+156>>2]|0;g=e+(o<<2)|0;f[g>>2]=(f[g>>2]|0)+1;if((i|0)==-1)p=-1;else p=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;g=e+(p<<2)|0;f[g>>2]=(f[g>>2]|0)+1;if((h|0)==-1){k=2;l=-1;m=e;n=28}else{k=2;l=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;m=e;n=28}break}case 3:{if(b)q=-1;else q=f[(f[f[c>>2]>>2]|0)+(d<<2)>>2]|0;e=f[a+156>>2]|0;g=e+(q<<2)|0;f[g>>2]=(f[g>>2]|0)+1;if((i|0)==-1)r=-1;else r=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;g=e+(r<<2)|0;f[g>>2]=(f[g>>2]|0)+2;if((h|0)==-1){k=1;l=-1;m=e;n=28}else{k=1;l=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;m=e;n=28}break}case 7:{if(b)s=-1;else s=f[(f[f[c>>2]>>2]|0)+(d<<2)>>2]|0;d=f[a+156>>2]|0;b=d+(s<<2)|0;f[b>>2]=(f[b>>2]|0)+2;if((i|0)==-1)t=-1;else t=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;b=d+(t<<2)|0;f[b>>2]=(f[b>>2]|0)+2;if((h|0)==-1){k=2;l=-1;m=d;n=28}else{k=2;l=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;m=d;n=28}break}default:{}}if((n|0)==28){n=m+(l<<2)|0;f[n>>2]=(f[n>>2]|0)+k}if((i|0)==-1)u=-1;else u=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;i=f[(f[a+156>>2]|0)+(u<<2)>>2]|0;u=f[a+176>>2]|0;if((i|0)<(u|0)){v=u;w=v-u|0;x=a+172|0;f[x>>2]=w;return}c=f[a+180>>2]|0;v=(i|0)>(c|0)?c:i;w=v-u|0;x=a+172|0;f[x>>2]=w;return}function Uc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){g=0;return g|0}i=a+12|0;do if((e&65535)<512){j=c+8|0;k=f[j>>2]|0;l=f[j+4>>2]|0;j=c+16|0;m=j;n=f[m>>2]|0;o=Vl(n|0,f[m+4>>2]|0,4,0)|0;m=I;if((l|0)<(m|0)|(l|0)==(m|0)&k>>>0<o>>>0){g=0;return g|0}else{o=(f[c>>2]|0)+n|0;n=h[o>>0]|h[o+1>>0]<<8|h[o+2>>0]<<16|h[o+3>>0]<<24;b[i>>0]=n;b[i+1>>0]=n>>8;b[i+2>>0]=n>>16;b[i+3>>0]=n>>24;o=j;k=Vl(f[o>>2]|0,f[o+4>>2]|0,4,0)|0;o=j;f[o>>2]=k;f[o+4>>2]=I;p=n;break}}else if(Nh(i,c)|0){p=f[i>>2]|0;break}else{g=0;return g|0}while(0);e=a+4|0;n=f[e>>2]|0;o=f[a>>2]|0;k=n-o>>2;j=o;o=n;if(p>>>0<=k>>>0)if(p>>>0<k>>>0?(n=j+(p<<2)|0,(n|0)!=(o|0)):0){f[e>>2]=o+(~((o+-4-n|0)>>>2)<<2);q=p}else q=p;else{Og(a,p-k|0);q=f[i>>2]|0}if(!q){g=1;return g|0}k=c+8|0;p=c+16|0;n=0;o=q;a:while(1){q=k;e=f[q>>2]|0;j=f[q+4>>2]|0;q=p;m=f[q>>2]|0;l=f[q+4>>2]|0;if(!((j|0)>(l|0)|(j|0)==(l|0)&e>>>0>m>>>0)){g=0;r=23;break}q=f[c>>2]|0;s=b[q+m>>0]|0;t=Vl(m|0,l|0,1,0)|0;l=I;m=p;f[m>>2]=t;f[m+4>>2]=l;m=s&255;u=m&3;v=m>>>2;switch(s&3){case 3:{s=v+n|0;if(s>>>0>=o>>>0){g=0;r=23;break a}Dh((f[a>>2]|0)+(n<<2)|0,0,(m&252)+4|0)|0;w=s;break}case 0:{x=v;r=20;break}default:{s=v;v=0;m=l;l=t;while(1){if(!((j|0)>(m|0)|(j|0)==(m|0)&e>>>0>l>>>0)){g=0;r=23;break a}t=b[q+l>>0]|0;l=Vl(l|0,m|0,1,0)|0;m=I;y=p;f[y>>2]=l;f[y+4>>2]=m;y=(t&255)<<(v<<3|6)|s;v=v+1|0;if((v|0)>=(u|0)){x=y;r=20;break}else s=y}}}if((r|0)==20){r=0;f[(f[a>>2]|0)+(n<<2)>>2]=x;w=n}n=w+1|0;o=f[i>>2]|0;if(n>>>0>=o>>>0){r=22;break}}if((r|0)==22){g=Xf(a+16|0,f[a>>2]|0,o)|0;return g|0}else if((r|0)==23)return g|0;return 0}function Vc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){g=0;return g|0}i=a+12|0;do if((e&65535)<512){j=c+8|0;k=f[j>>2]|0;l=f[j+4>>2]|0;j=c+16|0;m=j;n=f[m>>2]|0;o=Vl(n|0,f[m+4>>2]|0,4,0)|0;m=I;if((l|0)<(m|0)|(l|0)==(m|0)&k>>>0<o>>>0){g=0;return g|0}else{o=(f[c>>2]|0)+n|0;n=h[o>>0]|h[o+1>>0]<<8|h[o+2>>0]<<16|h[o+3>>0]<<24;b[i>>0]=n;b[i+1>>0]=n>>8;b[i+2>>0]=n>>16;b[i+3>>0]=n>>24;o=j;k=Vl(f[o>>2]|0,f[o+4>>2]|0,4,0)|0;o=j;f[o>>2]=k;f[o+4>>2]=I;p=n;break}}else if(Nh(i,c)|0){p=f[i>>2]|0;break}else{g=0;return g|0}while(0);e=a+4|0;n=f[e>>2]|0;o=f[a>>2]|0;k=n-o>>2;j=o;o=n;if(p>>>0<=k>>>0)if(p>>>0<k>>>0?(n=j+(p<<2)|0,(n|0)!=(o|0)):0){f[e>>2]=o+(~((o+-4-n|0)>>>2)<<2);q=p}else q=p;else{Og(a,p-k|0);q=f[i>>2]|0}if(!q){g=1;return g|0}k=c+8|0;p=c+16|0;n=0;o=q;a:while(1){q=k;e=f[q>>2]|0;j=f[q+4>>2]|0;q=p;m=f[q>>2]|0;l=f[q+4>>2]|0;if(!((j|0)>(l|0)|(j|0)==(l|0)&e>>>0>m>>>0)){g=0;r=23;break}q=f[c>>2]|0;s=b[q+m>>0]|0;t=Vl(m|0,l|0,1,0)|0;l=I;m=p;f[m>>2]=t;f[m+4>>2]=l;m=s&255;u=m&3;v=m>>>2;switch(s&3){case 3:{s=v+n|0;if(s>>>0>=o>>>0){g=0;r=23;break a}Dh((f[a>>2]|0)+(n<<2)|0,0,(m&252)+4|0)|0;w=s;break}case 0:{x=v;r=20;break}default:{s=v;v=0;m=l;l=t;while(1){if(!((j|0)>(m|0)|(j|0)==(m|0)&e>>>0>l>>>0)){g=0;r=23;break a}t=b[q+l>>0]|0;l=Vl(l|0,m|0,1,0)|0;m=I;y=p;f[y>>2]=l;f[y+4>>2]=m;y=(t&255)<<(v<<3|6)|s;v=v+1|0;if((v|0)>=(u|0)){x=y;r=20;break}else s=y}}}if((r|0)==20){r=0;f[(f[a>>2]|0)+(n<<2)>>2]=x;w=n}n=w+1|0;o=f[i>>2]|0;if(n>>>0>=o>>>0){r=22;break}}if((r|0)==22){g=Yf(a+16|0,f[a>>2]|0,o)|0;return g|0}else if((r|0)==23)return g|0;return 0}function Wc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=u;u=u+16|0;h=d+4|0;i=d;f[a+72>>2]=e;f[a+64>>2]=g;g=jp(e>>>0>1073741823?-1:e<<2)|0;j=a+68|0;k=f[j>>2]|0;f[j>>2]=g;if(k|0)kp(k);k=a+8|0;f[k>>2]=e;g=a+32|0;l=a+36|0;m=f[l>>2]|0;n=f[g>>2]|0;o=m-n>>2;p=n;n=m;if(o>>>0>=e>>>0){if(o>>>0>e>>>0?(m=p+(e<<2)|0,(m|0)!=(n|0)):0)f[l>>2]=n+(~((n+-4-m|0)>>>2)<<2)}else Og(g,e-o|0);o=a+56|0;g=f[o>>2]|0;m=f[g+4>>2]|0;n=f[g>>2]|0;l=m-n|0;p=l>>2;if((l|0)<=0){u=d;return 1}l=a+16|0;q=a+32|0;r=a+12|0;s=a+20|0;if((m|0)==(n|0)){t=g;Do(t)}else{v=0;w=n}while(1){f[i>>2]=f[w+(v<<2)>>2];f[h>>2]=f[i>>2];jc(a,h,c,v);n=X(v,e)|0;g=f[j>>2]|0;m=b+(n<<2)|0;x=c+(n<<2)|0;if((f[k>>2]|0)>0){n=0;do{y=f[g+(n<<2)>>2]|0;z=f[l>>2]|0;if((y|0)>(z|0)){A=f[q>>2]|0;f[A+(n<<2)>>2]=z;B=A}else{A=f[r>>2]|0;z=f[q>>2]|0;f[z+(n<<2)>>2]=(y|0)<(A|0)?A:y;B=z}n=n+1|0;C=f[k>>2]|0}while((n|0)<(C|0));if((C|0)>0){n=0;do{g=(f[m+(n<<2)>>2]|0)+(f[B+(n<<2)>>2]|0)|0;z=x+(n<<2)|0;f[z>>2]=g;if((g|0)<=(f[l>>2]|0)){if((g|0)<(f[r>>2]|0)){D=(f[s>>2]|0)+g|0;E=22}}else{D=g-(f[s>>2]|0)|0;E=22}if((E|0)==22){E=0;f[z>>2]=D}n=n+1|0}while((n|0)<(f[k>>2]|0))}}v=v+1|0;if((v|0)>=(p|0)){E=10;break}n=f[o>>2]|0;w=f[n>>2]|0;if((f[n+4>>2]|0)-w>>2>>>0<=v>>>0){t=n;E=11;break}}if((E|0)==10){u=d;return 1}else if((E|0)==11)Do(t);return 0}function Xc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;d=u;u=u+32|0;e=d+16|0;g=d+12|0;h=d;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;i=f[a>>2]|0;j=i+8|0;k=f[j+4>>2]|0;l=i+16|0;m=l;n=f[m>>2]|0;o=f[m+4>>2]|0;do if((k|0)>(o|0)|((k|0)==(o|0)?(f[j>>2]|0)>>>0>n>>>0:0)){m=b[(f[i>>2]|0)+n>>0]|0;p=Vl(n|0,o|0,1,0)|0;q=l;f[q>>2]=p;f[q+4>>2]=I;q=m&255;Sh(e,q,0);if(m<<24>>24){p=f[a>>2]|0;r=Hj(e,0)|0;s=p+8|0;t=f[s>>2]|0;v=f[s+4>>2]|0;s=p+16|0;w=s;x=f[w>>2]|0;y=m&255;m=Vl(x|0,f[w+4>>2]|0,y|0,0)|0;w=I;if((v|0)<(w|0)|(v|0)==(w|0)&t>>>0<m>>>0){z=0;break}Ef(r|0,(f[p>>2]|0)+x|0,q|0)|0;q=s;x=Vl(f[q>>2]|0,f[q+4>>2]|0,y|0,0)|0;y=s;f[y>>2]=x;f[y+4>>2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0)f[l>>2]=n+(~((n+-4-m|0)>>>2)<<2)}else Og(g,e-o|0);o=a+56|0;g=f[o>>2]|0;m=f[g+4>>2]|0;n=f[g>>2]|0;l=m-n|0;p=l>>2;if((l|0)<=0){u=d;return 1}l=a+16|0;q=a+32|0;r=a+12|0;s=a+20|0;if((m|0)==(n|0)){t=g;Do(t)}else{v=0;w=n}while(1){f[i>>2]=f[w+(v<<2)>>2];f[h>>2]=f[i>>2];hc(a,h,c,v);n=X(v,e)|0;g=f[j>>2]|0;m=b+(n<<2)|0;x=c+(n<<2)|0;if((f[k>>2]|0)>0){n=0;do{y=f[g+(n<<2)>>2]|0;z=f[l>>2]|0;if((y|0)>(z|0)){A=f[q>>2]|0;f[A+(n<<2)>>2]=z;B=A}else{A=f[r>>2]|0;z=f[q>>2]|0;f[z+(n<<2)>>2]=(y|0)<(A|0)?A:y;B=z}n=n+1|0;C=f[k>>2]|0}while((n|0)<(C|0));if((C|0)>0){n=0;do{g=(f[m+(n<<2)>>2]|0)+(f[B+(n<<2)>>2]|0)|0;z=x+(n<<2)|0;f[z>>2]=g;if((g|0)<=(f[l>>2]|0)){if((g|0)<(f[r>>2]|0)){D=(f[s>>2]|0)+g|0;E=22}}else{D=g-(f[s>>2]|0)|0;E=22}if((E|0)==22){E=0;f[z>>2]=D}n=n+1|0}while((n|0)<(f[k>>2]|0))}}v=v+1|0;if((v|0)>=(p|0)){E=10;break}n=f[o>>2]|0;w=f[n>>2]|0;if((f[n+4>>2]|0)-w>>2>>>0<=v>>>0){t=n;E=11;break}}if((E|0)==10){u=d;return 1}else if((E|0)==11)Do(t);return 0}function Zc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=Na,t=Na,u=Na,v=0,w=0,x=0,y=0,z=0;c=f[b>>2]|0;b=a+4|0;d=f[b>>2]|0;e=(d|0)==0;a:do if(!e){g=d+-1|0;h=(g&d|0)==0;if(!h)if(c>>>0<d>>>0)i=c;else i=(c>>>0)%(d>>>0)|0;else i=g&c;j=f[(f[a>>2]|0)+(i<<2)>>2]|0;if(!j)k=i;else{if(h){h=j;while(1){l=f[h>>2]|0;if(!l){k=i;break a}m=f[l+4>>2]|0;if(!((m|0)==(c|0)|(m&g|0)==(i|0))){k=i;break a}if((f[l+8>>2]|0)==(c|0)){o=l;break}else h=l}p=o+12|0;return p|0}else q=j;while(1){h=f[q>>2]|0;if(!h){k=i;break a}g=f[h+4>>2]|0;if((g|0)!=(c|0)){if(g>>>0<d>>>0)r=g;else r=(g>>>0)%(d>>>0)|0;if((r|0)!=(i|0)){k=i;break a}}if((f[h+8>>2]|0)==(c|0)){o=h;break}else q=h}p=o+12|0;return p|0}}else k=0;while(0);q=Yk(16)|0;f[q+8>>2]=c;f[q+12>>2]=0;f[q+4>>2]=c;f[q>>2]=0;i=a+12|0;s=$(((f[i>>2]|0)+1|0)>>>0);t=$(d>>>0);u=$(n[a+16>>2]);do if(e|$(u*t)<s){r=d<<1|(d>>>0<3|(d+-1&d|0)!=0)&1;j=~~$(W($(s/u)))>>>0;wg(a,r>>>0<j>>>0?j:r);r=f[b>>2]|0;j=r+-1|0;if(!(j&r)){v=r;w=j&c;break}if(c>>>0<r>>>0){v=r;w=c}else{v=r;w=(c>>>0)%(r>>>0)|0}}else{v=d;w=k}while(0);k=(f[a>>2]|0)+(w<<2)|0;w=f[k>>2]|0;if(!w){d=a+8|0;f[q>>2]=f[d>>2];f[d>>2]=q;f[k>>2]=d;d=f[q>>2]|0;if(d|0){k=f[d+4>>2]|0;d=v+-1|0;if(d&v)if(k>>>0<v>>>0)x=k;else x=(k>>>0)%(v>>>0)|0;else x=k&d;y=(f[a>>2]|0)+(x<<2)|0;z=30}}else{f[q>>2]=f[w>>2];y=w;z=30}if((z|0)==30)f[y>>2]=q;f[i>>2]=(f[i>>2]|0)+1;o=q;p=o+12|0;return p|0}function _c(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=a+8|0;e=f[d>>2]|0;switch(f[e+28>>2]|0){case 2:{g=b[e+24>>0]|0;h=g<<24>>24;i=jp((h|0)>-1?h:-1)|0;j=f[a+16>>2]|0;if(!(f[j+80>>2]|0))k=0;else k=(f[f[j>>2]>>2]|0)+(f[j+48>>2]|0)|0;a:do if(c|0){if(g<<24>>24>0){l=0;m=0}else{Ef(f[f[e+64>>2]>>2]|0,i|0,h|0)|0;if((c|0)==1)break;else{n=0;o=1}while(1){n=n+h|0;Ef((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+n|0,i|0,h|0)|0;o=o+1|0;if((o|0)==(c|0))break a}}while(1){j=0;p=m;while(1){b[i+j>>0]=f[k+(p<<2)>>2];j=j+1|0;if((j|0)==(h|0))break;else p=p+1|0}Ef((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+m|0,i|0,h|0)|0;l=l+1|0;if((l|0)==(c|0))break;else m=m+h|0}}while(0);kp(i);q=1;return q|0}case 1:{i=b[e+24>>0]|0;h=i<<24>>24;m=jp((h|0)>-1?h:-1)|0;l=f[a+16>>2]|0;if(!(f[l+80>>2]|0))r=0;else r=(f[f[l>>2]>>2]|0)+(f[l+48>>2]|0)|0;b:do if(c|0){if(i<<24>>24>0){s=0;t=0}else{Ef(f[f[e+64>>2]>>2]|0,m|0,h|0)|0;if((c|0)==1)break;else{u=0;v=1}while(1){u=u+h|0;Ef((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+u|0,m|0,h|0)|0;v=v+1|0;if((v|0)==(c|0))break b}}while(1){l=0;k=t;while(1){b[m+l>>0]=f[r+(k<<2)>>2];l=l+1|0;if((l|0)==(h|0))break;else k=k+1|0}Ef((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+t|0,m|0,h|0)|0;s=s+1|0;if((s|0)==(c|0))break;else t=t+h|0}}while(0);kp(m);q=1;return q|0}case 4:{kg(a,c);q=1;return q|0}case 3:{kg(a,c);q=1;return q|0}case 6:{lg(a,c);q=1;return q|0}case 5:{lg(a,c);q=1;return q|0}default:{q=0;return q|0}}return 0}function $c(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;f[a>>2]=f[c>>2];d=c+4|0;f[a+4>>2]=f[d>>2];e=c+8|0;f[a+8>>2]=f[e>>2];g=c+12|0;f[a+12>>2]=f[g>>2];f[d>>2]=0;f[e>>2]=0;f[g>>2]=0;g=c+16|0;f[a+16>>2]=f[g>>2];e=c+20|0;f[a+20>>2]=f[e>>2];d=c+24|0;f[a+24>>2]=f[d>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;b[a+28>>0]=b[c+28>>0]|0;d=a+32|0;e=c+32|0;f[d>>2]=0;g=a+36|0;f[g>>2]=0;f[a+40>>2]=0;f[d>>2]=f[e>>2];d=c+36|0;f[g>>2]=f[d>>2];g=c+40|0;f[a+40>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;e=a+44|0;d=c+44|0;f[e>>2]=0;g=a+48|0;f[g>>2]=0;f[a+52>>2]=0;f[e>>2]=f[d>>2];e=c+48|0;f[g>>2]=f[e>>2];g=c+52|0;f[a+52>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+56|0;e=c+56|0;f[d>>2]=0;g=a+60|0;f[g>>2]=0;f[a+64>>2]=0;f[d>>2]=f[e>>2];d=c+60|0;f[g>>2]=f[d>>2];g=c+64|0;f[a+64>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;f[a+68>>2]=f[c+68>>2];f[a+72>>2]=f[c+72>>2];e=a+76|0;d=c+76|0;f[e>>2]=0;g=a+80|0;f[g>>2]=0;f[a+84>>2]=0;f[e>>2]=f[d>>2];e=c+80|0;f[g>>2]=f[e>>2];g=c+84|0;f[a+84>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+88|0;e=c+88|0;f[d>>2]=0;g=a+92|0;f[g>>2]=0;f[a+96>>2]=0;f[d>>2]=f[e>>2];d=c+92|0;f[g>>2]=f[d>>2];g=c+96|0;f[a+96>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;b[a+100>>0]=b[c+100>>0]|0;e=a+104|0;d=c+104|0;f[e>>2]=0;g=a+108|0;f[g>>2]=0;f[a+112>>2]=0;f[e>>2]=f[d>>2];e=c+108|0;f[g>>2]=f[e>>2];g=c+112|0;f[a+112>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+116|0;e=c+116|0;f[d>>2]=0;g=a+120|0;f[g>>2]=0;f[a+124>>2]=0;f[d>>2]=f[e>>2];d=c+120|0;f[g>>2]=f[d>>2];g=c+124|0;f[a+124>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;f[a+128>>2]=f[c+128>>2];e=a+132|0;d=c+132|0;f[e>>2]=0;g=a+136|0;f[g>>2]=0;f[a+140>>2]=0;f[e>>2]=f[d>>2];e=c+136|0;f[g>>2]=f[e>>2];g=c+140|0;f[a+140>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;return}function ad(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=u;u=u+32|0;g=e+8|0;i=e;switch(d|0){case 2:{d=f[b+12>>2]|0;j=f[b+4>>2]|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;a:do if((c|0)==-2){k=0;l=8}else{m=f[(f[(f[j+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;do if((Pa[f[(f[j>>2]|0)+8>>2]&127](j)|0)==1){Gd(i,j,c,d,g,((h[j+36>>0]|0)<<8|(h[j+37>>0]|0))&65535);n=f[i>>2]|0;if(!n){f[i>>2]=0;break}else{o=i;p=n;break a}}while(0);n=Yk(24)|0;f[n+4>>2]=m;q=n+8|0;f[q>>2]=f[g>>2];f[q+4>>2]=f[g+4>>2];f[q+8>>2]=f[g+8>>2];f[q+12>>2]=f[g+12>>2];f[n>>2]=2484;k=n;l=8}while(0);if((l|0)==8){f[i>>2]=k;o=i;p=k}f[a>>2]=p;f[o>>2]=0;u=e;return}case 3:{o=f[b+12>>2]|0;p=f[b+4>>2]|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;b:do if((c|0)==-2){r=0;l=16}else{b=f[(f[(f[p+4>>2]|0)+8>>2]|0)+(o<<2)>>2]|0;do if((Pa[f[(f[p>>2]|0)+8>>2]&127](p)|0)==1){Fd(i,p,c,o,g,((h[p+36>>0]|0)<<8|(h[p+37>>0]|0))&65535);k=f[i>>2]|0;if(!k){f[i>>2]=0;break}else{s=i;t=k;break b}}while(0);m=Yk(24)|0;f[m+4>>2]=b;k=m+8|0;f[k>>2]=f[g>>2];f[k+4>>2]=f[g+4>>2];f[k+8>>2]=f[g+8>>2];f[k+12>>2]=f[g+12>>2];f[m>>2]=2540;r=m;l=16}while(0);if((l|0)==16){f[i>>2]=r;s=i;t=r}f[a>>2]=t;f[s>>2]=0;u=e;return}default:{f[a>>2]=0;u=e;return}}}function bd(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=u;u=u+16|0;h=d+4|0;i=d;j=a+60|0;f[a+64>>2]=g;g=a+8|0;f[g>>2]=e;k=a+32|0;l=a+36|0;m=f[l>>2]|0;n=f[k>>2]|0;o=m-n>>2;p=n;n=m;if(o>>>0>=e>>>0){if(o>>>0>e>>>0?(m=p+(e<<2)|0,(m|0)!=(n|0)):0)f[l>>2]=n+(~((n+-4-m|0)>>>2)<<2)}else Og(k,e-o|0);o=a+56|0;k=f[o>>2]|0;m=f[k+4>>2]|0;n=f[k>>2]|0;l=m-n|0;p=l>>2;if((l|0)<=0){q=1;u=d;return q|0}l=a+16|0;r=a+32|0;s=a+12|0;t=a+20|0;if((m|0)==(n|0)){v=k;Do(v)}else{w=0;x=n}while(1){f[i>>2]=f[x+(w<<2)>>2];f[h>>2]=f[i>>2];if(!(Ob(j,h,c,w)|0)){q=0;y=24;break}n=X(w,e)|0;k=b+(n<<2)|0;m=c+(n<<2)|0;if((f[g>>2]|0)>0){n=0;do{z=f[a+68+(n<<2)>>2]|0;A=f[l>>2]|0;if((z|0)>(A|0)){B=f[r>>2]|0;f[B+(n<<2)>>2]=A;C=B}else{B=f[s>>2]|0;A=f[r>>2]|0;f[A+(n<<2)>>2]=(z|0)<(B|0)?B:z;C=A}n=n+1|0;D=f[g>>2]|0}while((n|0)<(D|0));if((D|0)>0){n=0;do{A=(f[k+(n<<2)>>2]|0)+(f[C+(n<<2)>>2]|0)|0;z=m+(n<<2)|0;f[z>>2]=A;if((A|0)<=(f[l>>2]|0)){if((A|0)<(f[s>>2]|0)){E=(f[t>>2]|0)+A|0;y=20}}else{E=A-(f[t>>2]|0)|0;y=20}if((y|0)==20){y=0;f[z>>2]=E}n=n+1|0}while((n|0)<(f[g>>2]|0))}}w=w+1|0;if((w|0)>=(p|0)){q=1;y=24;break}n=f[o>>2]|0;x=f[n>>2]|0;if((f[n+4>>2]|0)-x>>2>>>0<=w>>>0){v=n;y=8;break}}if((y|0)==8)Do(v);else if((y|0)==24){u=d;return q|0}return 0}function cd(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=u;u=u+16|0;h=d+4|0;i=d;j=a+60|0;f[a+64>>2]=g;g=a+8|0;f[g>>2]=e;k=a+32|0;l=a+36|0;m=f[l>>2]|0;n=f[k>>2]|0;o=m-n>>2;p=n;n=m;if(o>>>0>=e>>>0){if(o>>>0>e>>>0?(m=p+(e<<2)|0,(m|0)!=(n|0)):0)f[l>>2]=n+(~((n+-4-m|0)>>>2)<<2)}else Og(k,e-o|0);o=a+56|0;k=f[o>>2]|0;m=f[k+4>>2]|0;n=f[k>>2]|0;l=m-n|0;p=l>>2;if((l|0)<=0){q=1;u=d;return q|0}l=a+16|0;r=a+32|0;s=a+12|0;t=a+20|0;if((m|0)==(n|0)){v=k;Do(v)}else{w=0;x=n}while(1){f[i>>2]=f[x+(w<<2)>>2];f[h>>2]=f[i>>2];if(!(Nb(j,h,c,w)|0)){q=0;y=24;break}n=X(w,e)|0;k=b+(n<<2)|0;m=c+(n<<2)|0;if((f[g>>2]|0)>0){n=0;do{z=f[a+68+(n<<2)>>2]|0;A=f[l>>2]|0;if((z|0)>(A|0)){B=f[r>>2]|0;f[B+(n<<2)>>2]=A;C=B}else{B=f[s>>2]|0;A=f[r>>2]|0;f[A+(n<<2)>>2]=(z|0)<(B|0)?B:z;C=A}n=n+1|0;D=f[g>>2]|0}while((n|0)<(D|0));if((D|0)>0){n=0;do{A=(f[k+(n<<2)>>2]|0)+(f[C+(n<<2)>>2]|0)|0;z=m+(n<<2)|0;f[z>>2]=A;if((A|0)<=(f[l>>2]|0)){if((A|0)<(f[s>>2]|0)){E=(f[t>>2]|0)+A|0;y=20}}else{E=A-(f[t>>2]|0)|0;y=20}if((y|0)==20){y=0;f[z>>2]=E}n=n+1|0}while((n|0)<(f[g>>2]|0))}}w=w+1|0;if((w|0)>=(p|0)){q=1;y=24;break}n=f[o>>2]|0;x=f[n>>2]|0;if((f[n+4>>2]|0)-x>>2>>>0<=w>>>0){v=n;y=8;break}}if((y|0)==8)Do(v);else if((y|0)==24){u=d;return q|0}return 0}function dd(a,c,e,g,h){a=a|0;c=c|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;i=u;u=u+32|0;j=i+16|0;k=i+12|0;l=i;m=c+24|0;n=b[m>>0]|0;o=n<<24>>24;p=f[a+80>>2]|0;a=X(p,o)|0;q=f[c+28>>2]|0;if((q|0)==(e|0)|(q|0)==(g|0)?b[c+84>>0]|0:0){g=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;Le(h,g,g+(a<<1)|0);r=1;u=i;return r|0}f[l>>2]=0;g=l+4|0;f[g>>2]=0;f[l+8>>2]=0;do if(n<<24>>24)if(n<<24>>24<0)Do(l);else{q=o<<1;e=Yk(q)|0;f[l>>2]=e;s=e+(o<<1)|0;f[l+8>>2]=s;Dh(e|0,0,q|0)|0;f[g>>2]=s;break}while(0);Le(h,0,0+(a<<1)|0);a:do if(!p)t=1;else{a=c+84|0;s=c+68|0;if(n<<24>>24>0){v=0;w=0}else{q=0;while(1){if(!(b[a>>0]|0))x=f[(f[s>>2]|0)+(q<<2)>>2]|0;else x=q;e=f[l>>2]|0;f[k>>2]=x;y=b[m>>0]|0;f[j>>2]=f[k>>2];if(!(Fb(c,j,y,e)|0)){t=0;break a}q=q+1|0;if(q>>>0>=p>>>0){t=1;break a}}}while(1){if(!(b[a>>0]|0))z=f[(f[s>>2]|0)+(w<<2)>>2]|0;else z=w;q=f[l>>2]|0;f[k>>2]=z;e=b[m>>0]|0;f[j>>2]=f[k>>2];if(!(Fb(c,j,e,q)|0)){t=0;break a}q=f[l>>2]|0;e=f[h>>2]|0;y=0;A=v;while(1){d[e+(A<<1)>>1]=d[q+(y<<1)>>1]|0;y=y+1|0;if((y|0)==(o|0))break;else A=A+1|0}w=w+1|0;if(w>>>0>=p>>>0){t=1;break}else v=v+o|0}}while(0);o=f[l>>2]|0;if(o|0){l=f[g>>2]|0;if((l|0)!=(o|0))f[g>>2]=l+(~((l+-2-o|0)>>>1)<<1);mp(o)}r=t;u=i;return r|0}function ed(a,c,e,g,h){a=a|0;c=c|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;i=u;u=u+32|0;j=i+16|0;k=i+12|0;l=i;m=c+24|0;n=b[m>>0]|0;o=n<<24>>24;p=f[a+80>>2]|0;a=X(p,o)|0;q=f[c+28>>2]|0;if((q|0)==(e|0)|(q|0)==(g|0)?b[c+84>>0]|0:0){g=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;Le(h,g,g+(a<<1)|0);r=1;u=i;return r|0}f[l>>2]=0;g=l+4|0;f[g>>2]=0;f[l+8>>2]=0;do if(n<<24>>24)if(n<<24>>24<0)Do(l);else{q=o<<1;e=Yk(q)|0;f[l>>2]=e;s=e+(o<<1)|0;f[l+8>>2]=s;Dh(e|0,0,q|0)|0;f[g>>2]=s;break}while(0);Le(h,0,0+(a<<1)|0);a:do if(!p)t=1;else{a=c+84|0;s=c+68|0;if(n<<24>>24>0){v=0;w=0}else{q=0;while(1){if(!(b[a>>0]|0))x=f[(f[s>>2]|0)+(q<<2)>>2]|0;else x=q;e=f[l>>2]|0;f[k>>2]=x;y=b[m>>0]|0;f[j>>2]=f[k>>2];if(!(Gb(c,j,y,e)|0)){t=0;break a}q=q+1|0;if(q>>>0>=p>>>0){t=1;break a}}}while(1){if(!(b[a>>0]|0))z=f[(f[s>>2]|0)+(w<<2)>>2]|0;else z=w;q=f[l>>2]|0;f[k>>2]=z;e=b[m>>0]|0;f[j>>2]=f[k>>2];if(!(Gb(c,j,e,q)|0)){t=0;break a}q=f[l>>2]|0;e=f[h>>2]|0;y=0;A=v;while(1){d[e+(A<<1)>>1]=d[q+(y<<1)>>1]|0;y=y+1|0;if((y|0)==(o|0))break;else A=A+1|0}w=w+1|0;if(w>>>0>=p>>>0){t=1;break}else v=v+o|0}}while(0);o=f[l>>2]|0;if(o|0){l=f[g>>2]|0;if((l|0)!=(o|0))f[g>>2]=l+(~((l+-2-o|0)>>>1)<<1);mp(o)}r=t;u=i;return r|0}function fd(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;h=u;u=u+32|0;i=h+16|0;j=h+12|0;k=h;l=c+24|0;m=b[l>>0]|0;n=m<<24>>24;o=f[a+80>>2]|0;a=X(o,n)|0;p=f[c+28>>2]|0;if((p|0)==(d|0)|(p|0)==(e|0)?b[c+84>>0]|0:0){e=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;Me(g,e,e+(a<<2)|0);q=1;u=h;return q|0}f[k>>2]=0;e=k+4|0;f[e>>2]=0;f[k+8>>2]=0;do if(m<<24>>24)if(m<<24>>24<0)Do(k);else{p=n<<2;d=Yk(p)|0;f[k>>2]=d;r=d+(n<<2)|0;f[k+8>>2]=r;Dh(d|0,0,p|0)|0;f[e>>2]=r;break}while(0);Me(g,0,0+(a<<2)|0);a:do if(!o)s=1;else{a=c+84|0;r=c+68|0;if(m<<24>>24>0){t=0;v=0}else{p=0;while(1){if(!(b[a>>0]|0))w=f[(f[r>>2]|0)+(p<<2)>>2]|0;else w=p;d=f[k>>2]|0;f[j>>2]=w;x=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(Hb(c,i,x,d)|0)){s=0;break a}p=p+1|0;if(p>>>0>=o>>>0){s=1;break a}}}while(1){if(!(b[a>>0]|0))y=f[(f[r>>2]|0)+(v<<2)>>2]|0;else y=v;p=f[k>>2]|0;f[j>>2]=y;d=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(Hb(c,i,d,p)|0)){s=0;break a}p=f[k>>2]|0;d=f[g>>2]|0;x=0;z=t;while(1){f[d+(z<<2)>>2]=f[p+(x<<2)>>2];x=x+1|0;if((x|0)==(n|0))break;else z=z+1|0}v=v+1|0;if(v>>>0>=o>>>0){s=1;break}else t=t+n|0}}while(0);n=f[k>>2]|0;if(n|0){k=f[e>>2]|0;if((k|0)!=(n|0))f[e>>2]=k+(~((k+-4-n|0)>>>2)<<2);mp(n)}q=s;u=h;return q|0}function gd(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;h=u;u=u+32|0;i=h+16|0;j=h+12|0;k=h;l=c+24|0;m=b[l>>0]|0;n=m<<24>>24;o=f[a+80>>2]|0;a=X(o,n)|0;p=f[c+28>>2]|0;if((p|0)==(d|0)|(p|0)==(e|0)?b[c+84>>0]|0:0){e=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;Me(g,e,e+(a<<2)|0);q=1;u=h;return q|0}f[k>>2]=0;e=k+4|0;f[e>>2]=0;f[k+8>>2]=0;do if(m<<24>>24)if(m<<24>>24<0)Do(k);else{p=n<<2;d=Yk(p)|0;f[k>>2]=d;r=d+(n<<2)|0;f[k+8>>2]=r;Dh(d|0,0,p|0)|0;f[e>>2]=r;break}while(0);Me(g,0,0+(a<<2)|0);a:do if(!o)s=1;else{a=c+84|0;r=c+68|0;if(m<<24>>24>0){t=0;v=0}else{p=0;while(1){if(!(b[a>>0]|0))w=f[(f[r>>2]|0)+(p<<2)>>2]|0;else w=p;d=f[k>>2]|0;f[j>>2]=w;x=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(Ib(c,i,x,d)|0)){s=0;break a}p=p+1|0;if(p>>>0>=o>>>0){s=1;break a}}}while(1){if(!(b[a>>0]|0))y=f[(f[r>>2]|0)+(v<<2)>>2]|0;else y=v;p=f[k>>2]|0;f[j>>2]=y;d=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(Ib(c,i,d,p)|0)){s=0;break a}p=f[k>>2]|0;d=f[g>>2]|0;x=0;z=t;while(1){f[d+(z<<2)>>2]=f[p+(x<<2)>>2];x=x+1|0;if((x|0)==(n|0))break;else z=z+1|0}v=v+1|0;if(v>>>0>=o>>>0){s=1;break}else t=t+n|0}}while(0);n=f[k>>2]|0;if(n|0){k=f[e>>2]|0;if((k|0)!=(n|0))f[e>>2]=k+(~((k+-4-n|0)>>>2)<<2);mp(n)}q=s;u=h;return q|0}function hd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0;e=c+8|0;g=f[e+4>>2]|0;h=c+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if(!((g|0)>(k|0)|((g|0)==(k|0)?(f[e>>2]|0)>>>0>j>>>0:0))){l=0;return l|0}e=b[(f[c>>2]|0)+j>>0]|0;g=Vl(j|0,k|0,1,0)|0;k=h;f[k>>2]=g;f[k+4>>2]=I;do switch(e<<24>>24){case 1:{l=me(a,c,d)|0;return l|0}case 2:{l=me(a,c,d)|0;return l|0}case 3:{l=me(a,c,d)|0;return l|0}case 4:{l=me(a,c,d)|0;return l|0}case 5:{l=me(a,c,d)|0;return l|0}case 6:{l=me(a,c,d)|0;return l|0}case 7:{l=me(a,c,d)|0;return l|0}case 8:{l=me(a,c,d)|0;return l|0}case 9:{l=le(a,c,d)|0;return l|0}case 10:{l=ke(a,c,d)|0;return l|0}case 11:{l=je(a,c,d)|0;return l|0}case 12:{l=ie(a,c,d)|0;return l|0}case 13:{l=he(a,c,d)|0;return l|0}case 14:{l=ge(a,c,d)|0;return l|0}case 15:{l=ge(a,c,d)|0;return l|0}case 16:{l=ge(a,c,d)|0;return l|0}case 17:{l=ge(a,c,d)|0;return l|0}case 18:{l=ge(a,c,d)|0;return l|0}default:{l=0;return l|0}}while(0);return 0}function id(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;h=u;u=u+32|0;i=h+16|0;j=h+12|0;k=h;l=c+24|0;m=b[l>>0]|0;n=m<<24>>24;o=f[a+80>>2]|0;a=X(o,n)|0;p=f[c+28>>2]|0;if((p|0)==(d|0)|(p|0)==(e|0)?b[c+84>>0]|0:0){e=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;af(g,e,e+a|0);q=1;u=h;return q|0}f[k>>2]=0;e=k+4|0;f[e>>2]=0;f[k+8>>2]=0;if(m<<24>>24){if(m<<24>>24<0)Do(k);p=Yk(n)|0;f[e>>2]=p;f[k>>2]=p;f[k+8>>2]=p+n;d=n;r=p;do{b[r>>0]=0;r=(f[e>>2]|0)+1|0;f[e>>2]=r;d=d+-1|0}while((d|0)!=0)}af(g,0,0+a|0);a:do if(!o)s=1;else{a=c+84|0;d=c+68|0;if(m<<24>>24>0){t=0;v=0}else{r=0;while(1){if(!(b[a>>0]|0))w=f[(f[d>>2]|0)+(r<<2)>>2]|0;else w=r;p=f[k>>2]|0;f[j>>2]=w;x=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(Kb(c,i,x,p)|0)){s=0;break a}r=r+1|0;if(r>>>0>=o>>>0){s=1;break a}}}while(1){if(!(b[a>>0]|0))y=f[(f[d>>2]|0)+(v<<2)>>2]|0;else y=v;r=f[k>>2]|0;f[j>>2]=y;p=b[l>>0]|0;f[i>>2]=f[j>>2];if(Kb(c,i,p,r)|0){z=0;A=t}else{s=0;break a}while(1){b[(f[g>>2]|0)+A>>0]=b[(f[k>>2]|0)+z>>0]|0;z=z+1|0;if((z|0)==(n|0))break;else A=A+1|0}v=v+1|0;if(v>>>0>=o>>>0){s=1;break}else t=t+n|0}}while(0);n=f[k>>2]|0;if(n|0){if((f[e>>2]|0)!=(n|0))f[e>>2]=n;mp(n)}q=s;u=h;return q|0}function jd(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;h=u;u=u+32|0;i=h+16|0;j=h+12|0;k=h;l=c+24|0;m=b[l>>0]|0;n=m<<24>>24;o=f[a+80>>2]|0;a=X(o,n)|0;p=f[c+28>>2]|0;if((p|0)==(d|0)|(p|0)==(e|0)?b[c+84>>0]|0:0){e=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;af(g,e,e+a|0);q=1;u=h;return q|0}f[k>>2]=0;e=k+4|0;f[e>>2]=0;f[k+8>>2]=0;if(m<<24>>24){if(m<<24>>24<0)Do(k);p=Yk(n)|0;f[e>>2]=p;f[k>>2]=p;f[k+8>>2]=p+n;d=n;r=p;do{b[r>>0]=0;r=(f[e>>2]|0)+1|0;f[e>>2]=r;d=d+-1|0}while((d|0)!=0)}af(g,0,0+a|0);a:do if(!o)s=1;else{a=c+84|0;d=c+68|0;if(m<<24>>24>0){t=0;v=0}else{r=0;while(1){if(!(b[a>>0]|0))w=f[(f[d>>2]|0)+(r<<2)>>2]|0;else w=r;p=f[k>>2]|0;f[j>>2]=w;x=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(Lb(c,i,x,p)|0)){s=0;break a}r=r+1|0;if(r>>>0>=o>>>0){s=1;break a}}}while(1){if(!(b[a>>0]|0))y=f[(f[d>>2]|0)+(v<<2)>>2]|0;else y=v;r=f[k>>2]|0;f[j>>2]=y;p=b[l>>0]|0;f[i>>2]=f[j>>2];if(Lb(c,i,p,r)|0){z=0;A=t}else{s=0;break a}while(1){b[(f[g>>2]|0)+A>>0]=b[(f[k>>2]|0)+z>>0]|0;z=z+1|0;if((z|0)==(n|0))break;else A=A+1|0}v=v+1|0;if(v>>>0>=o>>>0){s=1;break}else t=t+n|0}}while(0);n=f[k>>2]|0;if(n|0){if((f[e>>2]|0)!=(n|0))f[e>>2]=n;mp(n)}q=s;u=h;return q|0}function kd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;e=b+12|0;g=f[e>>2]|0;h=(f[c>>2]|0)-g|0;i=c+4|0;j=(f[i>>2]|0)-g|0;k=c;f[k>>2]=h;f[k+4>>2]=j;k=(h|0)>-1;l=(j|0)>-1;m=f[e>>2]|0;if(((l?j:0-j|0)+(k?h:0-h|0)|0)>(m|0)){if(k)if(!l)if((h|0)<1){n=-1;o=-1}else p=6;else{n=1;o=1}else if((j|0)<1){n=-1;o=-1}else p=6;if((p|0)==6){n=(h|0)>0?1:-1;o=(j|0)>0?1:-1}l=X(m,n)|0;k=X(m,o)|0;q=(h<<1)-l|0;f[c>>2]=q;r=(j<<1)-k|0;f[i>>2]=r;if((X(n,o)|0)>-1){o=0-r|0;f[c>>2]=o;s=0-q|0;t=o}else{f[c>>2]=r;s=q;t=r}r=(t+l|0)/2|0;f[c>>2]=r;c=(s+k|0)/2|0;f[i>>2]=c;u=0;v=r;w=c;x=f[e>>2]|0}else{u=1;v=h;w=j;x=m}m=(f[d>>2]|0)+v|0;f[a>>2]=m;v=(f[d+4>>2]|0)+w|0;w=a+4|0;f[w>>2]=v;if((x|0)>=(m|0))if((m|0)<(0-x|0))y=(f[b+4>>2]|0)+m|0;else y=m;else y=m-(f[b+4>>2]|0)|0;f[a>>2]=y;if((x|0)>=(v|0))if((v|0)<(0-x|0))z=(f[b+4>>2]|0)+v|0;else z=v;else z=v-(f[b+4>>2]|0)|0;f[w>>2]=z;if(u){A=y;B=z;C=A+g|0;D=B+g|0;E=a;F=E;f[F>>2]=C;G=E+4|0;H=G;f[H>>2]=D;return}if((y|0)>-1)if((z|0)<=-1)if((y|0)<1){I=-1;J=-1}else p=24;else{I=1;J=1}else if((z|0)<1){I=-1;J=-1}else p=24;if((p|0)==24){I=(y|0)>0?1:-1;J=(z|0)>0?1:-1}p=X(x,I)|0;u=X(x,J)|0;x=(y<<1)-p|0;f[a>>2]=x;y=(z<<1)-u|0;f[w>>2]=y;if((X(I,J)|0)>-1){J=0-y|0;f[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+4|0;f[d>>2]=g;f[g>>2]=f[g>>2]&u|v>>>w;i=(f[b>>2]|0)+4|0;f[b>>2]=i;if((c|0)<=63)break;else c=c+-32|0}x=n+-32-r|0;y=i}else{x=n;y=p}if((x|0)<=0){j=o;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}p=f[y>>2]&-1>>>(32-x|0);y=(w|0)<(x|0)?w:x;n=f[d>>2]|0;i=f[n>>2]&~(-1<<f[o>>2]&-1>>>(w-y|0));f[n>>2]=i;f[n>>2]=i|p<<f[o>>2];i=(f[o>>2]|0)+y|0;w=n+(i>>>5<<2)|0;f[d>>2]=w;f[o>>2]=i&31;i=x-y|0;if((i|0)<=0){j=o;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}f[w>>2]=f[w>>2]&~(-1>>>(32-i|0))|p>>>y;f[o>>2]=i;j=o;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}function md(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=u;u=u+32|0;d=c+16|0;e=c;f[d>>2]=0;do if((j[b+38>>1]|0)<514){g=b+8|0;i=f[g>>2]|0;k=f[g+4>>2]|0;g=b+16|0;l=g;m=f[l>>2]|0;n=Vl(m|0,f[l+4>>2]|0,4,0)|0;l=I;if((k|0)<(l|0)|(k|0)==(l|0)&i>>>0<n>>>0){o=0;u=c;return o|0}else{i=(f[b>>2]|0)+m|0;m=h[i>>0]|h[i+1>>0]<<8|h[i+2>>0]<<16|h[i+3>>0]<<24;f[d>>2]=m;i=g;f[i>>2]=n;f[i+4>>2]=l;p=m;break}}else if(Nh(d,b)|0){p=f[d>>2]|0;break}else{o=0;u=c;return o|0}while(0);if(!p){o=0;u=c;return o|0}m=a+76|0;ud(m,p,0);Zm(e);if(zd(e,b)|0){if(f[d>>2]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0){o=0;u=d;return o|0}else{p=(f[c>>2]|0)+m|0;m=p;q=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=p+4|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=e;f[m>>2]=q;f[m+4>>2]=p;m=g;f[m>>2]=n;f[m+4>>2]=l;r=g;s=i;t=k;v=n;w=l;x=p;y=q;break}}else if(nh(e,c)|0){q=e;p=c+8|0;l=c+16|0;n=l;r=l;s=f[p>>2]|0;t=f[p+4>>2]|0;v=f[n>>2]|0;w=f[n+4>>2]|0;x=f[q+4>>2]|0;y=f[q>>2]|0;break}else{o=0;u=d;return o|0}while(0);e=Xl(s|0,t|0,v|0,w|0)|0;t=I;if(x>>>0>t>>>0|(x|0)==(t|0)&y>>>0>e>>>0){o=0;u=d;return o|0}e=(f[c>>2]|0)+v|0;c=Vl(v|0,w|0,y|0,x|0)|0;x=r;f[x>>2]=c;f[x+4>>2]=I;if((y|0)<1){o=0;u=d;return o|0}f[a+40>>2]=e;x=y+-1|0;c=e+x|0;a:do switch((h[c>>0]|0)>>>6&3){case 0:{f[a+44>>2]=x;z=b[c>>0]&63;break}case 1:{if((y|0)<2){o=0;u=d;return o|0}else{f[a+44>>2]=y+-2;r=e+y+-2|0;z=(h[r+1>>0]|0)<<8&16128|(h[r>>0]|0);break a}break}case 2:{if((y|0)<3){o=0;u=d;return o|0}else{f[a+44>>2]=y+-3;r=e+y+-3|0;z=(h[r+1>>0]|0)<<8|(h[r>>0]|0)|(h[r+2>>0]|0)<<16&4128768;break a}break}case 3:{f[a+44>>2]=y+-4;r=e+y+-4|0;z=(h[r+2>>0]|0)<<16|(h[r+3>>0]|0)<<24&1056964608|(h[r+1>>0]|0)<<8|(h[r>>0]|0);break}default:{}}while(0);y=z+4194304|0;f[a+48>>2]=y;o=y>>>0<1073741824;u=d;return o|0}function od(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;d=u;u=u+16|0;e=d;do if((j[c+38>>1]|0)<512){g=c+8|0;i=f[g>>2]|0;k=f[g+4>>2]|0;g=c+16|0;l=g;m=f[l>>2]|0;n=Vl(m|0,f[l+4>>2]|0,8,0)|0;l=I;if((k|0)<(l|0)|(k|0)==(l|0)&i>>>0<n>>>0){o=0;u=d;return o|0}else{p=(f[c>>2]|0)+m|0;m=p;q=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=p+4|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=e;f[m>>2]=q;f[m+4>>2]=p;m=g;f[m>>2]=n;f[m+4>>2]=l;r=g;s=i;t=k;v=n;w=l;x=p;y=q;break}}else if(nh(e,c)|0){q=e;p=c+8|0;l=c+16|0;n=l;r=l;s=f[p>>2]|0;t=f[p+4>>2]|0;v=f[n>>2]|0;w=f[n+4>>2]|0;x=f[q+4>>2]|0;y=f[q>>2]|0;break}else{o=0;u=d;return o|0}while(0);e=Xl(s|0,t|0,v|0,w|0)|0;t=I;if(x>>>0>t>>>0|(x|0)==(t|0)&y>>>0>e>>>0){o=0;u=d;return o|0}e=(f[c>>2]|0)+v|0;c=Vl(v|0,w|0,y|0,x|0)|0;x=r;f[x>>2]=c;f[x+4>>2]=I;if((y|0)<1){o=0;u=d;return o|0}f[a+40>>2]=e;x=y+-1|0;c=e+x|0;a:do switch((h[c>>0]|0)>>>6&3){case 0:{f[a+44>>2]=x;z=b[c>>0]&63;break}case 1:{if((y|0)<2){o=0;u=d;return o|0}else{f[a+44>>2]=y+-2;r=e+y+-2|0;z=(h[r+1>>0]|0)<<8&16128|(h[r>>0]|0);break a}break}case 2:{if((y|0)<3){o=0;u=d;return o|0}else{f[a+44>>2]=y+-3;r=e+y+-3|0;z=(h[r+1>>0]|0)<<8|(h[r>>0]|0)|(h[r+2>>0]|0)<<16&4128768;break a}break}case 3:{f[a+44>>2]=y+-4;r=e+y+-4|0;z=(h[r+2>>0]|0)<<16|(h[r+3>>0]|0)<<24&1056964608|(h[r+1>>0]|0)<<8|(h[r>>0]|0);break}default:{}}while(0);y=z+2097152|0;f[a+48>>2]=y;o=y>>>0<536870912;u=d;return o|0}function pd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;d=u;u=u+16|0;e=d;do if((j[c+38>>1]|0)<512){g=c+8|0;i=f[g>>2]|0;k=f[g+4>>2]|0;g=c+16|0;l=g;m=f[l>>2]|0;n=Vl(m|0,f[l+4>>2]|0,8,0)|0;l=I;if((k|0)<(l|0)|(k|0)==(l|0)&i>>>0<n>>>0){o=0;u=d;return o|0}else{p=(f[c>>2]|0)+m|0;m=p;q=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=p+4|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=e;f[m>>2]=q;f[m+4>>2]=p;m=g;f[m>>2]=n;f[m+4>>2]=l;r=g;s=i;t=k;v=n;w=l;x=p;y=q;break}}else if(nh(e,c)|0){q=e;p=c+8|0;l=c+16|0;n=l;r=l;s=f[p>>2]|0;t=f[p+4>>2]|0;v=f[n>>2]|0;w=f[n+4>>2]|0;x=f[q+4>>2]|0;y=f[q>>2]|0;break}else{o=0;u=d;return o|0}while(0);e=Xl(s|0,t|0,v|0,w|0)|0;t=I;if(x>>>0>t>>>0|(x|0)==(t|0)&y>>>0>e>>>0){o=0;u=d;return o|0}e=(f[c>>2]|0)+v|0;c=Vl(v|0,w|0,y|0,x|0)|0;x=r;f[x>>2]=c;f[x+4>>2]=I;if((y|0)<1){o=0;u=d;return o|0}f[a+40>>2]=e;x=y+-1|0;c=e+x|0;a:do switch((h[c>>0]|0)>>>6&3){case 0:{f[a+44>>2]=x;z=b[c>>0]&63;break}case 1:{if((y|0)<2){o=0;u=d;return o|0}else{f[a+44>>2]=y+-2;r=e+y+-2|0;z=(h[r+1>>0]|0)<<8&16128|(h[r>>0]|0);break a}break}case 2:{if((y|0)<3){o=0;u=d;return o|0}else{f[a+44>>2]=y+-3;r=e+y+-3|0;z=(h[r+1>>0]|0)<<8|(h[r>>0]|0)|(h[r+2>>0]|0)<<16&4128768;break a}break}case 3:{f[a+44>>2]=y+-4;r=e+y+-4|0;z=(h[r+2>>0]|0)<<16|(h[r+3>>0]|0)<<24&1056964608|(h[r+1>>0]|0)<<8|(h[r>>0]|0);break}default:{}}while(0);y=z+1048576|0;f[a+48>>2]=y;o=y>>>0<268435456;u=d;return o|0}function qd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;d=u;u=u+16|0;e=d;do if((j[c+38>>1]|0)<512){g=c+8|0;i=f[g>>2]|0;k=f[g+4>>2]|0;g=c+16|0;l=g;m=f[l>>2]|0;n=Vl(m|0,f[l+4>>2]|0,8,0)|0;l=I;if((k|0)<(l|0)|(k|0)==(l|0)&i>>>0<n>>>0){o=0;u=d;return o|0}else{p=(f[c>>2]|0)+m|0;m=p;q=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=p+4|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=e;f[m>>2]=q;f[m+4>>2]=p;m=g;f[m>>2]=n;f[m+4>>2]=l;r=g;s=i;t=k;v=n;w=l;x=p;y=q;break}}else if(nh(e,c)|0){q=e;p=c+8|0;l=c+16|0;n=l;r=l;s=f[p>>2]|0;t=f[p+4>>2]|0;v=f[n>>2]|0;w=f[n+4>>2]|0;x=f[q+4>>2]|0;y=f[q>>2]|0;break}else{o=0;u=d;return o|0}while(0);e=Xl(s|0,t|0,v|0,w|0)|0;t=I;if(x>>>0>t>>>0|(x|0)==(t|0)&y>>>0>e>>>0){o=0;u=d;return o|0}e=(f[c>>2]|0)+v|0;c=Vl(v|0,w|0,y|0,x|0)|0;x=r;f[x>>2]=c;f[x+4>>2]=I;if((y|0)<1){o=0;u=d;return o|0}f[a+40>>2]=e;x=y+-1|0;c=e+x|0;a:do switch((h[c>>0]|0)>>>6&3){case 0:{f[a+44>>2]=x;z=b[c>>0]&63;break}case 1:{if((y|0)<2){o=0;u=d;return o|0}else{f[a+44>>2]=y+-2;r=e+y+-2|0;z=(h[r+1>>0]|0)<<8&16128|(h[r>>0]|0);break a}break}case 2:{if((y|0)<3){o=0;u=d;return o|0}else{f[a+44>>2]=y+-3;r=e+y+-3|0;z=(h[r+1>>0]|0)<<8|(h[r>>0]|0)|(h[r+2>>0]|0)<<16&4128768;break a}break}case 3:{f[a+44>>2]=y+-4;r=e+y+-4|0;z=(h[r+2>>0]|0)<<16|(h[r+3>>0]|0)<<24&1056964608|(h[r+1>>0]|0)<<8|(h[r>>0]|0);break}default:{}}while(0);y=z+262144|0;f[a+48>>2]=y;o=y>>>0<67108864;u=d;return o|0}function rd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;d=u;u=u+16|0;e=d;do if((j[c+38>>1]|0)<512){g=c+8|0;i=f[g>>2]|0;k=f[g+4>>2]|0;g=c+16|0;l=g;m=f[l>>2]|0;n=Vl(m|0,f[l+4>>2]|0,8,0)|0;l=I;if((k|0)<(l|0)|(k|0)==(l|0)&i>>>0<n>>>0){o=0;u=d;return o|0}else{p=(f[c>>2]|0)+m|0;m=p;q=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=p+4|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=e;f[m>>2]=q;f[m+4>>2]=p;m=g;f[m>>2]=n;f[m+4>>2]=l;r=g;s=i;t=k;v=n;w=l;x=p;y=q;break}}else if(nh(e,c)|0){q=e;p=c+8|0;l=c+16|0;n=l;r=l;s=f[p>>2]|0;t=f[p+4>>2]|0;v=f[n>>2]|0;w=f[n+4>>2]|0;x=f[q+4>>2]|0;y=f[q>>2]|0;break}else{o=0;u=d;return o|0}while(0);e=Xl(s|0,t|0,v|0,w|0)|0;t=I;if(x>>>0>t>>>0|(x|0)==(t|0)&y>>>0>e>>>0){o=0;u=d;return o|0}e=(f[c>>2]|0)+v|0;c=Vl(v|0,w|0,y|0,x|0)|0;x=r;f[x>>2]=c;f[x+4>>2]=I;if((y|0)<1){o=0;u=d;return o|0}f[a+40>>2]=e;x=y+-1|0;c=e+x|0;a:do switch((h[c>>0]|0)>>>6&3){case 0:{f[a+44>>2]=x;z=b[c>>0]&63;break}case 1:{if((y|0)<2){o=0;u=d;return o|0}else{f[a+44>>2]=y+-2;r=e+y+-2|0;z=(h[r+1>>0]|0)<<8&16128|(h[r>>0]|0);break a}break}case 2:{if((y|0)<3){o=0;u=d;return o|0}else{f[a+44>>2]=y+-3;r=e+y+-3|0;z=(h[r+1>>0]|0)<<8|(h[r>>0]|0)|(h[r+2>>0]|0)<<16&4128768;break a}break}case 3:{f[a+44>>2]=y+-4;r=e+y+-4|0;z=(h[r+2>>0]|0)<<16|(h[r+3>>0]|0)<<24&1056964608|(h[r+1>>0]|0)<<8|(h[r>>0]|0);break}default:{}}while(0);y=z+131072|0;f[a+48>>2]=y;o=y>>>0<33554432;u=d;return o|0}function sd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;d=u;u=u+16|0;e=d;do if((j[c+38>>1]|0)<512){g=c+8|0;i=f[g>>2]|0;k=f[g+4>>2]|0;g=c+16|0;l=g;m=f[l>>2]|0;n=Vl(m|0,f[l+4>>2]|0,8,0)|0;l=I;if((k|0)<(l|0)|(k|0)==(l|0)&i>>>0<n>>>0){o=0;u=d;return o|0}else{p=(f[c>>2]|0)+m|0;m=p;q=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=p+4|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=e;f[m>>2]=q;f[m+4>>2]=p;m=g;f[m>>2]=n;f[m+4>>2]=l;r=g;s=i;t=k;v=n;w=l;x=p;y=q;break}}else if(nh(e,c)|0){q=e;p=c+8|0;l=c+16|0;n=l;r=l;s=f[p>>2]|0;t=f[p+4>>2]|0;v=f[n>>2]|0;w=f[n+4>>2]|0;x=f[q+4>>2]|0;y=f[q>>2]|0;break}else{o=0;u=d;return o|0}while(0);e=Xl(s|0,t|0,v|0,w|0)|0;t=I;if(x>>>0>t>>>0|(x|0)==(t|0)&y>>>0>e>>>0){o=0;u=d;return o|0}e=(f[c>>2]|0)+v|0;c=Vl(v|0,w|0,y|0,x|0)|0;x=r;f[x>>2]=c;f[x+4>>2]=I;if((y|0)<1){o=0;u=d;return o|0}f[a+40>>2]=e;x=y+-1|0;c=e+x|0;a:do switch((h[c>>0]|0)>>>6&3){case 0:{f[a+44>>2]=x;z=b[c>>0]&63;break}case 1:{if((y|0)<2){o=0;u=d;return o|0}else{f[a+44>>2]=y+-2;r=e+y+-2|0;z=(h[r+1>>0]|0)<<8&16128|(h[r>>0]|0);break a}break}case 2:{if((y|0)<3){o=0;u=d;return o|0}else{f[a+44>>2]=y+-3;r=e+y+-3|0;z=(h[r+1>>0]|0)<<8|(h[r>>0]|0)|(h[r+2>>0]|0)<<16&4128768;break a}break}case 3:{f[a+44>>2]=y+-4;r=e+y+-4|0;z=(h[r+2>>0]|0)<<16|(h[r+3>>0]|0)<<24&1056964608|(h[r+1>>0]|0)<<8|(h[r>>0]|0);break}default:{}}while(0);y=z+32768|0;f[a+48>>2]=y;o=y>>>0<8388608;u=d;return o|0}function td(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;d=u;u=u+16|0;e=d;do if((j[c+38>>1]|0)<512){g=c+8|0;i=f[g>>2]|0;k=f[g+4>>2]|0;g=c+16|0;l=g;m=f[l>>2]|0;n=Vl(m|0,f[l+4>>2]|0,8,0)|0;l=I;if((k|0)<(l|0)|(k|0)==(l|0)&i>>>0<n>>>0){o=0;u=d;return o|0}else{p=(f[c>>2]|0)+m|0;m=p;q=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=p+4|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=e;f[m>>2]=q;f[m+4>>2]=p;m=g;f[m>>2]=n;f[m+4>>2]=l;r=g;s=i;t=k;v=n;w=l;x=p;y=q;break}}else if(nh(e,c)|0){q=e;p=c+8|0;l=c+16|0;n=l;r=l;s=f[p>>2]|0;t=f[p+4>>2]|0;v=f[n>>2]|0;w=f[n+4>>2]|0;x=f[q+4>>2]|0;y=f[q>>2]|0;break}else{o=0;u=d;return o|0}while(0);e=Xl(s|0,t|0,v|0,w|0)|0;t=I;if(x>>>0>t>>>0|(x|0)==(t|0)&y>>>0>e>>>0){o=0;u=d;return o|0}e=(f[c>>2]|0)+v|0;c=Vl(v|0,w|0,y|0,x|0)|0;x=r;f[x>>2]=c;f[x+4>>2]=I;if((y|0)<1){o=0;u=d;return o|0}f[a+40>>2]=e;x=y+-1|0;c=e+x|0;a:do switch((h[c>>0]|0)>>>6&3){case 0:{f[a+44>>2]=x;z=b[c>>0]&63;break}case 1:{if((y|0)<2){o=0;u=d;return o|0}else{f[a+44>>2]=y+-2;r=e+y+-2|0;z=(h[r+1>>0]|0)<<8&16128|(h[r>>0]|0);break a}break}case 2:{if((y|0)<3){o=0;u=d;return o|0}else{f[a+44>>2]=y+-3;r=e+y+-3|0;z=(h[r+1>>0]|0)<<8|(h[r>>0]|0)|(h[r+2>>0]|0)<<16&4128768;break a}break}case 3:{f[a+44>>2]=y+-4;r=e+y+-4|0;z=(h[r+2>>0]|0)<<16|(h[r+3>>0]|0)<<24&1056964608|(h[r+1>>0]|0)<<8|(h[r>>0]|0);break}default:{}}while(0);y=z+16384|0;f[a+48>>2]=y;o=y>>>0<4194304;u=d;return o|0}function ud(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=u;u=u+32|0;e=d+8|0;g=d;h=a+4|0;i=f[h>>2]|0;if(i>>>0>=b>>>0){f[h>>2]=b;u=d;return}j=a+8|0;k=f[j>>2]|0;l=k<<5;m=b-i|0;if(l>>>0<m>>>0|i>>>0>(l-m|0)>>>0){f[e>>2]=0;n=e+4|0;f[n>>2]=0;o=e+8|0;f[o>>2]=0;if((b|0)<0)Do(a);p=k<<6;k=b+31&-32;Jg(e,l>>>0<1073741823?(p>>>0<k>>>0?k:p):2147483647);p=f[h>>2]|0;f[n>>2]=p+m;k=f[a>>2]|0;l=k;q=f[e>>2]|0;r=(l+(p>>>5<<2)-k<<3)+(p&31)|0;if((r|0)>0){p=r>>>5;kk(q|0,k|0,p<<2|0)|0;k=r&31;r=q+(p<<2)|0;s=r;if(!k){t=0;v=s}else{w=-1>>>(32-k|0);f[r>>2]=f[r>>2]&~w|f[l+(p<<2)>>2]&w;t=k;v=s}}else{t=0;v=q}f[g>>2]=v;f[g+4>>2]=t;t=g;g=f[t>>2]|0;v=f[t+4>>2]|0;t=f[a>>2]|0;f[a>>2]=f[e>>2];f[e>>2]=t;e=f[h>>2]|0;f[h>>2]=f[n>>2];f[n>>2]=e;e=f[j>>2]|0;f[j>>2]=f[o>>2];f[o>>2]=e;if(t|0)mp(t);x=g;y=v}else{v=(f[a>>2]|0)+(i>>>5<<2)|0;f[h>>2]=b;x=v;y=i&31}if(!m){u=d;return}i=(y|0)==0;v=x;if(c){if(i){z=m;A=x;B=v}else{c=32-y|0;b=c>>>0>m>>>0?m:c;f[v>>2]=f[v>>2]|-1>>>(c-b|0)&-1<<y;c=v+4|0;z=m-b|0;A=c;B=c}c=z>>>5;Dh(A|0,-1,c<<2|0)|0;A=z&31;z=B+(c<<2)|0;if(!A){u=d;return}f[z>>2]=f[z>>2]|-1>>>(32-A|0);u=d;return}else{if(i){C=m;D=x;E=v}else{x=32-y|0;i=x>>>0>m>>>0?m:x;f[v>>2]=f[v>>2]&~(-1>>>(x-i|0)&-1<<y);y=v+4|0;C=m-i|0;D=y;E=y}y=C>>>5;Dh(D|0,0,y<<2|0)|0;D=C&31;C=E+(y<<2)|0;if(!D){u=d;return}f[C>>2]=f[C>>2]&~(-1>>>(32-D|0));u=d;return}}function vd(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3348;b=f[a+388>>2]|0;if(b|0){c=a+392|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=a+368|0;d=f[b>>2]|0;f[b>>2]=0;if(d|0){b=d+-4|0;c=f[b>>2]|0;if(c|0){e=d+(c<<4)|0;do e=e+-16|0;while((e|0)!=(d|0))}kp(b)}Pg(a+216|0);b=f[a+196>>2]|0;if(b|0){d=a+200|0;e=f[d>>2]|0;if((e|0)!=(b|0))f[d>>2]=e+(~((e+-4-b|0)>>>2)<<2);mp(b)}b=f[a+184>>2]|0;if(b|0){e=a+188|0;d=f[e>>2]|0;if((d|0)!=(b|0))f[e>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+172>>2]|0;if(b|0){d=a+176|0;e=f[d>>2]|0;if((e|0)!=(b|0))f[d>>2]=e+(~((e+-4-b|0)>>>2)<<2);mp(b)}b=f[a+160>>2]|0;if(b|0){e=a+164|0;d=f[e>>2]|0;if((d|0)!=(b|0))f[e>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+144>>2]|0;if(b|0){d=b;do{b=d;d=f[d>>2]|0;mp(b)}while((d|0)!=0)}d=a+136|0;b=f[d>>2]|0;f[d>>2]=0;if(b|0)mp(b);b=f[a+120>>2]|0;if(b|0)mp(b);b=f[a+108>>2]|0;if(b|0)mp(b);b=f[a+96>>2]|0;if(b|0)mp(b);b=f[a+72>>2]|0;if(b|0){d=a+76|0;e=f[d>>2]|0;if((e|0)!=(b|0))f[d>>2]=e+(~((e+-4-b|0)>>>2)<<2);mp(b)}b=f[a+60>>2]|0;if(b|0)mp(b);b=f[a+48>>2]|0;if(b|0){e=a+52|0;d=f[e>>2]|0;if((d|0)!=(b|0))f[e>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+36>>2]|0;if(b|0){d=a+40|0;e=f[d>>2]|0;if((e|0)!=(b|0))f[d>>2]=e+(~(((e+-12-b|0)>>>0)/12|0)*12|0);mp(b)}b=f[a+24>>2]|0;if(b|0){e=a+28|0;d=f[e>>2]|0;if((d|0)!=(b|0))f[e>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+12>>2]|0;if(b|0){d=a+16|0;e=f[d>>2]|0;if((e|0)!=(b|0))f[d>>2]=e+(~((e+-4-b|0)>>>2)<<2);mp(b)}b=a+8|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;Vg(a);mp(a);return}function wd(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;c=a+32|0;d=f[c>>2]|0;e=d+8|0;g=f[e+4>>2]|0;h=d+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if(!((g|0)>(k|0)|((g|0)==(k|0)?(f[e>>2]|0)>>>0>j>>>0:0))){l=0;return l|0}e=b[(f[d>>2]|0)+j>>0]|0;d=Vl(j|0,k|0,1,0)|0;k=h;f[k>>2]=d;f[k+4>>2]=I;k=e&255;d=e<<24>>24==0;a:do if(!d){e=0;while(1){if(!(Qa[f[(f[a>>2]|0)+16>>2]&127](a,e)|0)){l=0;break}e=e+1|0;if((e|0)>=(k|0))break a}return l|0}while(0);e=a+8|0;h=f[e>>2]|0;j=f[a+12>>2]|0;b:do if((h|0)!=(j|0)){g=a+4|0;i=h;while(1){m=f[i>>2]|0;i=i+4|0;if(!(Ra[f[(f[m>>2]|0)+8>>2]&31](m,a,f[g>>2]|0)|0)){l=0;break}if((i|0)==(j|0))break b}return l|0}while(0);if(!d){j=0;do{h=f[(f[e>>2]|0)+(j<<2)>>2]|0;j=j+1|0;if(!(Qa[f[(f[h>>2]|0)+12>>2]&127](h,f[c>>2]|0)|0)){l=0;n=26;break}}while((j|0)<(k|0));if((n|0)==26)return l|0;if(!d){d=a+20|0;n=a+24|0;j=0;do{c=f[(f[e>>2]|0)+(j<<2)>>2]|0;h=Pa[f[(f[c>>2]|0)+24>>2]&127](c)|0;if((h|0)>0){c=0;do{i=f[(f[e>>2]|0)+(j<<2)>>2]|0;g=Qa[f[(f[i>>2]|0)+20>>2]&127](i,c)|0;i=f[n>>2]|0;m=f[d>>2]|0;o=i-m>>2;p=m;do if(g>>>0>=o>>>0){m=g+1|0;q=i;if(m>>>0>o>>>0){Og(d,m-o|0);r=f[d>>2]|0;break}if(m>>>0<o>>>0?(s=p+(m<<2)|0,(s|0)!=(q|0)):0){f[n>>2]=q+(~((q+-4-s|0)>>>2)<<2);r=p}else r=p}else r=p;while(0);f[r+(g<<2)>>2]=j;c=c+1|0}while((c|0)!=(h|0))}j=j+1|0}while((j|0)!=(k|0))}}if(!(Pa[f[(f[a>>2]|0)+28>>2]&127](a)|0)){l=0;return l|0}l=Pa[f[(f[a>>2]|0)+32>>2]&127](a)|0;return l|0}function xd(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;c=u;u=u+16|0;d=c;e=Pa[f[(f[a>>2]|0)+24>>2]&127](a)|0;if((e|0)<=0){g=1;u=c;return g|0}h=a+36|0;i=a+48|0;j=d+8|0;k=d+4|0;l=d+11|0;m=0;while(1){n=(Pa[f[(f[a>>2]|0)+28>>2]&127](a)|0)+40|0;if((f[n>>2]|0)!=0?(n=f[(f[h>>2]|0)+(m<<2)>>2]|0,o=f[n+8>>2]|0,p=ig(n)|0,(p|0)!=0):0){n=(Pa[f[(f[a>>2]|0)+28>>2]&127](a)|0)+40|0;q=f[n>>2]|0;n=f[o+56>>2]|0;o=Yk(32)|0;f[d>>2]=o;f[j>>2]=-2147483616;f[k>>2]=24;r=o;s=11875;t=r+24|0;do{b[r>>0]=b[s>>0]|0;r=r+1|0;s=s+1|0}while((r|0)<(t|0));b[o+24>>0]=0;s=q+16|0;r=f[s>>2]|0;if(r){t=s;v=r;a:while(1){r=v;while(1){if((f[r+16>>2]|0)>=(n|0))break;w=f[r+4>>2]|0;if(!w){x=t;break a}else r=w}v=f[r>>2]|0;if(!v){x=r;break}else t=r}if(((x|0)!=(s|0)?(n|0)>=(f[x+16>>2]|0):0)?(t=x+20|0,(fg(t,d)|0)!=0):0)y=gi(t,d,0)|0;else z=14}else z=14;if((z|0)==14){z=0;y=gi(q,d,0)|0}if((b[l>>0]|0)<0)mp(f[d>>2]|0);if(y)ae(f[(f[(f[h>>2]|0)+(m<<2)>>2]|0)+8>>2]|0,p);else z=19}else z=19;if((z|0)==19?(z=0,t=f[(f[h>>2]|0)+(m<<2)>>2]|0,!(Qa[f[(f[t>>2]|0)+24>>2]&127](t,i)|0)):0){g=0;z=21;break}m=m+1|0;if((m|0)>=(e|0)){g=1;z=21;break}}if((z|0)==21){u=c;return g|0}return 0}function yd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;e=u;u=u+32|0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>2]|0;if(!p){u=e;return 1}if((f[m>>2]|0)!=(p|0))f[m>>2]=p;mp(p);u=e;return 1}function zd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;d=u;u=u+16|0;e=d;g=c+8|0;i=g;k=f[i+4>>2]|0;l=c+16|0;m=l;n=f[m>>2]|0;o=f[m+4>>2]|0;if(!((k|0)>(o|0)|((k|0)==(o|0)?(f[i>>2]|0)>>>0>n>>>0:0))){p=0;u=d;return p|0}b[a+12>>0]=b[(f[c>>2]|0)+n>>0]|0;n=l;i=f[n>>2]|0;o=f[n+4>>2]|0;n=Vl(i|0,o|0,1,0)|0;k=l;f[k>>2]=n;f[k+4>>2]=I;if((j[c+38>>1]|0)<514){k=g;m=f[k>>2]|0;q=f[k+4>>2]|0;k=Vl(i|0,o|0,5,0)|0;o=I;if((q|0)<(o|0)|(q|0)==(o|0)&m>>>0<k>>>0)r=0;else{i=(f[c>>2]|0)+n|0;n=h[i>>0]|h[i+1>>0]<<8|h[i+2>>0]<<16|h[i+3>>0]<<24;f[e>>2]=n;i=l;f[i>>2]=k;f[i+4>>2]=o;s=m;t=q;v=k;w=o;x=n;y=7}}else if(Nh(e,c)|0){n=g;g=l;s=f[n>>2]|0;t=f[n+4>>2]|0;v=f[g>>2]|0;w=f[g+4>>2]|0;x=f[e>>2]|0;y=7}else r=0;a:do if((y|0)==7){e=Xl(s|0,t|0,v|0,w|0)|0;g=I;if(!((g|0)<0|(g|0)==0&e>>>0<x>>>0)?(e=(f[c>>2]|0)+v|0,(x|0)>=1):0){f[a>>2]=e;g=x+-1|0;n=e+g|0;switch((h[n>>0]|0)>>>6&3){case 0:{f[a+4>>2]=g;z=b[n>>0]&63;break}case 1:{if((x|0)<2){r=0;break a}f[a+4>>2]=x+-2;n=e+x+-2|0;z=(h[n+1>>0]|0)<<8&16128|(h[n>>0]|0);break}case 2:{if((x|0)<3){r=0;break a}f[a+4>>2]=x+-3;n=e+x+-3|0;z=(h[n+1>>0]|0)<<8|(h[n>>0]|0)|(h[n+2>>0]|0)<<16&4128768;break}default:{r=0;break a}}n=z+4096|0;f[a+8>>2]=n;if(n>>>0<1048576){n=Vl(v|0,w|0,x|0,0)|0;e=l;f[e>>2]=n;f[e+4>>2]=I;r=1}else r=0}else r=0}while(0);p=r;u=d;return p|0}function Ad(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3120;b=a+368|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=c+-4|0;d=f[b>>2]|0;if(d|0){e=c+(d<<4)|0;do e=e+-16|0;while((e|0)!=(c|0))}kp(b)}Pg(a+216|0);b=f[a+196>>2]|0;if(b|0){c=a+200|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);mp(b)}b=f[a+184>>2]|0;if(b|0){e=a+188|0;c=f[e>>2]|0;if((c|0)!=(b|0))f[e>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+172>>2]|0;if(b|0){c=a+176|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);mp(b)}b=f[a+160>>2]|0;if(b|0){e=a+164|0;c=f[e>>2]|0;if((c|0)!=(b|0))f[e>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+144>>2]|0;if(b|0){c=b;do{b=c;c=f[c>>2]|0;mp(b)}while((c|0)!=0)}c=a+136|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)mp(b);b=f[a+120>>2]|0;if(b|0)mp(b);b=f[a+108>>2]|0;if(b|0)mp(b);b=f[a+96>>2]|0;if(b|0)mp(b);b=f[a+72>>2]|0;if(b|0){c=a+76|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);mp(b)}b=f[a+60>>2]|0;if(b|0)mp(b);b=f[a+48>>2]|0;if(b|0){e=a+52|0;c=f[e>>2]|0;if((c|0)!=(b|0))f[e>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+36>>2]|0;if(b|0){c=a+40|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~(((e+-12-b|0)>>>0)/12|0)*12|0);mp(b)}b=f[a+24>>2]|0;if(b|0){e=a+28|0;c=f[e>>2]|0;if((c|0)!=(b|0))f[e>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+12>>2]|0;if(b|0){c=a+16|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);mp(b)}b=a+8|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;Vg(a);mp(a);return}function Bd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+32|0;e=d;g=a+8|0;h=f[g>>2]|0;i=a+4|0;j=f[i>>2]|0;if(((h-j|0)/144|0)>>>0>=c>>>0){k=c;l=j;do{f[l>>2]=-1;Si(l+4|0);b[l+100>>0]=1;m=l+104|0;n=m+40|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(n|0));l=(f[i>>2]|0)+144|0;f[i>>2]=l;k=k+-1|0}while((k|0)!=0);u=d;return}k=f[a>>2]|0;l=(j-k|0)/144|0;j=l+c|0;if(j>>>0>29826161)Do(a);o=(h-k|0)/144|0;k=o<<1;h=o>>>0<14913080?(k>>>0<j>>>0?j:k):29826161;f[e+12>>2]=0;f[e+16>>2]=a+8;do if(h)if(h>>>0>29826161){k=ra(8)|0;dn(k,13708);f[k>>2]=4852;va(k|0,1176,105)}else{p=Yk(h*144|0)|0;break}else p=0;while(0);f[e>>2]=p;k=p+(l*144|0)|0;l=e+8|0;f[l>>2]=k;j=e+4|0;f[j>>2]=k;o=e+12|0;f[o>>2]=p+(h*144|0);h=c;c=k;do{f[c>>2]=-1;Si(c+4|0);b[c+100>>0]=1;m=c+104|0;n=m+40|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(n|0));c=(f[l>>2]|0)+144|0;f[l>>2]=c;h=h+-1|0}while((h|0)!=0);h=c;c=f[a>>2]|0;m=f[i>>2]|0;if((m|0)==(c|0)){q=j;r=f[j>>2]|0;s=c;t=m}else{n=m;m=f[j>>2]|0;do{m=m+-144|0;n=n+-144|0;$c(m,n)}while((n|0)!=(c|0));f[j>>2]=m;q=j;r=m;s=f[a>>2]|0;t=f[i>>2]|0}f[a>>2]=r;f[q>>2]=s;f[i>>2]=h;f[l>>2]=t;t=f[g>>2]|0;f[g>>2]=f[o>>2];f[o>>2]=t;f[e>>2]=s;Ug(e);u=d;return}function Cd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=(c|0)==(a|0);b[c+12>>0]=d&1;if(d)return;else e=c;while(1){g=e+8|0;h=f[g>>2]|0;c=h+12|0;if(b[c>>0]|0){i=23;break}j=h+8|0;k=f[j>>2]|0;d=f[k>>2]|0;if((d|0)==(h|0)){l=f[k+4>>2]|0;if(!l){i=7;break}m=l+12|0;if(!(b[m>>0]|0))n=m;else{i=7;break}}else{if(!d){i=16;break}m=d+12|0;if(!(b[m>>0]|0))n=m;else{i=16;break}}b[c>>0]=1;c=(k|0)==(a|0);b[k+12>>0]=c&1;b[n>>0]=1;if(c){i=23;break}else e=k}if((i|0)==7){if((f[h>>2]|0)==(e|0)){o=h;p=k}else{n=h+4|0;a=f[n>>2]|0;c=f[a>>2]|0;f[n>>2]=c;if(!c)q=k;else{f[c+8>>2]=h;q=f[j>>2]|0}f[a+8>>2]=q;q=f[j>>2]|0;f[((f[q>>2]|0)==(h|0)?q:q+4|0)>>2]=a;f[a>>2]=h;f[j>>2]=a;o=a;p=f[a+8>>2]|0}b[o+12>>0]=1;b[p+12>>0]=0;o=f[p>>2]|0;a=o+4|0;q=f[a>>2]|0;f[p>>2]=q;if(q|0)f[q+8>>2]=p;q=p+8|0;f[o+8>>2]=f[q>>2];c=f[q>>2]|0;f[((f[c>>2]|0)==(p|0)?c:c+4|0)>>2]=o;f[a>>2]=p;f[q>>2]=o;return}else if((i|0)==16){if((f[h>>2]|0)==(e|0)){o=e+4|0;q=f[o>>2]|0;f[h>>2]=q;if(!q)r=k;else{f[q+8>>2]=h;r=f[j>>2]|0}f[g>>2]=r;r=f[j>>2]|0;f[((f[r>>2]|0)==(h|0)?r:r+4|0)>>2]=e;f[o>>2]=h;f[j>>2]=e;s=e;t=f[e+8>>2]|0}else{s=h;t=k}b[s+12>>0]=1;b[t+12>>0]=0;s=t+4|0;k=f[s>>2]|0;h=f[k>>2]|0;f[s>>2]=h;if(h|0)f[h+8>>2]=t;h=t+8|0;f[k+8>>2]=f[h>>2];s=f[h>>2]|0;f[((f[s>>2]|0)==(t|0)?s:s+4|0)>>2]=k;f[k>>2]=t;f[h>>2]=k;return}else if((i|0)==23)return}function Dd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;e=u;u=u+16|0;g=e;h=f[a+40>>2]|0;i=f[a+44>>2]|0;if((h|0)==(i|0)){j=0;k=2;l=(k|0)==2;m=l?0:j;u=e;return m|0}a=g+11|0;n=g+4|0;o=d+11|0;p=d+4|0;q=0;r=h;a:while(1){f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=Ah(f[r>>2]|0,c,g)|0;s=b[a>>0]|0;b:do if(h){t=s<<24>>24<0;v=s&255;w=t?f[n>>2]|0:v;x=b[o>>0]|0;y=x<<24>>24<0;if((w|0)==((y?f[p>>2]|0:x&255)|0)){x=f[g>>2]|0;z=t?x:g;A=y?f[d>>2]|0:d;y=(w|0)==0;c:do if(t){if(!y?fj(z,A,w)|0:0){B=0;C=q;D=14;break b}}else if(!y){if((b[A>>0]|0)==(x&255)<<24>>24){E=g;F=v;G=A}else{H=0;I=q;D=13;break b}while(1){F=F+-1|0;E=E+1|0;if(!F)break c;G=G+1|0;if((b[E>>0]|0)!=(b[G>>0]|0)){H=0;I=q;D=13;break b}}}while(0);H=1;I=f[r>>2]|0;D=13}else{H=0;I=q;D=13}}else{H=3;I=q;D=13}while(0);if((D|0)==13){D=0;if(s<<24>>24<0){B=H;C=I;D=14}else{J=H;K=I}}if((D|0)==14){D=0;mp(f[g>>2]|0);J=B;K=C}switch(J&3){case 3:case 0:break;default:{j=K;k=J;D=17;break a}}r=r+4|0;if((r|0)==(i|0)){j=K;k=2;D=17;break}else q=K}if((D|0)==17){l=(k|0)==2;m=l?0:j;u=e;return m|0}return 0}function Ed(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=u;u=u+16|0;d=c;e=b+8|0;g=e;i=f[g>>2]|0;j=f[g+4>>2]|0;g=b+16|0;k=g;l=f[k>>2]|0;m=Vl(l|0,f[k+4>>2]|0,4,0)|0;k=I;if((j|0)<(k|0)|(j|0)==(k|0)&i>>>0<m>>>0){n=0;u=c;return n|0}i=(f[b>>2]|0)+l|0;l=h[i>>0]|h[i+1>>0]<<8|h[i+2>>0]<<16|h[i+3>>0]<<24;i=g;f[i>>2]=m;f[i+4>>2]=k;if((l|0)<0){n=0;u=c;return n|0}ud(a+76|0,l,0);Zm(d);if(zd(d,b)|0){if((l|0)>0){k=a+76|0;i=1;m=0;do{i=i^((Oi(d)|0)^1);j=(f[k>>2]|0)+(m>>>5<<2)|0;o=1<<(m&31);if(i)p=f[j>>2]|o;else p=f[j>>2]&~o;f[j>>2]=p;m=m+1|0}while((m|0)<(l|0))}l=e;e=f[l>>2]|0;m=f[l+4>>2]|0;l=g;p=f[l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>>2];f[m+12>>2]=f[e+12>>2];f[c+24>>2]=d;f[c+28>>2]=i;f[c+32>>2]=b;f[c+36>>2]=j;f[c>>2]=2680;f[c+44>>2]=0;f[c+48>>2]=0;f[c+52>>2]=d;f[c+56>>2]=i;f[c+60>>2]=b;f[c+64>>2]=j;f[c+40>>2]=2736;f[c+68>>2]=1;i=c+72|0;f[i>>2]=-1;f[i+4>>2]=-1;f[i+8>>2]=-1;f[i+12>>2]=-1;Zm(c+88|0);h=c;f[a>>2]=h;return}}else if(l){l=Yk(104)|0;f[l+4>>2]=g;g=l+8|0;f[g>>2]=f[e>>2];f[g+4>>2]=f[e+4>>2];f[g+8>>2]=f[e+8>>2];f[g+12>>2]=f[e+12>>2];f[l+24>>2]=d;f[l+28>>2]=k;f[l+32>>2]=b;f[l+36>>2]=j;f[l>>2]=2596;f[l+44>>2]=0;f[l+48>>2]=0;f[l+52>>2]=d;f[l+56>>2]=k;f[l+60>>2]=b;f[l+64>>2]=j;f[l+40>>2]=2652;f[l+68>>2]=1;j=l+72|0;f[j>>2]=-1;f[j+4>>2]=-1;f[j+8>>2]=-1;f[j+12>>2]=-1;Zm(l+88|0);h=l;f[a>>2]=h;return}f[a>>2]=0;f[a>>2]=0;h=0;f[a>>2]=h;return}function Gd(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;g=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;if(!((c+-1|0)>>>0<6&(Pa[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1)){h=0;f[a>>2]=h;return}i=Pa[f[(f[b>>2]|0)+36>>2]&127](b)|0;j=Qa[f[(f[b>>2]|0)+44>>2]&127](b,d)|0;if((i|0)==0|(j|0)==0){h=0;f[a>>2]=h;return}k=Qa[f[(f[b>>2]|0)+40>>2]&127](b,d)|0;d=f[b+44>>2]|0;b=j+12|0;l=(c|0)==6;if(!k){if(l){c=Yk(104)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<24>>24==0;do if(!m)if(j<<24>>24<0)Do(g);else{n=k<<2;o=Yk(n)|0;f[g>>2]=o;p=o+(k<<2)|0;f[g+8>>2]=p;Dh(o|0,0,n|0)|0;f[l>>2]=p;q=o;r=p;s=o;break}else{q=0;r=0;s=0}while(0);f[h>>2]=0;g=h+4|0;f[g>>2]=0;f[h+8>>2]=0;if(m){t=0;v=0;w=0}else{m=k<<2;j=Yk(m)|0;f[h>>2]=j;o=j+(k<<2)|0;f[h+8>>2]=o;Dh(j|0,0,m|0)|0;f[g>>2]=o;t=j;v=o;w=j}j=c+80|0;if(f[j>>2]|0){o=c+48|0;m=c+40|0;h=c+64|0;k=a+48|0;a=0;p=s;n=t;while(1){x=o;y=f[x>>2]|0;z=f[x+4>>2]|0;x=m;A=f[x>>2]|0;B=al(A|0,f[x+4>>2]|0,a|0,0)|0;x=Vl(B|0,I|0,y|0,z|0)|0;Ef(p|0,(f[f[c>>2]>>2]|0)+x|0,A|0)|0;A=b[i>>0]|0;if(A<<24>>24>0){x=f[k>>2]|0;z=A<<24>>24;A=0;do{f[n+(A<<2)>>2]=(f[x+(A+d<<2)>>2]|0)+(f[q+(A<<2)>>2]|0);A=A+1|0}while((A|0)<(z|0));C=s}else C=p;z=m;A=f[z>>2]|0;x=al(A|0,f[z+4>>2]|0,a|0,0)|0;Ef((f[f[h>>2]>>2]|0)+x|0,w|0,A|0)|0;a=a+1|0;if(a>>>0>=(f[j>>2]|0)>>>0)break;else{p=C;n=w}}}if(t|0){if((v|0)!=(t|0))f[g>>2]=v+(~((v+-4-t|0)>>>2)<<2);mp(w)}if(!q){u=e;return 1}if((r|0)!=(q|0))f[l>>2]=r+(~((r+-4-q|0)>>>2)<<2);mp(s);u=e;return 1}function Jd(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3396;mg(a+232|0);Pg(a+216|0);b=f[a+196>>2]|0;if(b|0){c=a+200|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+184>>2]|0;if(b|0){d=a+188|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+172>>2]|0;if(b|0){c=a+176|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+160>>2]|0;if(b|0){d=a+164|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+144>>2]|0;if(b|0){c=b;do{b=c;c=f[c>>2]|0;mp(b)}while((c|0)!=0)}c=a+136|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)mp(b);b=f[a+120>>2]|0;if(b|0)mp(b);b=f[a+108>>2]|0;if(b|0)mp(b);b=f[a+96>>2]|0;if(b|0)mp(b);b=f[a+72>>2]|0;if(b|0){c=a+76|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+60>>2]|0;if(b|0)mp(b);b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+36>>2]|0;if(b|0){c=a+40|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);mp(b)}b=f[a+24>>2]|0;if(b|0){d=a+28|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+12>>2]|0;if(b|0){c=a+16|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=a+8|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;Vg(a);mp(a);return}function Kd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=u;u=u+16|0;d=c;e=a+40|0;g=e;h=a;i=g+40|0;do{f[g>>2]=f[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));if(yf(e,1,d)|0){g=a;h=e;i=g+40|0;do{f[g>>2]=f[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));e=d;k=f[e>>2]|0;l=f[e+4>>2]|0;e=a+8|0;m=e;n=a+16|0;o=n;p=f[o>>2]|0;q=f[o+4>>2]|0;o=Xl(f[m>>2]|0,f[m+4>>2]|0,p|0,q|0)|0;m=I;if(!(l>>>0>m>>>0|(l|0)==(m|0)&k>>>0>o>>>0)){o=Vl(p|0,q|0,k|0,l|0)|0;l=n;f[l>>2]=o;f[l+4>>2]=I;do if((j[a+38>>1]|0)>=514){if(!(zd(a+80|0,a)|0)){r=0;u=c;return r|0}}else{l=a+96|0;g=l;h=a;i=g+40|0;do{f[g>>2]=f[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));if(yf(l,1,d)|0){g=a;h=l;i=g+40|0;do{f[g>>2]=f[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));l=d;o=f[l>>2]|0;k=f[l+4>>2]|0;l=e;q=n;p=f[q>>2]|0;m=f[q+4>>2]|0;q=Xl(f[l>>2]|0,f[l+4>>2]|0,p|0,m|0)|0;l=I;if(!(k>>>0>l>>>0|(k|0)==(l|0)&o>>>0>q>>>0)){q=Vl(p|0,m|0,o|0,k|0)|0;k=n;f[k>>2]=q;f[k+4>>2]=I;break}}r=0;u=c;return r|0}while(0);if(!(Zg(a)|0)){r=0;u=c;return r|0}g=b;h=a;i=g+40|0;do{f[g>>2]=f[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));r=1;u=c;return r|0}}r=0;u=c;return r|0}function Ld(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d;if(!(gc(a,c)|0)){g=0;u=d;return g|0}h=Pa[f[(f[a>>2]|0)+24>>2]&127](a)|0;i=a+36|0;j=a+40|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0){if(h>>>0<m>>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){n=l;do{l=n+-4|0;f[j>>2]=l;o=f[l>>2]|0;f[l>>2]=0;if(o|0)Ua[f[(f[o>>2]|0)+4>>2]&127](o);n=f[j>>2]|0}while((n|0)!=(k|0))}}else cf(i,h-m|0);m=c+8|0;if((h|0)<=0){g=1;u=d;return g|0}k=c+16|0;n=0;while(1){j=m;o=f[j+4>>2]|0;l=k;p=f[l>>2]|0;q=f[l+4>>2]|0;if(!((o|0)>(q|0)|((o|0)==(q|0)?(f[j>>2]|0)>>>0>p>>>0:0))){g=0;r=19;break}j=b[(f[c>>2]|0)+p>>0]|0;o=Vl(p|0,q|0,1,0)|0;q=k;f[q>>2]=o;f[q+4>>2]=I;Wa[f[(f[a>>2]|0)+48>>2]&15](e,a,j);j=(f[i>>2]|0)+(n<<2)|0;q=f[e>>2]|0;f[e>>2]=0;o=f[j>>2]|0;f[j>>2]=q;if(o|0)Ua[f[(f[o>>2]|0)+4>>2]&127](o);o=f[e>>2]|0;f[e>>2]=0;if(o|0)Ua[f[(f[o>>2]|0)+4>>2]&127](o);o=f[(f[i>>2]|0)+(n<<2)>>2]|0;if(!o){g=0;r=19;break}q=f[(f[o>>2]|0)+8>>2]|0;j=Pa[f[(f[a>>2]|0)+28>>2]&127](a)|0;p=Qa[f[(f[a>>2]|0)+20>>2]&127](a,n)|0;n=n+1|0;if(!(Ra[q&31](o,j,p)|0)){g=0;r=19;break}if((n|0)>=(h|0)){g=1;r=19;break}}if((r|0)==19){u=d;return g|0}return 0}function Md(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,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l(l|0,m|0,4,0)|0;n=I;if((j|0)<(n|0)|(j|0)==(n|0)&i>>>0<k>>>0){o=f[a>>2]|0;p=l;q=m}else{m=(f[c>>2]|0)+l|0;l=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[a>>0]=l;b[a+1>>0]=l>>8;b[a+2>>0]=l>>16;b[a+3>>0]=l>>24;m=g;k=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=I;i=g;f[i>>2]=k;f[i+4>>2]=m;o=l;p=k;q=m}if(o>>>0>32){r=0;return r|0}o=a+4|0;m=e;e=f[m>>2]|0;k=f[m+4>>2]|0;m=Vl(p|0,q|0,4,0)|0;q=I;if((k|0)<(q|0)|(k|0)==(q|0)&e>>>0<m>>>0)s=f[o>>2]|0;else{m=(f[c>>2]|0)+p|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[o>>0]=p;b[o+1>>0]=p>>8;b[o+2>>0]=p>>16;b[o+3>>0]=p>>24;m=g;e=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=g;f[m>>2]=e;f[m+4>>2]=I;s=p}if(!s){r=1;return r|0}f[a+8>>2]=0;if(!(Hc(a+16|0,c)|0)){r=0;return r|0}if(!(ze(a+544|0,c)|0)){r=0;return r|0}if(!(ze(a+564|0,c)|0)){r=0;return r|0}if(ze(a+584|0,c)|0)return sb(a,f[o>>2]|0,d)|0;else{r=0;return r|0}return 0}function Od(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=c+8|0;g=e;i=f[g>>2]|0;j=f[g+4>>2]|0;g=c+16|0;k=g;l=f[k>>2]|0;m=f[k+4>>2]|0;k=Vl(l|0,m|0,4,0)|0;n=I;if((j|0)<(n|0)|(j|0)==(n|0)&i>>>0<k>>>0){o=f[a>>2]|0;p=l;q=m}else{m=(f[c>>2]|0)+l|0;l=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[a>>0]=l;b[a+1>>0]=l>>8;b[a+2>>0]=l>>16;b[a+3>>0]=l>>24;m=g;k=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=I;i=g;f[i>>2]=k;f[i+4>>2]=m;o=l;p=k;q=m}if(o>>>0>32){r=0;return r|0}o=a+4|0;m=e;e=f[m>>2]|0;k=f[m+4>>2]|0;m=Vl(p|0,q|0,4,0)|0;q=I;if((k|0)<(q|0)|(k|0)==(q|0)&e>>>0<m>>>0)s=f[o>>2]|0;else{m=(f[c>>2]|0)+p|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[o>>0]=p;b[o+1>>0]=p>>8;b[o+2>>0]=p>>16;b[o+3>>0]=p>>24;m=g;e=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=g;f[m>>2]=e;f[m+4>>2]=I;s=p}if(!s){r=1;return r|0}f[a+8>>2]=0;if(!(Hc(a+16|0,c)|0)){r=0;return r|0}if(!(ze(a+544|0,c)|0)){r=0;return r|0}if(!(ze(a+564|0,c)|0)){r=0;return r|0}if(ze(a+584|0,c)|0)return rb(a,f[o>>2]|0,d)|0;else{r=0;return r|0}return 0}function Pd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0;d=u;u=u+16|0;e=d+12|0;g=d;h=Yk(52)|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;n[h+16>>2]=$(1.0);i=h+20|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[h+36>>2]=$(1.0);f[h+40>>2]=0;f[h+44>>2]=0;f[h+48>>2]=0;No(e);if(Af(e,f[c+32>>2]|0,h)|0){e=(f[c+4>>2]|0)+4|0;c=f[e>>2]|0;f[e>>2]=h;if(c|0){e=c+40|0;i=f[e>>2]|0;if(i|0){j=c+44|0;k=f[j>>2]|0;if((k|0)==(i|0))l=i;else{m=k;do{k=m+-4|0;f[j>>2]=k;o=f[k>>2]|0;f[k>>2]=0;if(o|0){jh(o);mp(o)}m=f[j>>2]|0}while((m|0)!=(i|0));l=f[e>>2]|0}mp(l)}jh(c);mp(c)}f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=d;return}else{f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;c=Yk(32)|0;f[g>>2]=c;f[g+8>>2]=-2147483616;f[g+4>>2]=26;l=c;e=13315;i=l+26|0;do{b[l>>0]=b[e>>0]|0;l=l+1|0;e=e+1|0}while((l|0)<(i|0));b[c+26>>0]=0;f[a>>2]=-1;zh(a+4|0,g);if((b[g+11>>0]|0)<0)mp(f[g>>2]|0);g=h+40|0;a=f[g>>2]|0;if(a|0){c=h+44|0;e=f[c>>2]|0;if((e|0)==(a|0))p=a;else{l=e;do{e=l+-4|0;f[c>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0){jh(i);mp(i)}l=f[c>>2]|0}while((l|0)!=(a|0));p=f[g>>2]|0}mp(p)}jh(h);mp(h);u=d;return}}function Qd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=c+8|0;g=e;i=f[g>>2]|0;j=f[g+4>>2]|0;g=c+16|0;k=g;l=f[k>>2]|0;m=f[k+4>>2]|0;k=Vl(l|0,m|0,4,0)|0;n=I;if((j|0)<(n|0)|(j|0)==(n|0)&i>>>0<k>>>0){o=f[a>>2]|0;p=l;q=m}else{m=(f[c>>2]|0)+l|0;l=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[a>>0]=l;b[a+1>>0]=l>>8;b[a+2>>0]=l>>16;b[a+3>>0]=l>>24;m=g;k=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=I;i=g;f[i>>2]=k;f[i+4>>2]=m;o=l;p=k;q=m}if(o>>>0>32){r=0;return r|0}o=a+4|0;m=e;e=f[m>>2]|0;k=f[m+4>>2]|0;m=Vl(p|0,q|0,4,0)|0;q=I;if((k|0)<(q|0)|(k|0)==(q|0)&e>>>0<m>>>0)s=f[o>>2]|0;else{m=(f[c>>2]|0)+p|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[o>>0]=p;b[o+1>>0]=p>>8;b[o+2>>0]=p>>16;b[o+3>>0]=p>>24;m=g;e=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=g;f[m>>2]=e;f[m+4>>2]=I;s=p}if(!s){r=1;return r|0}f[a+8>>2]=0;if(!(ze(a+16|0,c)|0)){r=0;return r|0}if(!(ze(a+36|0,c)|0)){r=0;return r|0}if(!(ze(a+56|0,c)|0)){r=0;return r|0}if(ze(a+76|0,c)|0)return pb(a,f[o>>2]|0,d)|0;else{r=0;return r|0}return 0}function Rd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=c+8|0;g=e;i=f[g>>2]|0;j=f[g+4>>2]|0;g=c+16|0;k=g;l=f[k>>2]|0;m=f[k+4>>2]|0;k=Vl(l|0,m|0,4,0)|0;n=I;if((j|0)<(n|0)|(j|0)==(n|0)&i>>>0<k>>>0){o=f[a>>2]|0;p=l;q=m}else{m=(f[c>>2]|0)+l|0;l=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[a>>0]=l;b[a+1>>0]=l>>8;b[a+2>>0]=l>>16;b[a+3>>0]=l>>24;m=g;k=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=I;i=g;f[i>>2]=k;f[i+4>>2]=m;o=l;p=k;q=m}if(o>>>0>32){r=0;return r|0}o=a+4|0;m=e;e=f[m>>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b[o+2>>0]=p>>16;b[o+3>>0]=p>>24;m=g;e=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=g;f[m>>2]=e;f[m+4>>2]=I;s=p}if(!s){r=1;return r|0}f[a+8>>2]=0;if(!(zd(a+16|0,c)|0)){r=0;return r|0}if(!(ze(a+32|0,c)|0)){r=0;return r|0}if(!(ze(a+52|0,c)|0)){r=0;return r|0}if(ze(a+72|0,c)|0)return tb(a,f[o>>2]|0,d)|0;else{r=0;return r|0}return 0}function Ud(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;e=u;u=u+32|0;g=e+8|0;i=e+4|0;j=e;f[g>>2]=0;k=g+4|0;f[k>>2]=0;f[g+8>>2]=0;l=c+8|0;m=f[l>>2]|0;n=f[l+4>>2]|0;l=c+16|0;o=l;p=f[o>>2]|0;q=f[o+4>>2]|0;o=Vl(p|0,q|0,4,0)|0;r=I;a:do if((n|0)<(r|0)|(n|0)==(r|0)&m>>>0<o>>>0)s=0;else{t=f[c>>2]|0;v=t+p|0;w=h[v>>0]|h[v+1>>0]<<8|h[v+2>>0]<<16|h[v+3>>0]<<24;v=l;f[v>>2]=o;f[v+4>>2]=r;b:do switch(w|0){case 3:{if(!((n|0)>(r|0)|(n|0)==(r|0)&m>>>0>o>>>0)){s=0;break a}v=b[t+o>>0]|0;x=Vl(p|0,q|0,5,0)|0;y=l;f[y>>2]=x;f[y+4>>2]=I;f[a+8>>2]=v<<24>>24;if(v<<24>>24==1)if(dc(a,c,g)|0)break b;else{s=0;break a}else{pj(5100,23,1,f[933]|0)|0;s=0;break a}break}case 2:{if(!(dc(a,c,g)|0)){s=0;break a}break}default:{pj(5124,24,1,f[933]|0)|0;s=0;break a}}while(0);f[i>>2]=f[g>>2];f[j>>2]=f[k>>2];Df(i,j,a,d);s=1}while(0);d=f[g>>2]|0;if(!d){u=e;return s|0}g=f[k>>2]|0;if((g|0)!=(d|0))f[k>>2]=g+(~(((g+-12-d|0)>>>0)/12|0)*12|0);mp(d);u=e;return s|0}function Vd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0.0;a:do if(b>>>0<=20)do switch(b|0){case 9:{d=(f[c>>2]|0)+(4-1)&~(4-1);e=f[d>>2]|0;f[c>>2]=d+4;f[a>>2]=e;break a;break}case 10:{e=(f[c>>2]|0)+(4-1)&~(4-1);d=f[e>>2]|0;f[c>>2]=e+4;e=a;f[e>>2]=d;f[e+4>>2]=((d|0)<0)<<31>>31;break a;break}case 11:{d=(f[c>>2]|0)+(4-1)&~(4-1);e=f[d>>2]|0;f[c>>2]=d+4;d=a;f[d>>2]=e;f[d+4>>2]=0;break a;break}case 12:{d=(f[c>>2]|0)+(8-1)&~(8-1);e=d;g=f[e>>2]|0;h=f[e+4>>2]|0;f[c>>2]=d+8;d=a;f[d>>2]=g;f[d+4>>2]=h;break a;break}case 13:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=(d&65535)<<16>>16;d=a;f[d>>2]=h;f[d+4>>2]=((h|0)<0)<<31>>31;break a;break}case 14:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=a;f[h>>2]=d&65535;f[h+4>>2]=0;break a;break}case 15:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=(d&255)<<24>>24;d=a;f[d>>2]=h;f[d+4>>2]=((h|0)<0)<<31>>31;break a;break}case 16:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=a;f[h>>2]=d&255;f[h+4>>2]=0;break a;break}case 17:{h=(f[c>>2]|0)+(8-1)&~(8-1);i=+p[h>>3];f[c>>2]=h+8;p[a>>3]=i;break a;break}case 18:{h=(f[c>>2]|0)+(8-1)&~(8-1);i=+p[h>>3];f[c>>2]=h+8;p[a>>3]=i;break a;break}default:break a}while(0);while(0);return}function Wd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;c=u;u=u+32|0;d=c;e=a+4|0;g=f[a>>2]|0;h=(f[e>>2]|0)-g>>2;i=h+1|0;if(i>>>0>1073741823)Do(a);j=a+8|0;k=(f[j>>2]|0)-g|0;g=k>>1;l=k>>2>>>0<536870911?(g>>>0<i>>>0?i:g):1073741823;f[d+12>>2]=0;f[d+16>>2]=a+8;do if(l)if(l>>>0>1073741823){g=ra(8)|0;dn(g,13708);f[g>>2]=4852;va(g|0,1176,105)}else{m=Yk(l<<2)|0;break}else m=0;while(0);f[d>>2]=m;g=m+(h<<2)|0;h=d+8|0;i=d+4|0;f[i>>2]=g;k=m+(l<<2)|0;l=d+12|0;f[l>>2]=k;m=f[b>>2]|0;f[b>>2]=0;f[g>>2]=m;m=g+4|0;f[h>>2]=m;b=f[a>>2]|0;n=f[e>>2]|0;if((n|0)==(b|0)){o=g;p=l;q=h;r=b;s=m;t=n;v=k;w=o;f[a>>2]=w;f[i>>2]=r;f[e>>2]=s;f[q>>2]=t;x=f[j>>2]|0;f[j>>2]=v;f[p>>2]=x;f[d>>2]=r;ug(d);u=c;return}else{y=n;z=g}do{y=y+-4|0;g=f[y>>2]|0;f[y>>2]=0;f[z+-4>>2]=g;z=(f[i>>2]|0)+-4|0;f[i>>2]=z}while((y|0)!=(b|0));o=z;p=l;q=h;r=f[a>>2]|0;s=f[h>>2]|0;t=f[e>>2]|0;v=f[l>>2]|0;w=o;f[a>>2]=w;f[i>>2]=r;f[e>>2]=s;f[q>>2]=t;x=f[j>>2]|0;f[j>>2]=v;f[p>>2]=x;f[d>>2]=r;ug(d);u=c;return}function Xd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+32|0;e=d+12|0;g=d;h=wj(c,0)|0;if(!h){f[a>>2]=0;u=d;return}i=f[c+100>>2]|0;j=f[c+96>>2]|0;c=i-j|0;k=(c|0)/12|0;f[e>>2]=0;l=e+4|0;f[l>>2]=0;f[e+8>>2]=0;m=j;do if(c)if(k>>>0>357913941)Do(e);else{n=Yk(c)|0;f[e>>2]=n;f[e+8>>2]=n+(k*12|0);Dh(n|0,0,c|0)|0;f[l>>2]=n+c;o=n;break}else o=0;while(0);f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;a:do if((i|0)!=(j|0)){c=g+4|0;n=g+8|0;if(b[h+84>>0]|0){p=0;while(1){q=m+(p*12|0)|0;f[g>>2]=f[q>>2];f[g+4>>2]=f[q+4>>2];f[g+8>>2]=f[q+8>>2];f[o+(p*12|0)>>2]=f[g>>2];f[o+(p*12|0)+4>>2]=f[c>>2];f[o+(p*12|0)+8>>2]=f[n>>2];p=p+1|0;if(p>>>0>=k>>>0)break a}}p=f[h+68>>2]|0;q=0;do{r=f[p+(f[m+(q*12|0)>>2]<<2)>>2]|0;f[g>>2]=r;s=f[p+(f[m+(q*12|0)+4>>2]<<2)>>2]|0;f[c>>2]=s;t=f[p+(f[m+(q*12|0)+8>>2]<<2)>>2]|0;f[n>>2]=t;f[o+(q*12|0)>>2]=r;f[o+(q*12|0)+4>>2]=s;f[o+(q*12|0)+8>>2]=t;q=q+1|0}while(q>>>0<k>>>0)}while(0);Yh(a,e);a=f[e>>2]|0;if(a|0){e=f[l>>2]|0;if((e|0)!=(a|0))f[l>>2]=e+(~(((e+-12-a|0)>>>0)/12|0)*12|0);mp(a)}u=d;return}function Yd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=u;u=u+64|0;g=e+60|0;h=e;i=f[(f[c+4>>2]|0)+44>>2]|0;j=Yk(80)|0;f[j+4>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+4>>2]=m;o=l;p=k;q=m}if(o>>>0>32){r=0;return r|0}o=a+4|0;m=e;e=f[m>>2]|0;k=f[m+4>>2]|0;m=Vl(p|0,q|0,4,0)|0;q=I;if((k|0)<(q|0)|(k|0)==(q|0)&e>>>0<m>>>0)s=f[o>>2]|0;else{m=(f[c>>2]|0)+p|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[o>>0]=p;b[o+1>>0]=p>>8;b[o+2>>0]=p>>16;b[o+3>>0]=p>>24;m=g;e=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=g;f[m>>2]=e;f[m+4>>2]=I;s=p}if(!s){r=1;return r|0}f[a+8>>2]=0;if(!(Hc(a+16|0,c)|0)){r=0;return r|0}if(!(ze(a+544|0,c)|0)){r=0;return r|0}if(!(ze(a+564|0,c)|0)){r=0;return r|0}if(ze(a+584|0,c)|0)return lb(a,f[o>>2]|0,d)|0;else{r=0;return r|0}return 0}function $d(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=c+8|0;g=e;i=f[g>>2]|0;j=f[g+4>>2]|0;g=c+16|0;k=g;l=f[k>>2]|0;m=f[k+4>>2]|0;k=Vl(l|0,m|0,4,0)|0;n=I;if((j|0)<(n|0)|(j|0)==(n|0)&i>>>0<k>>>0){o=f[a>>2]|0;p=l;q=m}else{m=(f[c>>2]|0)+l|0;l=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[a>>0]=l;b[a+1>>0]=l>>8;b[a+2>>0]=l>>16;b[a+3>>0]=l>>24;m=g;k=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=I;i=g;f[i>>2]=k;f[i+4>>2]=m;o=l;p=k;q=m}if(o>>>0>32){r=0;return r|0}o=a+4|0;m=e;e=f[m>>2]|0;k=f[m+4>>2]|0;m=Vl(p|0,q|0,4,0)|0;q=I;if((k|0)<(q|0)|(k|0)==(q|0)&e>>>0<m>>>0)s=f[o>>2]|0;else{m=(f[c>>2]|0)+p|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[o>>0]=p;b[o+1>>0]=p>>8;b[o+2>>0]=p>>16;b[o+3>>0]=p>>24;m=g;e=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=g;f[m>>2]=e;f[m+4>>2]=I;s=p}if(!s){r=1;return r|0}f[a+8>>2]=0;if(!(Hc(a+16|0,c)|0)){r=0;return r|0}if(!(ze(a+544|0,c)|0)){r=0;return r|0}if(!(ze(a+564|0,c)|0)){r=0;return r|0}if(ze(a+584|0,c)|0)return kb(a,f[o>>2]|0,d)|0;else{r=0;return r|0}return 0}function ae(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;if(!(f[a+64>>2]|0)){d=Yk(32)|0;ll(d);e=a+64|0;g=f[e>>2]|0;f[e>>2]=d;if(!g)h=d;else{d=f[g>>2]|0;if(d|0){i=g+4|0;if((f[i>>2]|0)!=(d|0))f[i>>2]=d;mp(d)}mp(g);h=f[e>>2]|0}Ni(a,h,0,0,0,0);j=a}else j=a;if(!(wh(j,c)|0))return;b[a+84>>0]=b[c+84>>0]|0;f[a+80>>2]=f[c+80>>2];if((a|0)!=(c|0))Re(a+68|0,f[c+68>>2]|0,f[c+72>>2]|0);j=f[c+88>>2]|0;if(!j){c=a+88|0;h=f[c>>2]|0;f[c>>2]=0;if(!h)return;c=f[h+8>>2]|0;if(c|0){e=h+12|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;mp(c)}mp(h);return}h=Yk(40)|0;f[h>>2]=f[j>>2];c=h+8|0;e=j+8|0;f[c>>2]=0;g=h+12|0;f[g>>2]=0;d=h+16|0;f[d>>2]=0;i=j+12|0;k=(f[i>>2]|0)-(f[e>>2]|0)|0;if(k|0){if((k|0)<0)Do(c);l=Yk(k)|0;f[g>>2]=l;f[c>>2]=l;f[d>>2]=l+k;k=f[e>>2]|0;e=(f[i>>2]|0)-k|0;if((e|0)>0){Ef(l|0,k|0,e|0)|0;f[g>>2]=l+e}}e=h+24|0;l=j+24|0;f[e>>2]=f[l>>2];f[e+4>>2]=f[l+4>>2];f[e+8>>2]=f[l+8>>2];f[e+12>>2]=f[l+12>>2];l=a+88|0;a=f[l>>2]|0;f[l>>2]=h;if(!a)return;h=f[a+8>>2]|0;if(h|0){l=a+12|0;if((f[l>>2]|0)!=(h|0))f[l>>2]=h;mp(h)}mp(a);return}function be(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;e=u;u=u+32|0;g=e+20|0;h=e+16|0;i=e;j=c+24|0;k=b[j>>0]|0;l=k<<24>>24;m=f[a+80>>2]|0;a=X(m,l)|0;f[i>>2]=f[306];f[i+4>>2]=f[307];f[i+8>>2]=f[308];f[i+12>>2]=f[309];n=d+4|0;o=f[n>>2]|0;p=f[d>>2]|0;q=o-p>>2;r=p;p=o;if(a>>>0<=q>>>0){if(a>>>0<q>>>0?(o=r+(a<<2)|0,(o|0)!=(p|0)):0)f[n>>2]=p+(~((p+-4-o|0)>>>2)<<2)}else Og(d,a-q|0);if(!m){s=1;u=e;return s|0}q=c+84|0;a=c+68|0;if(k<<24>>24<=0){k=0;while(1){if(!(b[q>>0]|0))t=f[(f[a>>2]|0)+(k<<2)>>2]|0;else t=k;f[h>>2]=t;o=b[j>>0]|0;f[g>>2]=f[h>>2];if(!(vb(c,g,o,i)|0)){s=0;v=18;break}k=k+1|0;if(k>>>0>=m>>>0){s=1;v=18;break}}if((v|0)==18){u=e;return s|0}}else{w=0;x=0}while(1){if(!(b[q>>0]|0))y=f[(f[a>>2]|0)+(x<<2)>>2]|0;else y=x;f[h>>2]=y;k=b[j>>0]|0;f[g>>2]=f[h>>2];if(!(vb(c,g,k,i)|0)){s=0;v=18;break}k=f[d>>2]|0;t=0;o=w;while(1){f[k+(o<<2)>>2]=f[i+(t<<2)>>2];t=t+1|0;if((t|0)==(l|0))break;else o=o+1|0}x=x+1|0;if(x>>>0>=m>>>0){s=1;v=18;break}else w=w+l|0}if((v|0)==18){u=e;return s|0}return 0}function ce(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=c+8|0;g=e;i=f[g>>2]|0;j=f[g+4>>2]|0;g=c+16|0;k=g;l=f[k>>2]|0;m=f[k+4>>2]|0;k=Vl(l|0,m|0,4,0)|0;n=I;if((j|0)<(n|0)|(j|0)==(n|0)&i>>>0<k>>>0){o=f[a>>2]|0;p=l;q=m}else{m=(f[c>>2]|0)+l|0;l=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[a>>0]=l;b[a+1>>0]=l>>8;b[a+2>>0]=l>>16;b[a+3>>0]=l>>24;m=g;k=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=I;i=g;f[i>>2]=k;f[i+4>>2]=m;o=l;p=k;q=m}if(o>>>0>32){r=0;return r|0}o=a+4|0;m=e;e=f[m>>2]|0;k=f[m+4>>2]|0;m=Vl(p|0,q|0,4,0)|0;q=I;if((k|0)<(q|0)|(k|0)==(q|0)&e>>>0<m>>>0)s=f[o>>2]|0;else{m=(f[c>>2]|0)+p|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[o>>0]=p;b[o+1>>0]=p>>8;b[o+2>>0]=p>>16;b[o+3>>0]=p>>24;m=g;e=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=g;f[m>>2]=e;f[m+4>>2]=I;s=p}if(!s){r=1;return r|0}f[a+8>>2]=0;if(!(ze(a+16|0,c)|0)){r=0;return r|0}if(!(ze(a+36|0,c)|0)){r=0;return r|0}if(!(ze(a+56|0,c)|0)){r=0;return r|0}if(ze(a+76|0,c)|0)return ib(a,f[o>>2]|0,d)|0;else{r=0;return r|0}return 0}function de(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=c+8|0;g=e;i=f[g>>2]|0;j=f[g+4>>2]|0;g=c+16|0;k=g;l=f[k>>2]|0;m=f[k+4>>2]|0;k=Vl(l|0,m|0,4,0)|0;n=I;if((j|0)<(n|0)|(j|0)==(n|0)&i>>>0<k>>>0){o=f[a>>2]|0;p=l;q=m}else{m=(f[c>>2]|0)+l|0;l=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[a>>0]=l;b[a+1>>0]=l>>8;b[a+2>>0]=l>>16;b[a+3>>0]=l>>24;m=g;k=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=I;i=g;f[i>>2]=k;f[i+4>>2]=m;o=l;p=k;q=m}if(o>>>0>32){r=0;return r|0}o=a+4|0;m=e;e=f[m>>2]|0;k=f[m+4>>2]|0;m=Vl(p|0,q|0,4,0)|0;q=I;if((k|0)<(q|0)|(k|0)==(q|0)&e>>>0<m>>>0)s=f[o>>2]|0;else{m=(f[c>>2]|0)+p|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[o>>0]=p;b[o+1>>0]=p>>8;b[o+2>>0]=p>>16;b[o+3>>0]=p>>24;m=g;e=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=g;f[m>>2]=e;f[m+4>>2]=I;s=p}if(!s){r=1;return r|0}f[a+8>>2]=0;if(!(ze(a+16|0,c)|0)){r=0;return r|0}if(!(ze(a+36|0,c)|0)){r=0;return r|0}if(!(ze(a+56|0,c)|0)){r=0;return r|0}if(ze(a+76|0,c)|0)return hb(a,f[o>>2]|0,d)|0;else{r=0;return r|0}return 0}function ee(a,c,d){a=a|0;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+4>>2]|0;g=c+16|0;k=g;l=f[k>>2]|0;m=f[k+4>>2]|0;k=Vl(l|0,m|0,4,0)|0;n=I;if((j|0)<(n|0)|(j|0)==(n|0)&i>>>0<k>>>0){o=f[a>>2]|0;p=l;q=m}else{m=(f[c>>2]|0)+l|0;l=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[a>>0]=l;b[a+1>>0]=l>>8;b[a+2>>0]=l>>16;b[a+3>>0]=l>>24;m=g;k=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=I;i=g;f[i>>2]=k;f[i+4>>2]=m;o=l;p=k;q=m}if(o>>>0>32){r=0;return r|0}o=a+4|0;m=e;e=f[m>>2]|0;k=f[m+4>>2]|0;m=Vl(p|0,q|0,4,0)|0;q=I;if((k|0)<(q|0)|(k|0)==(q|0)&e>>>0<m>>>0)s=f[o>>2]|0;else{m=(f[c>>2]|0)+p|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;b[o>>0]=p;b[o+1>>0]=p>>8;b[o+2>>0]=p>>16;b[o+3>>0]=p>>24;m=g;e=Vl(f[m>>2]|0,f[m+4>>2]|0,4,0)|0;m=g;f[m>>2]=e;f[m+4>>2]=I;s=p}if(!s){r=1;return r|0}f[a+8>>2]=0;if(!(zd(a+16|0,c)|0)){r=0;return r|0}if(!(ze(a+32|0,c)|0)){r=0;return r|0}if(!(ze(a+52|0,c)|0)){r=0;return r|0}if(ze(a+72|0,c)|0)return mb(a,f[o>>2]|0,d)|0;else{r=0;return r|0}return 0}function ge(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+64|0;e=d;g=e;i=g+52|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(i|0));do if(Oc(e,b)|0){g=(a|0)==0;if(!g?(f[e+12>>2]|0)==0:0){j=0;break}i=nd(e,b)|0;if(g|i^1)j=i;else{i=e+48|0;g=e+44|0;k=e+40|0;l=e+16|0;m=e+28|0;n=0;o=f[i>>2]|0;while(1){a:do if(o>>>0<4194304){p=f[g>>2]|0;q=o;while(1){if((p|0)<=0){r=q;break a}s=f[k>>2]|0;p=p+-1|0;f[g>>2]=p;t=q<<8|(h[s+p>>0]|0);f[i>>2]=t;if(t>>>0>=4194304){r=t;break}else q=t}}else r=o;while(0);q=r&1048575;p=f[(f[l>>2]|0)+(q<<2)>>2]|0;t=f[m>>2]|0;o=(X(f[t+(p<<3)>>2]|0,r>>>20)|0)+q-(f[t+(p<<3)+4>>2]|0)|0;f[i>>2]=o;f[c+(n<<2)>>2]=p;n=n+1|0;if((n|0)==(a|0)){j=1;break}}}}else j=0;while(0);a=f[e+28>>2]|0;if(a|0){c=e+32|0;r=f[c>>2]|0;if((r|0)!=(a|0))f[c>>2]=r+(~((r+-8-a|0)>>>3)<<3);mp(a)}a=f[e+16>>2]|0;if(a|0){r=e+20|0;c=f[r>>2]|0;if((c|0)!=(a|0))f[r>>2]=c+(~((c+-4-a|0)>>>2)<<2);mp(a)}a=f[e>>2]|0;if(!a){u=d;return j|0}c=e+4|0;e=f[c>>2]|0;if((e|0)!=(a|0))f[c>>2]=e+(~((e+-4-a|0)>>>2)<<2);mp(a);u=d;return j|0}function he(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+64|0;e=d;g=e;i=g+52|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(i|0));do if(Pc(e,b)|0){g=(a|0)==0;if(!g?(f[e+12>>2]|0)==0:0){j=0;break}i=od(e,b)|0;if(g|i^1)j=i;else{i=e+48|0;g=e+44|0;k=e+40|0;l=e+16|0;m=e+28|0;n=0;o=f[i>>2]|0;while(1){a:do if(o>>>0<2097152){p=f[g>>2]|0;q=o;while(1){if((p|0)<=0){r=q;break a}s=f[k>>2]|0;p=p+-1|0;f[g>>2]=p;t=q<<8|(h[s+p>>0]|0);f[i>>2]=t;if(t>>>0>=2097152){r=t;break}else q=t}}else r=o;while(0);q=r&524287;p=f[(f[l>>2]|0)+(q<<2)>>2]|0;t=f[m>>2]|0;o=(X(f[t+(p<<3)>>2]|0,r>>>19)|0)+q-(f[t+(p<<3)+4>>2]|0)|0;f[i>>2]=o;f[c+(n<<2)>>2]=p;n=n+1|0;if((n|0)==(a|0)){j=1;break}}}}else j=0;while(0);a=f[e+28>>2]|0;if(a|0){c=e+32|0;r=f[c>>2]|0;if((r|0)!=(a|0))f[c>>2]=r+(~((r+-8-a|0)>>>3)<<3);mp(a)}a=f[e+16>>2]|0;if(a|0){r=e+20|0;c=f[r>>2]|0;if((c|0)!=(a|0))f[r>>2]=c+(~((c+-4-a|0)>>>2)<<2);mp(a)}a=f[e>>2]|0;if(!a){u=d;return j|0}c=e+4|0;e=f[c>>2]|0;if((e|0)!=(a|0))f[c>>2]=e+(~((e+-4-a|0)>>>2)<<2);mp(a);u=d;return j|0}function ie(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+64|0;e=d;g=e;i=g+52|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(i|0));do if(Qc(e,b)|0){g=(a|0)==0;if(!g?(f[e+12>>2]|0)==0:0){j=0;break}i=pd(e,b)|0;if(g|i^1)j=i;else{i=e+48|0;g=e+44|0;k=e+40|0;l=e+16|0;m=e+28|0;n=0;o=f[i>>2]|0;while(1){a:do if(o>>>0<1048576){p=f[g>>2]|0;q=o;while(1){if((p|0)<=0){r=q;break a}s=f[k>>2]|0;p=p+-1|0;f[g>>2]=p;t=q<<8|(h[s+p>>0]|0);f[i>>2]=t;if(t>>>0>=1048576){r=t;break}else q=t}}else r=o;while(0);q=r&262143;p=f[(f[l>>2]|0)+(q<<2)>>2]|0;t=f[m>>2]|0;o=(X(f[t+(p<<3)>>2]|0,r>>>18)|0)+q-(f[t+(p<<3)+4>>2]|0)|0;f[i>>2]=o;f[c+(n<<2)>>2]=p;n=n+1|0;if((n|0)==(a|0)){j=1;break}}}}else j=0;while(0);a=f[e+28>>2]|0;if(a|0){c=e+32|0;r=f[c>>2]|0;if((r|0)!=(a|0))f[c>>2]=r+(~((r+-8-a|0)>>>3)<<3);mp(a)}a=f[e+16>>2]|0;if(a|0){r=e+20|0;c=f[r>>2]|0;if((c|0)!=(a|0))f[r>>2]=c+(~((c+-4-a|0)>>>2)<<2);mp(a)}a=f[e>>2]|0;if(!a){u=d;return j|0}c=e+4|0;e=f[c>>2]|0;if((e|0)!=(a|0))f[c>>2]=e+(~((e+-4-a|0)>>>2)<<2);mp(a);u=d;return j|0}function je(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+64|0;e=d;g=e;i=g+52|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(i|0));do if(Rc(e,b)|0){g=(a|0)==0;if(!g?(f[e+12>>2]|0)==0:0){j=0;break}i=qd(e,b)|0;if(g|i^1)j=i;else{i=e+48|0;g=e+44|0;k=e+40|0;l=e+16|0;m=e+28|0;n=0;o=f[i>>2]|0;while(1){a:do if(o>>>0<262144){p=f[g>>2]|0;q=o;while(1){if((p|0)<=0){r=q;break a}s=f[k>>2]|0;p=p+-1|0;f[g>>2]=p;t=q<<8|(h[s+p>>0]|0);f[i>>2]=t;if(t>>>0>=262144){r=t;break}else q=t}}else r=o;while(0);q=r&65535;p=f[(f[l>>2]|0)+(q<<2)>>2]|0;t=f[m>>2]|0;o=(X(f[t+(p<<3)>>2]|0,r>>>16)|0)+q-(f[t+(p<<3)+4>>2]|0)|0;f[i>>2]=o;f[c+(n<<2)>>2]=p;n=n+1|0;if((n|0)==(a|0)){j=1;break}}}}else j=0;while(0);a=f[e+28>>2]|0;if(a|0){c=e+32|0;r=f[c>>2]|0;if((r|0)!=(a|0))f[c>>2]=r+(~((r+-8-a|0)>>>3)<<3);mp(a)}a=f[e+16>>2]|0;if(a|0){r=e+20|0;c=f[r>>2]|0;if((c|0)!=(a|0))f[r>>2]=c+(~((c+-4-a|0)>>>2)<<2);mp(a)}a=f[e>>2]|0;if(!a){u=d;return j|0}c=e+4|0;e=f[c>>2]|0;if((e|0)!=(a|0))f[c>>2]=e+(~((e+-4-a|0)>>>2)<<2);mp(a);u=d;return j|0}function ke(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+64|0;e=d;g=e;i=g+52|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(i|0));do if(Sc(e,b)|0){g=(a|0)==0;if(!g?(f[e+12>>2]|0)==0:0){j=0;break}i=rd(e,b)|0;if(g|i^1)j=i;else{i=e+48|0;g=e+44|0;k=e+40|0;l=e+16|0;m=e+28|0;n=0;o=f[i>>2]|0;while(1){a:do if(o>>>0<131072){p=f[g>>2]|0;q=o;while(1){if((p|0)<=0){r=q;break a}s=f[k>>2]|0;p=p+-1|0;f[g>>2]=p;t=q<<8|(h[s+p>>0]|0);f[i>>2]=t;if(t>>>0>=131072){r=t;break}else q=t}}else r=o;while(0);q=r&32767;p=f[(f[l>>2]|0)+(q<<2)>>2]|0;t=f[m>>2]|0;o=(X(f[t+(p<<3)>>2]|0,r>>>15)|0)+q-(f[t+(p<<3)+4>>2]|0)|0;f[i>>2]=o;f[c+(n<<2)>>2]=p;n=n+1|0;if((n|0)==(a|0)){j=1;break}}}}else j=0;while(0);a=f[e+28>>2]|0;if(a|0){c=e+32|0;r=f[c>>2]|0;if((r|0)!=(a|0))f[c>>2]=r+(~((r+-8-a|0)>>>3)<<3);mp(a)}a=f[e+16>>2]|0;if(a|0){r=e+20|0;c=f[r>>2]|0;if((c|0)!=(a|0))f[r>>2]=c+(~((c+-4-a|0)>>>2)<<2);mp(a)}a=f[e>>2]|0;if(!a){u=d;return j|0}c=e+4|0;e=f[c>>2]|0;if((e|0)!=(a|0))f[c>>2]=e+(~((e+-4-a|0)>>>2)<<2);mp(a);u=d;return j|0}function le(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+64|0;e=d;g=e;i=g+52|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(i|0));do if(Uc(e,b)|0){g=(a|0)==0;if(!g?(f[e+12>>2]|0)==0:0){j=0;break}i=sd(e,b)|0;if(g|i^1)j=i;else{i=e+48|0;g=e+44|0;k=e+40|0;l=e+16|0;m=e+28|0;n=0;o=f[i>>2]|0;while(1){a:do if(o>>>0<32768){p=f[g>>2]|0;q=o;while(1){if((p|0)<=0){r=q;break a}s=f[k>>2]|0;p=p+-1|0;f[g>>2]=p;t=q<<8|(h[s+p>>0]|0);f[i>>2]=t;if(t>>>0>=32768){r=t;break}else q=t}}else r=o;while(0);q=r&8191;p=f[(f[l>>2]|0)+(q<<2)>>2]|0;t=f[m>>2]|0;o=(X(f[t+(p<<3)>>2]|0,r>>>13)|0)+q-(f[t+(p<<3)+4>>2]|0)|0;f[i>>2]=o;f[c+(n<<2)>>2]=p;n=n+1|0;if((n|0)==(a|0)){j=1;break}}}}else j=0;while(0);a=f[e+28>>2]|0;if(a|0){c=e+32|0;r=f[c>>2]|0;if((r|0)!=(a|0))f[c>>2]=r+(~((r+-8-a|0)>>>3)<<3);mp(a)}a=f[e+16>>2]|0;if(a|0){r=e+20|0;c=f[r>>2]|0;if((c|0)!=(a|0))f[r>>2]=c+(~((c+-4-a|0)>>>2)<<2);mp(a)}a=f[e>>2]|0;if(!a){u=d;return j|0}c=e+4|0;e=f[c>>2]|0;if((e|0)!=(a|0))f[c>>2]=e+(~((e+-4-a|0)>>>2)<<2);mp(a);u=d;return j|0}function me(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+64|0;e=d;g=e;i=g+52|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(i|0));do if(Vc(e,b)|0){g=(a|0)==0;if(!g?(f[e+12>>2]|0)==0:0){j=0;break}i=td(e,b)|0;if(g|i^1)j=i;else{i=e+48|0;g=e+44|0;k=e+40|0;l=e+16|0;m=e+28|0;n=0;o=f[i>>2]|0;while(1){a:do if(o>>>0<16384){p=f[g>>2]|0;q=o;while(1){if((p|0)<=0){r=q;break a}s=f[k>>2]|0;p=p+-1|0;f[g>>2]=p;t=q<<8|(h[s+p>>0]|0);f[i>>2]=t;if(t>>>0>=16384){r=t;break}else q=t}}else r=o;while(0);q=r&4095;p=f[(f[l>>2]|0)+(q<<2)>>2]|0;t=f[m>>2]|0;o=(X(f[t+(p<<3)>>2]|0,r>>>12)|0)+q-(f[t+(p<<3)+4>>2]|0)|0;f[i>>2]=o;f[c+(n<<2)>>2]=p;n=n+1|0;if((n|0)==(a|0)){j=1;break}}}}else j=0;while(0);a=f[e+28>>2]|0;if(a|0){c=e+32|0;r=f[c>>2]|0;if((r|0)!=(a|0))f[c>>2]=r+(~((r+-8-a|0)>>>3)<<3);mp(a)}a=f[e+16>>2]|0;if(a|0){r=e+20|0;c=f[r>>2]|0;if((c|0)!=(a|0))f[r>>2]=c+(~((c+-4-a|0)>>>2)<<2);mp(a)}a=f[e>>2]|0;if(!a){u=d;return j|0}c=e+4|0;e=f[c>>2]|0;if((e|0)!=(a|0))f[c>>2]=e+(~((e+-4-a|0)>>>2)<<2);mp(a);u=d;return j|0}function ne(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=f[c>>2]|0;c=f[d>>2]|0;e=f[a+4>>2]|0;g=f[d+4>>2]|0;h=e+-1|0;i=(h&e|0)==0;if(!i)if(g>>>0<e>>>0)j=g;else j=(g>>>0)%(e>>>0)|0;else j=h&g;g=(f[a>>2]|0)+(j<<2)|0;k=f[g>>2]|0;while(1){l=f[k>>2]|0;if((l|0)==(d|0))break;else k=l}if((k|0)!=(a+8|0)){l=f[k+4>>2]|0;if(!i)if(l>>>0<e>>>0)m=l;else m=(l>>>0)%(e>>>0)|0;else m=l&h;if((m|0)==(j|0)){n=c;o=21}else o=13}else o=13;do if((o|0)==13){if(c|0){m=f[c+4>>2]|0;if(!i)if(m>>>0<e>>>0)p=m;else p=(m>>>0)%(e>>>0)|0;else p=m&h;if((p|0)==(j|0)){q=c;r=c;o=22;break}}f[g>>2]=0;n=f[d>>2]|0;o=21}while(0);if((o|0)==21){g=n;if(!n)s=g;else{q=n;r=g;o=22}}if((o|0)==22){o=f[q+4>>2]|0;if(!i)if(o>>>0<e>>>0)t=o;else t=(o>>>0)%(e>>>0)|0;else t=o&h;if((t|0)==(j|0))s=r;else{f[(f[a>>2]|0)+(t<<2)>>2]=k;s=f[d>>2]|0}}f[k>>2]=s;f[d>>2]=0;s=a+12|0;f[s>>2]=(f[s>>2]|0)+-1;if(!d)return c|0;s=d+8|0;a=f[d+20>>2]|0;if(a|0){k=d+24|0;if((f[k>>2]|0)!=(a|0))f[k>>2]=a;mp(a)}if((b[s+11>>0]|0)<0)mp(f[s>>2]|0);mp(d);return c|0}function oe(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=f[a+12>>2]|0;e=a+108|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0<m>>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{$f(i,h-m|0,3228);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+112|0;a=c+68|0;c=f[o+96>>2]|0;o=0;while(1){h=o*3|0;if((h|0)==-1){q=0;r=12;break}i=f[d>>2]|0;g=f[i+(h<<2)>>2]|0;if((g|0)==-1){q=0;r=12;break}k=f[(f[m>>2]|0)+12>>2]|0;l=f[k+(g<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}g=f[a>>2]|0;f[g+(f[c+(o*12|0)>>2]<<2)>>2]=l;l=h+1|0;if((l|0)==-1){q=0;r=12;break}j=f[i+(l<<2)>>2]|0;if((j|0)==-1){q=0;r=12;break}l=f[k+(j<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+4>>2]<<2)>>2]=l;l=h+2|0;if((l|0)==-1){q=0;r=12;break}h=f[i+(l<<2)>>2]|0;if((h|0)==-1){q=0;r=12;break}l=f[k+(h<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+8>>2]<<2)>>2]=l;o=o+1|0;if(o>>>0>=e>>>0){q=1;r=12;break}}if((r|0)==12)return q|0;return 0}function pe(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;pi(f[a+4>>2]|0,(f[h+28>>2]|0)-(f[h+24>>2]|0)>>2);h=a+96|0;i=f[g>>2]|0;j=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;f[c>>2]=0;i=a+100|0;k=f[i>>2]|0;l=f[h>>2]|0;m=k-l>>2;n=l;l=k;if(j>>>0<=m>>>0){if(j>>>0<m>>>0?(k=n+(j<<2)|0,(k|0)!=(l|0)):0)f[i>>2]=l+(~((l+-4-k|0)>>>2)<<2)}else $f(h,j-m|0,c);m=a+116|0;a=f[m>>2]|0;if(!a){j=f[g>>2]|0;g=(f[j+4>>2]|0)-(f[j>>2]|0)>>2;j=(g>>>0)/3|0;if(g>>>0<=2){o=1;u=b;return o|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(Eb(e,c)|0)){o=0;p=15;break}if((g|0)>=(j|0)){o=1;p=15;break}}if((p|0)==15){u=b;return o|0}}else{j=f[a>>2]|0;if((f[a+4>>2]|0)==(j|0)){o=1;u=b;return o|0}a=0;g=j;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(Eb(e,c)|0)){o=0;p=15;break}j=f[m>>2]|0;g=f[j>>2]|0;if(a>>>0>=(f[j+4>>2]|0)-g>>2>>>0){o=1;p=15;break}}if((p|0)==15){u=b;return o|0}}return 0}function qe(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=f[a+12>>2]|0;e=a+68|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0<m>>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{$f(i,h-m|0,3228);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+72|0;a=c+68|0;c=f[o+96>>2]|0;o=0;while(1){h=o*3|0;if((h|0)==-1){q=0;r=12;break}i=f[d>>2]|0;g=f[i+(h<<2)>>2]|0;if((g|0)==-1){q=0;r=12;break}k=f[(f[m>>2]|0)+12>>2]|0;l=f[k+(g<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}g=f[a>>2]|0;f[g+(f[c+(o*12|0)>>2]<<2)>>2]=l;l=h+1|0;if((l|0)==-1){q=0;r=12;break}j=f[i+(l<<2)>>2]|0;if((j|0)==-1){q=0;r=12;break}l=f[k+(j<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+4>>2]<<2)>>2]=l;l=h+2|0;if((l|0)==-1){q=0;r=12;break}h=f[i+(l<<2)>>2]|0;if((h|0)==-1){q=0;r=12;break}l=f[k+(h<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+8>>2]<<2)>>2]=l;o=o+1|0;if(o>>>0>=e>>>0){q=1;r=12;break}}if((r|0)==12)return q|0;return 0}function re(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=b;jg(a+16|0);Zm(a+528|0);um(a+544|0);um(a+564|0);um(a+584|0);e=a+604|0;f[e>>2]=0;g=a+608|0;f[g>>2]=0;f[a+612>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)Do(e);else{i=b<<2;j=Yk(i)|0;f[e>>2]=j;k=j+(b<<2)|0;f[a+612>>2]=k;Dh(j|0,0,i|0)|0;f[g>>2]=k;break}while(0);g=a+616|0;f[g>>2]=0;e=a+620|0;f[e>>2]=0;f[a+624>>2]=0;if(!h){k=b<<2;i=Yk(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+624>>2]=g;Dh(i|0,0,k|0)|0;f[e>>2]=g}g=b<<5|1;f[d>>2]=0;e=d+4|0;f[e>>2]=0;f[d+8>>2]=0;if(!h){k=b<<2;i=Yk(k)|0;f[d>>2]=i;j=i+(b<<2)|0;f[d+8>>2]=j;Dh(i|0,0,k|0)|0;f[e>>2]=j}ti(a+628|0,g,d);j=f[d>>2]|0;if(j|0){k=f[e>>2]|0;if((k|0)!=(j|0))f[e>>2]=k+(~((k+-4-j|0)>>>2)<<2);mp(j)}f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;if(!h){h=b<<2;k=Yk(h)|0;f[d>>2]=k;e=k+(b<<2)|0;f[d+8>>2]=e;Dh(k|0,0,h|0)|0;f[j>>2]=e}ti(a+640|0,g,d);g=f[d>>2]|0;if(!g){u=c;return}d=f[j>>2]|0;if((d|0)!=(g|0))f[j>>2]=d+(~((d+-4-g|0)>>>2)<<2);mp(g);u=c;return}function se(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=u;u=u+32|0;d=c+12|0;e=c;g=b*3|0;f[d>>2]=0;h=d+4|0;f[h>>2]=0;f[d+8>>2]=0;do if(g)if(g>>>0>1073741823)Do(d);else{i=b*12|0;j=Yk(i)|0;f[d>>2]=j;k=j+(g<<2)|0;f[d+8>>2]=k;Dh(j|0,0,i|0)|0;f[h>>2]=k;l=j;break}else l=0;while(0);if(yh(g,1,f[a+32>>2]|0,l)|0)if(!b)m=1;else{l=a+44|0;a=e+4|0;g=e+8|0;j=0;k=0;i=0;while(1){f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;n=f[d>>2]|0;o=f[n+(k<<2)>>2]|0;p=o>>>1;q=((o&1|0)==0?p:0-p|0)+i|0;f[e>>2]=q;p=f[n+(k+1<<2)>>2]|0;o=p>>>1;r=((p&1|0)==0?o:0-o|0)+q|0;f[a>>2]=r;q=f[n+(k+2<<2)>>2]|0;n=q>>>1;i=((q&1|0)==0?n:0-n|0)+r|0;f[g>>2]=i;r=f[l>>2]|0;n=r+100|0;q=f[n>>2]|0;if((q|0)==(f[r+104>>2]|0))Lg(r+96|0,e);else{f[q>>2]=f[e>>2];f[q+4>>2]=f[e+4>>2];f[q+8>>2]=f[e+8>>2];f[n>>2]=(f[n>>2]|0)+12}j=j+1|0;if(j>>>0>=b>>>0){m=1;break}else k=k+3|0}}else m=0;k=f[d>>2]|0;if(!k){u=c;return m|0}d=f[h>>2]|0;if((d|0)!=(k|0))f[h>>2]=d+(~((d+-4-k|0)>>>2)<<2);mp(k);u=c;return m|0}function te(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=a+4|0;d=b+4|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];f[c+16>>2]=f[d+16>>2];d=a+24|0;c=b+24|0;if((a|0)==(b|0))return a|0;e=b+28|0;g=f[e>>2]|0;if(!g)h=0;else{i=a+32|0;do if(g>>>0>f[i>>2]<<5>>>0){j=f[d>>2]|0;if(!j)k=g;else{mp(j);f[d>>2]=0;f[i>>2]=0;f[a+28>>2]=0;k=f[e>>2]|0}if((k|0)<0)Do(d);else{j=((k+-1|0)>>>5)+1|0;l=Yk(j<<2)|0;f[d>>2]=l;f[a+28>>2]=0;f[i>>2]=j;m=f[e>>2]|0;n=l;break}}else{m=g;n=f[d>>2]|0}while(0);kk(n|0,f[c>>2]|0,((m+-1|0)>>>5<<2)+4|0)|0;h=f[e>>2]|0}f[a+28>>2]=h;h=a+36|0;e=b+36|0;m=b+40|0;b=f[m>>2]|0;if(!b)o=0;else{c=a+44|0;do if(b>>>0>f[c>>2]<<5>>>0){n=f[h>>2]|0;if(!n)p=b;else{mp(n);f[h>>2]=0;f[c>>2]=0;f[a+40>>2]=0;p=f[m>>2]|0}if((p|0)<0)Do(h);else{n=((p+-1|0)>>>5)+1|0;d=Yk(n<<2)|0;f[h>>2]=d;f[a+40>>2]=0;f[c>>2]=n;q=f[m>>2]|0;r=d;break}}else{q=b;r=f[h>>2]|0}while(0);kk(r|0,f[e>>2]|0,((q+-1|0)>>>5<<2)+4|0)|0;o=f[m>>2]|0}f[a+40>>2]=o;return a|0}function ue(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;c=u;u=u+32|0;d=c;e=a+8|0;g=f[e>>2]|0;h=a+4|0;i=f[h>>2]|0;j=i;if(g-i>>2>>>0>=b>>>0){Dh(i|0,0,b<<2|0)|0;f[h>>2]=i+(b<<2);u=c;return}k=f[a>>2]|0;l=i-k>>2;m=l+b|0;n=k;if(m>>>0>1073741823)Do(a);o=g-k|0;p=o>>1;q=o>>2>>>0<536870911?(p>>>0<m>>>0?m:p):1073741823;f[d+12>>2]=0;f[d+16>>2]=a+8;do if(q)if(q>>>0>1073741823){p=ra(8)|0;dn(p,13708);f[p>>2]=4852;va(p|0,1176,105)}else{r=Yk(q<<2)|0;break}else r=0;while(0);f[d>>2]=r;p=r+(l<<2)|0;l=d+8|0;m=d+4|0;f[m>>2]=p;o=r+(q<<2)|0;q=d+12|0;f[q>>2]=o;r=p+(b<<2)|0;Dh(p|0,0,b<<2|0)|0;f[l>>2]=r;if((j|0)==(n|0)){s=p;t=q;v=l;w=k;x=r;y=i;z=o;A=g}else{g=j;j=p;do{g=g+-4|0;p=f[g>>2]|0;f[g>>2]=0;f[j+-4>>2]=p;j=(f[m>>2]|0)+-4|0;f[m>>2]=j}while((g|0)!=(n|0));s=j;t=q;v=l;w=f[a>>2]|0;x=f[l>>2]|0;y=f[h>>2]|0;z=f[q>>2]|0;A=f[e>>2]|0}f[a>>2]=s;f[m>>2]=w;f[h>>2]=x;f[v>>2]=y;f[e>>2]=z;f[t>>2]=A;f[d>>2]=w;ug(d);u=c;return}function ve(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=b;um(a+16|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0]|0;o=Vl(m|0,n|0,1,0)|0;p=I;q=i;f[q>>2]=o;f[q+4>>2]=p;if(l<<24>>24!=-2){r=l;s=p;t=o;v=3}}else{r=0;s=n;t=m;v=3}if((v|0)==3){if((k|0)>(s|0)|(k|0)==(s|0)&j>>>0>t>>>0){j=b[(f[d>>2]|0)+t>>0]|0;k=Vl(t|0,s|0,1,0)|0;s=i;f[s>>2]=k;f[s+4>>2]=I;w=j}else w=0;Xa[f[(f[a>>2]|0)+40>>2]&7](g,a,r<<24>>24,w<<24>>24);w=a+20|0;r=f[g>>2]|0;f[g>>2]=0;j=f[w>>2]|0;f[w>>2]=r;if(j){Ua[f[(f[j>>2]|0)+4>>2]&127](j);j=f[g>>2]|0;f[g>>2]=0;if(j|0)Ua[f[(f[j>>2]|0)+4>>2]&127](j)}else f[g>>2]=0}g=f[a+20>>2]|0;if(g|0?!(Qa[f[(f[a>>2]|0)+28>>2]&127](a,g)|0):0){x=0;u=e;return x|0}if(!(Ra[f[(f[a>>2]|0)+36>>2]&31](a,c,d)|0)){x=0;u=e;return x|0}d=(f[c+4>>2]|0)-(f[c>>2]|0)>>2;c=f[a+4>>2]|0;if((c|0?((h[c+36>>0]|0)<<8&65535)<512:0)?!(Qa[f[(f[a>>2]|0)+48>>2]&127](a,d)|0):0){x=0;u=e;return x|0}x=1;u=e;return x|0}function xe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=b;Zm(a+16|0);um(a+32|0);um(a+52|0);um(a+72|0);e=a+92|0;f[e>>2]=0;g=a+96|0;f[g>>2]=0;f[a+100>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)Do(e);else{i=b<<2;j=Yk(i)|0;f[e>>2]=j;k=j+(b<<2)|0;f[a+100>>2]=k;Dh(j|0,0,i|0)|0;f[g>>2]=k;break}while(0);g=a+104|0;f[g>>2]=0;e=a+108|0;f[e>>2]=0;f[a+112>>2]=0;if(!h){k=b<<2;i=Yk(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+112>>2]=g;Dh(i|0,0,k|0)|0;f[e>>2]=g}g=b<<5|1;f[d>>2]=0;e=d+4|0;f[e>>2]=0;f[d+8>>2]=0;if(!h){k=b<<2;i=Yk(k)|0;f[d>>2]=i;j=i+(b<<2)|0;f[d+8>>2]=j;Dh(i|0,0,k|0)|0;f[e>>2]=j}ti(a+116|0,g,d);j=f[d>>2]|0;if(j|0){k=f[e>>2]|0;if((k|0)!=(j|0))f[e>>2]=k+(~((k+-4-j|0)>>>2)<<2);mp(j)}f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;if(!h){h=b<<2;k=Yk(h)|0;f[d>>2]=k;e=k+(b<<2)|0;f[d+8>>2]=e;Dh(k|0,0,h|0)|0;f[j>>2]=e}ti(a+128|0,g,d);g=f[d>>2]|0;if(!g){u=c;return}d=f[j>>2]|0;if((d|0)!=(g|0))f[j>>2]=d+(~((d+-4-g|0)>>>2)<<2);mp(g);u=c;return}function ye(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a+132|0;c=f[b>>2]|0;if(c|0){d=a+136|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);mp(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}mp(g)}g=a+120|0;b=f[g>>2]|0;if(b|0){j=a+124|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);mp(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}mp(l)}l=f[a+108>>2]|0;if(l|0){g=a+112|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);mp(l)}l=f[a+96>>2]|0;if(!l){n=a+76|0;lj(n);o=a+56|0;lj(o);p=a+36|0;lj(p);q=a+16|0;lj(q);return}m=a+100|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);mp(l);n=a+76|0;lj(n);o=a+56|0;lj(o);p=a+36|0;lj(p);q=a+16|0;lj(q);return}function ze(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;c=f[a>>2]|0;d=a+4|0;e=f[d>>2]|0;g=c;i=e+(~((e+-4-g|0)>>>2)<<2)|0;if((e|0)==(c|0)){j=e;k=c}else{f[d>>2]=i;j=i;k=i}i=a+16|0;f[i>>2]=0;e=a+12|0;f[e>>2]=k;k=b+8|0;l=k;m=f[l>>2]|0;n=f[l+4>>2]|0;l=b+16|0;o=l;p=f[o>>2]|0;q=Vl(p|0,f[o+4>>2]|0,4,0)|0;o=I;if((n|0)<(o|0)|(n|0)==(o|0)&m>>>0<q>>>0){r=0;return r|0}s=(f[b>>2]|0)+p|0;p=h[s>>0]|h[s+1>>0]<<8|h[s+2>>0]<<16|h[s+3>>0]<<24;s=l;f[s>>2]=q;f[s+4>>2]=o;if(!((p|0)!=0&(p&3|0)==0)){r=0;return r|0}s=Xl(m|0,n|0,q|0,o|0)|0;t=I;if((t|0)<0|(t|0)==0&s>>>0<p>>>0){r=0;return r|0}s=p>>>2;t=j-g>>2;if(s>>>0<=t>>>0)if(s>>>0<t>>>0?(g=c+(s<<2)|0,(g|0)!=(j|0)):0){f[d>>2]=j+(~((j+-4-g|0)>>>2)<<2);u=q;v=o;w=n;x=m}else{u=q;v=o;w=n;x=m}else{Og(a,s-t|0);t=k;k=l;u=f[k>>2]|0;v=f[k+4>>2]|0;w=f[t+4>>2]|0;x=f[t>>2]|0}t=Vl(u|0,v|0,p|0,0)|0;v=I;if((w|0)<(v|0)|(w|0)==(v|0)&x>>>0<t>>>0){r=0;return r|0}Ef(f[a>>2]|0,(f[b>>2]|0)+u|0,p|0)|0;u=l;b=Vl(f[u>>2]|0,f[u+4>>2]|0,p|0,0)|0;p=l;f[p>>2]=b;f[p+4>>2]=I;f[e>>2]=f[a>>2];f[i>>2]=0;r=1;return r|0}function Ae(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=a+4|0;d=f[a>>2]|0;e=((f[c>>2]|0)-d|0)/24|0;g=e+1|0;if(g>>>0>178956970)Do(a);h=a+8|0;i=((f[h>>2]|0)-d|0)/24|0;d=i<<1;j=i>>>0<89478485?(d>>>0<g>>>0?g:d):178956970;do if(j)if(j>>>0>178956970){d=ra(8)|0;dn(d,13708);f[d>>2]=4852;va(d|0,1176,105)}else{k=Yk(j*24|0)|0;break}else k=0;while(0);d=k+(e*24|0)|0;g=d;i=k+(j*24|0)|0;f[d>>2]=1276;f[k+(e*24|0)+4>>2]=f[b+4>>2];ni(k+(e*24|0)+8|0,b+8|0);f[k+(e*24|0)+20>>2]=f[b+20>>2];b=d+24|0;e=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(e|0)){l=g;m=e;n=e}else{j=k;k=g;g=d;do{f[g+-24>>2]=1276;f[g+-20>>2]=f[j+-20>>2];d=g+-16|0;o=j+-16|0;f[d>>2]=0;p=g+-12|0;f[p>>2]=0;f[g+-8>>2]=0;f[d>>2]=f[o>>2];d=j+-12|0;f[p>>2]=f[d>>2];p=j+-8|0;f[g+-8>>2]=f[p>>2];f[p>>2]=0;f[d>>2]=0;f[o>>2]=0;f[g+-4>>2]=f[j+-4>>2];j=j+-24|0;g=k+-24|0;k=g}while((j|0)!=(e|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=b;f[h>>2]=i;i=m;if((n|0)!=(i|0)){h=n;do{h=h+-24|0;Ua[f[f[h>>2]>>2]&127](h)}while((h|0)!=(i|0))}if(!m)return;mp(m);return}function Be(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a+640|0;c=f[b>>2]|0;if(c|0){d=a+644|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);mp(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}mp(g)}g=a+628|0;b=f[g>>2]|0;if(b|0){j=a+632|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);mp(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}mp(l)}l=f[a+616>>2]|0;if(l|0){g=a+620|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);mp(l)}l=f[a+604>>2]|0;if(!l){n=a+584|0;lj(n);o=a+564|0;lj(o);p=a+544|0;lj(p);q=a+16|0;qp(q);return}m=a+608|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);mp(l);n=a+584|0;lj(n);o=a+564|0;lj(o);p=a+544|0;lj(p);q=a+16|0;qp(q);return}function Ce(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=u;u=u+80|0;h=g;i=g+60|0;j=g+40|0;k=h;l=d;m=k+40|0;do{f[k>>2]=f[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(m|0));fc(a,h,i);if(f[a>>2]|0){u=g;return}h=a+4|0;n=h+11|0;if((b[n>>0]|0)<0)mp(f[h>>2]|0);if(b[i+7>>0]|0){f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;o=Yk(32)|0;f[j>>2]=o;f[j+8>>2]=-2147483616;f[j+4>>2]=27;k=o;l=11847;m=k+27|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[o+27>>0]=0;f[a>>2]=-1;zh(h,j);if((b[j+11>>0]|0)<0)mp(f[j>>2]|0);u=g;return}Cf(j,b[i+8>>0]|0);i=f[j>>2]|0;if(!i){o=j+16|0;l=f[o>>2]|0;f[o>>2]=0;zc(a,l,c,d,e);if(!(f[a>>2]|0)){if((b[n>>0]|0)<0)mp(f[h>>2]|0);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}if(l|0)Ua[f[(f[l>>2]|0)+4>>2]&127](l)}else{f[a>>2]=i;zh(h,j+4|0)}h=j+16|0;i=f[h>>2]|0;f[h>>2]=0;if(i|0)Ua[f[(f[i>>2]|0)+4>>2]&127](i);i=j+4|0;if((b[i+11>>0]|0)<0)mp(f[i>>2]|0);u=g;return}function De(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(((d-g|0)/12|0)>>>0>=b>>>0){Dh(g|0,0,b*12|0)|0;f[e>>2]=h+(b*12|0);return}i=f[a>>2]|0;j=(g-i|0)/12|0;g=j+b|0;k=i;if(g>>>0>357913941)Do(a);l=(d-i|0)/12|0;d=l<<1;m=l>>>0<178956970?(d>>>0<g>>>0?g:d):357913941;do if(m)if(m>>>0>357913941){d=ra(8)|0;dn(d,13708);f[d>>2]=4852;va(d|0,1176,105)}else{n=Yk(m*12|0)|0;break}else n=0;while(0);d=n+(j*12|0)|0;j=d;g=n+(m*12|0)|0;Dh(d|0,0,b*12|0)|0;m=d+(b*12|0)|0;if((h|0)==(k|0)){o=j;p=i;q=h}else{i=h;h=j;j=d;do{d=j+-12|0;b=i;i=i+-12|0;f[d>>2]=0;n=j+-8|0;f[n>>2]=0;f[j+-4>>2]=0;f[d>>2]=f[i>>2];d=b+-8|0;f[n>>2]=f[d>>2];n=b+-4|0;f[j+-4>>2]=f[n>>2];f[n>>2]=0;f[d>>2]=0;f[i>>2]=0;j=h+-12|0;h=j}while((i|0)!=(k|0));o=h;p=f[a>>2]|0;q=f[e>>2]|0}f[a>>2]=o;f[e>>2]=m;f[c>>2]=g;g=p;if((q|0)!=(g|0)){c=q;do{q=c;c=c+-12|0;m=f[c>>2]|0;if(m|0){e=q+-8|0;q=f[e>>2]|0;if((q|0)!=(m|0))f[e>>2]=q+(~((q+-4-m|0)>>>2)<<2);mp(m)}}while((c|0)!=(g|0))}if(!p)return;mp(p);return}function Ee(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=b[(f[a+8>>2]|0)+24>>0]|0;d=jp(c>>>0>1073741823?-1:c<<2)|0;e=a+28|0;g=f[e>>2]|0;f[e>>2]=d;if(g|0)kp(g);g=a+4|0;d=f[(f[g>>2]|0)+32>>2]|0;i=c<<2;c=d+8|0;j=f[c>>2]|0;k=f[c+4>>2]|0;c=d+16|0;l=c;m=f[l>>2]|0;n=Vl(m|0,f[l+4>>2]|0,i|0,0)|0;l=I;if((k|0)<(l|0)|(k|0)==(l|0)&j>>>0<n>>>0){o=0;return o|0}Ef(f[e>>2]|0,(f[d>>2]|0)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m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+72|0;a=c+68|0;c=f[o+96>>2]|0;o=f[d+28>>2]|0;d=0;while(1){h=d*3|0;i=f[o+(h<<2)>>2]|0;if((i|0)==-1){q=0;r=11;break}g=f[(f[m>>2]|0)+12>>2]|0;k=f[g+(i<<2)>>2]|0;if(k>>>0>=p>>>0){q=0;r=11;break}i=f[a>>2]|0;f[i+(f[c+(d*12|0)>>2]<<2)>>2]=k;k=f[o+(h+1<<2)>>2]|0;if((k|0)==-1){q=0;r=11;break}l=f[g+(k<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=11;break}f[i+(f[c+(d*12|0)+4>>2]<<2)>>2]=l;l=f[o+(h+2<<2)>>2]|0;if((l|0)==-1){q=0;r=11;break}h=f[g+(l<<2)>>2]|0;if(h>>>0>=p>>>0){q=0;r=11;break}f[i+(f[c+(d*12|0)+8>>2]<<2)>>2]=h;d=d+1|0;if(d>>>0>=e>>>0){q=1;r=11;break}}if((r|0)==11)return q|0;return 0}function Ge(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=u;u=u+80|0;h=g;i=g+60|0;j=g+40|0;k=h;l=d;m=k+40|0;do{f[k>>2]=f[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(m|0));fc(a,h,i);if(f[a>>2]|0){u=g;return}h=a+4|0;n=h+11|0;if((b[n>>0]|0)<0)mp(f[h>>2]|0);if((b[i+7>>0]|0)!=1){f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;o=Yk(32)|0;f[j>>2]=o;f[j+8>>2]=-2147483616;f[j+4>>2]=20;k=o;l=11826;m=k+20|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[o+20>>0]=0;f[a>>2]=-1;zh(h,j);if((b[j+11>>0]|0)<0)mp(f[j>>2]|0);u=g;return}ng(j,b[i+8>>0]|0);i=f[j>>2]|0;if(!i){o=j+16|0;l=f[o>>2]|0;f[o>>2]=0;gk(a,l,c,d,e);if(!(f[a>>2]|0)){if((b[n>>0]|0)<0)mp(f[h>>2]|0);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}if(l|0)Ua[f[(f[l>>2]|0)+4>>2]&127](l)}else{f[a>>2]=i;zh(h,j+4|0)}h=j+16|0;i=f[h>>2]|0;f[h>>2]=0;if(i|0)Ua[f[(f[i>>2]|0)+4>>2]&127](i);i=j+4|0;if((b[i+11>>0]|0)<0)mp(f[i>>2]|0);u=g;return}function He(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=u;u=u+112|0;g=e+100|0;h=e;i=f[(f[c+4>>2]|0)+44>>2]|0;j=Yk(120)|0;f[j+4>>2]=0;f[j>>2]=3304;k=j+8|0;l=j+12|0;m=l+44|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[k>>2]=3328;l=j+56|0;m=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[j+96>>2]=0;f[j+100>>2]=0;f[j+104>>2]=0;f[j+108>>2]=i;f[j+112>>2]=d;f[j+116>>2]=0;k=j;n=f[c+8>>2]|0;c=h+4|0;l=c+4|0;m=l+40|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[h>>2]=3328;l=h+48|0;m=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[h+88>>2]=0;f[h+92>>2]=0;f[h+96>>2]=0;l=n;f[c>>2]=l;m=((f[l+4>>2]|0)-(f[n>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;If(h+24|0,m,g);m=f[c>>2]|0;c=(f[m+28>>2]|0)-(f[m+24>>2]|0)>>2;b[g>>0]=0;If(h+36|0,c,g);f[h+8>>2]=n;f[h+12>>2]=d;f[h+16>>2]=i;f[h+20>>2]=j;Wf(j,h);f[a>>2]=k;eh(h);u=e;return}function Ie(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b;e=c-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;if(e>>>0<=h-i>>2>>>0){k=a+4|0;l=(f[k>>2]|0)-i>>2;m=e>>>0>l>>>0;n=b+(l<<2)|0;l=m?n:c;o=l;p=o-d|0;q=p>>2;if(q|0)kk(i|0,b|0,p|0)|0;p=j+(q<<2)|0;if(!m){m=f[k>>2]|0;if((m|0)==(p|0))return;f[k>>2]=m+(~((m+-4-p|0)>>>2)<<2);return}if((l|0)==(c|0))return;l=f[k>>2]|0;p=((c+-4-o|0)>>>2)+1|0;o=n;n=l;while(1){f[n>>2]=f[o>>2];o=o+4|0;if((o|0)==(c|0))break;else n=n+4|0}f[k>>2]=l+(p<<2);return}p=i;if(!i)r=h;else{h=a+4|0;l=f[h>>2]|0;if((l|0)!=(j|0))f[h>>2]=l+(~((l+-4-i|0)>>>2)<<2);mp(p);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;r=0}if(e>>>0>1073741823)Do(a);h=r>>1;p=r>>2>>>0<536870911?(h>>>0<e>>>0?e:h):1073741823;if(p>>>0>1073741823)Do(a);h=Yk(p<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(p<<2);if((b|0)==(c|0))return;p=((c+-4-d|0)>>>2)+1|0;d=b;b=h;while(1){f[b>>2]=f[d>>2];d=d+4|0;if((d|0)==(c|0))break;else b=b+4|0}f[e>>2]=h+(p<<2);return}function Je(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=c+8|0;e=f[d>>2]|0;g=f[d+4>>2]|0;d=c+16|0;i=d;k=f[i>>2]|0;l=f[i+4>>2]|0;i=Vl(k|0,l|0,4,0)|0;m=I;if((g|0)<(m|0)|(g|0)==(m|0)&e>>>0<i>>>0){n=0;return n|0}o=f[c>>2]|0;p=o+k|0;q=h[p>>0]|h[p+1>>0]<<8|h[p+2>>0]<<16|h[p+3>>0]<<24;p=d;f[p>>2]=i;f[p+4>>2]=m;m=Vl(k|0,l|0,8,0)|0;p=I;if((g|0)<(p|0)|(g|0)==(p|0)&e>>>0<m>>>0){n=0;return n|0}r=o+i|0;i=h[r>>0]|h[r+1>>0]<<8|h[r+2>>0]<<16|h[r+3>>0]<<24;r=d;f[r>>2]=m;f[r+4>>2]=p;if((q|0)>(i|0)){n=0;return n|0}f[a+12>>2]=q;f[a+16>>2]=i;r=Xl(i|0,((i|0)<0)<<31>>31|0,q|0,((q|0)<0)<<31>>31|0)|0;q=I;if(!(q>>>0<0|(q|0)==0&r>>>0<2147483647)){n=0;return n|0}q=r+1|0;f[a+20>>2]=q;r=(q|0)/2|0;i=a+24|0;f[i>>2]=r;f[a+28>>2]=0-r;if(!(q&1))f[i>>2]=r+-1;do if((j[c+38>>1]|0)<514){if(!((g|0)>(p|0)|(g|0)==(p|0)&e>>>0>m>>>0)){n=0;return n|0}r=b[o+m>>0]|0;i=Vl(k|0,l|0,9,0)|0;q=d;f[q>>2]=i;f[q+4>>2]=I;if((r&255)<2){f[a+88>>2]=r&255;break}else{n=0;return n|0}}while(0);n=zd(a+108|0,c)|0;return n|0}function Ke(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=a+128|0;c=f[b>>2]|0;if(c|0){d=a+132|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);mp(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}mp(g)}g=a+116|0;b=f[g>>2]|0;if(b|0){j=a+120|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);mp(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}mp(l)}l=f[a+104>>2]|0;if(l|0){g=a+108|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);mp(l)}l=f[a+92>>2]|0;if(!l){n=a+72|0;lj(n);o=a+52|0;lj(o);p=a+32|0;lj(p);return}m=a+96|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);mp(l);n=a+72|0;lj(n);o=a+52|0;lj(o);p=a+32|0;lj(p);return}function Le(a,b,c){a=a|0;b=b|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=b;g=c-e|0;h=g>>1;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0<=j-k>>1>>>0){m=a+4|0;n=(f[m>>2]|0)-k>>1;o=h>>>0>n>>>0;p=b+(n<<1)|0;n=o?p:c;q=n;r=q-e|0;s=r>>1;if(s|0)kk(k|0,b|0,r|0)|0;r=l+(s<<1)|0;if(!o){o=f[m>>2]|0;if((o|0)==(r|0))return;f[m>>2]=o+(~((o+-2-r|0)>>>1)<<1);return}if((n|0)==(c|0))return;n=f[m>>2]|0;r=c+-2-q|0;q=p;p=n;while(1){d[p>>1]=d[q>>1]|0;q=q+2|0;if((q|0)==(c|0))break;else p=p+2|0}f[m>>2]=n+((r>>>1)+1<<1);return}r=k;if(!k)t=j;else{j=a+4|0;n=f[j>>2]|0;if((n|0)!=(l|0))f[j>>2]=n+(~((n+-2-k|0)>>>1)<<1);mp(r);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;t=0}if((g|0)<0)Do(a);g=t>>1>>>0<1073741823?(t>>>0<h>>>0?h:t):2147483647;if((g|0)<0)Do(a);t=Yk(g<<1)|0;h=a+4|0;f[h>>2]=t;f[a>>2]=t;f[i>>2]=t+(g<<1);if((b|0)==(c|0))return;g=c+-2-e|0;e=b;b=t;while(1){d[b>>1]=d[e>>1]|0;e=e+2|0;if((e|0)==(c|0))break;else b=b+2|0}f[h>>2]=t+((g>>>1)+1<<1);return}function Me(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b;e=c-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;if(e>>>0<=h-i>>2>>>0){k=a+4|0;l=(f[k>>2]|0)-i>>2;m=e>>>0>l>>>0;n=b+(l<<2)|0;l=m?n:c;o=l;p=o-d|0;q=p>>2;if(q|0)kk(i|0,b|0,p|0)|0;p=j+(q<<2)|0;if(!m){m=f[k>>2]|0;if((m|0)==(p|0))return;f[k>>2]=m+(~((m+-4-p|0)>>>2)<<2);return}if((l|0)==(c|0))return;l=f[k>>2]|0;p=c+-4-o|0;o=n;n=l;while(1){f[n>>2]=f[o>>2];o=o+4|0;if((o|0)==(c|0))break;else n=n+4|0}f[k>>2]=l+((p>>>2)+1<<2);return}p=i;if(!i)r=h;else{h=a+4|0;l=f[h>>2]|0;if((l|0)!=(j|0))f[h>>2]=l+(~((l+-4-i|0)>>>2)<<2);mp(p);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;r=0}if(e>>>0>1073741823)Do(a);h=r>>1;p=r>>2>>>0<536870911?(h>>>0<e>>>0?e:h):1073741823;if(p>>>0>1073741823)Do(a);h=Yk(p<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(p<<2);if((b|0)==(c|0))return;p=c+-4-d|0;d=b;b=h;while(1){f[b>>2]=f[d>>2];d=d+4|0;if((d|0)==(c|0))break;else b=b+4|0}f[e>>2]=h+((p>>>2)+1<<2);return}function Ne(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+8|0;e=f[d>>2]|0;g=f[a>>2]|0;h=g;do if(e-g>>2>>>0>=b>>>0){i=a+4|0;j=f[i>>2]|0;k=j-g>>2;l=k>>>0<b>>>0;m=l?k:b;n=j;if(m|0){j=m;m=h;while(1){f[m>>2]=f[c>>2];j=j+-1|0;if(!j)break;else m=m+4|0}}if(!l){m=h+(b<<2)|0;if((m|0)==(n|0))return;else{o=i;p=n+(~((n+-4-m|0)>>>2)<<2)|0;break}}else{m=b-k|0;j=m;q=n;while(1){f[q>>2]=f[c>>2];j=j+-1|0;if(!j)break;else q=q+4|0}o=i;p=n+(m<<2)|0;break}}else{q=g;if(!g)r=e;else{j=a+4|0;k=f[j>>2]|0;if((k|0)!=(h|0))f[j>>2]=k+(~((k+-4-g|0)>>>2)<<2);mp(q);f[d>>2]=0;f[j>>2]=0;f[a>>2]=0;r=0}if(b>>>0>1073741823)Do(a);j=r>>1;q=r>>2>>>0<536870911?(j>>>0<b>>>0?b:j):1073741823;if(q>>>0>1073741823)Do(a);j=Yk(q<<2)|0;k=a+4|0;f[k>>2]=j;f[a>>2]=j;f[d>>2]=j+(q<<2);q=b;l=j;while(1){f[l>>2]=f[c>>2];q=q+-1|0;if(!q)break;else l=l+4|0}o=k;p=j+(b<<2)|0}while(0);f[o>>2]=p;return}function Oe(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=u;u=u+32|0;i=h+16|0;j=h;k=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;do if((c+-1|0)>>>0<6&(Pa[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1){l=Pa[f[(f[b>>2]|0)+36>>2]&127](b)|0;m=Qa[f[(f[b>>2]|0)+44>>2]&127](b,d)|0;if((l|0)==0|(m|0)==0){f[a>>2]=0;u=h;return}n=Qa[f[(f[b>>2]|0)+40>>2]&127](b,d)|0;if(!n){f[j>>2]=f[b+44>>2];f[j+4>>2]=l;f[j+12>>2]=m;f[j+8>>2]=m+12;rc(a,i,c,k,e,j,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}else{f[j>>2]=f[b+44>>2];f[j+4>>2]=n;f[j+12>>2]=m;f[j+8>>2]=m+12;pc(a,i,c,k,e,j,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}}while(0);f[a>>2]=0;u=h;return}function Pe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;c=u;u=u+16|0;d=c;e=a+76|0;g=f[e>>2]|0;h=a+80|0;i=f[h>>2]|0;if((i|0)!=(g|0))f[h>>2]=i+(~((i+-4-g|0)>>>2)<<2);f[e>>2]=0;f[h>>2]=0;f[a+84>>2]=0;if(g|0)mp(g);g=a+64|0;h=f[g>>2]|0;e=a+68|0;if((f[e>>2]|0)!=(h|0))f[e>>2]=h;f[g>>2]=0;f[e>>2]=0;f[a+72>>2]=0;if(h|0)mp(h);h=b+4|0;e=f[h>>2]|0;g=f[b>>2]|0;i=((e-g|0)/12|0)*3|0;j=a+4|0;k=f[j>>2]|0;l=f[a>>2]|0;m=k-l>>2;n=l;l=k;k=g;if(i>>>0<=m>>>0)if(i>>>0<m>>>0?(o=n+(i<<2)|0,(o|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-o|0)>>>2)<<2);p=e;q=g;r=k}else{p=e;q=g;r=k}else{Og(a,i-m|0);m=f[b>>2]|0;p=f[h>>2]|0;q=m;r=m}if((p|0)!=(q|0)){q=f[a>>2]|0;m=(p-r|0)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k+1>>0]<<8|h[k+2>>0]<<16|h[k+3>>0]<<24;b[p>>0]=q;b[p+1>>0]=q>>8;b[p+2>>0]=q>>16;b[p+3>>0]=q>>24;return}}function Re(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=c;e=b;g=d-e|0;h=g>>2;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0>j-k>>2>>>0){m=k;if(!k)n=j;else{j=a+4|0;o=f[j>>2]|0;if((o|0)!=(l|0))f[j>>2]=o+(~((o+-4-k|0)>>>2)<<2);mp(m);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;n=0}if(h>>>0>1073741823)Do(a);j=n>>1;m=n>>2>>>0<536870911?(j>>>0<h>>>0?h:j):1073741823;if(m>>>0>1073741823)Do(a);j=Yk(m<<2)|0;n=a+4|0;f[n>>2]=j;f[a>>2]=j;f[i>>2]=j+(m<<2);if((g|0)<=0)return;Ef(j|0,b|0,g|0)|0;f[n>>2]=j+(g>>>2<<2);return}g=a+4|0;a=f[g>>2]|0;j=a-k>>2;k=h>>>0>j>>>0;h=k?b+(j<<2)|0:c;c=a;j=a;if((h|0)==(b|0))p=l;else{a=h+-4-e|0;e=b;b=l;while(1){f[b>>2]=f[e>>2];e=e+4|0;if((e|0)==(h|0))break;else b=b+4|0}p=l+((a>>>2)+1<<2)|0}if(k){k=d-h|0;if((k|0)<=0)return;Ef(j|0,h|0,k|0)|0;f[g>>2]=(f[g>>2]|0)+(k>>>2<<2);return}else{if((p|0)==(c|0))return;f[g>>2]=c+(~((c+-4-p|0)>>>2)<<2);return}}function Se(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=c+8|0;e=f[d>>2]|0;g=f[d+4>>2]|0;d=c+16|0;i=d;k=f[i>>2]|0;l=f[i+4>>2]|0;i=Vl(k|0,l|0,4,0)|0;m=I;if((g|0)<(m|0)|(g|0)==(m|0)&e>>>0<i>>>0){n=0;return n|0}o=f[c>>2]|0;p=o+k|0;q=h[p>>0]|h[p+1>>0]<<8|h[p+2>>0]<<16|h[p+3>>0]<<24;p=d;f[p>>2]=i;f[p+4>>2]=m;p=(j[c+38>>1]|0)<514;do if(p){r=Vl(k|0,l|0,8,0)|0;s=I;if((g|0)<(s|0)|(g|0)==(s|0)&e>>>0<r>>>0){n=0;return n|0}else{t=d;f[t>>2]=r;f[t+4>>2]=s;u=s;v=r;break}}else{u=m;v=i}while(0);if(!(q&1)){n=0;return n|0}i=(_(q|0)|0)^31;if((i+-1|0)>>>0>28){n=0;return n|0}f[a+8>>2]=i+1;q=2<<i;f[a+12>>2]=q+-1;i=q+-2|0;f[a+16>>2]=i;f[a+20>>2]=(i|0)/2|0;do if(p){if(!((g|0)>(u|0)|(g|0)==(u|0)&e>>>0>v>>>0)){n=0;return n|0}i=b[o+v>>0]|0;q=Vl(v|0,u|0,1,0)|0;m=d;f[m>>2]=q;f[m+4>>2]=I;if((i&255)<2){f[a+68>>2]=i&255;break}else{n=0;return n|0}}while(0);n=zd(a+88|0,c)|0;return n|0}function Te(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=u;u=u+112|0;d=c+96|0;e=c+16|0;g=c+4|0;h=c;i=e+76|0;j=e;k=j+76|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));f[i>>2]=-1;f[g>>2]=0;i=g+4|0;f[i>>2]=0;f[g+8>>2]=0;f[h>>2]=g;f[d>>2]=f[h>>2];if(Nc(e,a,d)|0){d=f[g>>2]|0;Me(b,d,d+((f[i>>2]|0)-d>>2<<2)|0);l=f[e+68>>2]|0}else l=0;d=f[g>>2]|0;if(d|0){g=f[i>>2]|0;if((g|0)!=(d|0))f[i>>2]=g+(~((g+-4-d|0)>>>2)<<2);mp(d)}d=f[e+56>>2]|0;if(d|0)mp(d);d=f[e+32>>2]|0;if(d|0){g=e+36|0;i=f[g>>2]|0;if((i|0)!=(d|0))f[g>>2]=i+(~((i+-4-d|0)>>>2)<<2);mp(d)}d=f[e+20>>2]|0;if(d|0){i=e+24|0;g=f[i>>2]|0;if((g|0)!=(d|0))f[i>>2]=g+(~((g+-4-d|0)>>>2)<<2);mp(d)}d=f[e+8>>2]|0;if(d|0){g=e+12|0;i=f[g>>2]|0;if((i|0)!=(d|0))f[g>>2]=i+(~((i+-4-d|0)>>>2)<<2);mp(d)}d=e+4|0;e=f[d>>2]|0;f[d>>2]=0;if(!e){u=c;return l|0}Vg(e);mp(e);u=c;return l|0}function Ue(a,b,c,d){a=a|0;b=$(b);c=$(c);d=d|0;var e=Na,f=Na,g=Na,h=Na,i=Na,j=Na,k=0.0,l=Na,m=Na,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=Na,u=Na,v=0,w=0;e=$(b+c);f=$(b-c);if(!(f<=$(.5))|(!(f>=$(-.5))|(!(e>=$(.5))|!(e<=$(1.5))))){do if(!(e<=$(.5))){if(e>=$(1.5)){g=$($(1.5)-c);h=$($(1.5)-b);break}if(!(f<=$(-.5))){g=$(c+$(.5));h=$(b+$(-.5));break}else{g=$(c+$(-.5));h=$(b+$(.5));break}}else{g=$($(.5)-c);h=$($(.5)-b)}while(0);i=$(h+g);j=$(g-h);k=-1.0;l=g;m=h}else{i=e;j=f;k=1.0;l=b;m=c}c=$(+l*2.0+-1.0);l=$(+m*2.0+-1.0);o=+i*2.0;p=o+-1.0;q=3.0-o;o=+j*2.0;r=o+1.0;s=1.0-o;o=s<r?s:r;r=q<p?q:p;j=$(k*(o<r?o:r));i=$($(l*l)+$($(c*c)+$(j*j)));if(+i<1.0e-06){n[d>>2]=$(0.0);t=$(0.0);u=$(0.0);v=d+4|0;n[v>>2]=u;w=d+8|0;n[w>>2]=t;return}else{m=$($(1.0)/$(L($(i))));i=$(m*j);n[d>>2]=i;t=$(m*l);u=$(m*c);v=d+4|0;n[v>>2]=u;w=d+8|0;n[w>>2]=t;return}}function Ve(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=c&255;g=(d|0)!=0;a:do if(g&(a&3|0)!=0){h=c&255;i=a;j=d;while(1){if((b[i>>0]|0)==h<<24>>24){k=i;l=j;m=6;break a}n=i+1|0;o=j+-1|0;p=(o|0)!=0;if(p&(n&3|0)!=0){i=n;j=o}else{q=n;r=o;s=p;m=5;break}}}else{q=a;r=d;s=g;m=5}while(0);if((m|0)==5)if(s){k=q;l=r;m=6}else{t=q;u=0}b:do if((m|0)==6){q=c&255;if((b[k>>0]|0)==q<<24>>24){t=k;u=l}else{r=X(e,16843009)|0;c:do if(l>>>0>3){s=k;g=l;while(1){d=f[s>>2]^r;if((d&-2139062144^-2139062144)&d+-16843009|0)break;d=s+4|0;a=g+-4|0;if(a>>>0>3){s=d;g=a}else{v=d;w=a;m=11;break c}}x=s;y=g}else{v=k;w=l;m=11}while(0);if((m|0)==11)if(!w){t=v;u=0;break}else{x=v;y=w}while(1){if((b[x>>0]|0)==q<<24>>24){t=x;u=y;break b}r=x+1|0;y=y+-1|0;if(!y){t=r;u=0;break}else x=r}}}while(0);return (u|0?t:0)|0}function We(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=e;do if((d|0)==(e|0)){h=a+8|0;i=f[h>>2]|0;j=a+12|0;k=f[j>>2]|0;l=k;if(i>>>0<k>>>0){k=i;m=((l-k>>2)+1|0)/2|0;n=i+(m<<2)|0;o=k-d|0;k=o>>2;p=n+(0-k<<2)|0;if(!k){q=n;r=i}else{kk(p|0,d|0,o|0)|0;q=p;r=f[h>>2]|0}f[c>>2]=q;f[h>>2]=r+(m<<2);s=q;break}m=l-g>>1;l=(m|0)==0?1:m;if(l>>>0>1073741823){m=ra(8)|0;dn(m,13708);f[m>>2]=4852;va(m|0,1176,105)}m=Yk(l<<2)|0;p=m;o=m+((l+3|0)>>>2<<2)|0;n=o;k=m+(l<<2)|0;if((d|0)==(i|0)){t=n;u=d}else{l=o;m=n;v=d;do{f[l>>2]=f[v>>2];l=m+4|0;m=l;v=v+4|0}while((v|0)!=(i|0));t=m;u=f[a>>2]|0}f[a>>2]=p;f[c>>2]=n;f[h>>2]=t;f[j>>2]=k;if(!u)s=o;else{mp(u);s=f[c>>2]|0}}else s=d;while(0);f[s+-4>>2]=f[b>>2];f[c>>2]=(f[c>>2]|0)+-4;return}function Xe(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=a+4|0;g=f[e>>2]|0;if(!g){f[c>>2]=e;h=e;return h|0}e=b[d+11>>0]|0;i=e<<24>>24<0;j=i?f[d+4>>2]|0:e&255;e=i?f[d>>2]|0:d;d=a+4|0;a=g;while(1){g=a+16|0;i=b[g+11>>0]|0;k=i<<24>>24<0;l=k?f[a+20>>2]|0:i&255;i=l>>>0<j>>>0;m=i?l:j;if((m|0)!=0?(n=fj(e,k?f[g>>2]|0:g,m)|0,(n|0)!=0):0)if((n|0)<0)o=8;else o=10;else if(j>>>0<l>>>0)o=8;else o=10;if((o|0)==8){o=0;n=f[a>>2]|0;if(!n){o=9;break}else{p=a;q=n}}else if((o|0)==10){o=0;n=j>>>0<l>>>0?j:l;if((n|0)!=0?(l=fj(k?f[g>>2]|0:g,e,n)|0,(l|0)!=0):0){if((l|0)>=0){o=16;break}}else o=12;if((o|0)==12?(o=0,!i):0){o=16;break}r=a+4|0;i=f[r>>2]|0;if(!i){o=15;break}else{p=r;q=i}}d=p;a=q}if((o|0)==9){f[c>>2]=a;h=a;return h|0}else if((o|0)==15){f[c>>2]=a;h=r;return h|0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=a+48|0;c=f[j>>2]|0;f[j>>2]=0;if(c|0)Ua[f[(f[c>>2]|0)+4>>2]&127](c);switch(d<<24>>24){case 0:{d=Yk(384)|0;$h(d);c=f[j>>2]|0;f[j>>2]=d;if(!c)l=d;else{Ua[f[(f[c>>2]|0)+4>>2]&127](c);m=11}break}case 1:{c=Yk(424)|0;mh(c);d=f[j>>2]|0;f[j>>2]=c;if(!d)l=c;else{Ua[f[(f[d>>2]|0)+4>>2]&127](d);m=11}break}case 2:{d=Yk(440)|0;Sg(d);c=f[j>>2]|0;f[j>>2]=d;if(!c)l=d;else{Ua[f[(f[c>>2]|0)+4>>2]&127](c);m=11}break}default:m=11}if((m|0)==11){m=f[j>>2]|0;if(!m){k=0;return k|0}else l=m}k=Qa[f[(f[l>>2]|0)+8>>2]&127](l,a)|0;return k|0}function _e(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=u;u=u+32|0;g=e+12|0;h=e;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;i=Rh(c)|0;if(i>>>0>4294967279)Do(g);if(i>>>0<11){b[g+11>>0]=i;if(!i)j=g;else{k=g;l=6}}else{m=i+16&-16;n=Yk(m)|0;f[g>>2]=n;f[g+8>>2]=m|-2147483648;f[g+4>>2]=i;k=n;l=6}if((l|0)==6){Ef(k|0,c|0,i|0)|0;j=k}b[j+i>>0]=0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;i=Rh(d)|0;if(i>>>0>4294967279)Do(h);if(i>>>0<11){b[h+11>>0]=i;if(!i)o=h;else{p=h;l=12}}else{j=i+16&-16;k=Yk(j)|0;f[h>>2]=k;f[h+8>>2]=j|-2147483648;f[h+4>>2]=i;p=k;l=12}if((l|0)==12){Ef(p|0,d|0,i|0)|0;o=p}b[o+i>>0]=0;i=f[a+4>>2]|0;if((i|0)!=0?(o=Dd(i,g,h)|0,(o|0)!=0):0)q=dj(a,f[o+40>>2]|0)|0;else q=-1;if((b[h+11>>0]|0)<0)mp(f[h>>2]|0);if((b[g+11>>0]|0)>=0){u=e;return q|0}mp(f[g>>2]|0);u=e;return q|0}function $e(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;pi(f[a+4>>2]|0,(f[h+56>>2]|0)-(f[h+52>>2]|0)>>2);h=a+76|0;a=f[h>>2]|0;if(!a){i=f[(f[g>>2]|0)+64>>2]|0;g=(f[i+4>>2]|0)-(f[i>>2]|0)>>2;i=(g>>>0)/3|0;if(g>>>0<=2){j=1;u=b;return j|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(Jb(e,c)|0)){j=0;k=10;break}if((g|0)>=(i|0)){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}else{i=f[a>>2]|0;if((f[a+4>>2]|0)==(i|0)){j=1;u=b;return j|0}a=0;g=i;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(Jb(e,c)|0)){j=0;k=10;break}i=f[h>>2]|0;g=f[i>>2]|0;if(a>>>0>=(f[i+4>>2]|0)-g>>2>>>0){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}return 0}function af(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=c;g=d-e|0;h=a+8|0;i=f[h>>2]|0;j=f[a>>2]|0;k=j;if(g>>>0>(i-j|0)>>>0){if(!j)l=i;else{i=a+4|0;if((f[i>>2]|0)!=(k|0))f[i>>2]=k;mp(k);f[h>>2]=0;f[i>>2]=0;f[a>>2]=0;l=0}if((g|0)<0)Do(a);i=l<<1;m=l>>>0<1073741823?(i>>>0<g>>>0?g:i):2147483647;if((m|0)<0)Do(a);i=Yk(m)|0;l=a+4|0;f[l>>2]=i;f[a>>2]=i;f[h>>2]=i+m;if((c|0)==(d|0))return;else{n=c;o=i}do{b[o>>0]=b[n>>0]|0;n=n+1|0;o=(f[l>>2]|0)+1|0;f[l>>2]=o}while((n|0)!=(d|0));return}else{n=a+4|0;a=(f[n>>2]|0)-j|0;j=g>>>0>a>>>0;g=c+a|0;a=j?g:d;o=a-e|0;if(o|0)kk(k|0,c|0,o|0)|0;c=k+o|0;if(!j){if((f[n>>2]|0)==(c|0))return;f[n>>2]=c;return}if((a|0)==(d|0))return;a=g;g=f[n>>2]|0;do{b[g>>0]=b[a>>0]|0;a=a+1|0;g=(f[n>>2]|0)+1|0;f[n>>2]=g}while((a|0)!=(d|0));return}}function bf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=Na,t=0,v=Na,w=Na;d=u;u=u+16|0;e=d;g=f[a+24>>2]|0;h=a+8|0;i=b[(f[h>>2]|0)+24>>0]|0;j=i<<24>>24;k=j<<2;l=jp(j>>>0>1073741823?-1:j<<2)|0;Eo(e);if(!(jl(e,$(n[a+32>>2]),(1<<g)+-1|0)|0)){m=0;kp(l);u=d;return m|0}g=f[a+16>>2]|0;if(!(f[g+80>>2]|0))o=0;else o=(f[f[g>>2]>>2]|0)+(f[g+48>>2]|0)|0;if(!c){m=1;kp(l);u=d;return m|0}g=a+28|0;if(i<<24>>24>0){p=0;q=0;r=0}else{i=0;a=0;while(1){Ef((f[f[(f[h>>2]|0)+64>>2]>>2]|0)+a|0,l|0,k|0)|0;i=i+1|0;if((i|0)==(c|0)){m=1;break}else a=a+k|0}kp(l);u=d;return m|0}while(1){a=f[g>>2]|0;s=$(n[e>>2]);i=0;t=q;while(1){v=$(s*$(f[o+(t<<2)>>2]|0));w=$(v+$(n[a+(i<<2)>>2]));n[l+(i<<2)>>2]=w;i=i+1|0;if((i|0)==(j|0))break;else t=t+1|0}Ef((f[f[(f[h>>2]|0)+64>>2]>>2]|0)+r|0,l|0,k|0)|0;p=p+1|0;if((p|0)==(c|0)){m=1;break}else{q=q+j|0;r=r+k|0}}kp(l);u=d;return m|0}function cf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(d-g>>2>>>0>=b>>>0){Dh(g|0,0,b<<2|0)|0;f[e>>2]=g+(b<<2);return}i=f[a>>2]|0;j=g-i>>2;g=j+b|0;k=i;if(g>>>0>1073741823)Do(a);l=d-i|0;d=l>>1;m=l>>2>>>0<536870911?(d>>>0<g>>>0?g:d):1073741823;do if(m)if(m>>>0>1073741823){d=ra(8)|0;dn(d,13708);f[d>>2]=4852;va(d|0,1176,105)}else{n=Yk(m<<2)|0;break}else n=0;while(0);d=n+(j<<2)|0;Dh(d|0,0,b<<2|0)|0;b=d;j=n+(m<<2)|0;m=n+(g<<2)|0;if((h|0)==(k|0)){o=b;p=i;q=h}else{i=h;h=b;b=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[b+-4>>2]=d;b=h+-4|0;h=b}while((i|0)!=(k|0));o=h;p=f[a>>2]|0;q=f[e>>2]|0}f[a>>2]=o;f[e>>2]=m;f[c>>2]=j;j=p;if((q|0)!=(j|0)){c=q;do{c=c+-4|0;q=f[c>>2]|0;f[c>>2]=0;if(q|0)Ua[f[(f[q>>2]|0)+4>>2]&127](q)}while((c|0)!=(j|0))}if(!p)return;mp(p);return}function df(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+4|0;e=f[a>>2]|0;g=((f[d>>2]|0)-e|0)/12|0;h=g+1|0;if(h>>>0>357913941)Do(a);i=a+8|0;j=((f[i>>2]|0)-e|0)/12|0;e=j<<1;k=j>>>0<178956970?(e>>>0<h>>>0?h:e):357913941;do if(k)if(k>>>0>357913941){e=ra(8)|0;dn(e,13708);f[e>>2]=4852;va(e|0,1176,105)}else{l=Yk(k*12|0)|0;break}else l=0;while(0);e=l+(g*12|0)|0;g=e;h=l+(k*12|0)|0;zh(e,c);c=e+12|0;k=f[a>>2]|0;l=f[d>>2]|0;if((l|0)==(k|0)){m=g;n=k;o=k}else{j=l;l=g;g=e;do{e=g+-12|0;j=j+-12|0;f[e>>2]=f[j>>2];f[e+4>>2]=f[j+4>>2];f[e+8>>2]=f[j+8>>2];f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;g=l+-12|0;l=g}while((j|0)!=(k|0));m=l;n=f[a>>2]|0;o=f[d>>2]|0}f[a>>2]=m;f[d>>2]=c;f[i>>2]=h;h=n;if((o|0)!=(h|0)){i=o;do{i=i+-12|0;if((b[i+11>>0]|0)<0)mp(f[i>>2]|0)}while((i|0)!=(h|0))}if(!n)return;mp(n);return}function ef(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;c=a+8|0;d=f[c>>2]|0;e=a+12|0;g=f[e>>2]|0;h=g;do if((d|0)==(g|0)){i=a+4|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(j>>>0>k>>>0){m=j;n=((m-l>>2)+1|0)/-2|0;o=j+(n<<2)|0;p=d-m|0;m=p>>2;if(!m)q=j;else{kk(o|0,j|0,p|0)|0;q=f[i>>2]|0}p=o+(m<<2)|0;f[c>>2]=p;f[i>>2]=q+(n<<2);r=p;break}p=h-l>>1;l=(p|0)==0?1:p;if(l>>>0>1073741823){p=ra(8)|0;dn(p,13708);f[p>>2]=4852;va(p|0,1176,105)}p=Yk(l<<2)|0;n=p;m=p+(l>>>2<<2)|0;o=m;s=p+(l<<2)|0;if((j|0)==(d|0)){t=o;u=k}else{k=m;m=o;l=j;do{f[k>>2]=f[l>>2];k=m+4|0;m=k;l=l+4|0}while((l|0)!=(d|0));t=m;u=f[a>>2]|0}f[a>>2]=n;f[i>>2]=o;f[c>>2]=t;f[e>>2]=s;if(!u)r=t;else{mp(u);r=f[c>>2]|0}}else r=d;while(0);f[r>>2]=f[b>>2];f[c>>2]=(f[c>>2]|0)+4;return}function ff(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=c;e=b;g=d-e|0;h=g>>2;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0<=j-k>>2>>>0){m=a+4|0;n=(f[m>>2]|0)-k>>2;o=h>>>0>n>>>0;p=o?b+(n<<2)|0:c;c=p;n=c-e|0;e=n>>2;if(e|0)kk(k|0,b|0,n|0)|0;n=l+(e<<2)|0;if(o){o=d-c|0;if((o|0)<=0)return;Ef(f[m>>2]|0,p|0,o|0)|0;f[m>>2]=(f[m>>2]|0)+(o>>>2<<2);return}else{o=f[m>>2]|0;if((o|0)==(n|0))return;f[m>>2]=o+(~((o+-4-n|0)>>>2)<<2);return}}n=k;if(!k)q=j;else{j=a+4|0;o=f[j>>2]|0;if((o|0)!=(l|0))f[j>>2]=o+(~((o+-4-k|0)>>>2)<<2);mp(n);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;q=0}if(h>>>0>1073741823)Do(a);j=q>>1;n=q>>2>>>0<536870911?(j>>>0<h>>>0?h:j):1073741823;if(n>>>0>1073741823)Do(a);j=Yk(n<<2)|0;h=a+4|0;f[h>>2]=j;f[a>>2]=j;f[i>>2]=j+(n<<2);if((g|0)<=0)return;Ef(j|0,b|0,g|0)|0;f[h>>2]=j+(g>>>2<<2);return}function gf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=c+8|0;e=f[d>>2]|0;g=f[d+4>>2]|0;d=c+16|0;i=d;k=f[i>>2]|0;l=f[i+4>>2]|0;i=Vl(k|0,l|0,4,0)|0;m=I;if((g|0)<(m|0)|(g|0)==(m|0)&e>>>0<i>>>0){n=0;return n|0}o=f[c>>2]|0;p=o+k|0;q=h[p>>0]|h[p+1>>0]<<8|h[p+2>>0]<<16|h[p+3>>0]<<24;p=d;f[p>>2]=i;f[p+4>>2]=m;m=Vl(k|0,l|0,8,0)|0;p=I;if((g|0)<(p|0)|(g|0)==(p|0)&e>>>0<m>>>0){n=0;return n|0}i=d;f[i>>2]=m;f[i+4>>2]=p;if(!(q&1)){n=0;return n|0}i=(_(q|0)|0)^31;if((i+-1|0)>>>0>28){n=0;return n|0}f[a+8>>2]=i+1;q=2<<i;f[a+12>>2]=q+-1;i=q+-2|0;f[a+16>>2]=i;f[a+20>>2]=(i|0)/2|0;do if((j[c+38>>1]|0)<514){if(!((g|0)>(p|0)|(g|0)==(p|0)&e>>>0>m>>>0)){n=0;return n|0}i=b[o+m>>0]|0;q=Vl(k|0,l|0,9,0)|0;r=d;f[r>>2]=q;f[r+4>>2]=I;if((i&255)<2){f[a+68>>2]=i&255;break}else{n=0;return n|0}}while(0);n=zd(a+88|0,c)|0;return n|0}function hf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+16|0;d=c;e=Yk(64)|0;g=Yk(12)|0;h=f[(f[a+4>>2]|0)+80>>2]|0;f[g+4>>2]=0;f[g>>2]=3524;f[g+8>>2]=h;f[d>>2]=g;yj(e,d);g=e;if((b|0)>=0){h=a+8|0;i=a+12|0;a=f[i>>2]|0;j=f[h>>2]|0;k=a-j>>2;do if((k|0)<=(b|0)){l=b+1|0;m=a;if(l>>>0>k>>>0){cf(h,l-k|0);break}if(l>>>0<k>>>0?(n=j+(l<<2)|0,(n|0)!=(m|0)):0){l=m;do{m=l+-4|0;f[i>>2]=m;o=f[m>>2]|0;f[m>>2]=0;if(o|0)Ua[f[(f[o>>2]|0)+4>>2]&127](o);l=f[i>>2]|0}while((l|0)!=(n|0))}}while(0);i=(f[h>>2]|0)+(b<<2)|0;b=f[i>>2]|0;f[i>>2]=g;if(!b)p=1;else{Ua[f[(f[b>>2]|0)+4>>2]&127](b);p=1}}else{Ua[f[(f[e>>2]|0)+4>>2]&127](e);p=0}e=f[d>>2]|0;f[d>>2]=0;if(!e){u=c;return p|0}Ua[f[(f[e>>2]|0)+4>>2]&127](e);u=c;return p|0}function jf(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;pi(f[a+4>>2]|0,(f[h+28>>2]|0)-(f[h+24>>2]|0)>>2);h=a+76|0;a=f[h>>2]|0;if(!a){i=f[g>>2]|0;g=(f[i+4>>2]|0)-(f[i>>2]|0)>>2;i=(g>>>0)/3|0;if(g>>>0<=2){j=1;u=b;return j|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(Mb(e,c)|0)){j=0;k=10;break}if((g|0)>=(i|0)){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}else{i=f[a>>2]|0;if((f[a+4>>2]|0)==(i|0)){j=1;u=b;return j|0}a=0;g=i;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(Mb(e,c)|0)){j=0;k=10;break}i=f[h>>2]|0;g=f[i>>2]|0;if(a>>>0>=(f[i+4>>2]|0)-g>>2>>>0){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}return 0}function kf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=f[b>>2]|0;do if((c|0)!=-1){b=f[(f[(f[a+4>>2]|0)+12>>2]|0)+(c<<2)>>2]|0;d=c+1|0;e=((d>>>0)%3|0|0)==0?c+-2|0:d;if((e|0)==-1)g=-1;else g=f[(f[(f[a>>2]|0)+96>>2]|0)+(((e|0)/3|0)*12|0)+(((e|0)%3|0)<<2)>>2]|0;if((b|0)!=-1){e=(((b>>>0)%3|0|0)==0?2:-1)+b|0;if((e|0)==-1){h=-1;i=b;j=0}else{h=f[(f[(f[a>>2]|0)+96>>2]|0)+(((e|0)/3|0)*12|0)+(((e|0)%3|0)<<2)>>2]|0;i=b;j=0}}else{h=-1;i=-1;j=1}if((g|0)!=(h|0)){k=-1;return k|0}b=(((c>>>0)%3|0|0)==0?2:-1)+c|0;if((b|0)==-1)if(j){l=-1;m=-1;n=i;break}else o=-1;else{e=f[(f[(f[a>>2]|0)+96>>2]|0)+(((b|0)/3|0)*12|0)+(((b|0)%3|0)<<2)>>2]|0;if(j){l=-1;m=e;n=i;break}else o=e}e=i+1|0;b=((e>>>0)%3|0|0)==0?i+-2|0:e;if((b|0)==-1){l=-1;m=o;n=i}else{l=f[(f[(f[a>>2]|0)+96>>2]|0)+(((b|0)/3|0)*12|0)+(((b|0)%3|0)<<2)>>2]|0;m=o;n=i}}else{l=-1;m=-1;n=-1}while(0);k=(m|0)!=(l|0)?-1:n;return k|0}function lf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=a+20|0;if(Cc(e,c)|0){g=0;return g|0}a=_b(e,c)|0;c=f[d>>2]|0;f[d>>2]=0;d=f[a>>2]|0;f[a>>2]=c;if(!d){g=1;return g|0}c=f[d+28>>2]|0;if(c|0){a=c;do{c=a;a=f[a>>2]|0;Bg(c+8|0);mp(c)}while((a|0)!=0)}a=d+20|0;c=f[a>>2]|0;f[a>>2]=0;if(c|0)mp(c);c=f[d+8>>2]|0;if(c|0){a=c;do{c=a;a=f[a>>2]|0;e=c+8|0;h=f[c+20>>2]|0;if(h|0){i=c+24|0;if((f[i>>2]|0)!=(h|0))f[i>>2]=h;mp(h)}if((b[e+11>>0]|0)<0)mp(f[e>>2]|0);mp(c)}while((a|0)!=0)}a=f[d>>2]|0;f[d>>2]=0;if(a|0)mp(a);mp(d);g=1;return g|0}function mf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;f[e>>2]=b;g=a+8|0;if(((f[a+12>>2]|0)-(f[g>>2]|0)>>2|0)<=(b|0))_f(g,b+1|0);h=f[(f[c>>2]|0)+56>>2]|0;do if((h|0)<5){i=a+20+(h*12|0)+4|0;j=f[i>>2]|0;if((j|0)==(f[a+20+(h*12|0)+8>>2]|0)){dh(a+20+(h*12|0)|0,e);break}else{f[j>>2]=b;f[i>>2]=j+4;break}}while(0);b=f[c>>2]|0;h=f[e>>2]|0;f[b+60>>2]=h;e=(f[g>>2]|0)+(h<<2)|0;f[c>>2]=0;c=f[e>>2]|0;f[e>>2]=b;if(!c){u=d;return}b=c+88|0;e=f[b>>2]|0;f[b>>2]=0;if(e|0){b=f[e+8>>2]|0;if(b|0){h=e+12|0;if((f[h>>2]|0)!=(b|0))f[h>>2]=b;mp(b)}mp(e)}e=f[c+68>>2]|0;if(e|0){b=c+72|0;h=f[b>>2]|0;if((h|0)!=(e|0))f[b>>2]=h+(~((h+-4-e|0)>>>2)<<2);mp(e)}e=c+64|0;h=f[e>>2]|0;f[e>>2]=0;if(h|0){e=f[h>>2]|0;if(e|0){b=h+4|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;mp(e)}mp(h)}mp(c);u=d;return}function nf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;d=u;u=u+48|0;e=d+16|0;g=d;h=d+32|0;i=a+28|0;j=f[i>>2]|0;f[h>>2]=j;k=a+20|0;l=(f[k>>2]|0)-j|0;f[h+4>>2]=l;f[h+8>>2]=b;f[h+12>>2]=c;b=l+c|0;l=a+60|0;f[g>>2]=f[l>>2];f[g+4>>2]=h;f[g+8>>2]=2;j=mm(Aa(146,g|0)|0)|0;a:do if((b|0)!=(j|0)){g=2;m=b;n=h;o=j;while(1){if((o|0)<0)break;m=m-o|0;p=f[n+4>>2]|0;q=o>>>0>p>>>0;r=q?n+8|0:n;s=g+(q<<31>>31)|0;t=o-(q?p:0)|0;f[r>>2]=(f[r>>2]|0)+t;p=r+4|0;f[p>>2]=(f[p>>2]|0)-t;f[e>>2]=f[l>>2];f[e+4>>2]=r;f[e+8>>2]=s;o=mm(Aa(146,e|0)|0)|0;if((m|0)==(o|0)){v=3;break a}else{g=s;n=r}}f[a+16>>2]=0;f[i>>2]=0;f[k>>2]=0;f[a>>2]=f[a>>2]|32;if((g|0)==2)w=0;else w=c-(f[n+4>>2]|0)|0}else v=3;while(0);if((v|0)==3){v=f[a+44>>2]|0;f[a+16>>2]=v+(f[a+48>>2]|0);a=v;f[i>>2]=a;f[k>>2]=a;w=c}u=d;return w|0}function of(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=3716;b=f[a+68>>2]|0;if(b|0){c=a+72|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+56>>2]|0;if(b|0){d=a+60|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+44>>2]|0;if(b|0){c=a+48|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+32>>2]|0;if(b|0){d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+20>>2]|0;if(b|0){c=a+24|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}rg(a+8|0);b=a+4|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;b=a+40|0;d=f[b>>2]|0;if(d|0){c=a+44|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[c>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0){jh(i);mp(i)}h=f[c>>2]|0}while((h|0)!=(d|0));g=f[b>>2]|0}mp(g)}jh(a);mp(a);return}function pf(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a+12|0;d=f[a>>2]|0;e=a+8|0;g=f[e>>2]|0;h=(g|0)==-1;if(!(b[c>>0]|0)){do if(((!h?(i=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(i|0)!=-1):0)?(f[(f[d>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)==0:0)?(j=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(i<<2)>>2]|0,(j|0)!=-1):0)if(!((j>>>0)%3|0)){k=j+2|0;break}else{k=j+-1|0;break}else k=-1;while(0);f[e>>2]=k;return}k=g+1|0;if(((!h?(h=((k>>>0)%3|0|0)==0?g+-2|0:k,(h|0)!=-1):0)?(f[(f[d>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0)==0:0)?(k=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(h<<2)>>2]|0,h=k+1|0,(k|0)!=-1):0){g=((h>>>0)%3|0|0)==0?k+-2|0:h;f[e>>2]=g;if((g|0)!=-1){if((g|0)!=(f[a+4>>2]|0))return;f[e>>2]=-1;return}}else f[e>>2]=-1;g=f[a+4>>2]|0;do if((((g|0)!=-1?(a=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(a|0)!=-1):0)?(f[(f[d>>2]|0)+(a>>>5<<2)>>2]&1<<(a&31)|0)==0:0)?(h=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(a<<2)>>2]|0,(h|0)!=-1):0)if(!((h>>>0)%3|0)){l=h+2|0;break}else{l=h+-1|0;break}else l=-1;while(0);f[e>>2]=l;b[c>>0]=0;return}function qf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;a=f[d>>2]|0;do if(a|0){e=b[c+11>>0]|0;g=e<<24>>24<0;h=g?f[c+4>>2]|0:e&255;e=g?f[c>>2]|0:c;g=d;i=a;a:while(1){j=i;while(1){k=j+16|0;l=b[k+11>>0]|0;m=l<<24>>24<0;n=m?f[j+20>>2]|0:l&255;l=h>>>0<n>>>0?h:n;if((l|0)!=0?(o=fj(m?f[k>>2]|0:k,e,l)|0,(o|0)!=0):0){if((o|0)>=0)break}else p=6;if((p|0)==6?(p=0,n>>>0>=h>>>0):0)break;n=f[j+4>>2]|0;if(!n){q=g;break a}else j=n}i=f[j>>2]|0;if(!i){q=j;break}else g=j}if((q|0)!=(d|0)){g=q+16|0;i=b[g+11>>0]|0;n=i<<24>>24<0;o=n?f[q+20>>2]|0:i&255;i=o>>>0<h>>>0?o:h;if(i|0?(l=fj(e,n?f[g>>2]|0:g,i)|0,l|0):0){if((l|0)<0)break;else r=q;return r|0}if(h>>>0>=o>>>0){r=q;return r|0}}}while(0);r=d;return r|0}function rf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if(((e-h|0)/12|0)>>>0>=b>>>0){i=b;j=h;do{f[j>>2]=f[c>>2];f[j+4>>2]=f[c+4>>2];f[j+8>>2]=f[c+8>>2];j=(f[g>>2]|0)+12|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=(h-i|0)/12|0;h=j+b|0;if(h>>>0>357913941)Do(a);k=(e-i|0)/12|0;i=k<<1;e=k>>>0<178956970?(i>>>0<h>>>0?h:i):357913941;do if(e)if(e>>>0>357913941){i=ra(8)|0;dn(i,13708);f[i>>2]=4852;va(i|0,1176,105)}else{l=Yk(e*12|0)|0;break}else l=0;while(0);i=l+(j*12|0)|0;j=l+(e*12|0)|0;e=b;b=i;l=i;do{f[b>>2]=f[c>>2];f[b+4>>2]=f[c+4>>2];f[b+8>>2]=f[c+8>>2];b=l+12|0;l=b;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;b=(f[g>>2]|0)-e|0;c=i+(((b|0)/-12|0)*12|0)|0;if((b|0)>0)Ef(c|0,e|0,b|0)|0;f[a>>2]=c;f[g>>2]=l;f[d>>2]=j;if(!e)return;mp(e);return}function sf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d>>2;g=e+1|0;if(g>>>0>1073741823)Do(a);h=a+8|0;i=(f[h>>2]|0)-d|0;d=i>>1;j=i>>2>>>0<536870911?(d>>>0<g>>>0?g:d):1073741823;do if(j)if(j>>>0>1073741823){d=ra(8)|0;dn(d,13708);f[d>>2]=4852;va(d|0,1176,105)}else{k=Yk(j<<2)|0;break}else k=0;while(0);d=k+(e<<2)|0;e=d;g=k+(j<<2)|0;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;j=d+4|0;b=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(b|0)){l=e;m=b;n=b}else{i=k;k=e;e=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[e+-4>>2]=d;e=k+-4|0;k=e}while((i|0)!=(b|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=j;f[h>>2]=g;g=m;if((n|0)!=(g|0)){h=n;do{h=h+-4|0;n=f[h>>2]|0;f[h>>2]=0;if(n|0){jh(n);mp(n)}}while((h|0)!=(g|0))}if(!m)return;mp(m);return}function tf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;e=u;u=u+80|0;g=e;h=e+64|0;Nj(g);i=f[(f[a+8>>2]|0)+56>>2]|0;j=X(Zj(5)|0,d)|0;Uh(g,i,0,d&255,5,0,j,((j|0)<0)<<31>>31,0,0);j=Yk(96)|0;Bj(j,g);b[j+84>>0]=1;g=f[j+68>>2]|0;d=j+72|0;i=f[d>>2]|0;if((i|0)!=(g|0))f[d>>2]=i+(~((i+-4-g|0)>>>2)<<2);Jh(j,c)|0;f[h>>2]=j;rh(a,h);a=f[h>>2]|0;f[h>>2]=0;if(!a){u=e;return}h=a+88|0;j=f[h>>2]|0;f[h>>2]=0;if(j|0){h=f[j+8>>2]|0;if(h|0){c=j+12|0;if((f[c>>2]|0)!=(h|0))f[c>>2]=h;mp(h)}mp(j)}j=f[a+68>>2]|0;if(j|0){h=a+72|0;c=f[h>>2]|0;if((c|0)!=(j|0))f[h>>2]=c+(~((c+-4-j|0)>>>2)<<2);mp(j)}j=a+64|0;c=f[j>>2]|0;f[j>>2]=0;if(c|0){j=f[c>>2]|0;if(j|0){h=c+4|0;if((f[h>>2]|0)!=(j|0))f[h>>2]=j;mp(j)}mp(c)}mp(a);u=e;return}function uf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=f[c>>2]|0;c=f[a>>2]|0;e=c+(d>>>5<<2)|0;f[e>>2]=f[e>>2]|1<<(d&31);e=f[a+64>>2]|0;g=(d|0)==-1;h=d+1|0;if(!g?(i=((h>>>0)%3|0|0)==0?d+-2|0:h,(i|0)!=-1):0)j=f[(f[e>>2]|0)+(i<<2)>>2]|0;else j=-1;i=a+12|0;h=(f[i>>2]|0)+(j>>>5<<2)|0;f[h>>2]=f[h>>2]|1<<(j&31);if(g){j=(f[i>>2]|0)+536870908|0;f[j>>2]=f[j>>2]|-2147483648;return}j=(((d>>>0)%3|0|0)==0?2:-1)+d|0;if((j|0)==-1)k=-1;else k=f[(f[e>>2]|0)+(j<<2)>>2]|0;j=(f[i>>2]|0)+(k>>>5<<2)|0;f[j>>2]=f[j>>2]|1<<(k&31);if(g)return;g=f[(f[e+12>>2]|0)+(d<<2)>>2]|0;if((g|0)==-1)return;b[a+24>>0]=0;a=c+(g>>>5<<2)|0;f[a>>2]=f[a>>2]|1<<(g&31);a=g+1|0;c=((a>>>0)%3|0|0)==0?g+-2|0:a;if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((f[h>>2]|0)!=(e|0))f[h>>2]=e;mp(e)}mp(c)}c=f[g+68>>2]|0;if(c|0){e=g+72|0;h=f[e>>2]|0;if((h|0)!=(c|0))f[e>>2]=h+(~((h+-4-c|0)>>>2)<<2);mp(c)}c=g+64|0;h=f[c>>2]|0;f[c>>2]=0;if(h|0){c=f[h>>2]|0;if(c|0){e=h+4|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;mp(c)}mp(h)}mp(g)}g=a+84|0;h=a+88|0;a=f[h>>2]|0;c=f[g>>2]|0;e=a-c>>2;if((e|0)>(b|0)){u=d;return}i=b+1|0;b=a;if(i>>>0>e>>>0){dg(g,i-e|0);u=d;return}if(i>>>0>=e>>>0){u=d;return}e=c+(i<<2)|0;if((e|0)==(b|0)){u=d;return}f[h>>2]=b+(~((b+-4-e|0)>>>2)<<2);u=d;return}function xf(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=a+172|0;d=f[c>>2]|0;do if((d|0)==-1){e=f[a+144>>2]|0;g=Pa[f[(f[e>>2]|0)+32>>2]&127](e)|0;if(((h[g+36>>0]<<8|h[g+37>>0])&65535)<514)if(b[a+76>>0]|0){g=a+72|0;e=f[g>>2]|0;i=f[a+64>>2]|0;j=f[a+68>>2]|0;k=i+(e>>>3)|0;if(k>>>0<j>>>0?(l=h[k>>0]|0,k=e+1|0,f[g>>2]=k,(1<<(e&7)&l|0)!=0):0){l=i+(k>>>3)|0;if(l>>>0<j>>>0){m=(h[l>>0]|0)>>>(k&7)&1;l=e+2|0;f[g>>2]=l;n=m;o=l}else{n=0;o=k}k=i+(o>>>3)|0;if(k>>>0<j>>>0){j=(h[k>>0]|0)>>>(o&7);f[g>>2]=o+1;p=j<<1&2}else p=0;q=(p|n)<<1|1}else q=0}else q=1;else q=7}else{j=(f[a+196>>2]|0)+(d<<2)|0;g=f[j>>2]|0;k=g+-1|0;f[j>>2]=k;if((g|0)<1){r=9;return r|0}else{q=f[3436+(f[(f[(f[a+184>>2]|0)+((f[c>>2]|0)*12|0)>>2]|0)+(k<<2)>>2]<<2)>>2]|0;break}}while(0);f[a+168>>2]=q;r=q;return r|0}function yf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,k=0,l=0,m=0,n=0;do if(c){if((j[a+38>>1]|0)>=514){if(nh(d,a)|0)break;else e=0;return e|0}g=a+8|0;i=f[g>>2]|0;k=f[g+4>>2]|0;g=a+16|0;l=g;m=f[l>>2]|0;n=Vl(m|0,f[l+4>>2]|0,8,0)|0;l=I;if((k|0)<(l|0)|(k|0)==(l|0)&i>>>0<n>>>0){e=0;return e|0}else{n=(f[a>>2]|0)+m|0;m=n;i=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=n+4|0;n=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=d;l=m;b[l>>0]=i;b[l+1>>0]=i>>8;b[l+2>>0]=i>>16;b[l+3>>0]=i>>24;i=m+4|0;b[i>>0]=n;b[i+1>>0]=n>>8;b[i+2>>0]=n>>16;b[i+3>>0]=n>>24;n=g;i=Vl(f[n>>2]|0,f[n+4>>2]|0,8,0)|0;n=g;f[n>>2]=i;f[n+4>>2]=I;break}}while(0);b[a+36>>0]=1;d=a+16|0;c=f[d>>2]|0;n=(f[a>>2]|0)+c|0;i=a+8|0;g=Xl(f[i>>2]|0,f[i+4>>2]|0,c|0,f[d+4>>2]|0)|0;f[a+32>>2]=0;f[a+24>>2]=n;f[a+28>>2]=n+g;e=1;return e|0}function zf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;g=u;u=u+32|0;h=g+16|0;i=g+8|0;j=g;k=e>>>0>1073741823?-1:e<<2;l=jp(k)|0;Dh(l|0,0,k|0)|0;k=a+8|0;a=f[l>>2]|0;m=f[l+4>>2]|0;n=f[b+4>>2]|0;f[h>>2]=f[b>>2];f[h+4>>2]=n;f[j>>2]=a;f[j+4>>2]=m;kd(i,k,j,h);f[c>>2]=f[i>>2];f[c+4>>2]=f[i+4>>2];if((e|0)>=(d|0)){kp(l);u=g;return 1}m=0-e|0;a=h+4|0;n=j+4|0;o=i+4|0;p=e;do{q=c+(p<<2)|0;r=q+(m<<2)|0;s=b+(p<<2)|0;t=f[r>>2]|0;v=f[r+4>>2]|0;r=f[s+4>>2]|0;f[h>>2]=f[s>>2];f[a>>2]=r;f[j>>2]=t;f[n>>2]=v;kd(i,k,j,h);f[q>>2]=f[i>>2];f[q+4>>2]=f[o>>2];p=p+e|0}while((p|0)<(d|0));kp(l);u=g;return 1}function Af(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=u;u=u+16|0;e=d+8|0;g=d+4|0;h=d;if(!c){i=0;u=d;return i|0}f[a>>2]=b;f[e>>2]=0;Nh(e,b)|0;a:do if(!(f[e>>2]|0))j=8;else{b=0;while(1){Nh(g,f[a>>2]|0)|0;k=Yk(44)|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;n[k+16>>2]=$(1.0);l=k+20|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;f[l+12>>2]=0;n[k+36>>2]=$(1.0);f[k+40>>2]=f[g>>2];if(!(Jc(a,k)|0))break;f[h>>2]=k;ui(c,h)|0;l=f[h>>2]|0;f[h>>2]=0;if(l|0){jh(l);mp(l)}b=b+1|0;if(b>>>0>=(f[e>>2]|0)>>>0){j=8;break a}}jh(k);mp(k);m=0}while(0);if((j|0)==8)m=Jc(a,c)|0;i=m;u=d;return i|0}function Bf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;if(c>>>0>4294967279)Do(a);d=a+11|0;e=b[d>>0]|0;g=e<<24>>24<0;if(g){h=f[a+4>>2]|0;i=(f[a+8>>2]&2147483647)+-1|0}else{h=e&255;i=10}j=h>>>0>c>>>0?h:c;c=j>>>0<11;k=c?10:(j+16&-16)+-1|0;do if((k|0)!=(i|0)){do if(c){j=f[a>>2]|0;if(g){l=0;m=j;n=a;o=13}else{Um(a,j,(e&255)+1|0)|0;mp(j);o=16}}else{j=k+1|0;p=Yk(j)|0;if(g){l=1;m=f[a>>2]|0;n=p;o=13;break}else{Um(p,a,(e&255)+1|0)|0;q=p;r=j;s=a+4|0;o=15;break}}while(0);if((o|0)==13){j=a+4|0;Um(n,m,(f[j>>2]|0)+1|0)|0;mp(m);if(l){q=n;r=k+1|0;s=j;o=15}else o=16}if((o|0)==15){f[a+8>>2]=r|-2147483648;f[s>>2]=h;f[a>>2]=q;break}else if((o|0)==16){b[d>>0]=h;break}}while(0);return}function Cf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+32|0;e=d+16|0;g=d;switch(c<<24>>24){case 0:{c=Yk(44)|0;h=c;i=h+44|0;do{f[h>>2]=0;h=h+4|0}while((h|0)<(i|0));jk(c);f[c>>2]=3636;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=c;u=d;return}case 1:{c=Yk(44)|0;h=c;i=h+44|0;do{f[h>>2]=0;h=h+4|0}while((h|0)<(i|0));jk(c);f[c>>2]=3592;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=c;u=d;return}default:{c=Yk(32)|0;f[g>>2]=c;f[g+8>>2]=-2147483616;f[g+4>>2]=28;h=c;j=11797;i=h+28|0;do{b[h>>0]=b[j>>0]|0;h=h+1|0;j=j+1|0}while((h|0)<(i|0));b[c+28>>0]=0;f[e>>2]=-1;c=e+4|0;zh(c,g);f[a>>2]=f[e>>2];zh(a+4|0,c);f[a+16>>2]=0;if((b[c+11>>0]|0)<0)mp(f[c>>2]|0);if((b[g+11>>0]|0)<0)mp(f[g>>2]|0);u=d;return}}}function Df(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=Na,k=0,l=0,m=0,o=0,p=Na,q=Na,r=Na,s=0,t=0,v=0,w=0,x=0,y=0;g=u;u=u+16|0;h=g+12|0;i=g;j=$(n[d+4>>2]);k=(1<<f[d>>2])+-1|0;Eo(h);jl(h,j,k)|0;d=f[a>>2]|0;if((f[c>>2]|0)==(d|0)){u=g;return}a=i+4|0;l=i+8|0;m=e+16|0;o=e+28|0;e=d;d=f[o>>2]|0;do{j=$((f[e>>2]|0)-k|0);p=$(n[h>>2]);q=$(p*j);j=$(p*$((f[e+4>>2]|0)-k|0));r=$(p*$((f[e+8>>2]|0)-k|0));n[i>>2]=q;n[a>>2]=j;n[l>>2]=r;s=f[m>>2]|0;t=f[s>>2]|0;if(!(b[t+84>>0]|0))v=f[(f[t+68>>2]|0)+(d<<2)>>2]|0;else v=d;w=i+(f[s+4>>2]<<2)|0;s=t+40|0;x=f[s>>2]|0;y=al(x|0,f[s+4>>2]|0,v|0,0)|0;Ef((f[f[t+64>>2]>>2]|0)+y|0,w|0,x|0)|0;d=(f[o>>2]|0)+1|0;f[o>>2]=d;e=e+12|0}while((f[c>>2]|0)!=(e|0));u=g;return}function Ef(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0;if((d|0)>=8192)return Ea(a|0,c|0,d|0)|0;e=a|0;g=a+d|0;if((a&3)==(c&3)){while(a&3){if(!d)return e|0;b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0;d=d-1|0}h=g&-4|0;d=h-64|0;while((a|0)<=(d|0)){f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];f[a+12>>2]=f[c+12>>2];f[a+16>>2]=f[c+16>>2];f[a+20>>2]=f[c+20>>2];f[a+24>>2]=f[c+24>>2];f[a+28>>2]=f[c+28>>2];f[a+32>>2]=f[c+32>>2];f[a+36>>2]=f[c+36>>2];f[a+40>>2]=f[c+40>>2];f[a+44>>2]=f[c+44>>2];f[a+48>>2]=f[c+48>>2];f[a+52>>2]=f[c+52>>2];f[a+56>>2]=f[c+56>>2];f[a+60>>2]=f[c+60>>2];a=a+64|0;c=c+64|0}while((a|0)<(h|0)){f[a>>2]=f[c>>2];a=a+4|0;c=c+4|0}}else{h=g-4|0;while((a|0)<(h|0)){b[a>>0]=b[c>>0]|0;b[a+1>>0]=b[c+1>>0]|0;b[a+2>>0]=b[c+2>>0]|0;b[a+3>>0]=b[c+3>>0]|0;a=a+4|0;c=c+4|0}}while((a|0)<(g|0)){b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0}return e|0}function Ff(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=f[c+88>>2]|0;if(!d){e=0;return e|0}if((f[d>>2]|0)!=1){e=0;return e|0}g=d+8|0;d=f[g>>2]|0;f[a+4>>2]=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;i=a+8|0;j=c+24|0;c=b[j>>0]|0;k=c<<24>>24;l=a+12|0;m=f[l>>2]|0;n=f[i>>2]|0;o=m-n>>2;p=n;n=m;if(o>>>0>=k>>>0)if(o>>>0>k>>>0?(m=p+(k<<2)|0,(m|0)!=(n|0)):0){f[l>>2]=n+(~((n+-4-m|0)>>>2)<<2);q=c;r=d}else{q=c;r=d}else{Og(i,k-o|0);q=b[j>>0]|0;r=f[g>>2]|0}g=r+4|0;j=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;if(q<<24>>24>0){g=f[i>>2]|0;i=q<<24>>24;q=j;o=4;k=0;while(1){f[g+(k<<2)>>2]=q;o=o+4|0;k=k+1|0;d=r+o|0;c=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;if((k|0)>=(i|0)){s=c;break}else q=c}}else s=j;f[a+20>>2]=s;e=1;return e|0}function Gf(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;do if(!(Gn(a,f[c+8>>2]|0,g)|0)){if(!(Gn(a,f[c>>2]|0,g)|0)){h=f[a+8>>2]|0;Ya[f[(f[h>>2]|0)+24>>2]&3](h,c,d,e,g);break}if((f[c+16>>2]|0)!=(d|0)?(h=c+20|0,(f[h>>2]|0)!=(d|0)):0){f[c+32>>2]=e;i=c+44|0;if((f[i>>2]|0)==4)break;j=c+52|0;b[j>>0]=0;k=c+53|0;b[k>>0]=0;l=f[a+8>>2]|0;Za[f[(f[l>>2]|0)+20>>2]&3](l,c,d,d,1,g);if(b[k>>0]|0)if(!(b[j>>0]|0)){m=3;n=11}else o=3;else{m=4;n=11}if((n|0)==11){f[h>>2]=d;h=c+40|0;f[h>>2]=(f[h>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0){b[c+54>>0]=1;o=m}else o=m}f[i>>2]=o;break}if((e|0)==1)f[c+32>>2]=1}else Sk(0,c,d,e);while(0);return}function Hf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e+12|0;h=e+8|0;i=e;f[i>>2]=f[b>>2];f[g>>2]=f[i>>2];i=Dc(a,g,h,e+4|0,c)|0;c=f[i>>2]|0;if(c|0){j=c;u=e;return j|0}c=Yk(40)|0;zh(c+16|0,d);zh(c+28|0,d+12|0);d=f[h>>2]|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=d;f[i>>2]=c;d=f[f[a>>2]>>2]|0;if(!d)k=c;else{f[a>>2]=d;k=f[i>>2]|0}Cd(f[a+4>>2]|0,k);k=a+8|0;f[k>>2]=(f[k>>2]|0)+1;j=c;u=e;return j|0}function If(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=0;if(!c){u=e;return}i=a+8|0;j=f[i>>2]|0;k=j<<5;if(k>>>0<c>>>0){f[g>>2]=0;l=g+4|0;f[l>>2]=0;m=g+8|0;f[m>>2]=0;if((c|0)<0)Do(a);n=j<<6;j=c+31&-32;Jg(g,k>>>0<1073741823?(n>>>0<j>>>0?j:n):2147483647);n=f[a>>2]|0;f[a>>2]=f[g>>2];f[g>>2]=n;g=f[h>>2]|0;f[h>>2]=c;f[l>>2]=g;g=f[i>>2]|0;f[i>>2]=f[m>>2];f[m>>2]=g;if(n|0)mp(n);o=a}else{f[h>>2]=c;o=a}a=f[o>>2]|0;o=a;h=a;a=c>>>5;n=a<<2;if(!(b[d>>0]|0)){Dh(h|0,0,n|0)|0;d=c&31;g=o+(a<<2)|0;if(!d){u=e;return}f[g>>2]=f[g>>2]&~(-1>>>(32-d|0));u=e;return}else{Dh(h|0,-1,n|0)|0;n=c&31;c=o+(a<<2)|0;if(!n){u=e;return}f[c>>2]=f[c>>2]|-1>>>(32-n|0);u=e;return}}function Jf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;c=b+8|0;d=f[c>>2]|0;e=f[c+4>>2]|0;c=b+16|0;g=c;i=f[g>>2]|0;j=f[g+4>>2]|0;g=Vl(i|0,j|0,4,0)|0;k=I;if((e|0)<(k|0)|(e|0)==(k|0)&d>>>0<g>>>0){l=0;return l|0}m=f[b>>2]|0;b=m+i|0;n=h[b>>0]|h[b+1>>0]<<8|h[b+2>>0]<<16|h[b+3>>0]<<24;b=c;f[b>>2]=g;f[b+4>>2]=k;k=Vl(i|0,j|0,8,0)|0;j=I;if((e|0)<(j|0)|(e|0)==(j|0)&d>>>0<k>>>0){l=0;return l|0}d=m+g|0;g=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;d=c;f[d>>2]=k;f[d+4>>2]=j;if((n|0)>(g|0)){l=0;return l|0}f[a+12>>2]=n;f[a+16>>2]=g;j=Xl(g|0,((g|0)<0)<<31>>31|0,n|0,((n|0)<0)<<31>>31|0)|0;n=I;if(!(n>>>0<0|(n|0)==0&j>>>0<2147483647)){l=0;return l|0}n=j+1|0;f[a+20>>2]=n;j=(n|0)/2|0;g=a+24|0;f[g>>2]=j;f[a+28>>2]=0-j;if(n&1|0){l=1;return l|0}f[g>>2]=j+-1;l=1;return l|0}function Kf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=(d-e|0)/12|0;h=g+1|0;i=e;j=d;if(h>>>0>357913941)Do(a);d=a+8|0;k=((f[d>>2]|0)-e|0)/12|0;l=k<<1;m=k>>>0<178956970?(l>>>0<h>>>0?h:l):357913941;do if(m)if(m>>>0>357913941){l=ra(8)|0;dn(l,13708);f[l>>2]=4852;va(l|0,1176,105)}else{n=Yk(m*12|0)|0;break}else n=0;while(0);l=n+(g*12|0)|0;h=n+(m*12|0)|0;f[l>>2]=f[b>>2];f[n+(g*12|0)+4>>2]=f[b+4>>2];f[n+(g*12|0)+8>>2]=f[b+8>>2];b=l+12|0;if((j|0)==(i|0))o=l;else{g=j;j=l;while(1){l=g;g=g+-12|0;f[j+-12>>2]=f[g>>2];f[j+-8>>2]=f[l+-8>>2];f[j+-4>>2]=f[l+-4>>2];l=j+-12|0;if((g|0)==(i|0)){o=l;break}else j=l}}f[a>>2]=o;f[c>>2]=b;f[d>>2]=h;if(!e)return;mp(e);return}function Lf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=a+12|0;a:do if((f[e>>2]|0)!=(c|0)){g=f[a>>2]|0;h=a+4|0;i=f[h>>2]|0;if((i|0)!=(g|0)){j=i;while(1){i=j+-12|0;f[h>>2]=i;if((b[i+11>>0]|0)<0){mp(f[i>>2]|0);k=f[h>>2]|0}else k=i;if((k|0)==(g|0))break;else j=k}}f[e>>2]=c;j=f[c+8>>2]|0;if(j|0){i=a+8|0;l=j;j=g;while(1){m=l+8|0;if((j|0)==(f[i>>2]|0))df(a,m);else{zh(j,m);f[h>>2]=(f[h>>2]|0)+12}m=f[l>>2]|0;if(!m)break a;l=m;j=f[h>>2]|0}}}while(0);if((d|0)<0){n=0;return n|0}c=f[a>>2]|0;if((((f[a+4>>2]|0)-c|0)/12|0)>>>0<=d>>>0){n=0;return n|0}a=c+(d*12|0)|0;if((b[a+11>>0]|0)<0){n=f[a>>2]|0;return n|0}else{n=a;return n|0}return 0}function Mf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=u;u=u+16|0;d=c;e=f[(f[a>>2]|0)+8>>2]|0;g=a+8|0;h=a+12|0;i=(f[h>>2]|0)-(f[g>>2]|0)>>2;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;Wa[e&15](a,i,d);i=f[d>>2]|0;f[d>>2]=0;if(!i){k=f[h>>2]|0;l=f[g>>2]|0;m=k-l|0;n=m>>2;o=n+-1|0;u=c;return o|0}d=i+88|0;a=f[d>>2]|0;f[d>>2]=0;if(a|0){d=f[a+8>>2]|0;if(d|0){e=a+12|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;mp(d)}mp(a)}a=f[i+68>>2]|0;if(a|0){d=i+72|0;e=f[d>>2]|0;if((e|0)!=(a|0))f[d>>2]=e+(~((e+-4-a|0)>>>2)<<2);mp(a)}a=i+64|0;e=f[a>>2]|0;f[a>>2]=0;if(e|0){a=f[e>>2]|0;if(a|0){d=e+4|0;if((f[d>>2]|0)!=(a|0))f[d>>2]=a;mp(a)}mp(e)}mp(i);k=f[h>>2]|0;l=f[g>>2]|0;m=k-l|0;n=m>>2;o=n+-1|0;u=c;return o|0}function Nf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=1048576){if((h|0)!=1048576?(e=i+4194304|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else Og(a,1048576-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else Of(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>1048576){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==1048576;return k|0}function Of(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;if(d-g>>3>>>0>=b>>>0){h=b;i=g;do{j=i;f[j>>2]=0;f[j+4>>2]=0;i=(f[e>>2]|0)+8|0;f[e>>2]=i;h=h+-1|0}while((h|0)!=0);return}h=f[a>>2]|0;i=g-h>>3;g=i+b|0;if(g>>>0>536870911)Do(a);j=d-h|0;h=j>>2;d=j>>3>>>0<268435455?(h>>>0<g>>>0?g:h):536870911;do if(d)if(d>>>0>536870911){h=ra(8)|0;dn(h,13708);f[h>>2]=4852;va(h|0,1176,105)}else{k=Yk(d<<3)|0;break}else k=0;while(0);h=k+(i<<3)|0;i=k+(d<<3)|0;d=b;b=h;k=h;do{g=b;f[g>>2]=0;f[g+4>>2]=0;b=k+8|0;k=b;d=d+-1|0}while((d|0)!=0);d=f[a>>2]|0;b=(f[e>>2]|0)-d|0;g=h+(0-(b>>3)<<3)|0;if((b|0)>0)Ef(g|0,d|0,b|0)|0;f[a>>2]=g;f[e>>2]=k;f[c>>2]=i;if(!d)return;mp(d);return}function Pf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;c=u;u=u+16|0;d=c;if(!(Kd(a,b)|0)){e=0;u=c;return e|0}g=b+8|0;i=f[g>>2]|0;j=f[g+4>>2]|0;g=b+16|0;k=g;l=f[k>>2]|0;m=Vl(l|0,f[k+4>>2]|0,4,0)|0;k=I;if((j|0)<(k|0)|(j|0)==(k|0)&i>>>0<m>>>0){e=0;u=c;return e|0}i=(f[b>>2]|0)+l|0;l=h[i>>0]|h[i+1>>0]<<8|h[i+2>>0]<<16|h[i+3>>0]<<24;i=g;f[i>>2]=m;f[i+4>>2]=k;if((l|0)<0){e=0;u=c;return e|0}k=f[a+152>>2]|0;if((l|0)>=(k|0)){e=0;u=c;return e|0}l=a+156|0;f[d>>2]=0;i=a+160|0;m=f[i>>2]|0;g=f[l>>2]|0;j=m-g>>2;n=g;g=m;if(k>>>0<=j>>>0){if(k>>>0<j>>>0?(m=n+(k<<2)|0,(m|0)!=(g|0)):0)f[i>>2]=g+(~((g+-4-m|0)>>>2)<<2)}else $f(l,k-j|0,d);e=zd(a+168|0,b)|0;u=c;return e|0}function Qf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=524288){if((h|0)!=524288?(e=i+2097152|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else Og(a,524288-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else Of(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>524288){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==524288;return k|0}function Rf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=262144){if((h|0)!=262144?(e=i+1048576|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else Og(a,262144-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else Of(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>262144){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0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P>>2]=(f[P>>2]|0)+(1<<N+-1);P=(_(J|0)|0)^31;f[e>>2]=0;Eh(n,P,e);P=(J>>>1)-(f[e>>2]|0)|0;S=J-P|0;c:do if((P|0)==(S|0)){T=P;U=P}else{R=f[o>>2]|0;Q=f[D>>2]|0;do if((Q|0)!=(f[C>>2]|0)){V=(f[Q>>2]&1<<31-R|0)!=0;W=R+1|0;f[o>>2]=W;if((W|0)==32){f[D>>2]=Q+4;f[o>>2]=0;if(V){T=P;U=S;break c}else break}else if(V){T=P;U=S;break c}else break}while(0);T=S;U=P}while(0);P=f[t>>2]|0;S=f[P+(O*12|0)>>2]|0;Q=S+(K<<2)|0;f[Q>>2]=(f[Q>>2]|0)+1;ff(P+(L*12|0)|0,S,f[P+(O*12|0)+4>>2]|0);if(T|0){P=f[x>>2]|0;S=f[z>>2]|0;Q=P-S>>2;R=f[s>>2]|0;V=f[y>>2]|0;if((((Q|0)==0?0:(Q*341|0)+-1|0)|0)==(V+R|0)){nc(g);X=f[s>>2]|0;Y=f[y>>2]|0;Z=f[x>>2]|0;$=f[z>>2]|0}else{X=R;Y=V;Z=P;$=S}S=Y+X|0;if((Z|0)==($|0))aa=0;else aa=(f[$+(((S>>>0)/341|0)<<2)>>2]|0)+(((S>>>0)%341|0)*12|0)|0;f[aa>>2]=T;f[aa+4>>2]=K;f[aa+8>>2]=O;f[y>>2]=(f[y>>2]|0)+1}if(U|0){S=f[x>>2]|0;P=f[z>>2]|0;V=S-P>>2;R=f[s>>2]|0;Q=f[y>>2]|0;if((((V|0)==0?0:(V*341|0)+-1|0)|0)==(Q+R|0)){nc(g);ba=f[s>>2]|0;ca=f[y>>2]|0;da=f[x>>2]|0;ea=f[z>>2]|0}else{ba=R;ca=Q;da=S;ea=P}P=ca+ba|0;if((da|0)==(ea|0))fa=0;else fa=(f[ea+(((P>>>0)/341|0)<<2)>>2]|0)+(((P>>>0)%341|0)*12|0)|0;f[fa>>2]=U;f[fa+4>>2]=K;f[fa+8>>2]=L;f[y>>2]=(f[y>>2]|0)+1}break}P=f[q>>2]|0;f[P>>2]=K;S=f[h>>2]|0;if(S>>>0>1){Q=1;R=S;V=K;while(1){V=(V|0)==(R+-1|0)?0:V+1|0;f[P+(Q<<2)>>2]=V;Q=Q+1|0;W=f[h>>2]|0;if(Q>>>0>=W>>>0){ga=W;break}else R=W}}else ga=S;if(J|0){R=0;Q=ga;while(1){if(!Q)ha=f[w>>2]|0;else{V=f[q>>2]|0;P=f[w>>2]|0;L=f[H>>2]|0;W=0;do{ia=V+(W<<2)|0;f[P+(f[ia>>2]<<2)>>2]=0;ja=f[ia>>2]|0;ka=(f[a>>2]|0)-(f[L+(ja<<2)>>2]|0)|0;do if(ka|0){la=P+(ja<<2)|0;ma=f[m>>2]|0;na=32-ma|0;if((ka|0)>(na|0)){oa=f[j>>2]|0;pa=oa+4|0;if((pa|0)==(f[k>>2]|0)){f[la>>2]=0;break}else{qa=f[oa>>2]<<ma;oa=ka-na|0;f[m>>2]=oa;f[j>>2]=pa;ra=32-oa|0;f[la>>2]=(f[pa>>2]|0)>>>ra|qa>>>(ra-na|0);break}}na=f[j>>2]|0;if((na|0)==(f[k>>2]|0)){f[la>>2]=0;break}f[la>>2]=f[na>>2]<<ma>>>(32-ka|0);ma=(f[m>>2]|0)+ka|0;f[m>>2]=ma;if((ma|0)!=32)break;f[j>>2]=na+4;f[m>>2]=0}while(0);ka=f[ia>>2]|0;ja=P+(ka<<2)|0;f[ja>>2]=f[ja>>2]|f[(f[M>>2]|0)+(ka<<2)>>2];W=W+1|0}while(W>>>0<(f[h>>2]|0)>>>0);ha=P}P=f[ha>>2]|0;f[e>>2]=P;f[p>>2]=f[ha+4>>2];f[r>>2]=f[ha+8>>2];W=f[c>>2]|0;L=W+4|0;V=f[L>>2]|0;if(V>>>0<(f[W+8>>2]|0)>>>0){f[V>>2]=P;f[V+4>>2]=f[p>>2];f[V+8>>2]=f[r>>2];f[L>>2]=V+12}else Kf(W,e);f[v>>2]=(f[v>>2]|0)+1;W=R+1|0;if(W>>>0>=J>>>0)break b;R=W;Q=f[h>>2]|0}}}while(0);G=f[y>>2]|0;if(!G){B=1;break}}}while(0);h=f[z>>2]|0;e=f[s>>2]|0;c=h+(((e>>>0)/341|0)<<2)|0;ha=f[x>>2]|0;a=ha;ga=h;if((ha|0)==(h|0)){sa=0;ta=0}else{fa=(f[y>>2]|0)+e|0;sa=(f[h+(((fa>>>0)/341|0)<<2)>>2]|0)+(((fa>>>0)%341|0)*12|0)|0;ta=(f[c>>2]|0)+(((e>>>0)%341|0)*12|0)|0}e=c;c=ta;d:while(1){ta=c;do{fa=ta;if((sa|0)==(fa|0))break d;ta=fa+12|0}while((ta-(f[e>>2]|0)|0)!=4092);ta=e+4|0;e=ta;c=f[ta>>2]|0}f[y>>2]=0;y=a-ga>>2;if(y>>>0>2){ga=h;do{mp(f[ga>>2]|0);ga=(f[z>>2]|0)+4|0;f[z>>2]=ga;ua=f[x>>2]|0;va=ua-ga>>2}while(va>>>0>2);wa=va;xa=ga;ya=ua}else{wa=y;xa=h;ya=ha}switch(wa|0){case 1:{za=170;Aa=90;break}case 2:{za=341;Aa=90;break}default:{}}if((Aa|0)==90)f[s>>2]=za;if((xa|0)!=(ya|0)){za=xa;do{mp(f[za>>2]|0);za=za+4|0}while((za|0)!=(ya|0));ya=f[z>>2]|0;z=f[x>>2]|0;if((z|0)!=(ya|0))f[x>>2]=z+(~((z+-4-ya|0)>>>2)<<2)}ya=f[g>>2]|0;if(!ya){u=d;return B|0}mp(ya);u=d;return B|0}function xb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0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)>>2]=(m|0)<(o|0)?o:m;r=k}j=j+1|0;s=f[i>>2]|0}while((j|0)<(s|0));if((s|0)>0){s=a+20|0;j=0;do{p=(f[b+(j<<2)>>2]|0)+(f[r+(j<<2)>>2]|0)|0;q=c+(j<<2)|0;f[q>>2]=p;if((p|0)<=(f[l>>2]|0)){if((p|0)<(f[n>>2]|0)){t=(f[s>>2]|0)+p|0;v=18}}else{t=p-(f[s>>2]|0)|0;v=18}if((v|0)==18){v=0;f[q>>2]=t}j=j+1|0}while((j|0)<(f[i>>2]|0))}}j=f[a+48>>2]|0;t=f[a+52>>2]|0;s=Yk(16)|0;f[s>>2]=0;f[s+4>>2]=0;f[s+8>>2]=0;f[s+12>>2]=0;f[h>>2]=0;n=h+4|0;f[n>>2]=0;f[h+8>>2]=0;do if(e)if(e>>>0>1073741823)Do(h);else{l=e<<2;r=Yk(l)|0;f[h>>2]=r;q=r+(e<<2)|0;f[h+8>>2]=q;Dh(r|0,0,l|0)|0;f[n>>2]=q;w=r;break}else w=0;while(0);r=a+56|0;q=f[r>>2]|0;l=f[q+4>>2]|0;p=f[q>>2]|0;k=l-p|0;m=k>>2;a:do if((k|0)>4){o=j+64|0;x=j+28|0;y=(e|0)>0;z=a+16|0;A=a+32|0;B=a+12|0;C=a+20|0;D=e<<2;E=(e|0)==1;if(l-p>>2>>>0>1){F=1;G=p}else{H=q;Do(H)}while(1){I=f[G+(F<<2)>>2]|0;J=(((I>>>0)%3|0|0)==0?2:-1)+I|0;K=J>>>5;L=1<<(J&31);M=(I|0)==-1|(J|0)==-1;N=1;O=0;P=I;b:while(1){Q=N^1;R=O;S=P;while(1){if((S|0)==-1){T=R;v=58;break b}U=f[d+(R*12|0)>>2]|0;if(((f[(f[j>>2]|0)+(S>>>5<<2)>>2]&1<<(S&31)|0)==0?(V=f[(f[(f[o>>2]|0)+12>>2]|0)+(S<<2)>>2]|0,(V|0)!=-1):0)?(W=f[x>>2]|0,Y=f[t>>2]|0,Z=f[Y+(f[W+(V<<2)>>2]<<2)>>2]|0,_=V+1|0,$=f[Y+(f[W+((((_>>>0)%3|0|0)==0?V+-2|0:_)<<2)>>2]<<2)>>2]|0,_=f[Y+(f[W+((((V>>>0)%3|0|0)==0?2:-1)+V<<2)>>2]<<2)>>2]|0,(Z|0)<(F|0)&($|0)<(F|0)&(_|0)<(F|0)):0){V=X(Z,e)|0;Z=X($,e)|0;$=X(_,e)|0;if(y){_=0;do{f[U+(_<<2)>>2]=(f[c+(_+$<<2)>>2]|0)+(f[c+(_+Z<<2)>>2]|0)-(f[c+(_+V<<2)>>2]|0);_=_+1|0}while((_|0)!=(e|0))}_=R+1|0;if((_|0)==4){aa=4;v=38;break b}else ba=_}else ba=R;do if(N){_=S+1|0;V=((_>>>0)%3|0|0)==0?S+-2|0:_;if(((V|0)!=-1?(f[(f[j>>2]|0)+(V>>>5<<2)>>2]&1<<(V&31)|0)==0:0)?(_=f[(f[(f[o>>2]|0)+12>>2]|0)+(V<<2)>>2]|0,V=_+1|0,(_|0)!=-1):0)ca=((V>>>0)%3|0|0)==0?_+-2|0:V;else ca=-1}else{V=(((S>>>0)%3|0|0)==0?2:-1)+S|0;if(((V|0)!=-1?(f[(f[j>>2]|0)+(V>>>5<<2)>>2]&1<<(V&31)|0)==0:0)?(_=f[(f[(f[o>>2]|0)+12>>2]|0)+(V<<2)>>2]|0,(_|0)!=-1):0)if(!((_>>>0)%3|0)){ca=_+2|0;break}else{ca=_+-1|0;break}else ca=-1}while(0);if((ca|0)==(I|0)){T=ba;v=58;break b}if((ca|0)!=-1|Q){R=ba;S=ca}else break}if(M){N=0;O=ba;P=-1;continue}if(f[(f[j>>2]|0)+(K<<2)>>2]&L|0){N=0;O=ba;P=-1;continue}S=f[(f[(f[o>>2]|0)+12>>2]|0)+(J<<2)>>2]|0;if((S|0)==-1){N=0;O=ba;P=-1;continue}if(!((S>>>0)%3|0)){N=0;O=ba;P=S+2|0;continue}else{N=0;O=ba;P=S+-1|0;continue}}if((v|0)==58){v=0;if((T|0)>0){aa=T;v=38}else{da=X(F,e)|0;v=73}}if((v|0)==38){v=0;if(y){Dh(f[h>>2]|0,0,D|0)|0;P=aa+-1|0;O=s+(P<<2)|0;N=a+60+(P*12|0)+4|0;J=a+60+(P*12|0)|0;P=f[h>>2]|0;L=0;K=0;while(1){M=f[O>>2]|0;f[O>>2]=M+1;if((f[N>>2]|0)>>>0<=M>>>0){ea=0;fa=P;break a}if(!(f[(f[J>>2]|0)+(M>>>5<<2)>>2]&1<<(M&31))){M=f[d+(L*12|0)>>2]|0;I=0;do{S=P+(I<<2)|0;f[S>>2]=(f[S>>2]|0)+(f[M+(I<<2)>>2]|0);I=I+1|0}while((I|0)!=(e|0));ga=K+1|0}else ga=K;L=L+1|0;if((L|0)>=(aa|0)){ha=ga;break}else K=ga}}else{K=aa+-1|0;L=s+(K<<2)|0;P=a+60+(K*12|0)|0;J=f[h>>2]|0;N=f[a+60+(K*12|0)+4>>2]|0;K=0;O=0;I=f[L>>2]|0;while(1){M=I;I=I+1|0;f[L>>2]=I;if(N>>>0<=M>>>0){ea=0;fa=J;break a}S=O+((f[(f[P>>2]|0)+(M>>>5<<2)>>2]&1<<(M&31)|0)==0&1)|0;K=K+1|0;if((K|0)>=(aa|0)){ha=S;break}else O=S}}O=X(F,e)|0;if(ha){K=f[h>>2]|0;if(y?(f[K>>2]=(f[K>>2]|0)/(ha|0)|0,!E):0){P=1;do{J=K+(P<<2)|0;f[J>>2]=(f[J>>2]|0)/(ha|0)|0;P=P+1|0}while((P|0)!=(e|0))}P=b+(O<<2)|0;J=c+(O<<2)|0;if((f[i>>2]|0)>0){N=0;do{I=f[K+(N<<2)>>2]|0;L=f[z>>2]|0;if((I|0)>(L|0)){S=f[A>>2]|0;f[S+(N<<2)>>2]=L;ia=S}else{S=f[B>>2]|0;L=f[A>>2]|0;f[L+(N<<2)>>2]=(I|0)<(S|0)?S:I;ia=L}N=N+1|0;ja=f[i>>2]|0}while((N|0)<(ja|0));if((ja|0)>0){N=0;do{K=(f[P+(N<<2)>>2]|0)+(f[ia+(N<<2)>>2]|0)|0;L=J+(N<<2)|0;f[L>>2]=K;do if((K|0)>(f[z>>2]|0)){ka=K-(f[C>>2]|0)|0;v=95}else{if((K|0)>=(f[B>>2]|0))break;ka=(f[C>>2]|0)+K|0;v=95}while(0);if((v|0)==95){v=0;f[L>>2]=ka}N=N+1|0}while((N|0)<(f[i>>2]|0))}}}else{da=O;v=73}}if((v|0)==73?(v=0,N=c+((X(F+-1|0,e)|0)<<2)|0,J=b+(da<<2)|0,P=c+(da<<2)|0,(f[i>>2]|0)>0):0){K=0;do{I=f[N+(K<<2)>>2]|0;S=f[z>>2]|0;if((I|0)>(S|0)){M=f[A>>2]|0;f[M+(K<<2)>>2]=S;la=M}else{M=f[B>>2]|0;S=f[A>>2]|0;f[S+(K<<2)>>2]=(I|0)<(M|0)?M:I;la=S}K=K+1|0;ma=f[i>>2]|0}while((K|0)<(ma|0));if((ma|0)>0){K=0;do{N=(f[J+(K<<2)>>2]|0)+(f[la+(K<<2)>>2]|0)|0;O=P+(K<<2)|0;f[O>>2]=N;if((N|0)<=(f[z>>2]|0)){if((N|0)<(f[B>>2]|0)){na=(f[C>>2]|0)+N|0;v=83}}else{na=N-(f[C>>2]|0)|0;v=83}if((v|0)==83){v=0;f[O>>2]=na}K=K+1|0}while((K|0)<(f[i>>2]|0))}}F=F+1|0;if((F|0)>=(m|0)){v=100;break}K=f[r>>2]|0;G=f[K>>2]|0;if((f[K+4>>2]|0)-G>>2>>>0<=F>>>0){H=K;v=28;break}}if((v|0)==28)Do(H);else if((v|0)==100){ea=1;fa=f[h>>2]|0;break}}else{ea=1;fa=w}while(0);if(fa|0){w=f[n>>2]|0;if((w|0)!=(fa|0))f[n>>2]=w+(~((w+-4-fa|0)>>>2)<<2);mp(fa)}mp(s);s=f[d+36>>2]|0;if(s|0){fa=d+40|0;w=f[fa>>2]|0;if((w|0)!=(s|0))f[fa>>2]=w+(~((w+-4-s|0)>>>2)<<2);mp(s)}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{V=(((P>>>0)%3|0|0)==0?2:-1)+P|0;if((V|0)!=-1?(Y=f[S+(V<<2)>>2]|0,(Y|0)!=-1):0)if(!((Y>>>0)%3|0)){ca=Y+2|0;break}else{ca=Y+-1|0;break}else ca=-1}while(0);if((ca|0)==(H|0)){Q=ba;v=58;break b}if((ca|0)!=-1|N){O=ba;P=ca}else break}if(J){K=0;L=ba;M=-1;continue}P=f[S+(I<<2)>>2]|0;if((P|0)==-1){K=0;L=ba;M=-1;continue}if(!((P>>>0)%3|0)){K=0;L=ba;M=P+2|0;continue}else{K=0;L=ba;M=P+-1|0;continue}}if((v|0)==58){v=0;if((Q|0)>0){aa=Q;v=41}else{da=X(E,e)|0;v=73}}if((v|0)==41){v=0;if(x){Dh(f[h>>2]|0,0,C|0)|0;M=aa+-1|0;L=s+(M<<2)|0;K=a+60+(M*12|0)+4|0;I=a+60+(M*12|0)|0;M=f[h>>2]|0;J=0;H=0;while(1){P=f[L>>2]|0;f[L>>2]=P+1;if((f[K>>2]|0)>>>0<=P>>>0){ea=0;fa=M;break a}if(!(f[(f[I>>2]|0)+(P>>>5<<2)>>2]&1<<(P&31))){P=f[d+(J*12|0)>>2]|0;O=0;do{N=M+(O<<2)|0;f[N>>2]=(f[N>>2]|0)+(f[P+(O<<2)>>2]|0);O=O+1|0}while((O|0)!=(e|0));ga=H+1|0}else ga=H;J=J+1|0;if((J|0)>=(aa|0)){ha=ga;break}else H=ga}}else{H=aa+-1|0;J=s+(H<<2)|0;M=a+60+(H*12|0)|0;I=f[h>>2]|0;K=f[a+60+(H*12|0)+4>>2]|0;H=0;L=0;O=f[J>>2]|0;while(1){P=O;O=O+1|0;f[J>>2]=O;if(K>>>0<=P>>>0){ea=0;fa=I;break a}N=L+((f[(f[M>>2]|0)+(P>>>5<<2)>>2]&1<<(P&31)|0)==0&1)|0;H=H+1|0;if((H|0)>=(aa|0)){ha=N;break}else L=N}}L=X(E,e)|0;if(ha){H=f[h>>2]|0;if(x?(f[H>>2]=(f[H>>2]|0)/(ha|0)|0,!D):0){M=1;do{I=H+(M<<2)|0;f[I>>2]=(f[I>>2]|0)/(ha|0)|0;M=M+1|0}while((M|0)!=(e|0))}M=b+(L<<2)|0;I=c+(L<<2)|0;if((f[i>>2]|0)>0){K=0;do{O=f[H+(K<<2)>>2]|0;J=f[y>>2]|0;if((O|0)>(J|0)){N=f[z>>2]|0;f[N+(K<<2)>>2]=J;ia=N}else{N=f[A>>2]|0;J=f[z>>2]|0;f[J+(K<<2)>>2]=(O|0)<(N|0)?N:O;ia=J}K=K+1|0;ja=f[i>>2]|0}while((K|0)<(ja|0));if((ja|0)>0){K=0;do{H=(f[M+(K<<2)>>2]|0)+(f[ia+(K<<2)>>2]|0)|0;J=I+(K<<2)|0;f[J>>2]=H;do if((H|0)>(f[y>>2]|0)){ka=H-(f[B>>2]|0)|0;v=95}else{if((H|0)>=(f[A>>2]|0))break;ka=(f[B>>2]|0)+H|0;v=95}while(0);if((v|0)==95){v=0;f[J>>2]=ka}K=K+1|0}while((K|0)<(f[i>>2]|0))}}}else{da=L;v=73}}if((v|0)==73?(v=0,K=c+((X(E+-1|0,e)|0)<<2)|0,I=b+(da<<2)|0,M=c+(da<<2)|0,(f[i>>2]|0)>0):0){H=0;do{O=f[K+(H<<2)>>2]|0;N=f[y>>2]|0;if((O|0)>(N|0)){P=f[z>>2]|0;f[P+(H<<2)>>2]=N;la=P}else{P=f[A>>2]|0;N=f[z>>2]|0;f[N+(H<<2)>>2]=(O|0)<(P|0)?P:O;la=N}H=H+1|0;ma=f[i>>2]|0}while((H|0)<(ma|0));if((ma|0)>0){H=0;do{K=(f[I+(H<<2)>>2]|0)+(f[la+(H<<2)>>2]|0)|0;L=M+(H<<2)|0;f[L>>2]=K;if((K|0)<=(f[y>>2]|0)){if((K|0)<(f[A>>2]|0)){na=(f[B>>2]|0)+K|0;v=83}}else{na=K-(f[B>>2]|0)|0;v=83}if((v|0)==83){v=0;f[L>>2]=na}H=H+1|0}while((H|0)<(f[i>>2]|0))}}E=E+1|0;if((E|0)>=(m|0)){v=100;break}H=f[r>>2]|0;F=f[H>>2]|0;if((f[H+4>>2]|0)-F>>2>>>0<=E>>>0){G=H;v=28;break}}if((v|0)==28)Do(G);else if((v|0)==100){ea=1;fa=f[h>>2]|0;break}}else{ea=1;fa=w}while(0);if(fa|0){w=f[n>>2]|0;if((w|0)!=(fa|0))f[n>>2]=w+(~((w+-4-fa|0)>>>2)<<2);mp(fa)}mp(s);s=f[d+36>>2]|0;if(s|0){fa=d+40|0;w=f[fa>>2]|0;if((w|0)!=(s|0))f[fa>>2]=w+(~((w+-4-s|0)>>>2)<<2);mp(s)}s=f[d+24>>2]|0;if(s|0){w=d+28|0;fa=f[w>>2]|0;if((fa|0)!=(s|0))f[w>>2]=fa+(~((fa+-4-s|0)>>>2)<<2);mp(s)}s=f[d+12>>2]|0;if(s|0){fa=d+16|0;w=f[fa>>2]|0;if((w|0)!=(s|0))f[fa>>2]=w+(~((w+-4-s|0)>>>2)<<2);mp(s)}s=f[d>>2]|0;if(!s){u=g;return ea|0}w=d+4|0;d=f[w>>2]|0;if((d|0)!=(s|0))f[w>>2]=d+(~((d+-4-s|0)>>>2)<<2);mp(s);u=g;return ea|0}function zb(a,c,d,e,g,i){a=a|0;c=+c;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0,D=0.0,E=0,F=0,G=0,H=0.0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0.0,ga=0.0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0;j=u;u=u+560|0;k=j+8|0;l=j;m=j+524|0;n=m;o=j+512|0;f[l>>2]=0;p=o+12|0;Em(c)|0;if((I|0)<0){q=-c;r=1;s=14257}else{q=c;r=(g&2049|0)!=0&1;s=(g&2048|0)==0?((g&1|0)==0?14258:14263):14260}Em(q)|0;do if(0==0&(I&2146435072|0)==2146435072){t=(i&32|0)!=0;v=r+3|0;Wi(a,32,d,v,g&-65537);qn(a,s,r);qn(a,q!=q|0.0!=0.0?(t?14284:14288):t?14276:14280,3);Wi(a,32,d,v,g^8192);w=v}else{c=+So(q,l)*2.0;v=c!=0.0;if(v)f[l>>2]=(f[l>>2]|0)+-1;t=i|32;if((t|0)==97){x=i&32;y=(x|0)==0?s:s+9|0;z=r|2;A=12-e|0;do if(!(e>>>0>11|(A|0)==0)){B=8.0;C=A;do{C=C+-1|0;B=B*16.0}while((C|0)!=0);if((b[y>>0]|0)==45){D=-(B+(-c-B));break}else{D=c+B-B;break}}else D=c;while(0);A=f[l>>2]|0;C=(A|0)<0?0-A|0:A;E=ai(C,((C|0)<0)<<31>>31,p)|0;if((E|0)==(p|0)){C=o+11|0;b[C>>0]=48;F=C}else F=E;b[F+-1>>0]=(A>>31&2)+43;A=F+-2|0;b[A>>0]=i+15;E=(e|0)<1;C=(g&8|0)==0;G=m;H=D;while(1){J=~~H;K=G+1|0;b[G>>0]=x|h[14292+J>>0];H=(H-+(J|0))*16.0;if((K-n|0)==1?!(C&(E&H==0.0)):0){b[K>>0]=46;L=G+2|0}else L=K;if(!(H!=0.0))break;else G=L}G=L;if((e|0)!=0?(-2-n+G|0)<(e|0):0){M=G-n|0;N=e+2|0}else{E=G-n|0;M=E;N=E}E=p-A|0;G=E+z+N|0;Wi(a,32,d,G,g);qn(a,y,z);Wi(a,48,d,G,g^65536);qn(a,m,M);Wi(a,48,N-M|0,0,0);qn(a,A,E);Wi(a,32,d,G,g^8192);w=G;break}G=(e|0)<0?6:e;if(v){E=(f[l>>2]|0)+-28|0;f[l>>2]=E;O=c*268435456.0;P=E}else{O=c;P=f[l>>2]|0}E=(P|0)<0?k:k+288|0;C=E;H=O;do{x=~~H>>>0;f[C>>2]=x;C=C+4|0;H=(H-+(x>>>0))*1.0e9}while(H!=0.0);if((P|0)>0){v=E;A=C;z=P;while(1){y=(z|0)<29?z:29;x=A+-4|0;if(x>>>0>=v>>>0){K=x;x=0;do{J=Sl(f[K>>2]|0,0,y|0)|0;Q=Vl(J|0,I|0,x|0,0)|0;J=I;R=Wk(Q|0,J|0,1e9,0)|0;f[K>>2]=R;x=Mn(Q|0,J|0,1e9,0)|0;K=K+-4|0}while(K>>>0>=v>>>0);if(x){K=v+-4|0;f[K>>2]=x;S=K}else S=v}else S=v;K=A;while(1){if(K>>>0<=S>>>0)break;J=K+-4|0;if(!(f[J>>2]|0))K=J;else break}x=(f[l>>2]|0)-y|0;f[l>>2]=x;if((x|0)>0){v=S;A=K;z=x}else{T=S;U=K;V=x;break}}}else{T=E;U=C;V=P}if((V|0)<0){z=((G+25|0)/9|0)+1|0;A=(t|0)==102;v=T;x=U;J=V;while(1){Q=0-J|0;R=(Q|0)<9?Q:9;if(v>>>0<x>>>0){Q=(1<<R)+-1|0;W=1e9>>>R;Y=0;Z=v;do{_=f[Z>>2]|0;f[Z>>2]=(_>>>R)+Y;Y=X(_&Q,W)|0;Z=Z+4|0}while(Z>>>0<x>>>0);Z=(f[v>>2]|0)==0?v+4|0:v;if(!Y){$=Z;aa=x}else{f[x>>2]=Y;$=Z;aa=x+4|0}}else{$=(f[v>>2]|0)==0?v+4|0:v;aa=x}Z=A?E:$;W=(aa-Z>>2|0)>(z|0)?Z+(z<<2)|0:aa;J=(f[l>>2]|0)+R|0;f[l>>2]=J;if((J|0)>=0){ba=$;ca=W;break}else{v=$;x=W}}}else{ba=T;ca=U}x=E;if(ba>>>0<ca>>>0){v=(x-ba>>2)*9|0;J=f[ba>>2]|0;if(J>>>0<10)da=v;else{z=v;v=10;while(1){v=v*10|0;A=z+1|0;if(J>>>0<v>>>0){da=A;break}else z=A}}}else da=0;z=(t|0)==103;v=(G|0)!=0;J=G-((t|0)!=102?da:0)+((v&z)<<31>>31)|0;if((J|0)<(((ca-x>>2)*9|0)+-9|0)){A=J+9216|0;J=E+4+(((A|0)/9|0)+-1024<<2)|0;C=(A|0)%9|0;if((C|0)<8){A=C;C=10;while(1){W=C*10|0;if((A|0)<7){A=A+1|0;C=W}else{ea=W;break}}}else ea=10;C=f[J>>2]|0;A=(C>>>0)%(ea>>>0)|0;t=(J+4|0)==(ca|0);if(!(t&(A|0)==0)){B=(((C>>>0)/(ea>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;W=(ea|0)/2|0;H=A>>>0<W>>>0?.5:t&(A|0)==(W|0)?1.0:1.5;if(!r){fa=H;ga=B}else{W=(b[s>>0]|0)==45;fa=W?-H:H;ga=W?-B:B}W=C-A|0;f[J>>2]=W;if(ga+fa!=ga){A=W+ea|0;f[J>>2]=A;if(A>>>0>999999999){A=ba;W=J;while(1){C=W+-4|0;f[W>>2]=0;if(C>>>0<A>>>0){t=A+-4|0;f[t>>2]=0;ha=t}else ha=A;t=(f[C>>2]|0)+1|0;f[C>>2]=t;if(t>>>0>999999999){A=ha;W=C}else{ia=ha;ja=C;break}}}else{ia=ba;ja=J}W=(x-ia>>2)*9|0;A=f[ia>>2]|0;if(A>>>0<10){ka=ja;la=W;ma=ia}else{C=W;W=10;while(1){W=W*10|0;t=C+1|0;if(A>>>0<W>>>0){ka=ja;la=t;ma=ia;break}else C=t}}}else{ka=J;la=da;ma=ba}}else{ka=J;la=da;ma=ba}C=ka+4|0;na=la;oa=ca>>>0>C>>>0?C:ca;pa=ma}else{na=da;oa=ca;pa=ba}C=oa;while(1){if(C>>>0<=pa>>>0){qa=0;break}W=C+-4|0;if(!(f[W>>2]|0))C=W;else{qa=1;break}}J=0-na|0;do if(z){W=G+((v^1)&1)|0;if((W|0)>(na|0)&(na|0)>-5){ra=i+-1|0;sa=W+-1-na|0}else{ra=i+-2|0;sa=W+-1|0}W=g&8;if(!W){if(qa?(A=f[C+-4>>2]|0,(A|0)!=0):0)if(!((A>>>0)%10|0)){t=0;Z=10;while(1){Z=Z*10|0;Q=t+1|0;if((A>>>0)%(Z>>>0)|0|0){ta=Q;break}else t=Q}}else ta=0;else ta=9;t=((C-x>>2)*9|0)+-9|0;if((ra|32|0)==102){Z=t-ta|0;A=(Z|0)>0?Z:0;ua=ra;va=(sa|0)<(A|0)?sa:A;wa=0;break}else{A=t+na-ta|0;t=(A|0)>0?A:0;ua=ra;va=(sa|0)<(t|0)?sa:t;wa=0;break}}else{ua=ra;va=sa;wa=W}}else{ua=i;va=G;wa=g&8}while(0);G=va|wa;x=(G|0)!=0&1;v=(ua|32|0)==102;if(v){xa=0;ya=(na|0)>0?na:0}else{z=(na|0)<0?J:na;t=ai(z,((z|0)<0)<<31>>31,p)|0;z=p;if((z-t|0)<2){A=t;while(1){Z=A+-1|0;b[Z>>0]=48;if((z-Z|0)<2)A=Z;else{za=Z;break}}}else za=t;b[za+-1>>0]=(na>>31&2)+43;A=za+-2|0;b[A>>0]=ua;xa=A;ya=z-A|0}A=r+1+va+x+ya|0;Wi(a,32,d,A,g);qn(a,s,r);Wi(a,48,d,A,g^65536);if(v){J=pa>>>0>E>>>0?E:pa;Z=m+9|0;R=Z;Y=m+8|0;Q=J;do{K=ai(f[Q>>2]|0,0,Z)|0;if((Q|0)==(J|0))if((K|0)==(Z|0)){b[Y>>0]=48;Aa=Y}else Aa=K;else if(K>>>0>m>>>0){Dh(m|0,48,K-n|0)|0;y=K;while(1){_=y+-1|0;if(_>>>0>m>>>0)y=_;else{Aa=_;break}}}else Aa=K;qn(a,Aa,R-Aa|0);Q=Q+4|0}while(Q>>>0<=E>>>0);if(G|0)qn(a,14308,1);if(Q>>>0<C>>>0&(va|0)>0){E=va;R=Q;while(1){Y=ai(f[R>>2]|0,0,Z)|0;if(Y>>>0>m>>>0){Dh(m|0,48,Y-n|0)|0;J=Y;while(1){v=J+-1|0;if(v>>>0>m>>>0)J=v;else{Ba=v;break}}}else Ba=Y;qn(a,Ba,(E|0)<9?E:9);R=R+4|0;J=E+-9|0;if(!(R>>>0<C>>>0&(E|0)>9)){Ca=J;break}else E=J}}else Ca=va;Wi(a,48,Ca+9|0,9,0)}else{E=qa?C:pa+4|0;if((va|0)>-1){R=m+9|0;Z=(wa|0)==0;Q=R;G=0-n|0;J=m+8|0;K=va;v=pa;while(1){x=ai(f[v>>2]|0,0,R)|0;if((x|0)==(R|0)){b[J>>0]=48;Da=J}else Da=x;do if((v|0)==(pa|0)){x=Da+1|0;qn(a,Da,1);if(Z&(K|0)<1){Ea=x;break}qn(a,14308,1);Ea=x}else{if(Da>>>0<=m>>>0){Ea=Da;break}Dh(m|0,48,Da+G|0)|0;x=Da;while(1){z=x+-1|0;if(z>>>0>m>>>0)x=z;else{Ea=z;break}}}while(0);Y=Q-Ea|0;qn(a,Ea,(K|0)>(Y|0)?Y:K);x=K-Y|0;v=v+4|0;if(!(v>>>0<E>>>0&(x|0)>-1)){Fa=x;break}else K=x}}else Fa=va;Wi(a,48,Fa+18|0,18,0);qn(a,xa,p-xa|0)}Wi(a,32,d,A,g^8192);w=A}while(0);u=j;return ((w|0)<(d|0)?d:w)|0}function Ab(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0;c=u;u=u+48|0;d=c+36|0;e=c+24|0;g=c+12|0;h=c;i=a+4|0;j=f[(f[i>>2]|0)+44>>2]|0;k=a+8|0;l=f[k>>2]|0;m=((f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y=f[i>>2]|0;G=f[y+44>>2]|0;R=f[x>>2]|0;S=y;T=G;U=f[G+100>>2]|0;V=f[G+96>>2]|0}I=S;J=T;K=S;L=R;M=V;N=U}f[L+(H*12|0)>>2]=F;f[L+(H*12|0)+4>>2]=f[q>>2];f[L+(H*12|0)+8>>2]=f[s>>2];if(t>>>0>=((N-M|0)/12|0)>>>0){r=I;break}else{v=J;j=M;n=I;w=K;l=N}}}f[(f[r+4>>2]|0)+80>>2]=b;W=1;u=c;return W|0}f[e>>2]=0;b=e+4|0;f[b>>2]=0;f[e+8>>2]=0;r=f[k>>2]|0;N=(f[r+4>>2]|0)-(f[r>>2]|0)|0;l=N>>2;f[g>>2]=0;K=g+4|0;f[K>>2]=0;f[g+8>>2]=0;do if(l|0)if(l>>>0>1073741823)Do(g);else{w=Yk(N)|0;f[g>>2]=w;I=w+(l<<2)|0;f[g+8>>2]=I;Dh(w|0,0,N|0)|0;f[K>>2]=I;break}while(0);a:do if(((f[r+28>>2]|0)-(f[r+24>>2]|0)|0)>0){N=a+120|0;l=e+8|0;I=0;w=r;while(1){n=f[(f[w+24>>2]|0)+(I<<2)>>2]|0;b:do if((n|0)!=-1){c:do if((f[(f[N>>2]|0)+(I>>>5<<2)>>2]&1<<(I&31)|0)==0?(M=f[m>>2]|0,j=f[p>>2]|0,J=j,(M|0)!=(j|0)):0){v=(((n>>>0)%3|0|0)==0?2:-1)+n|0;t=(M-j|0)/144|0;if((v|0)==-1){j=0;while(1){M=f[(f[f[J+(j*144|0)+68>>2]>>2]|0)+(n<<2)>>2]|0;if(1<<(M&31)&f[(f[J+(j*144|0)+16>>2]|0)+(M>>>5<<2)>>2]|0){X=0;break a}j=j+1|0;if(j>>>0>=t>>>0){Y=n;break c}}}j=w+12|0;M=0;while(1){s=f[(f[f[J+(M*144|0)+68>>2]>>2]|0)+(n<<2)>>2]|0;if(1<<(s&31)&f[(f[J+(M*144|0)+16>>2]|0)+(s>>>5<<2)>>2]|0){s=f[J+(M*144|0)+32>>2]|0;L=f[s+(n<<2)>>2]|0;q=f[j>>2]|0;F=f[q+(v<<2)>>2]|0;do if((F|0)!=-1)if(!((F>>>0)%3|0)){Z=F+2|0;break}else{Z=F+-1|0;break}else Z=-1;while(0);if((Z|0)!=(n|0)){F=Z;while(1){if((F|0)==-1){X=0;break a}if((f[s+(F<<2)>>2]|0)!=(L|0)){Y=F;break c}U=(((F>>>0)%3|0|0)==0?2:-1)+F|0;do if((U|0)!=-1){V=f[q+(U<<2)>>2]|0;if((V|0)==-1){_=-1;break}if(!((V>>>0)%3|0)){_=V+2|0;break}else{_=V+-1|0;break}}else _=-1;while(0);if((_|0)==(n|0))break;else F=_}}}M=M+1|0;if(M>>>0>=t>>>0){Y=n;break}}}else Y=n;while(0);t=f[b>>2]|0;f[(f[g>>2]|0)+(Y<<2)>>2]=t-(f[e>>2]|0)>>2;f[d>>2]=Y;M=t;if((f[l>>2]|0)>>>0>M>>>0){f[M>>2]=Y;f[b>>2]=M+4;$=w}else{dh(e,d);$=f[k>>2]|0}if((((Y|0)!=-1?(M=(((Y>>>0)%3|0|0)==0?2:-1)+Y|0,(M|0)!=-1):0)?(t=f[(f[$+12>>2]|0)+(M<<2)>>2]|0,(t|0)!=-1):0)?(M=t+(((t>>>0)%3|0|0)==0?2:-1)|0,(M|0)!=-1&(M|0)!=(Y|0)):0){t=Y;v=M;M=$;while(1){j=f[m>>2]|0;J=f[p>>2]|0;F=J;d:do if((j|0)==(J|0))B=66;else{q=(j-J|0)/144|0;L=0;while(1){s=f[F+(L*144|0)+32>>2]|0;L=L+1|0;if((f[s+(v<<2)>>2]|0)!=(f[s+(t<<2)>>2]|0))break;if(L>>>0>=q>>>0){B=66;break d}}q=f[b>>2]|0;f[(f[g>>2]|0)+(v<<2)>>2]=q-(f[e>>2]|0)>>2;f[d>>2]=v;L=q;if((f[l>>2]|0)>>>0>L>>>0){f[L>>2]=v;f[b>>2]=L+4;aa=M}else{dh(e,d);aa=f[k>>2]|0}ba=aa}while(0);if((B|0)==66){B=0;F=f[g>>2]|0;f[F+(v<<2)>>2]=f[F+(t<<2)>>2];ba=M}if((v|0)==-1){ca=ba;break b}F=(((v>>>0)%3|0|0)==0?2:-1)+v|0;if((F|0)==-1){ca=ba;break b}J=f[(f[ba+12>>2]|0)+(F<<2)>>2]|0;if((J|0)==-1){ca=ba;break b}F=J+(((J>>>0)%3|0|0)==0?2:-1)|0;if((F|0)!=-1&(F|0)!=(Y|0)){J=v;v=F;M=ba;t=J}else{ca=ba;break}}}else ca=$}else ca=w;while(0);I=I+1|0;if((I|0)>=((f[ca+28>>2]|0)-(f[ca+24>>2]|0)>>2|0)){B=27;break}else w=ca}}else B=27;while(0);if((B|0)==27){B=f[i>>2]|0;ca=f[B+44>>2]|0;$=f[ca+100>>2]|0;ba=f[ca+96>>2]|0;if(($|0)==(ba|0))da=B;else{Y=h+4|0;aa=h+8|0;k=0;p=ca;ca=ba;ba=$;$=B;m=B;while(1){f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;B=(f[g>>2]|0)+(k*3<<2)|0;f[h>>2]=f[B>>2];f[h+4>>2]=f[B+4>>2];f[h+8>>2]=f[B+8>>2];B=p+96|0;_=p+100|0;Z=(ba-ca|0)/12|0;r=ca;a=k;k=k+1|0;if(a>>>0<Z>>>0){ea=r;fa=ca;ga=ba;ha=$;ia=p;ja=m}else{w=ba;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;if(k>>>0<=Z>>>0)if(k>>>0<Z>>>0?(I=r+(k*12|0)|0,(I|0)!=(w|0)):0){l=w+(~(((w+-12-I|0)>>>0)/12|0)*12|0)|0;f[_>>2]=l;ka=r;la=m;ma=p;na=l;oa=ca}else{ka=r;la=m;ma=p;na=ba;oa=ca}else{rf(B,k-Z|0,d);Z=f[i>>2]|0;r=f[Z+44>>2]|0;ka=f[B>>2]|0;la=Z;ma=r;na=f[r+100>>2]|0;oa=f[r+96>>2]|0}ea=ka;fa=oa;ga=na;ha=la;ia=ma;ja=la}f[ea+(a*12|0)>>2]=f[h>>2];f[ea+(a*12|0)+4>>2]=f[Y>>2];f[ea+(a*12|0)+8>>2]=f[aa>>2];if(k>>>0>=((ga-fa|0)/12|0)>>>0){da=ha;break}else{p=ia;ca=fa;ba=ga;$=ha;m=ja}}}f[(f[da+4>>2]|0)+80>>2]=(f[b>>2]|0)-(f[e>>2]|0)>>2;X=1}da=f[g>>2]|0;if(da|0){g=f[K>>2]|0;if((g|0)!=(da|0))f[K>>2]=g+(~((g+-4-da|0)>>>2)<<2);mp(da)}da=f[e>>2]|0;if(da|0){e=f[b>>2]|0;if((e|0)!=(da|0))f[b>>2]=e+(~((e+-4-da|0)>>>2)<<2);mp(da)}W=X;u=c;return W|0}function Bb(a,c,e,g,h){a=a|0;c=c|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0;i=u;u=u+64|0;j=i+16|0;k=i;l=i+24|0;m=i+8|0;n=i+20|0;f[j>>2]=c;c=(a|0)!=0;o=l+40|0;q=o;r=l+39|0;l=m+4|0;s=0;t=0;v=0;a:while(1){do if((t|0)>-1)if((s|0)>(2147483647-t|0)){w=tp()|0;f[w>>2]=75;x=-1;break}else{x=s+t|0;break}else x=t;while(0);w=f[j>>2]|0;y=b[w>>0]|0;if(!(y<<24>>24)){z=88;break}else{A=y;B=w}b:while(1){switch(A<<24>>24){case 37:{C=B;D=B;z=9;break b;break}case 0:{E=B;break b;break}default:{}}y=B+1|0;f[j>>2]=y;A=b[y>>0]|0;B=y}c:do if((z|0)==9)while(1){z=0;if((b[D+1>>0]|0)!=37){E=C;break c}y=C+1|0;D=D+2|0;f[j>>2]=D;if((b[D>>0]|0)!=37){E=y;break}else{C=y;z=9}}while(0);y=E-w|0;if(c)qn(a,w,y);if(y|0){s=y;t=x;continue}y=(Xo(b[(f[j>>2]|0)+1>>0]|0)|0)==0;F=f[j>>2]|0;if(!y?(b[F+2>>0]|0)==36:0){G=(b[F+1>>0]|0)+-48|0;H=1;J=3}else{G=-1;H=v;J=1}y=F+J|0;f[j>>2]=y;F=b[y>>0]|0;K=(F<<24>>24)+-32|0;if(K>>>0>31|(1<<K&75913|0)==0){L=0;M=F;N=y}else{K=0;O=F;F=y;while(1){y=1<<(O<<24>>24)+-32|K;P=F+1|0;f[j>>2]=P;Q=b[P>>0]|0;R=(Q<<24>>24)+-32|0;if(R>>>0>31|(1<<R&75913|0)==0){L=y;M=Q;N=P;break}else{K=y;O=Q;F=P}}}if(M<<24>>24==42){if((Xo(b[N+1>>0]|0)|0)!=0?(F=f[j>>2]|0,(b[F+2>>0]|0)==36):0){O=F+1|0;f[h+((b[O>>0]|0)+-48<<2)>>2]=10;S=f[g+((b[O>>0]|0)+-48<<3)>>2]|0;T=1;U=F+3|0}else{if(H|0){V=-1;break}if(c){F=(f[e>>2]|0)+(4-1)&~(4-1);O=f[F>>2]|0;f[e>>2]=F+4;W=O}else W=0;S=W;T=0;U=(f[j>>2]|0)+1|0}f[j>>2]=U;O=(S|0)<0;X=O?0-S|0:S;Y=O?L|8192:L;Z=T;_=U}else{O=Qj(j)|0;if((O|0)<0){V=-1;break}X=O;Y=L;Z=H;_=f[j>>2]|0}do if((b[_>>0]|0)==46){if((b[_+1>>0]|0)!=42){f[j>>2]=_+1;O=Qj(j)|0;$=O;aa=f[j>>2]|0;break}if(Xo(b[_+2>>0]|0)|0?(O=f[j>>2]|0,(b[O+3>>0]|0)==36):0){F=O+2|0;f[h+((b[F>>0]|0)+-48<<2)>>2]=10;K=f[g+((b[F>>0]|0)+-48<<3)>>2]|0;F=O+4|0;f[j>>2]=F;$=K;aa=F;break}if(Z|0){V=-1;break a}if(c){F=(f[e>>2]|0)+(4-1)&~(4-1);K=f[F>>2]|0;f[e>>2]=F+4;ba=K}else ba=0;K=(f[j>>2]|0)+2|0;f[j>>2]=K;$=ba;aa=K}else{$=-1;aa=_}while(0);K=0;F=aa;while(1){if(((b[F>>0]|0)+-65|0)>>>0>57){V=-1;break a}O=F;F=F+1|0;f[j>>2]=F;ca=b[(b[O>>0]|0)+-65+(13776+(K*58|0))>>0]|0;da=ca&255;if((da+-1|0)>>>0>=8)break;else K=da}if(!(ca<<24>>24)){V=-1;break}O=(G|0)>-1;do if(ca<<24>>24==19)if(O){V=-1;break a}else z=50;else{if(O){f[h+(G<<2)>>2]=da;P=g+(G<<3)|0;Q=f[P+4>>2]|0;y=k;f[y>>2]=f[P>>2];f[y+4>>2]=Q;z=50;break}if(!c){V=0;break a}Vd(k,da,e);ea=f[j>>2]|0}while(0);if((z|0)==50){z=0;if(c)ea=F;else{s=0;t=x;v=Z;continue}}O=b[ea+-1>>0]|0;Q=(K|0)!=0&(O&15|0)==3?O&-33:O;O=Y&-65537;y=(Y&8192|0)==0?Y:O;d:do switch(Q|0){case 110:{switch((K&255)<<24>>24){case 0:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 1:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 2:{P=f[k>>2]|0;f[P>>2]=x;f[P+4>>2]=((x|0)<0)<<31>>31;s=0;t=x;v=Z;continue a;break}case 3:{d[f[k>>2]>>1]=x;s=0;t=x;v=Z;continue a;break}case 4:{b[f[k>>2]>>0]=x;s=0;t=x;v=Z;continue a;break}case 6:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 7:{P=f[k>>2]|0;f[P>>2]=x;f[P+4>>2]=((x|0)<0)<<31>>31;s=0;t=x;v=Z;continue a;break}default:{s=0;t=x;v=Z;continue a}}break}case 112:{fa=120;ga=$>>>0>8?$:8;ha=y|8;z=62;break}case 88:case 120:{fa=Q;ga=$;ha=y;z=62;break}case 111:{P=k;R=f[P>>2]|0;ia=f[P+4>>2]|0;P=Uj(R,ia,o)|0;ja=q-P|0;ka=P;la=0;ma=14240;na=(y&8|0)==0|($|0)>(ja|0)?$:ja+1|0;oa=y;pa=R;qa=ia;z=68;break}case 105:case 100:{ia=k;R=f[ia>>2]|0;ja=f[ia+4>>2]|0;if((ja|0)<0){ia=Xl(0,0,R|0,ja|0)|0;P=I;ra=k;f[ra>>2]=ia;f[ra+4>>2]=P;sa=1;ta=14240;ua=ia;va=P;z=67;break d}else{sa=(y&2049|0)!=0&1;ta=(y&2048|0)==0?((y&1|0)==0?14240:14242):14241;ua=R;va=ja;z=67;break d}break}case 117:{ja=k;sa=0;ta=14240;ua=f[ja>>2]|0;va=f[ja+4>>2]|0;z=67;break}case 99:{b[r>>0]=f[k>>2];wa=r;xa=0;ya=14240;za=o;Aa=1;Ba=O;break}case 109:{ja=tp()|0;Ca=vn(f[ja>>2]|0)|0;z=72;break}case 115:{ja=f[k>>2]|0;Ca=ja|0?ja:14250;z=72;break}case 67:{f[m>>2]=f[k>>2];f[l>>2]=0;f[k>>2]=m;Da=-1;Ea=m;z=76;break}case 83:{ja=f[k>>2]|0;if(!$){Wi(a,32,X,0,y);Fa=0;z=85}else{Da=$;Ea=ja;z=76}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{s=zb(a,+p[k>>3],X,$,y,Q)|0;t=x;v=Z;continue a;break}default:{wa=w;xa=0;ya=14240;za=o;Aa=$;Ba=y}}while(0);e:do if((z|0)==62){z=0;w=k;Q=f[w>>2]|0;K=f[w+4>>2]|0;w=Cj(Q,K,o,fa&32)|0;F=(ha&8|0)==0|(Q|0)==0&(K|0)==0;ka=w;la=F?0:2;ma=F?14240:14240+(fa>>4)|0;na=ga;oa=ha;pa=Q;qa=K;z=68}else if((z|0)==67){z=0;ka=ai(ua,va,o)|0;la=sa;ma=ta;na=$;oa=y;pa=ua;qa=va;z=68}else if((z|0)==72){z=0;K=Ve(Ca,0,$)|0;Q=(K|0)==0;wa=Ca;xa=0;ya=14240;za=Q?Ca+$|0:K;Aa=Q?$:K-Ca|0;Ba=O}else if((z|0)==76){z=0;K=Ea;Q=0;F=0;while(1){w=f[K>>2]|0;if(!w){Ga=Q;Ha=F;break}ja=fn(n,w)|0;if((ja|0)<0|ja>>>0>(Da-Q|0)>>>0){Ga=Q;Ha=ja;break}w=ja+Q|0;if(Da>>>0>w>>>0){K=K+4|0;Q=w;F=ja}else{Ga=w;Ha=ja;break}}if((Ha|0)<0){V=-1;break a}Wi(a,32,X,Ga,y);if(!Ga){Fa=0;z=85}else{F=Ea;Q=0;while(1){K=f[F>>2]|0;if(!K){Fa=Ga;z=85;break e}ja=fn(n,K)|0;Q=ja+Q|0;if((Q|0)>(Ga|0)){Fa=Ga;z=85;break e}qn(a,n,ja);if(Q>>>0>=Ga>>>0){Fa=Ga;z=85;break}else F=F+4|0}}}while(0);if((z|0)==68){z=0;O=(pa|0)!=0|(qa|0)!=0;F=(na|0)!=0|O;Q=q-ka+((O^1)&1)|0;wa=F?ka:o;xa=la;ya=ma;za=o;Aa=F?((na|0)>(Q|0)?na:Q):na;Ba=(na|0)>-1?oa&-65537:oa}else if((z|0)==85){z=0;Wi(a,32,X,Fa,y^8192);s=(X|0)>(Fa|0)?X:Fa;t=x;v=Z;continue}Q=za-wa|0;F=(Aa|0)<(Q|0)?Q:Aa;O=F+xa|0;ja=(X|0)<(O|0)?O:X;Wi(a,32,ja,O,Ba);qn(a,ya,xa);Wi(a,48,ja,O,Ba^65536);Wi(a,48,F,Q,0);qn(a,wa,Q);Wi(a,32,ja,O,Ba^8192);s=ja;t=x;v=Z}f:do if((z|0)==88)if(!a)if(v){Z=1;while(1){t=f[h+(Z<<2)>>2]|0;if(!t){Ia=Z;break}Vd(g+(Z<<3)|0,t,e);t=Z+1|0;if((Z|0)<9)Z=t;else{Ia=t;break}}if((Ia|0)<10){Z=Ia;while(1){if(f[h+(Z<<2)>>2]|0){V=-1;break f}if((Z|0)<9)Z=Z+1|0;else{V=1;break}}}else V=1}else V=0;else V=x;while(0);u=i;return V|0}function Cb(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;c=u;u=u+32|0;d=c+20|0;e=c+16|0;g=c+4|0;i=c;j=a+36|0;k=a+37|0;l=a+32|0;m=f[l>>2]|0;do if((((h[j>>0]|0)<<8|(h[k>>0]|0))&65535)<514){n=m+8|0;o=f[n>>2]|0;p=f[n+4>>2]|0;n=m+16|0;q=n;r=f[q>>2]|0;s=f[q+4>>2]|0;q=Vl(r|0,s|0,4,0)|0;t=I;if((p|0)<(t|0)|(p|0)==(t|0)&o>>>0<q>>>0){v=0;u=c;return v|0}w=(f[m>>2]|0)+r|0;x=h[w>>0]|h[w+1>>0]<<8|h[w+2>>0]<<16|h[w+3>>0]<<24;f[d>>2]=x;w=n;f[w>>2]=q;f[w+4>>2]=t;t=Vl(r|0,s|0,8,0)|0;s=I;if((p|0)<(s|0)|(p|0)==(s|0)&o>>>0<t>>>0){v=0;u=c;return v|0}else{o=(f[m>>2]|0)+q|0;f[e>>2]=h[o>>0]|h[o+1>>0]<<8|h[o+2>>0]<<16|h[o+3>>0]<<24;o=n;f[o>>2]=t;f[o+4>>2]=s;y=x;break}}else{if(!(Nh(d,m)|0)){v=0;u=c;return v|0}if(Nh(e,f[l>>2]|0)|0){y=f[d>>2]|0;break}else{v=0;u=c;return v|0}}while(0);if(y>>>0>1431655765){v=0;u=c;return v|0}m=f[e>>2]|0;x=al(y|0,0,3,0)|0;s=I;if(s>>>0<0|(s|0)==0&x>>>0<m>>>0){v=0;u=c;return v|0}x=f[l>>2]|0;s=x+8|0;o=f[s+4>>2]|0;t=x+16|0;n=t;q=f[n>>2]|0;p=f[n+4>>2]|0;if(!((o|0)>(p|0)|((o|0)==(p|0)?(f[s>>2]|0)>>>0>q>>>0:0))){v=0;u=c;return v|0}s=b[(f[x>>2]|0)+q>>0]|0;o=Vl(q|0,p|0,1,0)|0;n=I;r=t;f[r>>2]=o;f[r+4>>2]=n;a:do if(!(s<<24>>24)){if(!(se(a,y)|0)){v=0;u=c;return v|0}}else{if(m>>>0<256){if(!y)break;r=a+44|0;t=g+4|0;w=g+8|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;z=x+8|0;A=f[z>>2]|0;B=f[z+4>>2]|0;b:do if((B|0)>(n|0)|(B|0)==(n|0)&A>>>0>o>>>0){z=0;C=x;D=o;E=n;F=B;G=A;H=y;while(1){J=C+16|0;K=f[C>>2]|0;L=b[K+D>>0]|0;M=Vl(D|0,E|0,1,0)|0;N=I;O=J;f[O>>2]=M;f[O+4>>2]=N;f[g>>2]=L&255;if(!((F|0)>(N|0)|(F|0)==(N|0)&G>>>0>M>>>0))break b;N=b[K+M>>0]|0;M=Vl(D|0,E|0,2,0)|0;L=I;O=J;f[O>>2]=M;f[O+4>>2]=L;f[t>>2]=N&255;if(!((F|0)>(L|0)|(F|0)==(L|0)&G>>>0>M>>>0))break b;L=b[K+M>>0]|0;M=Vl(D|0,E|0,3,0)|0;K=J;f[K>>2]=M;f[K+4>>2]=I;f[w>>2]=L&255;L=f[r>>2]|0;K=L+100|0;M=f[K>>2]|0;if((M|0)==(f[L+104>>2]|0)){Lg(L+96|0,g);P=f[d>>2]|0}else{f[M>>2]=f[g>>2];f[M+4>>2]=f[g+4>>2];f[M+8>>2]=f[g+8>>2];f[K>>2]=(f[K>>2]|0)+12;P=H}z=z+1|0;if(z>>>0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]=0;f[g+4>>2]=0;f[g+8>>2]=0;Q=E+8|0;L=f[Q>>2]|0;M=f[Q+4>>2]|0;C=Vl(F|0,K|0,2,0)|0;z=I;if((M|0)<(z|0)|(M|0)==(z|0)&L>>>0<C>>>0)break;else J=U}}while(0);v=0;u=c;return v|0}r=a+44|0;if((f[(f[r>>2]|0)+80>>2]|0)>>>0<2097152?(((h[j>>0]|0)<<8|(h[k>>0]|0))&65535)>513:0){if(!y)break;t=g+4|0;w=g+8|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;d:do if(Nh(i,x)|0){B=0;do{f[g>>2]=f[i>>2];if(!(Nh(i,f[l>>2]|0)|0))break d;f[t>>2]=f[i>>2];if(!(Nh(i,f[l>>2]|0)|0))break d;f[w>>2]=f[i>>2];H=f[r>>2]|0;D=H+100|0;A=f[D>>2]|0;if((A|0)==(f[H+104>>2]|0))Lg(H+96|0,g);else{f[A>>2]=f[g>>2];f[A+4>>2]=f[g+4>>2];f[A+8>>2]=f[g+8>>2];f[D>>2]=(f[D>>2]|0)+12}B=B+1|0;if(B>>>0>=(f[d>>2]|0)>>>0)break a;D=f[l>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0}while(Nh(i,D)|0)}while(0);v=0;u=c;return v|0}if(y|0){w=g+4|0;t=g+8|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;B=x+8|0;D=f[B>>2]|0;A=f[B+4>>2]|0;B=Vl(q|0,p|0,5,0)|0;H=I;e:do if(!((A|0)<(H|0)|(A|0)==(H|0)&D>>>0<B>>>0)){J=0;C=x;L=o;z=B;M=H;K=n;F=A;E=D;G=y;while(1){Q=C+16|0;S=f[C>>2]|0;R=S+L|0;T=h[R>>0]|h[R+1>>0]<<8|h[R+2>>0]<<16|h[R+3>>0]<<24;R=Q;f[R>>2]=z;f[R+4>>2]=M;f[g>>2]=T;T=Vl(L|0,K|0,8,0)|0;R=I;if((F|0)<(R|0)|(F|0)==(R|0)&E>>>0<T>>>0)break e;N=S+z|0;O=h[N>>0]|h[N+1>>0]<<8|h[N+2>>0]<<16|h[N+3>>0]<<24;N=Q;f[N>>2]=T;f[N+4>>2]=R;f[w>>2]=O;O=Vl(L|0,K|0,12,0)|0;R=I;if((F|0)<(R|0)|(F|0)==(R|0)&E>>>0<O>>>0)break e;N=S+T|0;T=h[N>>0]|h[N+1>>0]<<8|h[N+2>>0]<<16|h[N+3>>0]<<24;N=Q;f[N>>2]=O;f[N+4>>2]=R;f[t>>2]=T;T=f[r>>2]|0;R=T+100|0;N=f[R>>2]|0;if((N|0)==(f[T+104>>2]|0)){Lg(T+96|0,g);V=f[d>>2]|0}else{f[N>>2]=f[g>>2];f[N+4>>2]=f[g+4>>2];f[N+8>>2]=f[g+8>>2];f[R>>2]=(f[R>>2]|0)+12;V=G}J=J+1|0;if(J>>>0>=V>>>0)break a;C=f[l>>2]|0;R=C+16|0;L=f[R>>2]|0;K=f[R+4>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;R=C+8|0;E=f[R>>2]|0;F=f[R+4>>2]|0;z=Vl(L|0,K|0,4,0)|0;M=I;if((F|0)<(M|0)|(F|0)==(M|0)&E>>>0<z>>>0)break;else G=V}}while(0);v=0;u=c;return v|0}}while(0);f[(f[a+4>>2]|0)+80>>2]=f[e>>2];v=1;u=c;return v|0}function Db(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=Na,D=0,E=0.0,F=0,G=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vl(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){m=b[o>>0]|0;q=g+(r<<3)|0;f[q>>2]=m;f[q+4>>2]=((m|0)<0)<<31>>31;r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(o<<3)|0,0,(e<<24>>24)-o<<3|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vl(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=g+(t<<3)|0;f[k>>2]=h[m>>0];f[k+4>>2]=0;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(m<<3)|0,0,(e<<24>>24)-m<<3|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Vl(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){o=d[l>>1]|0;k=g+(q<<3)|0;f[k>>2]=o;f[k+4>>2]=((o|0)<0)<<31>>31;q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(l<<3)|0,0,(e<<24>>24)-l<<3|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=al(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Vl(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){m=g+(k<<3)|0;f[m>>2]=j[r>>1];f[m+4>>2]=0;k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(r<<3)|0,0,(e<<24>>24)-r<<3|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=al(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Vl(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){l=f[t>>2]|0;m=g+(o<<3)|0;f[m>>2]=l;f[m+4>>2]=((l|0)<0)<<31>>31;o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(t<<3)|0,0,(e<<24>>24)-t<<3|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=al(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Vl(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){r=g+(m<<3)|0;f[r>>2]=f[q>>2];f[r+4>>2]=0;m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(q<<3)|0,0,(e<<24>>24)-q<<3|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Vl(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){t=k;r=f[t+4>>2]|0;z=g+(l<<3)|0;f[z>>2]=f[t>>2];f[z+4>>2]=r;l=l+1|0;r=b[q>>0]|0;if((l|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){A=r;break}else k=k+8|0}}else A=m;k=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(k<<3)|0,0,(e<<24>>24)-k<<3|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;r=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;z=Vl(r|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+z|0;z=0;while(1){q=o;r=f[q+4>>2]|0;t=g+(z<<3)|0;f[t>>2]=f[q>>2];f[t+4>>2]=r;z=z+1|0;r=b[k>>0]|0;if((z|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){B=r;break}else o=o+8|0}}else B=l;o=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(o<<3)|0,0,(e<<24>>24)-o<<3|0)|0;i=1;return i|0}case 9:{o=a+24|0;z=b[o>>0]|0;if((z<<24>>24>e<<24>>24?e:z)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;r=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vl(r|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){C=$(n[m>>2]);k=+K(+C)>=1.0?(+C>0.0?~~+Y(+J(+C/4294967296.0),4294967295.0)>>>0:~~+W((+C-+(~~+C>>>0))/4294967296.0)>>>0):0;r=g+(t<<3)|0;f[r>>2]=~~+C>>>0;f[r+4>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){D=k;break}else m=m+4|0}}else D=z;m=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(m<<3)|0,0,(e<<24>>24)-m<<3|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;r=Vl(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+r|0;r=0;while(1){E=+p[l>>3];o=+K(E)>=1.0?(E>0.0?~~+Y(+J(E/4294967296.0),4294967295.0)>>>0:~~+W((E-+(~~E>>>0))/4294967296.0)>>>0):0;k=g+(r<<3)|0;f[k>>2]=~~E>>>0;f[k+4>>2]=o;r=r+1|0;o=b[m>>0]|0;if((r|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){F=o;break}else l=l+8|0}}else F=t;l=F<<24>>24;if(F<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(l<<3)|0,0,(e<<24>>24)-l<<3|0)|0;i=1;return i|0}case 11:{l=a+24|0;r=b[l>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){m=f[f[a>>2]>>2]|0;z=a+40|0;o=al(f[z>>2]|0,f[z+4>>2]|0,f[c>>2]|0,0)|0;z=a+48|0;k=Vl(o|0,I|0,f[z>>2]|0,f[z+4>>2]|0)|0;z=m+k|0;k=0;while(1){m=g+(k<<3)|0;f[m>>2]=h[z>>0];f[m+4>>2]=0;k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){G=m;break}else z=z+1|0}}else G=r;z=G<<24>>24;if(G<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(z<<3)|0,0,(e<<24>>24)-z<<3|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function Eb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;c=u;u=u+16|0;d=c+8|0;e=c;if((f[a+92>>2]|0)==(f[a+88>>2]|0)){u=c;return 1}g=a+52|0;h=f[g>>2]|0;if((h|0)==(f[a+56>>2]|0)){dh(a+48|0,b);i=b}else{f[h>>2]=f[b>>2];f[g>>2]=h+4;i=b}b=a+84|0;f[b>>2]=0;h=a+4|0;g=f[h>>2]|0;j=f[i>>2]|0;k=j+1|0;if((j|0)!=-1){l=((k>>>0)%3|0|0)==0?j+-2|0:k;if((l|0)==-1)m=-1;else m=f[(f[g>>2]|0)+(l<<2)>>2]|0;l=(((j>>>0)%3|0|0)==0?2:-1)+j|0;if((l|0)==-1){n=m;o=-1}else{n=m;o=f[(f[g>>2]|0)+(l<<2)>>2]|0}}else{n=-1;o=-1}l=a+36|0;g=f[l>>2]|0;m=g+(n>>>5<<2)|0;j=1<<(n&31);k=f[m>>2]|0;if(!(k&j)){f[m>>2]=k|j;j=f[i>>2]|0;k=j+1|0;if((j|0)==-1)p=-1;else p=((k>>>0)%3|0|0)==0?j+-2|0:k;f[e>>2]=p;k=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((p>>>0)/3|0)*12|0)+(((p>>>0)%3|0)<<2)>>2]|0;p=f[a+20>>2]|0;f[d>>2]=k;j=f[p+4>>2]|0;p=j+4|0;m=f[p>>2]|0;if((m|0)==(f[j+8>>2]|0))dh(j,d);else{f[m>>2]=k;f[p>>2]=m+4}m=a+12|0;p=f[m>>2]|0;k=p+4|0;j=f[k>>2]|0;if((j|0)==(f[p+8>>2]|0)){dh(p,e);q=f[m>>2]|0}else{f[j>>2]=f[e>>2];f[k>>2]=j+4;q=p}p=q+24|0;f[(f[q+12>>2]|0)+(n<<2)>>2]=f[p>>2];f[p>>2]=(f[p>>2]|0)+1;r=f[l>>2]|0}else r=g;g=r+(o>>>5<<2)|0;r=1<<(o&31);p=f[g>>2]|0;if(!(p&r)){f[g>>2]=p|r;r=f[i>>2]|0;do if((r|0)!=-1)if(!((r>>>0)%3|0)){s=r+2|0;break}else{s=r+-1|0;break}else s=-1;while(0);f[e>>2]=s;r=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((s>>>0)/3|0)*12|0)+(((s>>>0)%3|0)<<2)>>2]|0;s=f[a+20>>2]|0;f[d>>2]=r;p=f[s+4>>2]|0;s=p+4|0;g=f[s>>2]|0;if((g|0)==(f[p+8>>2]|0))dh(p,d);else{f[g>>2]=r;f[s>>2]=g+4}g=a+12|0;s=f[g>>2]|0;r=s+4|0;p=f[r>>2]|0;if((p|0)==(f[s+8>>2]|0)){dh(s,e);t=f[g>>2]|0}else{f[p>>2]=f[e>>2];f[r>>2]=p+4;t=s}s=t+24|0;f[(f[t+12>>2]|0)+(o<<2)>>2]=f[s>>2];f[s>>2]=(f[s>>2]|0)+1}s=f[i>>2]|0;if((s|0)==-1)v=-1;else v=f[(f[f[h>>2]>>2]|0)+(s<<2)>>2]|0;s=(f[l>>2]|0)+(v>>>5<<2)|0;o=1<<(v&31);t=f[s>>2]|0;if(!(o&t)){f[s>>2]=t|o;o=f[i>>2]|0;f[e>>2]=o;t=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((o>>>0)/3|0)*12|0)+(((o>>>0)%3|0)<<2)>>2]|0;o=f[a+20>>2]|0;f[d>>2]=t;s=f[o+4>>2]|0;o=s+4|0;p=f[o>>2]|0;if((p|0)==(f[s+8>>2]|0))dh(s,d);else{f[p>>2]=t;f[o>>2]=p+4}p=a+12|0;o=f[p>>2]|0;t=o+4|0;s=f[t>>2]|0;if((s|0)==(f[o+8>>2]|0)){dh(o,e);w=f[p>>2]|0}else{f[s>>2]=f[e>>2];f[t>>2]=s+4;w=o}o=w+24|0;f[(f[w+12>>2]|0)+(v<<2)>>2]=f[o>>2];f[o>>2]=(f[o>>2]|0)+1}o=f[b>>2]|0;a:do if((o|0)<3){v=a+24|0;w=a+16|0;s=a+20|0;t=a+12|0;p=a+88|0;r=o;while(1){g=r;while(1){x=a+48+(g*12|0)+4|0;y=f[x>>2]|0;if((f[a+48+(g*12|0)>>2]|0)!=(y|0))break;if((g|0)<2)g=g+1|0;else break a}n=y+-4|0;q=f[n>>2]|0;f[x>>2]=n;f[b>>2]=g;f[i>>2]=q;if((q|0)==-1)break;n=(q>>>0)/3|0;j=f[v>>2]|0;do if(!(f[j+(n>>>5<<2)>>2]&1<<(n&31))){k=q;m=j;b:while(1){z=(k>>>0)/3|0;A=m+(z>>>5<<2)|0;f[A>>2]=1<<(z&31)|f[A>>2];A=f[i>>2]|0;if((A|0)==-1)B=-1;else B=f[(f[f[h>>2]>>2]|0)+(A<<2)>>2]|0;z=(f[l>>2]|0)+(B>>>5<<2)|0;C=1<<(B&31);D=f[z>>2]|0;if(!(C&D)){f[z>>2]=D|C;C=f[i>>2]|0;f[e>>2]=C;D=f[(f[(f[w>>2]|0)+96>>2]|0)+(((C>>>0)/3|0)*12|0)+(((C>>>0)%3|0)<<2)>>2]|0;C=f[s>>2]|0;f[d>>2]=D;z=f[C+4>>2]|0;C=z+4|0;E=f[C>>2]|0;if((E|0)==(f[z+8>>2]|0))dh(z,d);else{f[E>>2]=D;f[C>>2]=E+4}E=f[t>>2]|0;C=E+4|0;D=f[C>>2]|0;if((D|0)==(f[E+8>>2]|0)){dh(E,e);F=f[t>>2]|0}else{f[D>>2]=f[e>>2];f[C>>2]=D+4;F=E}E=F+24|0;f[(f[F+12>>2]|0)+(B<<2)>>2]=f[E>>2];f[E>>2]=(f[E>>2]|0)+1;G=f[i>>2]|0}else G=A;A=f[h>>2]|0;if((G|0)==-1){H=93;break}E=G+1|0;D=((E>>>0)%3|0|0)==0?G+-2|0:E;if((D|0)==-1)I=-1;else I=f[(f[A+12>>2]|0)+(D<<2)>>2]|0;D=(((G>>>0)%3|0|0)==0?2:-1)+G|0;if((D|0)==-1)J=-1;else J=f[(f[A+12>>2]|0)+(D<<2)>>2]|0;D=(I|0)==-1;E=D?-1:(I>>>0)/3|0;C=(J|0)==-1;z=C?-1:(J>>>0)/3|0;if(D)K=1;else K=(f[(f[v>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)!=0;do if(C)if(K){H=93;break b}else H=82;else{if(f[(f[v>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)if(K){H=93;break b}else{H=82;break}E=f[(f[A>>2]|0)+(J<<2)>>2]|0;if(!(1<<(E&31)&f[(f[l>>2]|0)+(E>>>5<<2)>>2])){L=(f[p>>2]|0)+(E<<2)|0;E=f[L>>2]|0;f[L>>2]=E+1;M=(E|0)>0?1:2}else M=0;if(K?(M|0)<=(f[b>>2]|0):0){N=J;break}f[d>>2]=J;E=a+48+(M*12|0)+4|0;L=f[E>>2]|0;if((L|0)==(f[a+48+(M*12|0)+8>>2]|0))dh(a+48+(M*12|0)|0,d);else{f[L>>2]=J;f[E>>2]=L+4}if((f[b>>2]|0)>(M|0))f[b>>2]=M;if(K){H=93;break b}else H=82}while(0);if((H|0)==82){H=0;if(D)O=-1;else O=f[(f[f[h>>2]>>2]|0)+(I<<2)>>2]|0;if(!(1<<(O&31)&f[(f[l>>2]|0)+(O>>>5<<2)>>2])){A=(f[p>>2]|0)+(O<<2)|0;z=f[A>>2]|0;f[A>>2]=z+1;P=(z|0)>0?1:2}else P=0;if((P|0)>(f[b>>2]|0))break;else N=I}f[i>>2]=N;k=N;m=f[v>>2]|0}if((H|0)==93){H=0;Q=f[b>>2]|0;break}f[d>>2]=I;m=a+48+(P*12|0)+4|0;k=f[m>>2]|0;if((k|0)==(f[a+48+(P*12|0)+8>>2]|0))dh(a+48+(P*12|0)|0,d);else{f[k>>2]=I;f[m>>2]=k+4}k=f[b>>2]|0;if((k|0)>(P|0)){f[b>>2]=P;R=P}else R=k;Q=R}else Q=g;while(0);if((Q|0)<3)r=Q;else break a}u=c;return 1}while(0);f[i>>2]=-1;u=c;return 1}function Fb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{j=a+24|0;k=b[j>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;m=a+40|0;o=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;q=Vl(o|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=l+q|0;q=0;while(1){d[g+(q<<1)>>1]=b[m>>0]|0;q=q+1|0;l=b[j>>0]|0;if((q|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){r=l;break}else m=m+1|0}}else r=k;m=r<<24>>24;if(r<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(m<<1)|0,0,(e<<24>>24)-m<<1|0)|0;i=1;return i|0}case 2:{m=a+24|0;q=b[m>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){j=f[f[a>>2]>>2]|0;l=a+40|0;o=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;s=Vl(o|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=j+s|0;s=0;while(1){d[g+(s<<1)>>1]=h[l>>0]|0;s=s+1|0;j=b[m>>0]|0;if((s|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){t=j;break}else l=l+1|0}}else t=q;l=t<<24>>24;if(t<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(l<<1)|0,0,(e<<24>>24)-l<<1|0)|0;i=1;return i|0}case 3:{l=a+24|0;s=b[l>>0]|0;if((s<<24>>24>e<<24>>24?e:s)<<24>>24>0){m=f[f[a>>2]>>2]|0;k=a+40|0;j=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;o=Vl(j|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=m+o|0;o=0;while(1){d[g+(o<<1)>>1]=d[k>>1]|0;o=o+1|0;m=b[l>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){u=m;break}else k=k+2|0}}else u=s;k=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(k<<1)|0,0,(e<<24>>24)-k<<1|0)|0;i=1;return i|0}case 4:{k=a+24|0;o=b[k>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){l=f[f[a>>2]>>2]|0;q=a+40|0;m=al(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;j=Vl(m|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=l+j|0;j=0;while(1){d[g+(j<<1)>>1]=d[q>>1]|0;j=j+1|0;l=b[k>>0]|0;if((j|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){v=l;break}else q=q+2|0}}else v=o;q=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(q<<1)|0,0,(e<<24>>24)-q<<1|0)|0;i=1;return i|0}case 5:{q=a+24|0;j=b[q>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){k=f[f[a>>2]>>2]|0;s=a+40|0;l=al(f[s>>2]|0,f[s+4>>2]|0,f[c>>2]|0,0)|0;s=a+48|0;m=Vl(l|0,I|0,f[s>>2]|0,f[s+4>>2]|0)|0;s=k+m|0;m=0;while(1){d[g+(m<<1)>>1]=f[s>>2];m=m+1|0;k=b[q>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){w=k;break}else s=s+4|0}}else w=j;s=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(s<<1)|0,0,(e<<24>>24)-s<<1|0)|0;i=1;return i|0}case 6:{s=a+24|0;m=b[s>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;k=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;l=Vl(k|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+l|0;l=0;while(1){d[g+(l<<1)>>1]=f[o>>2];l=l+1|0;q=b[s>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){x=q;break}else o=o+4|0}}else x=m;o=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(o<<1)|0,0,(e<<24>>24)-o<<1|0)|0;i=1;return i|0}case 7:{o=a+24|0;l=b[o>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){s=f[f[a>>2]>>2]|0;j=a+40|0;q=al(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;k=Vl(q|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=s+k|0;k=0;while(1){d[g+(k<<1)>>1]=f[j>>2];k=k+1|0;s=b[o>>0]|0;if((k|0)>=((s<<24>>24>e<<24>>24?e:s)<<24>>24|0)){y=s;break}else j=j+8|0}}else y=l;j=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(j<<1)|0,0,(e<<24>>24)-j<<1|0)|0;i=1;return i|0}case 8:{j=a+24|0;k=b[j>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){o=f[f[a>>2]>>2]|0;m=a+40|0;s=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;q=Vl(s|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=o+q|0;q=0;while(1){d[g+(q<<1)>>1]=f[m>>2];q=q+1|0;o=b[j>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){z=o;break}else m=m+8|0}}else z=k;m=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(m<<1)|0,0,(e<<24>>24)-m<<1|0)|0;i=1;return i|0}case 9:{m=a+24|0;q=b[m>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){j=f[f[a>>2]>>2]|0;l=a+40|0;o=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;s=Vl(o|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=j+s|0;s=0;while(1){j=~~$(n[l>>2])&65535;d[g+(s<<1)>>1]=j;s=s+1|0;j=b[m>>0]|0;if((s|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){A=j;break}else l=l+4|0}}else A=q;l=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(l<<1)|0,0,(e<<24>>24)-l<<1|0)|0;i=1;return i|0}case 10:{l=a+24|0;s=b[l>>0]|0;if((s<<24>>24>e<<24>>24?e:s)<<24>>24>0){m=f[f[a>>2]>>2]|0;k=a+40|0;j=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;o=Vl(j|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=m+o|0;o=0;while(1){d[g+(o<<1)>>1]=~~+p[k>>3];o=o+1|0;m=b[l>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){B=m;break}else k=k+8|0}}else B=s;k=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(k<<1)|0,0,(e<<24>>24)-k<<1|0)|0;i=1;return i|0}case 11:{k=a+24|0;o=b[k>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){l=f[f[a>>2]>>2]|0;q=a+40|0;m=al(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;j=Vl(m|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=l+j|0;j=0;while(1){d[g+(j<<1)>>1]=h[q>>0]|0;j=j+1|0;l=b[k>>0]|0;if((j|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){C=l;break}else q=q+1|0}}else C=o;q=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(q<<1)|0,0,(e<<24>>24)-q<<1|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function Gb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{j=a+24|0;k=b[j>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;m=a+40|0;o=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;q=Vl(o|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=l+q|0;q=0;while(1){d[g+(q<<1)>>1]=b[m>>0]|0;q=q+1|0;l=b[j>>0]|0;if((q|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){r=l;break}else m=m+1|0}}else r=k;m=r<<24>>24;if(r<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(m<<1)|0,0,(e<<24>>24)-m<<1|0)|0;i=1;return i|0}case 2:{m=a+24|0;q=b[m>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){j=f[f[a>>2]>>2]|0;l=a+40|0;o=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;s=Vl(o|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=j+s|0;s=0;while(1){d[g+(s<<1)>>1]=h[l>>0]|0;s=s+1|0;j=b[m>>0]|0;if((s|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){t=j;break}else l=l+1|0}}else t=q;l=t<<24>>24;if(t<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(l<<1)|0,0,(e<<24>>24)-l<<1|0)|0;i=1;return i|0}case 3:{l=a+24|0;s=b[l>>0]|0;if((s<<24>>24>e<<24>>24?e:s)<<24>>24>0){m=f[f[a>>2]>>2]|0;k=a+40|0;j=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;o=Vl(j|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=m+o|0;o=0;while(1){d[g+(o<<1)>>1]=d[k>>1]|0;o=o+1|0;m=b[l>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){u=m;break}else k=k+2|0}}else u=s;k=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(k<<1)|0,0,(e<<24>>24)-k<<1|0)|0;i=1;return i|0}case 4:{k=a+24|0;o=b[k>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){l=f[f[a>>2]>>2]|0;q=a+40|0;m=al(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;j=Vl(m|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=l+j|0;j=0;while(1){d[g+(j<<1)>>1]=d[q>>1]|0;j=j+1|0;l=b[k>>0]|0;if((j|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){v=l;break}else q=q+2|0}}else v=o;q=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(q<<1)|0,0,(e<<24>>24)-q<<1|0)|0;i=1;return i|0}case 5:{q=a+24|0;j=b[q>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){k=f[f[a>>2]>>2]|0;s=a+40|0;l=al(f[s>>2]|0,f[s+4>>2]|0,f[c>>2]|0,0)|0;s=a+48|0;m=Vl(l|0,I|0,f[s>>2]|0,f[s+4>>2]|0)|0;s=k+m|0;m=0;while(1){d[g+(m<<1)>>1]=f[s>>2];m=m+1|0;k=b[q>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){w=k;break}else s=s+4|0}}else w=j;s=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(s<<1)|0,0,(e<<24>>24)-s<<1|0)|0;i=1;return i|0}case 6:{s=a+24|0;m=b[s>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;k=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;l=Vl(k|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+l|0;l=0;while(1){d[g+(l<<1)>>1]=f[o>>2];l=l+1|0;q=b[s>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){x=q;break}else o=o+4|0}}else x=m;o=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(o<<1)|0,0,(e<<24>>24)-o<<1|0)|0;i=1;return i|0}case 7:{o=a+24|0;l=b[o>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){s=f[f[a>>2]>>2]|0;j=a+40|0;q=al(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;k=Vl(q|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=s+k|0;k=0;while(1){d[g+(k<<1)>>1]=f[j>>2];k=k+1|0;s=b[o>>0]|0;if((k|0)>=((s<<24>>24>e<<24>>24?e:s)<<24>>24|0)){y=s;break}else j=j+8|0}}else y=l;j=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(j<<1)|0,0,(e<<24>>24)-j<<1|0)|0;i=1;return i|0}case 8:{j=a+24|0;k=b[j>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){o=f[f[a>>2]>>2]|0;m=a+40|0;s=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;q=Vl(s|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=o+q|0;q=0;while(1){d[g+(q<<1)>>1]=f[m>>2];q=q+1|0;o=b[j>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){z=o;break}else m=m+8|0}}else z=k;m=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(m<<1)|0,0,(e<<24>>24)-m<<1|0)|0;i=1;return i|0}case 9:{m=a+24|0;q=b[m>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){j=f[f[a>>2]>>2]|0;l=a+40|0;o=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;s=Vl(o|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=j+s|0;s=0;while(1){j=~~$(n[l>>2]);d[g+(s<<1)>>1]=j;s=s+1|0;j=b[m>>0]|0;if((s|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){A=j;break}else l=l+4|0}}else A=q;l=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(l<<1)|0,0,(e<<24>>24)-l<<1|0)|0;i=1;return i|0}case 10:{l=a+24|0;s=b[l>>0]|0;if((s<<24>>24>e<<24>>24?e:s)<<24>>24>0){m=f[f[a>>2]>>2]|0;k=a+40|0;j=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;o=Vl(j|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=m+o|0;o=0;while(1){d[g+(o<<1)>>1]=~~+p[k>>3];o=o+1|0;m=b[l>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){B=m;break}else k=k+8|0}}else B=s;k=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(k<<1)|0,0,(e<<24>>24)-k<<1|0)|0;i=1;return i|0}case 11:{k=a+24|0;o=b[k>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){l=f[f[a>>2]>>2]|0;q=a+40|0;m=al(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;j=Vl(m|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=l+j|0;j=0;while(1){d[g+(j<<1)>>1]=h[q>>0]|0;j=j+1|0;l=b[k>>0]|0;if((j|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){C=l;break}else q=q+1|0}}else C=o;q=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(q<<1)|0,0,(e<<24>>24)-q<<1|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function Hb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vl(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){f[g+(r<<2)>>2]=b[o>>0];r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vl(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){f[g+(t<<2)>>2]=h[m>>0];t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Vl(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=d[l>>1];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=al(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Vl(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=j[r>>1];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=al(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Vl(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){f[g+(o<<2)>>2]=f[t>>2];o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(t<<2)|0,0,(e<<24>>24)-t<<2|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=al(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Vl(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){f[g+(m<<2)>>2]=f[q>>2];m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(q<<2)|0,0,(e<<24>>24)-q<<2|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Vl(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){f[g+(l<<2)>>2]=f[k>>2];l=l+1|0;t=b[q>>0]|0;if((l|0)>=((t<<24>>24>e<<24>>24?e:t)<<24>>24|0)){z=t;break}else k=k+8|0}}else z=m;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;t=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vl(t|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+r|0;r=0;while(1){f[g+(r<<2)>>2]=f[o>>2];r=r+1|0;q=b[k>>0]|0;if((r|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else o=o+8|0}}else A=l;o=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 9:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vl(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=~~$(n[m>>2])>>>0;f[g+(t<<2)>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else m=m+4|0}}else B=r;m=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Vl(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=~~+p[l>>3]>>>0;q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){C=o;break}else l=l+8|0}}else C=t;l=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 11:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=al(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Vl(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=h[r>>0];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){D=m;break}else r=r+1|0}}else D=q;r=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function Ib(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vl(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){f[g+(r<<2)>>2]=b[o>>0];r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vl(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){f[g+(t<<2)>>2]=h[m>>0];t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Vl(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=d[l>>1];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=al(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Vl(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=j[r>>1];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=al(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Vl(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){f[g+(o<<2)>>2]=f[t>>2];o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(t<<2)|0,0,(e<<24>>24)-t<<2|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=al(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Vl(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){f[g+(m<<2)>>2]=f[q>>2];m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(q<<2)|0,0,(e<<24>>24)-q<<2|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Vl(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){f[g+(l<<2)>>2]=f[k>>2];l=l+1|0;t=b[q>>0]|0;if((l|0)>=((t<<24>>24>e<<24>>24?e:t)<<24>>24|0)){z=t;break}else k=k+8|0}}else z=m;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;t=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vl(t|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+r|0;r=0;while(1){f[g+(r<<2)>>2]=f[o>>2];r=r+1|0;q=b[k>>0]|0;if((r|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else o=o+8|0}}else A=l;o=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 9:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vl(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=~~$(n[m>>2]);f[g+(t<<2)>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else m=m+4|0}}else B=r;m=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Vl(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=~~+p[l>>3];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){C=o;break}else l=l+8|0}}else C=t;l=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 11:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=al(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Vl(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=h[r>>0];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){D=m;break}else r=r+1|0}}else D=q;r=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function Jb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;c=u;u=u+16|0;d=c+8|0;e=c;g=f[b>>2]|0;if((g|0)==-1){h=1;u=c;return h|0}i=(g>>>0)/3|0;j=a+24|0;if(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0){h=1;u=c;return h|0}i=a+48|0;k=f[i>>2]|0;l=a+52|0;m=f[l>>2]|0;if((m|0)==(k|0))n=k;else{o=m+(~((m+-4-k|0)>>>2)<<2)|0;f[l>>2]=o;n=o}o=a+56|0;if((n|0)==(f[o>>2]|0))dh(i,b);else{f[n>>2]=g;f[l>>2]=n+4}n=a+4|0;g=f[n>>2]|0;k=f[b>>2]|0;m=k+1|0;do if((k|0)!=-1){p=f[g+28>>2]|0;q=f[p+((((m>>>0)%3|0|0)==0?k+-2|0:m)<<2)>>2]|0;if(!((k>>>0)%3|0)){r=q;s=k+2|0;t=p;break}else{r=q;s=k+-1|0;t=p;break}}else{p=f[g+28>>2]|0;r=f[p+-4>>2]|0;s=-1;t=p}while(0);g=f[t+(s<<2)>>2]|0;if((r|0)==-1|(g|0)==-1){h=0;u=c;return h|0}s=a+36|0;t=f[s>>2]|0;k=t+(r>>>5<<2)|0;m=1<<(r&31);p=f[k>>2]|0;if(!(p&m)){f[k>>2]=p|m;m=f[b>>2]|0;p=m+1|0;if((m|0)==-1)v=-1;else v=((p>>>0)%3|0|0)==0?m+-2|0:p;f[e>>2]=v;p=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((v>>>0)/3|0)*12|0)+(((v>>>0)%3|0)<<2)>>2]|0;v=f[a+20>>2]|0;f[d>>2]=p;m=f[v+4>>2]|0;v=m+4|0;k=f[v>>2]|0;if((k|0)==(f[m+8>>2]|0))dh(m,d);else{f[k>>2]=p;f[v>>2]=k+4}k=a+12|0;v=f[k>>2]|0;p=v+4|0;m=f[p>>2]|0;if((m|0)==(f[v+8>>2]|0)){dh(v,e);w=f[k>>2]|0}else{f[m>>2]=f[e>>2];f[p>>2]=m+4;w=v}v=w+24|0;f[(f[w+12>>2]|0)+(r<<2)>>2]=f[v>>2];f[v>>2]=(f[v>>2]|0)+1;x=f[s>>2]|0}else x=t;t=x+(g>>>5<<2)|0;x=1<<(g&31);v=f[t>>2]|0;if(!(v&x)){f[t>>2]=v|x;x=f[b>>2]|0;do if((x|0)!=-1)if(!((x>>>0)%3|0)){y=x+2|0;break}else{y=x+-1|0;break}else y=-1;while(0);f[e>>2]=y;x=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((y>>>0)/3|0)*12|0)+(((y>>>0)%3|0)<<2)>>2]|0;y=f[a+20>>2]|0;f[d>>2]=x;v=f[y+4>>2]|0;y=v+4|0;t=f[y>>2]|0;if((t|0)==(f[v+8>>2]|0))dh(v,d);else{f[t>>2]=x;f[y>>2]=t+4}t=a+12|0;y=f[t>>2]|0;x=y+4|0;v=f[x>>2]|0;if((v|0)==(f[y+8>>2]|0)){dh(y,e);z=f[t>>2]|0}else{f[v>>2]=f[e>>2];f[x>>2]=v+4;z=y}y=z+24|0;f[(f[z+12>>2]|0)+(g<<2)>>2]=f[y>>2];f[y>>2]=(f[y>>2]|0)+1}y=f[i>>2]|0;g=f[l>>2]|0;if((y|0)==(g|0)){h=1;u=c;return h|0}z=a+16|0;v=a+20|0;x=a+12|0;a=g;g=y;a:while(1){y=f[a+-4>>2]|0;f[b>>2]=y;t=(y>>>0)/3|0;if((y|0)!=-1?(y=(f[j>>2]|0)+(t>>>5<<2)|0,r=1<<(t&31),t=f[y>>2]|0,(t&r|0)==0):0){f[y>>2]=t|r;r=f[n>>2]|0;t=f[b>>2]|0;y=f[(f[r+28>>2]|0)+(t<<2)>>2]|0;if((y|0)==-1){h=0;A=79;break}else{B=y;C=r;D=t}b:while(1){t=(f[s>>2]|0)+(B>>>5<<2)|0;r=1<<(B&31);y=f[t>>2]|0;do if(!(y&r)){w=f[(f[C+40>>2]|0)+(B<<2)>>2]|0;if((w|0)==-1)E=1;else{m=f[(f[f[C+64>>2]>>2]|0)+(w<<2)>>2]|0;E=(1<<(m&31)&f[(f[C+12>>2]|0)+(m>>>5<<2)>>2]|0)!=0}f[t>>2]=y|r;m=f[b>>2]|0;f[e>>2]=m;w=f[(f[(f[z>>2]|0)+96>>2]|0)+(((m>>>0)/3|0)*12|0)+(((m>>>0)%3|0)<<2)>>2]|0;m=f[v>>2]|0;f[d>>2]=w;p=f[m+4>>2]|0;m=p+4|0;k=f[m>>2]|0;if((k|0)==(f[p+8>>2]|0))dh(p,d);else{f[k>>2]=w;f[m>>2]=k+4}k=f[x>>2]|0;m=k+4|0;w=f[m>>2]|0;if((w|0)==(f[k+8>>2]|0)){dh(k,e);F=f[x>>2]|0}else{f[w>>2]=f[e>>2];f[m>>2]=w+4;F=k}k=F+24|0;f[(f[F+12>>2]|0)+(B<<2)>>2]=f[k>>2];f[k>>2]=(f[k>>2]|0)+1;k=f[n>>2]|0;w=f[b>>2]|0;if(E){G=w;H=k;A=59;break}m=w+1|0;do if((w|0)==-1)I=-1;else{p=((m>>>0)%3|0|0)==0?w+-2|0:m;if((p|0)==-1){I=-1;break}if(f[(f[k>>2]|0)+(p>>>5<<2)>>2]&1<<(p&31)|0){I=-1;break}I=f[(f[(f[k+64>>2]|0)+12>>2]|0)+(p<<2)>>2]|0}while(0);f[b>>2]=I;J=(I>>>0)/3|0;K=k}else{G=D;H=C;A=59}while(0);if((A|0)==59){A=0;r=G+1|0;if((G|0)==-1){A=60;break}y=((r>>>0)%3|0|0)==0?G+-2|0:r;do if((y|0)==-1)L=-1;else{if(f[(f[H>>2]|0)+(y>>>5<<2)>>2]&1<<(y&31)|0){L=-1;break}L=f[(f[(f[H+64>>2]|0)+12>>2]|0)+(y<<2)>>2]|0}while(0);f[d>>2]=L;y=(((G>>>0)%3|0|0)==0?2:-1)+G|0;do if((y|0)==-1)M=-1;else{if(f[(f[H>>2]|0)+(y>>>5<<2)>>2]&1<<(y&31)|0){M=-1;break}M=f[(f[(f[H+64>>2]|0)+12>>2]|0)+(y<<2)>>2]|0}while(0);y=(L|0)==-1;r=(L>>>0)/3|0;t=y?-1:r;m=(M|0)==-1;w=(M>>>0)/3|0;p=m?-1:w;do if(!y){q=f[j>>2]|0;if(f[q+(t>>>5<<2)>>2]&1<<(t&31)|0){A=69;break}if(m){N=L;O=r;break}if(!(f[q+(p>>>5<<2)>>2]&1<<(p&31))){A=74;break b}else{N=L;O=r}}else A=69;while(0);if((A|0)==69){A=0;if(m){A=71;break}if(!(f[(f[j>>2]|0)+(p>>>5<<2)>>2]&1<<(p&31))){N=M;O=w}else{A=71;break}}f[b>>2]=N;J=O;K=H}r=(f[j>>2]|0)+(J>>>5<<2)|0;f[r>>2]=f[r>>2]|1<<(J&31);D=f[b>>2]|0;B=f[(f[K+28>>2]|0)+(D<<2)>>2]|0;if((B|0)==-1){h=0;A=79;break a}else C=K}do if((A|0)==60){A=0;f[d>>2]=-1;A=71}else if((A|0)==74){A=0;r=f[l>>2]|0;f[r+-4>>2]=M;if((r|0)==(f[o>>2]|0)){dh(i,d);P=f[l>>2]|0;break}else{f[r>>2]=f[d>>2];t=r+4|0;f[l>>2]=t;P=t;break}}while(0);if((A|0)==71){A=0;t=(f[l>>2]|0)+-4|0;f[l>>2]=t;P=t}Q=f[i>>2]|0;R=P}else{t=a+-4|0;f[l>>2]=t;Q=g;R=t}if((Q|0)==(R|0)){h=1;A=79;break}else{a=R;g=Q}}if((A|0)==79){u=c;return h|0}return 0}function Kb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;if(!g){h=0;return h|0}do switch(f[a+28>>2]|0){case 1:{i=a+24|0;j=b[i>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){k=f[f[a>>2]>>2]|0;l=a+40|0;m=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;o=Vl(m|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=k+o|0;o=0;while(1){b[g+o>>0]=b[l>>0]|0;o=o+1|0;k=b[i>>0]|0;if((o|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){q=k;break}else l=l+1|0}}else q=j;l=q<<24>>24;if(q<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+l|0,0,(e<<24>>24)-l|0)|0;h=1;return h|0}case 2:{l=a+24|0;o=b[l>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){i=f[f[a>>2]>>2]|0;k=a+40|0;m=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=Vl(m|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=i+r|0;r=0;while(1){b[g+r>>0]=b[k>>0]|0;r=r+1|0;i=b[l>>0]|0;if((r|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0)){s=i;break}else k=k+1|0}}else s=o;k=s<<24>>24;if(s<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+k|0,0,(e<<24>>24)-k|0)|0;h=1;return h|0}case 3:{k=a+24|0;r=b[k>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){l=f[f[a>>2]>>2]|0;j=a+40|0;i=al(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;m=Vl(i|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=l+m|0;m=0;while(1){b[g+m>>0]=d[j>>1];m=m+1|0;l=b[k>>0]|0;if((m|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){t=l;break}else j=j+2|0}}else t=r;j=t<<24>>24;if(t<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+j|0,0,(e<<24>>24)-j|0)|0;h=1;return h|0}case 4:{j=a+24|0;m=b[j>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;l=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;i=Vl(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+i|0;i=0;while(1){b[g+i>>0]=d[o>>1];i=i+1|0;k=b[j>>0]|0;if((i|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else o=o+2|0}}else u=m;o=u<<24>>24;if(u<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+o|0,0,(e<<24>>24)-o|0)|0;h=1;return h|0}case 5:{o=a+24|0;i=b[o>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){j=f[f[a>>2]>>2]|0;r=a+40|0;k=al(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;l=Vl(k|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=j+l|0;l=0;while(1){b[g+l>>0]=f[r>>2];l=l+1|0;j=b[o>>0]|0;if((l|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){v=j;break}else r=r+4|0}}else v=i;r=v<<24>>24;if(v<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+r|0,0,(e<<24>>24)-r|0)|0;h=1;return h|0}case 6:{r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){o=f[f[a>>2]>>2]|0;m=a+40|0;j=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;k=Vl(j|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=o+k|0;k=0;while(1){b[g+k>>0]=f[m>>2];k=k+1|0;o=b[r>>0]|0;if((k|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){w=o;break}else m=m+4|0}}else w=l;m=w<<24>>24;if(w<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+m|0,0,(e<<24>>24)-m|0)|0;h=1;return h|0}case 7:{m=a+24|0;k=b[m>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){r=f[f[a>>2]>>2]|0;i=a+40|0;o=al(f[i>>2]|0,f[i+4>>2]|0,f[c>>2]|0,0)|0;i=a+48|0;j=Vl(o|0,I|0,f[i>>2]|0,f[i+4>>2]|0)|0;i=r+j|0;j=0;while(1){b[g+j>>0]=f[i>>2];j=j+1|0;r=b[m>>0]|0;if((j|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){x=r;break}else i=i+8|0}}else x=k;i=x<<24>>24;if(x<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+i|0,0,(e<<24>>24)-i|0)|0;h=1;return h|0}case 8:{i=a+24|0;j=b[i>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){m=f[f[a>>2]>>2]|0;l=a+40|0;r=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;o=Vl(r|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=m+o|0;o=0;while(1){b[g+o>>0]=f[l>>2];o=o+1|0;m=b[i>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){y=m;break}else l=l+8|0}}else y=j;l=y<<24>>24;if(y<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+l|0,0,(e<<24>>24)-l|0)|0;h=1;return h|0}case 9:{l=a+24|0;o=b[l>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){i=f[f[a>>2]>>2]|0;k=a+40|0;m=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=Vl(m|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=i+r|0;r=0;while(1){i=~~$(n[k>>2])&255;b[g+r>>0]=i;r=r+1|0;i=b[l>>0]|0;if((r|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0)){z=i;break}else k=k+4|0}}else z=o;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+k|0,0,(e<<24>>24)-k|0)|0;h=1;return h|0}case 10:{k=a+24|0;r=b[k>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){l=f[f[a>>2]>>2]|0;j=a+40|0;i=al(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;m=Vl(i|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=l+m|0;m=0;while(1){b[g+m>>0]=~~+p[j>>3];m=m+1|0;l=b[k>>0]|0;if((m|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){A=l;break}else j=j+8|0}}else A=r;j=A<<24>>24;if(A<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+j|0,0,(e<<24>>24)-j|0)|0;h=1;return h|0}case 11:{j=a+24|0;m=b[j>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;l=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;i=Vl(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+i|0;i=0;while(1){b[g+i>>0]=b[o>>0]|0;i=i+1|0;k=b[j>>0]|0;if((i|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else o=o+1|0}}else B=m;o=B<<24>>24;if(B<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+o|0,0,(e<<24>>24)-o|0)|0;h=1;return h|0}default:{h=0;return h|0}}while(0);return 0}function Lb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;if(!g){h=0;return h|0}do switch(f[a+28>>2]|0){case 1:{i=a+24|0;j=b[i>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){k=f[f[a>>2]>>2]|0;l=a+40|0;m=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;o=Vl(m|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=k+o|0;o=0;while(1){b[g+o>>0]=b[l>>0]|0;o=o+1|0;k=b[i>>0]|0;if((o|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){q=k;break}else l=l+1|0}}else q=j;l=q<<24>>24;if(q<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+l|0,0,(e<<24>>24)-l|0)|0;h=1;return h|0}case 2:{l=a+24|0;o=b[l>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){i=f[f[a>>2]>>2]|0;k=a+40|0;m=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=Vl(m|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=i+r|0;r=0;while(1){b[g+r>>0]=b[k>>0]|0;r=r+1|0;i=b[l>>0]|0;if((r|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0)){s=i;break}else k=k+1|0}}else s=o;k=s<<24>>24;if(s<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+k|0,0,(e<<24>>24)-k|0)|0;h=1;return h|0}case 3:{k=a+24|0;r=b[k>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){l=f[f[a>>2]>>2]|0;j=a+40|0;i=al(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;m=Vl(i|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=l+m|0;m=0;while(1){b[g+m>>0]=d[j>>1];m=m+1|0;l=b[k>>0]|0;if((m|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){t=l;break}else j=j+2|0}}else t=r;j=t<<24>>24;if(t<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+j|0,0,(e<<24>>24)-j|0)|0;h=1;return h|0}case 4:{j=a+24|0;m=b[j>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;l=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;i=Vl(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+i|0;i=0;while(1){b[g+i>>0]=d[o>>1];i=i+1|0;k=b[j>>0]|0;if((i|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else o=o+2|0}}else u=m;o=u<<24>>24;if(u<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+o|0,0,(e<<24>>24)-o|0)|0;h=1;return h|0}case 5:{o=a+24|0;i=b[o>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){j=f[f[a>>2]>>2]|0;r=a+40|0;k=al(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;l=Vl(k|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=j+l|0;l=0;while(1){b[g+l>>0]=f[r>>2];l=l+1|0;j=b[o>>0]|0;if((l|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){v=j;break}else r=r+4|0}}else v=i;r=v<<24>>24;if(v<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+r|0,0,(e<<24>>24)-r|0)|0;h=1;return h|0}case 6:{r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){o=f[f[a>>2]>>2]|0;m=a+40|0;j=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;k=Vl(j|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=o+k|0;k=0;while(1){b[g+k>>0]=f[m>>2];k=k+1|0;o=b[r>>0]|0;if((k|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){w=o;break}else m=m+4|0}}else w=l;m=w<<24>>24;if(w<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+m|0,0,(e<<24>>24)-m|0)|0;h=1;return h|0}case 7:{m=a+24|0;k=b[m>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){r=f[f[a>>2]>>2]|0;i=a+40|0;o=al(f[i>>2]|0,f[i+4>>2]|0,f[c>>2]|0,0)|0;i=a+48|0;j=Vl(o|0,I|0,f[i>>2]|0,f[i+4>>2]|0)|0;i=r+j|0;j=0;while(1){b[g+j>>0]=f[i>>2];j=j+1|0;r=b[m>>0]|0;if((j|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){x=r;break}else i=i+8|0}}else x=k;i=x<<24>>24;if(x<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+i|0,0,(e<<24>>24)-i|0)|0;h=1;return h|0}case 8:{i=a+24|0;j=b[i>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){m=f[f[a>>2]>>2]|0;l=a+40|0;r=al(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;o=Vl(r|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=m+o|0;o=0;while(1){b[g+o>>0]=f[l>>2];o=o+1|0;m=b[i>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){y=m;break}else l=l+8|0}}else y=j;l=y<<24>>24;if(y<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+l|0,0,(e<<24>>24)-l|0)|0;h=1;return h|0}case 9:{l=a+24|0;o=b[l>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){i=f[f[a>>2]>>2]|0;k=a+40|0;m=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=Vl(m|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=i+r|0;r=0;while(1){i=~~$(n[k>>2]);b[g+r>>0]=i;r=r+1|0;i=b[l>>0]|0;if((r|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0)){z=i;break}else k=k+4|0}}else z=o;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+k|0,0,(e<<24>>24)-k|0)|0;h=1;return h|0}case 10:{k=a+24|0;r=b[k>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){l=f[f[a>>2]>>2]|0;j=a+40|0;i=al(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;m=Vl(i|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=l+m|0;m=0;while(1){b[g+m>>0]=~~+p[j>>3];m=m+1|0;l=b[k>>0]|0;if((m|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){A=l;break}else j=j+8|0}}else A=r;j=A<<24>>24;if(A<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+j|0,0,(e<<24>>24)-j|0)|0;h=1;return h|0}case 11:{j=a+24|0;m=b[j>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;l=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;i=Vl(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+i|0;i=0;while(1){b[g+i>>0]=b[o>>0]|0;i=i+1|0;k=b[j>>0]|0;if((i|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else o=o+1|0}}else B=m;o=B<<24>>24;if(B<<24>>24>=e<<24>>24){h=1;return h|0}Dh(g+o|0,0,(e<<24>>24)-o|0)|0;h=1;return h|0}default:{h=0;return h|0}}while(0);return 0}function Mb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;c=u;u=u+16|0;d=c+8|0;e=c;g=f[b>>2]|0;if((g|0)==-1){h=1;u=c;return h|0}i=(g>>>0)/3|0;j=a+24|0;if(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0){h=1;u=c;return h|0}i=a+48|0;k=f[i>>2]|0;l=a+52|0;m=f[l>>2]|0;if((m|0)==(k|0))n=k;else{o=m+(~((m+-4-k|0)>>>2)<<2)|0;f[l>>2]=o;n=o}o=a+56|0;if((n|0)==(f[o>>2]|0))dh(i,b);else{f[n>>2]=g;f[l>>2]=n+4}n=a+4|0;g=f[n>>2]|0;k=f[b>>2]|0;m=k+1|0;if((k|0)==-1){h=0;u=c;return h|0}p=((m>>>0)%3|0|0)==0?k+-2|0:m;if((p|0)==-1)q=-1;else q=f[(f[g>>2]|0)+(p<<2)>>2]|0;p=(((k>>>0)%3|0|0)==0?2:-1)+k|0;if((p|0)==-1){h=0;u=c;return h|0}k=f[(f[g>>2]|0)+(p<<2)>>2]|0;if((q|0)==-1|(k|0)==-1){h=0;u=c;return h|0}p=a+36|0;g=f[p>>2]|0;m=g+(q>>>5<<2)|0;r=1<<(q&31);s=f[m>>2]|0;if(!(s&r)){f[m>>2]=s|r;r=f[b>>2]|0;s=r+1|0;if((r|0)==-1)t=-1;else t=((s>>>0)%3|0|0)==0?r+-2|0:s;f[e>>2]=t;s=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((t>>>0)/3|0)*12|0)+(((t>>>0)%3|0)<<2)>>2]|0;t=f[a+20>>2]|0;f[d>>2]=s;r=f[t+4>>2]|0;t=r+4|0;m=f[t>>2]|0;if((m|0)==(f[r+8>>2]|0))dh(r,d);else{f[m>>2]=s;f[t>>2]=m+4}m=a+12|0;t=f[m>>2]|0;s=t+4|0;r=f[s>>2]|0;if((r|0)==(f[t+8>>2]|0)){dh(t,e);v=f[m>>2]|0}else{f[r>>2]=f[e>>2];f[s>>2]=r+4;v=t}t=v+24|0;f[(f[v+12>>2]|0)+(q<<2)>>2]=f[t>>2];f[t>>2]=(f[t>>2]|0)+1;w=f[p>>2]|0}else w=g;g=w+(k>>>5<<2)|0;w=1<<(k&31);t=f[g>>2]|0;if(!(t&w)){f[g>>2]=t|w;w=f[b>>2]|0;do if((w|0)!=-1)if(!((w>>>0)%3|0)){x=w+2|0;break}else{x=w+-1|0;break}else x=-1;while(0);f[e>>2]=x;w=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((x>>>0)/3|0)*12|0)+(((x>>>0)%3|0)<<2)>>2]|0;x=f[a+20>>2]|0;f[d>>2]=w;t=f[x+4>>2]|0;x=t+4|0;g=f[x>>2]|0;if((g|0)==(f[t+8>>2]|0))dh(t,d);else{f[g>>2]=w;f[x>>2]=g+4}g=a+12|0;x=f[g>>2]|0;w=x+4|0;t=f[w>>2]|0;if((t|0)==(f[x+8>>2]|0)){dh(x,e);y=f[g>>2]|0}else{f[t>>2]=f[e>>2];f[w>>2]=t+4;y=x}x=y+24|0;f[(f[y+12>>2]|0)+(k<<2)>>2]=f[x>>2];f[x>>2]=(f[x>>2]|0)+1}x=f[i>>2]|0;k=f[l>>2]|0;if((x|0)==(k|0)){h=1;u=c;return h|0}y=a+16|0;t=a+20|0;w=a+12|0;a=k;k=x;a:while(1){x=f[a+-4>>2]|0;f[b>>2]=x;g=(x>>>0)/3|0;if((x|0)!=-1?(x=(f[j>>2]|0)+(g>>>5<<2)|0,q=1<<(g&31),g=f[x>>2]|0,(g&q|0)==0):0){f[x>>2]=g|q;q=f[b>>2]|0;if((q|0)==-1){h=0;z=80;break}g=f[n>>2]|0;x=q;b:while(1){q=f[(f[g>>2]|0)+(x<<2)>>2]|0;if((q|0)==-1){h=0;z=80;break a}v=(f[p>>2]|0)+(q>>>5<<2)|0;r=1<<(q&31);s=f[v>>2]|0;do if(!(s&r)){m=f[(f[g+24>>2]|0)+(q<<2)>>2]|0;A=m+1|0;do if((m|0)==-1)B=1;else{C=((A>>>0)%3|0|0)==0?m+-2|0:A;if((C|0)==-1){B=1;break}D=f[(f[g+12>>2]|0)+(C<<2)>>2]|0;C=D+1|0;if((D|0)==-1){B=1;break}B=((((C>>>0)%3|0|0)==0?D+-2|0:C)|0)==-1}while(0);f[v>>2]=s|r;A=f[b>>2]|0;f[e>>2]=A;m=f[(f[(f[y>>2]|0)+96>>2]|0)+(((A>>>0)/3|0)*12|0)+(((A>>>0)%3|0)<<2)>>2]|0;A=f[t>>2]|0;f[d>>2]=m;C=f[A+4>>2]|0;A=C+4|0;D=f[A>>2]|0;if((D|0)==(f[C+8>>2]|0))dh(C,d);else{f[D>>2]=m;f[A>>2]=D+4}D=f[w>>2]|0;A=D+4|0;m=f[A>>2]|0;if((m|0)==(f[D+8>>2]|0)){dh(D,e);E=f[w>>2]|0}else{f[m>>2]=f[e>>2];f[A>>2]=m+4;E=D}D=E+24|0;f[(f[E+12>>2]|0)+(q<<2)>>2]=f[D>>2];f[D>>2]=(f[D>>2]|0)+1;D=f[n>>2]|0;m=f[b>>2]|0;if(B)if((m|0)==-1){z=63;break b}else{F=m;G=D;z=64;break}do if((m|0)==-1)H=-1;else{A=m+1|0;C=((A>>>0)%3|0|0)==0?m+-2|0:A;if((C|0)==-1){H=-1;break}H=f[(f[D+12>>2]|0)+(C<<2)>>2]|0}while(0);f[b>>2]=H;I=(H>>>0)/3|0;J=D}else{F=x;G=g;z=64}while(0);if((z|0)==64){z=0;q=F+1|0;r=((q>>>0)%3|0|0)==0?F+-2|0:q;if((r|0)==-1)K=-1;else K=f[(f[G+12>>2]|0)+(r<<2)>>2]|0;f[d>>2]=K;r=(((F>>>0)%3|0|0)==0?2:-1)+F|0;if((r|0)==-1)L=-1;else L=f[(f[G+12>>2]|0)+(r<<2)>>2]|0;r=(K|0)==-1;q=(K>>>0)/3|0;s=r?-1:q;v=(L|0)==-1;m=(L>>>0)/3|0;C=v?-1:m;do if(!r){A=f[j>>2]|0;if(f[A+(s>>>5<<2)>>2]&1<<(s&31)|0){z=70;break}if(v){M=K;N=q;break}if(!(f[A+(C>>>5<<2)>>2]&1<<(C&31))){z=75;break b}else{M=K;N=q}}else z=70;while(0);if((z|0)==70){z=0;if(v){z=72;break}if(!(f[(f[j>>2]|0)+(C>>>5<<2)>>2]&1<<(C&31))){M=L;N=m}else{z=72;break}}f[b>>2]=M;I=N;J=G}q=(f[j>>2]|0)+(I>>>5<<2)|0;f[q>>2]=f[q>>2]|1<<(I&31);x=f[b>>2]|0;if((x|0)==-1){h=0;z=80;break a}else g=J}do if((z|0)==63){z=0;f[d>>2]=-1;z=72}else if((z|0)==75){z=0;g=f[l>>2]|0;f[g+-4>>2]=L;if((g|0)==(f[o>>2]|0)){dh(i,d);O=f[l>>2]|0;break}else{f[g>>2]=f[d>>2];x=g+4|0;f[l>>2]=x;O=x;break}}while(0);if((z|0)==72){z=0;x=(f[l>>2]|0)+-4|0;f[l>>2]=x;O=x}P=f[i>>2]|0;Q=O}else{x=a+-4|0;f[l>>2]=x;P=k;Q=x}if((P|0)==(Q|0)){h=1;z=80;break}else{a=Q;k=P}}if((z|0)==80){u=c;return h|0}return 0}function Nb(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca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s+84>>0]|0))v=f[(f[s+68>>2]|0)+(t<<2)>>2]|0;else v=t;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;f[j+16>>2]=0;f[j+20>>2]=0;f[h>>2]=v;v=b[s+24>>0]|0;f[g>>2]=f[h>>2];Db(s,g,v,j)|0;v=a+28|0;a=(f[v>>2]|0)==0;a:do if(!p){s=k+8|0;t=j+8|0;w=k+16|0;x=j+16|0;y=l+8|0;z=l+16|0;A=o;B=o;C=0;D=0;E=0;F=0;G=0;H=0;J=a;K=o;while(1){do if(J){L=K+1|0;if((K|0)==-1){M=A;N=-1;O=-1;P=-1;break}Q=((L>>>0)%3|0|0)==0?K+-2|0:L;if((A|0)!=-1)if(!((A>>>0)%3|0)){R=A;S=A+2|0;T=Q;U=A;V=19;break}else{R=A;S=A+-1|0;T=Q;U=A;V=19;break}else{R=-1;S=-1;T=Q;U=-1;V=19}}else{Q=B+1|0;L=((Q>>>0)%3|0|0)==0?B+-2|0:Q;if(!((B>>>0)%3|0)){R=A;S=B+2|0;T=L;U=K;V=19;break}else{R=A;S=B+-1|0;T=L;U=K;V=19;break}}while(0);if((V|0)==19){V=0;if((T|0)==-1){M=R;N=-1;O=S;P=U}else{M=R;N=f[(f[f[m>>2]>>2]|0)+(T<<2)>>2]|0;O=S;P=U}}W=f[n>>2]|0;L=f[W>>2]|0;if((f[W+4>>2]|0)-L>>2>>>0<=N>>>0){V=22;break}Q=f[(f[r>>2]|0)+(f[L+(N<<2)>>2]<<2)>>2]|0;L=f[q>>2]|0;if(!(b[L+84>>0]|0))X=f[(f[L+68>>2]|0)+(Q<<2)>>2]|0;else X=Q;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[h>>2]=X;Q=b[L+24>>0]|0;f[g>>2]=f[h>>2];Db(L,g,Q,k)|0;if((O|0)==-1)Y=-1;else Y=f[(f[f[m>>2]>>2]|0)+(O<<2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ra;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}}function Qb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=Na,K=Na,L=Na,M=0,N=0,O=0,P=0;e=u;u=u+64|0;g=e+40|0;i=e+16|0;j=e;k=Cc(a,c)|0;if(k|0){f[i>>2]=k;f[g>>2]=f[i>>2];ne(a,g)|0}f[j>>2]=0;k=j+4|0;f[k>>2]=0;f[j+8>>2]=0;l=f[d>>2]|0;m=(f[d+4>>2]|0)-l|0;if(!m){o=0;p=l}else{Rg(j,m);o=f[j>>2]|0;p=f[d>>2]|0}Ef(o|0,p|0,m|0)|0;zh(i,c);c=i+12|0;f[c>>2]=0;m=i+16|0;f[m>>2]=0;f[i+20>>2]=0;p=f[k>>2]|0;o=f[j>>2]|0;d=p-o|0;if(!d){q=o;r=p;s=0}else{Rg(c,d);q=f[j>>2]|0;r=f[k>>2]|0;s=f[c>>2]|0}Ef(s|0,q|0,r-q|0)|0;q=i+11|0;r=b[q>>0]|0;s=r<<24>>24<0;c=s?f[i>>2]|0:i;d=s?f[i+4>>2]|0:r&255;if(d>>>0>3){r=c;s=d;p=d;while(1){o=X(h[r>>0]|h[r+1>>0]<<8|h[r+2>>0]<<16|h[r+3>>0]<<24,1540483477)|0;s=(X(o>>>24^o,1540483477)|0)^(X(s,1540483477)|0);p=p+-4|0;if(p>>>0<=3)break;else r=r+4|0}r=d+-4|0;p=r&-4;t=r-p|0;v=c+(p+4)|0;w=s}else{t=d;v=c;w=d}switch(t|0){case 3:{x=h[v+2>>0]<<16^w;y=12;break}case 2:{x=w;y=12;break}case 1:{z=w;y=13;break}default:A=w}if((y|0)==12){z=h[v+1>>0]<<8^x;y=13}if((y|0)==13)A=X(z^h[v>>0],1540483477)|0;v=X(A>>>13^A,1540483477)|0;A=v>>>15^v;v=a+4|0;z=f[v>>2]|0;x=(z|0)==0;a:do if(!x){w=z+-1|0;t=(w&z|0)==0;if(!t)if(A>>>0<z>>>0)B=A;else B=(A>>>0)%(z>>>0)|0;else B=A&w;s=f[(f[a>>2]|0)+(B<<2)>>2]|0;if((s|0)!=0?(p=f[s>>2]|0,(p|0)!=0):0){s=(d|0)==0;if(t){if(s){t=p;while(1){r=f[t+4>>2]|0;if(!((r|0)==(A|0)|(r&w|0)==(B|0))){C=B;y=54;break a}r=b[t+8+11>>0]|0;if(!((r<<24>>24<0?f[t+12>>2]|0:r&255)|0))break a;t=f[t>>2]|0;if(!t){C=B;y=54;break a}}}else D=p;while(1){t=f[D+4>>2]|0;if(!((t|0)==(A|0)|(t&w|0)==(B|0))){C=B;y=54;break a}t=D+8|0;r=b[t+11>>0]|0;o=r<<24>>24<0;l=r&255;do if(((o?f[D+12>>2]|0:l)|0)==(d|0)){r=f[t>>2]|0;if(o)if(!(fj(r,c,d)|0))break a;else break;if((b[c>>0]|0)==(r&255)<<24>>24){r=t;E=l;F=c;do{E=E+-1|0;r=r+1|0;if(!E)break a;F=F+1|0}while((b[r>>0]|0)==(b[F>>0]|0))}}while(0);D=f[D>>2]|0;if(!D){C=B;y=54;break a}}}if(s){w=p;while(1){l=f[w+4>>2]|0;if((l|0)!=(A|0)){if(l>>>0<z>>>0)G=l;else G=(l>>>0)%(z>>>0)|0;if((G|0)!=(B|0)){C=B;y=54;break a}}l=b[w+8+11>>0]|0;if(!((l<<24>>24<0?f[w+12>>2]|0:l&255)|0))break a;w=f[w>>2]|0;if(!w){C=B;y=54;break a}}}else H=p;while(1){w=f[H+4>>2]|0;if((w|0)!=(A|0)){if(w>>>0<z>>>0)I=w;else I=(w>>>0)%(z>>>0)|0;if((I|0)!=(B|0)){C=B;y=54;break a}}w=H+8|0;s=b[w+11>>0]|0;l=s<<24>>24<0;t=s&255;do if(((l?f[H+12>>2]|0:t)|0)==(d|0)){s=f[w>>2]|0;if(l)if(!(fj(s,c,d)|0))break a;else break;if((b[c>>0]|0)==(s&255)<<24>>24){s=w;o=t;F=c;do{o=o+-1|0;s=s+1|0;if(!o)break a;F=F+1|0}while((b[s>>0]|0)==(b[F>>0]|0))}}while(0);H=f[H>>2]|0;if(!H){C=B;y=54;break}}}else{C=B;y=54}}else{C=0;y=54}while(0);if((y|0)==54){xg(g,a,A,i);y=a+12|0;J=$(((f[y>>2]|0)+1|0)>>>0);K=$(z>>>0);L=$(n[a+16>>2]);do if(x|$(L*K)<J){B=z<<1|(z>>>0<3|(z+-1&z|0)!=0)&1;H=~~$(W($(J/L)))>>>0;pg(a,B>>>0<H>>>0?H:B);B=f[v>>2]|0;H=B+-1|0;if(!(H&B)){M=B;N=H&A;break}if(A>>>0<B>>>0){M=B;N=A}else{M=B;N=(A>>>0)%(B>>>0)|0}}else{M=z;N=C}while(0);C=f[(f[a>>2]|0)+(N<<2)>>2]|0;if(!C){z=a+8|0;f[f[g>>2]>>2]=f[z>>2];f[z>>2]=f[g>>2];f[(f[a>>2]|0)+(N<<2)>>2]=z;z=f[g>>2]|0;N=f[z>>2]|0;if(!N)O=g;else{A=f[N+4>>2]|0;N=M+-1|0;if(N&M)if(A>>>0<M>>>0)P=A;else P=(A>>>0)%(M>>>0)|0;else P=A&N;f[(f[a>>2]|0)+(P<<2)>>2]=z;O=g}}else{f[f[g>>2]>>2]=f[C>>2];f[C>>2]=f[g>>2];O=g}f[y>>2]=(f[y>>2]|0)+1;f[O>>2]=0}O=f[i+12>>2]|0;if(O|0){if((f[m>>2]|0)!=(O|0))f[m>>2]=O;mp(O)}if((b[q>>0]|0)<0)mp(f[i>>2]|0);i=f[j>>2]|0;if(!i){u=e;return}if((f[k>>2]|0)!=(i|0))f[k>>2]=i;mp(i);u=e;return}function Rb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=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ta>>2]=ra;u=e;return}ia=Yl(t|0,R|0,29)|0;U=ia&7;ia=Li(ka|0,ja|0,U|0,0)|0;a=Li(ma|0,la|0,U|0,0)|0;i=Li(oa|0,na|0,U|0,0)|0;pa=ia;qa=a;ra=i;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}else{if(!((R|0)>0|(R|0)==0&t>>>0>536870912)){pa=ka;qa=ma;ra=oa;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}i=Yl(t|0,R|0,29)|0;R=I;t=Li(ka|0,ja|0,i|0,R|0)|0;ja=Li(ma|0,la|0,i|0,R|0)|0;la=Li(oa|0,na|0,i|0,R|0)|0;pa=t;qa=ja;ra=la;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}}function Sb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0;d=u;u=u+32|0;e=d+20|0;g=d+8|0;i=d+4|0;j=d;k=a+4|0;do if((h[(f[k>>2]|0)+36>>0]<<8&65535)<512){l=c+8|0;m=f[l>>2]|0;n=f[l+4>>2]|0;l=c+16|0;o=l;p=f[o>>2]|0;q=Vl(p|0,f[o+4>>2]|0,4,0)|0;o=I;if((n|0)<(o|0)|(n|0)==(o|0)&m>>>0<q>>>0){r=-1;u=d;return r|0}else{m=(f[c>>2]|0)+p|0;p=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;f[e>>2]=p;m=l;f[m>>2]=q;f[m+4>>2]=o;s=p;break}}else if(Nh(e,c)|0){s=f[e>>2]|0;break}else{r=-1;u=d;return r|0}while(0);a:do if(s|0){p=f[a+8>>2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=q-o;o=f[v>>2]|0;if((o|0)==(f[l>>2]|0))Lg(t,g);else{f[o>>2]=f[g>>2];f[o+4>>2]=f[g+4>>2];f[o+8>>2]=f[g+8>>2];f[v>>2]=(f[v>>2]|0)+12}n=n+1|0}while(n>>>0<(f[e>>2]|0)>>>0);if((G|0)==36){r=-1;u=d;return r|0}yf(c,0,0)|0;n=f[e>>2]|0;if(n|0){v=c+36|0;t=c+32|0;l=c+24|0;q=c+28|0;w=a+36|0;o=0;m=0;while(1){p=f[k>>2]|0;y=(b[v>>0]|0)==0;if(((h[p+36>>0]<<8|h[p+37>>0])&65535)<514)if(!y){p=f[t>>2]|0;B=f[l>>2]|0;C=f[q>>2]|0;A=B+(p>>>3)|0;if(A>>>0<C>>>0){D=(h[A>>0]|0)>>>(p&7)&1;A=p+1|0;f[t>>2]=A;H=D;J=A}else{H=0;J=p}if((B+(J>>>3)|0)>>>0<C>>>0){f[t>>2]=J+1;K=H}else K=H}else K=m;else if(!y){y=f[t>>2]|0;C=(f[l>>2]|0)+(y>>>3)|0;if(C>>>0<(f[q>>2]|0)>>>0){B=(h[C>>0]|0)>>>(y&7)&1;f[t>>2]=y+1;K=B}else K=0}else K=m;B=(f[w>>2]|0)+(o*12|0)+8|0;b[B>>0]=b[B>>0]&-2|K&1;o=o+1|0;if(o>>>0>=n>>>0)break;else m=K}}_j(c)}while(0);f[g>>2]=0;K=f[k>>2]|0;H=(h[K+36>>0]<<8|h[K+37>>0])&65535;if((H&65535)<512){K=c+8|0;J=f[K>>2]|0;e=f[K+4>>2]|0;K=c+16|0;F=K;s=f[F>>2]|0;m=Vl(s|0,f[F+4>>2]|0,4,0)|0;F=I;if((e|0)<(F|0)|(e|0)==(F|0)&J>>>0<m>>>0)L=-1;else{J=(f[c>>2]|0)+s|0;s=h[J>>0]|h[J+1>>0]<<8|h[J+2>>0]<<16|h[J+3>>0]<<24;f[g>>2]=s;J=K;f[J>>2]=m;f[J+4>>2]=F;M=s;G=43}}else if(H<<16>>16==512)if(Nh(g,c)|0){M=f[g>>2]|0;G=43}else L=-1;else G=57;b:do if((G|0)==43)if(!M)G=57;else{H=f[k>>2]|0;if(((h[H+36>>0]<<8|h[H+37>>0])&65535)>=258){H=a+52|0;s=a+56|0;F=a+48|0;J=0;m=0;while(1){f[i>>2]=0;Nh(j,c)|0;m=(f[j>>2]|0)+m|0;f[i>>2]=m;K=f[H>>2]|0;if((K|0)==(f[s>>2]|0))dh(F,i);else{f[K>>2]=m;f[H>>2]=K+4}J=J+1|0;if(J>>>0>=(f[g>>2]|0)>>>0){G=57;break b}}}J=c+8|0;H=c+16|0;m=a+52|0;F=a+56|0;s=a+48|0;K=0;while(1){f[i>>2]=0;e=J;n=f[e>>2]|0;o=f[e+4>>2]|0;e=H;w=f[e>>2]|0;t=Vl(w|0,f[e+4>>2]|0,4,0)|0;e=I;if((o|0)<(e|0)|(o|0)==(e|0)&n>>>0<t>>>0)break;n=(f[c>>2]|0)+w|0;w=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;f[i>>2]=w;n=H;f[n>>2]=t;f[n+4>>2]=e;e=f[m>>2]|0;if((e|0)==(f[F>>2]|0))dh(s,i);else{f[e>>2]=w;f[m>>2]=e+4}K=K+1|0;if(K>>>0>=(f[g>>2]|0)>>>0){G=57;break b}}L=-1}while(0);if((G|0)==57)L=f[c+16>>2]|0;r=L;u=d;return r|0}function Tb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;d=u;u=u+736|0;e=d+716|0;g=d;h=d+64|0;if((j[c+38>>1]|0)<515){i=1;u=d;return i|0}k=c+8|0;l=f[k+4>>2]|0;m=c+16|0;n=m;o=f[n>>2]|0;p=f[n+4>>2]|0;if(!((l|0)>(p|0)|((l|0)==(p|0)?(f[k>>2]|0)>>>0>o>>>0:0))){i=0;u=d;return i|0}k=b[(f[c>>2]|0)+o>>0]|0;l=Vl(o|0,p|0,1,0)|0;p=m;f[p>>2]=l;f[p+4>>2]=I;p=(Pa[f[(f[a>>2]|0)+28>>2]&127](a)|0)+4|0;l=f[(f[p>>2]|0)+80>>2]|0;p=Pa[f[(f[a>>2]|0)+24>>2]&127](a)|0;f[e>>2]=0;m=e+4|0;f[m>>2]=0;f[e+8>>2]=0;do if(p|0)if(p>>>0>214748364)Do(e);else{o=p*20|0;n=Yk(o)|0;f[e>>2]=n;f[e+8>>2]=n+(p*20|0);Dh(n|0,0,o|0)|0;f[m>>2]=n+o;break}while(0);p=a+64|0;o=a+68|0;n=a+60|0;q=a+52|0;r=a+56|0;s=a+48|0;t=0;v=0;a:while(1){if((v|0)>=(Pa[f[(f[a>>2]|0)+24>>2]&127](a)|0)){w=44;break}x=Qa[f[(f[a>>2]|0)+20>>2]&127](a,v)|0;y=(Pa[f[(f[a>>2]|0)+28>>2]&127](a)|0)+4|0;z=f[(f[(f[y>>2]|0)+8>>2]|0)+(x<<2)>>2]|0;Jh(z,l)|0;b[z+84>>0]=1;x=f[z+68>>2]|0;y=z+72|0;A=f[y>>2]|0;if((A|0)!=(x|0))f[y>>2]=A+(~((A+-4-x|0)>>>2)<<2);switch(f[z+28>>2]|0){case 2:case 4:case 6:{B=z;break}case 1:case 3:case 5:{x=z+24|0;A=b[x>>0]|0;if(A<<24>>24>0){y=0;C=A;while(1){f[g>>2]=0;A=f[q>>2]|0;if(A>>>0<(f[r>>2]|0)>>>0){f[A>>2]=0;f[q>>2]=A+4;D=C}else{dh(s,g);D=b[x>>0]|0}y=y+1|0;if((y|0)>=(D<<24>>24|0))break;else C=D}}B=z;break}case 9:{C=b[z+24>>0]|0;Nj(g);y=f[z+56>>2]|0;x=X(Zj(6)|0,C<<24>>24)|0;Uh(g,y,0,C,6,0,x,((x|0)<0)<<31>>31,0,0);x=Yk(96)|0;Bj(x,g);f[h>>2]=x;b[x+84>>0]=1;C=f[x+68>>2]|0;y=x+72|0;A=f[y>>2]|0;if((A|0)!=(C|0))f[y>>2]=A+(~((A+-4-C|0)>>>2)<<2);Jh(x,l)|0;x=f[p>>2]|0;if(x>>>0<(f[o>>2]|0)>>>0){C=f[h>>2]|0;f[h>>2]=0;f[x>>2]=C;C=x+4|0;f[p>>2]=C;E=C}else{Wd(n,h);E=f[p>>2]|0}C=f[E+-4>>2]|0;x=f[h>>2]|0;f[h>>2]=0;if(x|0){A=x+88|0;y=f[A>>2]|0;f[A>>2]=0;if(y|0){A=f[y+8>>2]|0;if(A|0){F=y+12|0;if((f[F>>2]|0)!=(A|0))f[F>>2]=A;mp(A)}mp(y)}y=f[x+68>>2]|0;if(y|0){A=x+72|0;F=f[A>>2]|0;if((F|0)!=(y|0))f[A>>2]=F+(~((F+-4-y|0)>>>2)<<2);mp(y)}y=x+64|0;F=f[y>>2]|0;f[y>>2]=0;if(F|0){y=f[F>>2]|0;if(y|0){A=F+4|0;if((f[A>>2]|0)!=(y|0))f[A>>2]=y;mp(y)}mp(F)}mp(x)}B=C;break}default:{G=0;break a}}C=B;x=f[C+28>>2]|0;F=Zj(x)|0;y=b[C+24>>0]|0;C=f[e>>2]|0;f[C+(v*20|0)>>2]=B;f[C+(v*20|0)+4>>2]=t;f[C+(v*20|0)+8>>2]=x;f[C+(v*20|0)+12>>2]=(F|0)>0?F:0;f[C+(v*20|0)+16>>2]=y;t=t+y|0;v=v+1|0}if((w|0)==44){Vf(g,e);switch(k<<24>>24){case 0:{ve(h,t);k=de(h,c,g)|0;ye(h);if(k)w=52;else H=0;break}case 1:{ve(h,t);k=ce(h,c,g)|0;ye(h);if(k)w=52;else H=0;break}case 2:{xe(h,t);k=fe(h,c,g)|0;Ke(h);if(k)w=52;else H=0;break}case 3:{xe(h,t);k=ee(h,c,g)|0;Ke(h);if(k)w=52;else H=0;break}case 4:{re(h,t);k=$d(h,c,g)|0;Be(h);if(k)w=52;else H=0;break}case 5:{re(h,t);k=_d(h,c,g)|0;Be(h);if(k)w=52;else H=0;break}case 6:{re(h,t);t=Zd(h,c,g)|0;Be(h);if(t)w=52;else H=0;break}default:H=0}if((w|0)==52)H=1;w=f[g+16>>2]|0;if(w|0){t=g+20|0;h=f[t>>2]|0;if((h|0)!=(w|0))f[t>>2]=h+(~(((h+-20-w|0)>>>0)/20|0)*20|0);mp(w)}w=f[g>>2]|0;if(w|0){h=g+4|0;if((f[h>>2]|0)!=(w|0))f[h>>2]=w;mp(w)}G=H}H=f[e>>2]|0;if(H|0){e=f[m>>2]|0;if((e|0)!=(H|0))f[m>>2]=e+(~(((e+-20-H|0)>>>0)/20|0)*20|0);mp(H)}i=G;u=d;return i|0}function Ub(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;c=u;u=u+48|0;d=c+24|0;e=c+12|0;g=c;if(!b){h=0;u=c;return h|0}i=a+12|0;j=a+4|0;k=f[j>>2]|0;l=f[a>>2]|0;m=k-l>>2;n=a+16|0;o=f[n>>2]|0;p=f[i>>2]|0;q=o-p>>2;r=p;p=o;if(m>>>0<=q>>>0)if(m>>>0<q>>>0?(o=r+(m<<2)|0,(o|0)!=(p|0)):0){f[n>>2]=p+(~((p+-4-o|0)>>>2)<<2);s=l;t=k}else{s=l;t=k}else{$f(i,m-q|0,3672);s=f[a>>2]|0;t=f[j>>2]|0}f[d>>2]=0;q=d+4|0;f[q>>2]=0;f[d+8>>2]=0;pi(d,t-s>>2);s=f[j>>2]|0;t=f[a>>2]|0;if((s|0)==(t|0)){v=s;w=s}else{m=f[d>>2]|0;k=m;l=k;o=0;p=s;s=k;k=t;t=m;while(1){m=f[k+(o<<2)>>2]|0;n=f[q>>2]|0;if(m>>>0<n-t>>2>>>0){x=l;y=s;z=k;A=p}else{r=m+1|0;f[e>>2]=0;B=n-t>>2;C=t;D=n;if(r>>>0<=B>>>0)if(r>>>0<B>>>0?(n=C+(r<<2)|0,(n|0)!=(D|0)):0){f[q>>2]=D+(~((D+-4-n|0)>>>2)<<2);E=l;F=p;G=k}else{E=l;F=p;G=k}else{$f(d,r-B|0,e);E=f[d>>2]|0;F=f[j>>2]|0;G=f[a>>2]|0}x=E;y=E;z=G;A=F}B=y+(m<<2)|0;f[B>>2]=(f[B>>2]|0)+1;o=o+1|0;if(o>>>0>=A-z>>2>>>0){v=z;w=A;break}else{l=x;p=A;s=y;k=z;t=y}}}y=w-v|0;v=y>>2;f[e>>2]=0;w=e+4|0;f[w>>2]=0;f[e+8>>2]=0;if(!v){H=0;I=0}else{if(v>>>0>536870911)Do(e);t=Yk(y<<1)|0;f[w>>2]=t;f[e>>2]=t;y=t+(v<<3)|0;f[e+8>>2]=y;z=v;v=t;k=t;while(1){s=v;f[s>>2]=-1;f[s+4>>2]=-1;s=k+8|0;A=z+-1|0;if(!A)break;else{z=A;v=s;k=s}}f[w>>2]=y;H=t;I=t}t=f[q>>2]|0;y=f[d>>2]|0;k=t-y|0;v=k>>2;f[g>>2]=0;z=g+4|0;f[z>>2]=0;f[g+8>>2]=0;s=y;do if(v)if(v>>>0>1073741823)Do(g);else{A=Yk(k)|0;f[g>>2]=A;p=A+(v<<2)|0;f[g+8>>2]=p;Dh(A|0,0,k|0)|0;f[z>>2]=p;J=A;K=p;L=A;break}else{J=0;K=0;L=0}while(0);if((t|0)!=(y|0)){y=0;t=0;while(1){f[J+(t<<2)>>2]=y;k=t+1|0;if(k>>>0<v>>>0){y=(f[s+(t<<2)>>2]|0)+y|0;t=k}else break}}t=f[j>>2]|0;j=f[a>>2]|0;y=j;if((t|0)!=(j|0)){k=a+40|0;a=t-j>>2;j=H;t=H;g=H;A=H;p=H;x=H;l=0;o=J;while(1){F=f[y+(l<<2)>>2]|0;G=l+1|0;E=((G>>>0)%3|0|0)==0?l+-2|0:G;if((E|0)==-1)M=-1;else M=f[y+(E<<2)>>2]|0;E=((l>>>0)%3|0|0)==0;G=(E?2:-1)+l|0;if((G|0)==-1)N=-1;else N=f[y+(G<<2)>>2]|0;if(E?(M|0)==(N|0)|((F|0)==(M|0)|(F|0)==(N|0)):0){f[k>>2]=(f[k>>2]|0)+1;O=j;P=t;Q=g;R=A;S=p;T=x;U=l+2|0;V=o}else W=51;a:do if((W|0)==51){W=0;E=f[s+(N<<2)>>2]|0;b:do if((E|0)>0){G=0;B=f[o+(N<<2)>>2]|0;while(1){m=f[p+(B<<3)>>2]|0;if((m|0)==-1){X=j;Y=t;Z=A;_=p;break b}if((m|0)==(M|0)){m=f[p+(B<<3)+4>>2]|0;if((m|0)==-1)$=-1;else $=f[y+(m<<2)>>2]|0;if((F|0)!=($|0))break}m=G+1|0;if((m|0)<(E|0)){G=m;B=B+1|0}else{X=j;Y=t;Z=A;_=p;break b}}m=f[A+(B<<3)+4>>2]|0;r=G;n=B;D=t;while(1){r=r+1|0;if((r|0)>=(E|0))break;C=n+1|0;f[D+(n<<3)>>2]=f[D+(C<<3)>>2];f[D+(n<<3)+4>>2]=f[D+(C<<3)+4>>2];if((f[j+(n<<3)>>2]|0)==-1)break;else{n=C;D=j}}f[g+(n<<3)>>2]=-1;if((m|0)==-1){X=g;Y=g;Z=g;_=g}else{D=f[i>>2]|0;f[D+(l<<2)>>2]=m;f[D+(m<<2)>>2]=l;O=g;P=g;Q=g;R=g;S=g;T=x;U=l;V=o;break a}}else{X=j;Y=t;Z=A;_=p}while(0);E=f[s+(M<<2)>>2]|0;if((E|0)>0){D=0;r=f[J+(M<<2)>>2]|0;while(1){aa=x+(r<<3)|0;if((f[aa>>2]|0)==-1)break;D=D+1|0;if((D|0)>=(E|0)){O=x;P=x;Q=x;R=x;S=x;T=x;U=l;V=J;break a}else r=r+1|0}f[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>2]|0;o=f[h>>2]|0;f[o+(m<<2)>>2]=(n|0)<(p|0)?p:n;q=o}m=m+1|0;r=f[g>>2]|0}while((m|0)<(r|0));if((r|0)>0){m=a+20|0;h=0;do{o=(f[b+(h<<2)>>2]|0)+(f[q+(h<<2)>>2]|0)|0;n=c+(h<<2)|0;f[n>>2]=o;if((o|0)<=(f[j>>2]|0)){if((o|0)<(f[l>>2]|0)){s=(f[m>>2]|0)+o|0;t=18}}else{s=o-(f[m>>2]|0)|0;t=18}if((t|0)==18){t=0;f[n>>2]=s}h=h+1|0;n=f[g>>2]|0}while((h|0)<(n|0));u=n}else u=r}else u=k;k=f[a+48>>2]|0;r=f[a+56>>2]|0;h=r+4|0;s=f[h>>2]|0;m=f[r>>2]|0;l=s-m|0;j=l>>2;if((l|0)<=4){kp(i);kp(d);return 1}l=f[a+52>>2]|0;q=(e|0)>0;n=a+16|0;o=a+32|0;p=a+12|0;v=a+20|0;a=k+12|0;w=e<<2;if(s-m>>2>>>0>1){x=1;y=u;z=m}else Do(r);while(1){m=f[z+(x<<2)>>2]|0;if(q)Dh(d|0,0,w|0)|0;if((m|0)!=-1){u=f[a>>2]|0;s=0;A=m;while(1){B=f[u+(A<<2)>>2]|0;if((B|0)!=-1){C=f[k>>2]|0;D=f[l>>2]|0;E=f[D+(f[C+(B<<2)>>2]<<2)>>2]|0;F=B+1|0;G=((F>>>0)%3|0|0)==0?B+-2|0:F;if((G|0)==-1)H=-1;else H=f[C+(G<<2)>>2]|0;G=f[D+(H<<2)>>2]|0;F=(((B>>>0)%3|0|0)==0?2:-1)+B|0;if((F|0)==-1)I=-1;else I=f[C+(F<<2)>>2]|0;F=f[D+(I<<2)>>2]|0;if((E|0)<(x|0)&(G|0)<(x|0)&(F|0)<(x|0)){D=X(E,e)|0;E=X(G,e)|0;G=X(F,e)|0;if(q){F=0;do{f[i+(F<<2)>>2]=(f[c+(F+G<<2)>>2]|0)+(f[c+(F+E<<2)>>2]|0)-(f[c+(F+D<<2)>>2]|0);F=F+1|0}while((F|0)!=(e|0));if(q){F=0;do{D=d+(F<<2)|0;f[D>>2]=(f[D>>2]|0)+(f[i+(F<<2)>>2]|0);F=F+1|0}while((F|0)!=(e|0))}}J=s+1|0}else J=s}else J=s;F=(((A>>>0)%3|0|0)==0?2:-1)+A|0;do if((F|0)!=-1?(D=f[u+(F<<2)>>2]|0,(D|0)!=-1):0)if(!((D>>>0)%3|0)){K=D+2|0;break}else{K=D+-1|0;break}else K=-1;while(0);A=(K|0)==(m|0)?-1:K;if((A|0)==-1)break;else s=J}s=X(x,e)|0;if(J){if(q){A=0;do{m=d+(A<<2)|0;f[m>>2]=(f[m>>2]|0)/(J|0)|0;A=A+1|0}while((A|0)!=(e|0))}A=b+(s<<2)|0;m=c+(s<<2)|0;if((y|0)>0){u=0;do{F=f[d+(u<<2)>>2]|0;D=f[n>>2]|0;if((F|0)>(D|0)){E=f[o>>2]|0;f[E+(u<<2)>>2]=D;L=E}else{E=f[p>>2]|0;D=f[o>>2]|0;f[D+(u<<2)>>2]=(F|0)<(E|0)?E:F;L=D}u=u+1|0;M=f[g>>2]|0}while((u|0)<(M|0));if((M|0)>0){u=0;do{D=(f[A+(u<<2)>>2]|0)+(f[L+(u<<2)>>2]|0)|0;F=m+(u<<2)|0;f[F>>2]=D;if((D|0)<=(f[n>>2]|0)){if((D|0)<(f[p>>2]|0)){N=(f[v>>2]|0)+D|0;t=70}}else{N=D-(f[v>>2]|0)|0;t=70}if((t|0)==70){t=0;f[F>>2]=N}u=u+1|0;F=f[g>>2]|0}while((u|0)<(F|0));O=F}else O=M}else O=y}else{P=s;t=48}}else{P=X(x,e)|0;t=48}if((t|0)==48){t=0;u=c+((X(x+-1|0,e)|0)<<2)|0;m=b+(P<<2)|0;A=c+(P<<2)|0;if((y|0)>0){F=0;do{D=f[u+(F<<2)>>2]|0;E=f[n>>2]|0;if((D|0)>(E|0)){G=f[o>>2]|0;f[G+(F<<2)>>2]=E;Q=G}else{G=f[p>>2]|0;E=f[o>>2]|0;f[E+(F<<2)>>2]=(D|0)<(G|0)?G:D;Q=E}F=F+1|0;R=f[g>>2]|0}while((F|0)<(R|0));if((R|0)>0){F=0;do{u=(f[m+(F<<2)>>2]|0)+(f[Q+(F<<2)>>2]|0)|0;s=A+(F<<2)|0;f[s>>2]=u;if((u|0)<=(f[n>>2]|0)){if((u|0)<(f[p>>2]|0)){S=(f[v>>2]|0)+u|0;t=58}}else{S=u-(f[v>>2]|0)|0;t=58}if((t|0)==58){t=0;f[s>>2]=S}F=F+1|0;s=f[g>>2]|0}while((F|0)<(s|0));O=s}else O=R}else O=y}x=x+1|0;if((x|0)>=(j|0)){t=22;break}z=f[r>>2]|0;if((f[h>>2]|0)-z>>2>>>0<=x>>>0){t=23;break}else y=O}if((t|0)==22){kp(i);kp(d);return 1}else if((t|0)==23)Do(r);return 0}function Wb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;g=a+8|0;f[g>>2]=e;d=a+32|0;h=a+36|0;i=f[h>>2]|0;j=f[d>>2]|0;k=i-j>>2;l=j;j=i;if(k>>>0>=e>>>0){if(k>>>0>e>>>0?(i=l+(e<<2)|0,(i|0)!=(j|0)):0)f[h>>2]=j+(~((j+-4-i|0)>>>2)<<2)}else Og(d,e-k|0);k=e>>>0>1073741823?-1:e<<2;d=jp(k)|0;Dh(d|0,0,k|0)|0;i=jp(k)|0;Dh(i|0,0,k|0)|0;k=f[g>>2]|0;if((k|0)>0){j=a+16|0;h=a+32|0;l=a+12|0;m=0;do{n=f[d+(m<<2)>>2]|0;o=f[j>>2]|0;if((n|0)>(o|0)){p=f[h>>2]|0;f[p+(m<<2)>>2]=o;q=p}else{p=f[l>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(f[c+(G+C<<2)>>2]|0);G=G+1|0}while((G|0)!=(e|0));if(q){G=0;do{C=d+(G<<2)|0;f[C>>2]=(f[C>>2]|0)+(f[i+(G<<2)>>2]|0);G=G+1|0}while((G|0)!=(e|0))}}I=s+1|0}else I=s;G=(((B>>>0)%3|0|0)==0?2:-1)+B|0;do if(((G|0)!=-1?(f[u+(G>>>5<<2)>>2]&1<<(G&31)|0)==0:0)?(C=f[(f[(f[a>>2]|0)+12>>2]|0)+(G<<2)>>2]|0,(C|0)!=-1):0)if(!((C>>>0)%3|0)){J=C+2|0;break}else{J=C+-1|0;break}else J=-1;while(0);B=(J|0)==(m|0)?-1:J;if((B|0)==-1)break;else s=I}s=X(y,e)|0;if(I){if(q){B=0;do{m=d+(B<<2)|0;f[m>>2]=(f[m>>2]|0)/(I|0)|0;B=B+1|0}while((B|0)!=(e|0))}B=b+(s<<2)|0;m=c+(s<<2)|0;if((z|0)>0){u=0;do{G=f[d+(u<<2)>>2]|0;C=f[n>>2]|0;if((G|0)>(C|0)){F=f[o>>2]|0;f[F+(u<<2)>>2]=C;K=F}else{F=f[p>>2]|0;C=f[o>>2]|0;f[C+(u<<2)>>2]=(G|0)<(F|0)?F:G;K=C}u=u+1|0;L=f[g>>2]|0}while((u|0)<(L|0));if((L|0)>0){u=0;do{C=(f[B+(u<<2)>>2]|0)+(f[K+(u<<2)>>2]|0)|0;G=m+(u<<2)|0;f[G>>2]=C;if((C|0)<=(f[n>>2]|0)){if((C|0)<(f[p>>2]|0)){M=(f[v>>2]|0)+C|0;t=68}}else{M=C-(f[v>>2]|0)|0;t=68}if((t|0)==68){t=0;f[G>>2]=M}u=u+1|0;G=f[g>>2]|0}while((u|0)<(G|0));N=G}else N=L}else N=z}else{O=s;t=46}}else{O=X(y,e)|0;t=46}if((t|0)==46){t=0;u=c+((X(y+-1|0,e)|0)<<2)|0;m=b+(O<<2)|0;B=c+(O<<2)|0;if((z|0)>0){G=0;do{C=f[u+(G<<2)>>2]|0;F=f[n>>2]|0;if((C|0)>(F|0)){H=f[o>>2]|0;f[H+(G<<2)>>2]=F;P=H}else{H=f[p>>2]|0;F=f[o>>2]|0;f[F+(G<<2)>>2]=(C|0)<(H|0)?H:C;P=F}G=G+1|0;Q=f[g>>2]|0}while((G|0)<(Q|0));if((Q|0)>0){G=0;do{u=(f[m+(G<<2)>>2]|0)+(f[P+(G<<2)>>2]|0)|0;s=B+(G<<2)|0;f[s>>2]=u;if((u|0)<=(f[n>>2]|0)){if((u|0)<(f[p>>2]|0)){R=(f[v>>2]|0)+u|0;t=56}}else{R=u-(f[v>>2]|0)|0;t=56}if((t|0)==56){t=0;f[s>>2]=R}G=G+1|0;s=f[g>>2]|0}while((G|0)<(s|0));N=s}else N=Q}else N=z}y=y+1|0;if((y|0)>=(j|0)){t=22;break}A=f[r>>2]|0;if((f[h>>2]|0)-A>>2>>>0<=y>>>0){t=23;break}else z=N}if((t|0)==22){kp(i);kp(d);return 1}else if((t|0)==23)Do(r);return 0}function Xb(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=Na,ba=Na,ca=Na;c=u;u=u+32|0;d=c+12|0;e=c;g=a+60|0;if((f[g>>2]|0)==(f[a+64>>2]|0)?(f[a+48>>2]|0)==(f[a+52>>2]|0):0){h=1;u=c;return h|0}if((Pa[f[(f[a>>2]|0)+24>>2]&127](a)|0)<=0){h=1;u=c;return h|0}i=d+4|0;j=d+8|0;k=e+4|0;l=e+8|0;m=e+8|0;o=d+8|0;p=a+36|0;q=d+8|0;r=d+4|0;s=d+11|0;t=0;v=0;w=0;a:while(1){x=Qa[f[(f[a>>2]|0)+20>>2]&127](a,w)|0;y=(Pa[f[(f[a>>2]|0)+28>>2]&127](a)|0)+4|0;z=f[(f[(f[y>>2]|0)+8>>2]|0)+(x<<2)>>2]|0;x=z+28|0;b:do switch(f[x>>2]|0){case 1:case 3:case 5:{y=z+24|0;A=b[y>>0]|0;B=A<<24>>24;f[d>>2]=0;f[i>>2]=0;f[j>>2]=0;if(!(A<<24>>24))C=0;else{if(A<<24>>24<0){D=8;break a}A=B<<2;E=Yk(A)|0;f[d>>2]=E;F=E+(B<<2)|0;f[o>>2]=F;Dh(E|0,0,A|0)|0;f[i>>2]=F;C=b[y>>0]|0}F=C<<24>>24;f[e>>2]=0;f[k>>2]=0;f[l>>2]=0;if(C<<24>>24){if(C<<24>>24<0){D=12;break a}A=F<<2;E=Yk(A)|0;f[e>>2]=E;B=E+(F<<2)|0;f[m>>2]=B;Dh(E|0,0,A|0)|0;f[k>>2]=B}switch(f[x>>2]|0){case 5:{if(Id(a,z,v)|0)D=18;else{G=1;H=v}break}case 3:{if(Hd(a,z,v)|0)D=18;else{G=1;H=v}break}case 1:{if(yd(a,z,v)|0)D=18;else{G=1;H=v}break}default:D=18}if((D|0)==18){D=0;G=0;H=v+(b[y>>0]|0)|0}y=f[e>>2]|0;if(y|0){B=f[k>>2]|0;if((B|0)!=(y|0))f[k>>2]=B+(~((B+-4-y|0)>>>2)<<2);mp(y)}y=f[d>>2]|0;if(y|0){B=f[i>>2]|0;if((B|0)!=(y|0))f[i>>2]=B+(~((B+-4-y|0)>>>2)<<2);mp(y)}if(!G){I=t;J=H}else{h=0;D=52;break a}break}case 9:{y=f[(f[g>>2]|0)+(t<<2)>>2]|0;B=f[p>>2]|0;A=t+1|0;E=(Pa[f[(f[a>>2]|0)+28>>2]&127](a)|0)+40|0;F=f[E>>2]|0;E=f[z+56>>2]|0;K=Yk(32)|0;f[d>>2]=K;f[q>>2]=-2147483616;f[r>>2]=24;L=K;M=11875;N=L+24|0;do{b[L>>0]=b[M>>0]|0;L=L+1|0;M=M+1|0}while((L|0)<(N|0));b[K+24>>0]=0;M=F+16|0;L=f[M>>2]|0;if(L){N=M;O=L;c:while(1){L=O;while(1){if((f[L+16>>2]|0)>=(E|0))break;P=f[L+4>>2]|0;if(!P){Q=N;break c}else L=P}O=f[L>>2]|0;if(!O){Q=L;break}else N=L}if(((Q|0)!=(M|0)?(E|0)>=(f[Q+16>>2]|0):0)?(N=Q+20|0,(fg(N,d)|0)!=0):0)R=gi(N,d,0)|0;else D=37}else D=37;if((D|0)==37){D=0;R=gi(F,d,0)|0}if((b[s>>0]|0)<0)mp(f[d>>2]|0);if(R){ae(z,y);I=A;J=v;break b}N=f[B+(t*24|0)+4>>2]|0;O=b[z+24>>0]|0;K=O<<24>>24;P=K<<2;S=jp(K>>>0>1073741823?-1:K<<2)|0;Eo(d);if(!(jl(d,$(n[B+(t*24|0)+20>>2]),(1<<N)+-1|0)|0)){D=51;break a}N=(f[f[y>>2]>>2]|0)+(f[y+48>>2]|0)|0;T=y+80|0;d:do if(f[T>>2]|0){U=z+64|0;V=B+(t*24|0)+8|0;if(O<<24>>24>0){W=0;X=0;Y=0}else{Z=0;_=0;while(1){Ef((f[f[U>>2]>>2]|0)+_|0,S|0,P|0)|0;Z=Z+1|0;if(Z>>>0>=(f[T>>2]|0)>>>0)break d;else _=_+P|0}}while(1){_=f[V>>2]|0;aa=$(n[d>>2]);Z=0;L=Y;while(1){ba=$(aa*$(f[N+(L<<2)>>2]|0));ca=$(ba+$(n[_+(Z<<2)>>2]));n[S+(Z<<2)>>2]=ca;Z=Z+1|0;if((Z|0)==(K|0))break;else L=L+1|0}Ef((f[f[U>>2]>>2]|0)+X|0,S|0,P|0)|0;W=W+1|0;if(W>>>0>=(f[T>>2]|0)>>>0)break;else{X=X+P|0;Y=Y+K|0}}}while(0);kp(S);I=A;J=v;break}default:{I=t;J=v}}while(0);w=w+1|0;if((w|0)>=(Pa[f[(f[a>>2]|0)+24>>2]&127](a)|0)){h=1;D=52;break}else{t=I;v=J}}if((D|0)==8)Do(d);else if((D|0)==12)Do(e);else if((D|0)==51){kp(S);h=0;u=c;return h|0}else if((D|0)==52){u=c;return h|0}return 0}function Yb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;d=u;u=u+16|0;e=d;g=a+144|0;i=f[g>>2]|0;k=Pa[f[(f[i>>2]|0)+32>>2]&127](i)|0;do if((((h[k+36>>0]|0)<<8|(h[k+37>>0]|0))&65535)<514){i=a+40|0;l=i;m=a;n=l+40|0;do{f[l>>2]=f[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));if(yf(i,1,e)|0){l=a;m=i;n=l+40|0;do{f[l>>2]=f[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));i=e;o=f[i>>2]|0;p=f[i+4>>2]|0;i=a+8|0;q=a+16|0;r=q;s=f[r>>2]|0;t=f[r+4>>2]|0;r=Xl(f[i>>2]|0,f[i+4>>2]|0,s|0,t|0)|0;i=I;if(!(p>>>0>i>>>0|(p|0)==(i|0)&o>>>0>r>>>0)){r=Vl(s|0,t|0,o|0,p|0)|0;p=q;f[p>>2]=r;f[p+4>>2]=I;break}}v=0;u=d;return v|0}while(0);do if((j[a+38>>1]|0)>=514){if(!(zd(a+80|0,a)|0)){v=0;u=d;return v|0}}else{k=a+96|0;l=k;m=a;n=l+40|0;do{f[l>>2]=f[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));if(yf(k,1,e)|0){l=a;m=k;n=l+40|0;do{f[l>>2]=f[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));k=e;p=f[k>>2]|0;r=f[k+4>>2]|0;k=a+8|0;q=a+16|0;o=q;t=f[o>>2]|0;s=f[o+4>>2]|0;o=Xl(f[k>>2]|0,f[k+4>>2]|0,t|0,s|0)|0;k=I;if(!(r>>>0>k>>>0|(r|0)==(k|0)&p>>>0>o>>>0)){o=Vl(t|0,s|0,p|0,r|0)|0;r=q;f[r>>2]=o;f[r+4>>2]=I;break}}v=0;u=d;return v|0}while(0);if(!(Zg(a)|0)){v=0;u=d;return v|0}l=c;m=a;n=l+40|0;do{f[l>>2]=f[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));m=f[g>>2]|0;l=Pa[f[(f[m>>2]|0)+32>>2]&127](m)|0;do if((((h[l+36>>0]|0)<<8|(h[l+37>>0]|0))&65535)<514){m=f[g>>2]|0;n=(Pa[f[(f[m>>2]|0)+32>>2]&127](m)|0)+36|0;if(((h[n>>0]|0)<<8&65535)<512){n=c+8|0;m=f[n>>2]|0;r=f[n+4>>2]|0;n=c+16|0;o=n;q=f[o>>2]|0;p=Vl(q|0,f[o+4>>2]|0,4,0)|0;o=I;if(!((r|0)<(o|0)|(r|0)==(o|0)&m>>>0<p>>>0)){m=(f[c>>2]|0)+q|0;q=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;f[e>>2]=q;m=n;f[m>>2]=p;f[m+4>>2]=o;w=q;x=19}}else if(Nh(e,c)|0){w=f[e>>2]|0;x=19}if((((x|0)==19?(q=f[a+152>>2]|0,w>>>0<q>>>0):0)?(o=c+8|0,m=f[o+4>>2]|0,p=c+16|0,n=p,r=f[n>>2]|0,s=f[n+4>>2]|0,(m|0)>(s|0)|((m|0)==(s|0)?(f[o>>2]|0)>>>0>r>>>0:0)):0)?(o=b[(f[c>>2]|0)+r>>0]|0,m=Vl(r|0,s|0,1,0)|0,s=p,f[s>>2]=m,f[s+4>>2]=I,o<<24>>24==0):0){f[a+176>>2]=2;f[a+180>>2]=7;y=q;break}v=0;u=d;return v|0}else{f[a+176>>2]=2;f[a+180>>2]=7;y=f[a+152>>2]|0}while(0);if((y|0)<0){v=0;u=d;return v|0}w=a+156|0;f[e>>2]=0;x=a+160|0;g=f[x>>2]|0;l=f[w>>2]|0;q=g-l>>2;o=l;l=g;if(y>>>0<=q>>>0)if(y>>>0<q>>>0?(g=o+(y<<2)|0,(g|0)!=(l|0)):0){f[x>>2]=l+(~((l+-4-g|0)>>>2)<<2);z=2;A=7}else{z=2;A=7}else{$f(w,y-q|0,e);z=f[a+176>>2]|0;A=f[a+180>>2]|0}q=A-z+1|0;z=a+184|0;A=a+188|0;y=f[A>>2]|0;w=f[z>>2]|0;g=(y-w|0)/12|0;l=w;w=y;if(q>>>0<=g>>>0)if(q>>>0<g>>>0?(x=l+(q*12|0)|0,(x|0)!=(w|0)):0){l=w;while(1){w=l+-12|0;f[A>>2]=w;o=f[w>>2]|0;if(!o)B=w;else{w=l+-8|0;s=f[w>>2]|0;if((s|0)!=(o|0))f[w>>2]=s+(~((s+-4-o|0)>>>2)<<2);mp(o);B=f[A>>2]|0}if((B|0)==(x|0))break;else l=B}C=B}else C=y;else{De(z,q-g|0);C=f[A>>2]|0}g=a+196|0;q=f[z>>2]|0;y=(C-q|0)/12|0;B=a+200|0;a=f[B>>2]|0;l=f[g>>2]|0;x=a-l>>2;o=l;l=a;if(y>>>0<=x>>>0)if(y>>>0<x>>>0?(a=o+(y<<2)|0,(a|0)!=(l|0)):0){f[B>>2]=l+(~((l+-4-a|0)>>>2)<<2);D=C;E=q}else{D=C;E=q}else{Og(g,y-x|0);D=f[A>>2]|0;E=f[z>>2]|0}if((D|0)==(E|0)){v=1;u=d;return v|0}E=0;do{Nh(e,c)|0;D=f[e>>2]|0;if(D|0){x=f[z>>2]|0;y=x+(E*12|0)|0;q=x+(E*12|0)+4|0;C=f[q>>2]|0;a=f[y>>2]|0;l=C-a>>2;B=a;a=C;if(D>>>0<=l>>>0)if(D>>>0<l>>>0?(C=B+(D<<2)|0,(C|0)!=(a|0)):0){f[q>>2]=a+(~((a+-4-C|0)>>>2)<<2);F=x;G=D}else{F=x;G=D}else{Og(y,D-l|0);F=f[z>>2]|0;G=f[e>>2]|0}yh(G,1,c,f[F+(E*12|0)>>2]|0)|0;f[(f[g>>2]|0)+(E<<2)>>2]=f[e>>2]}E=E+1|0}while(E>>>0<(((f[A>>2]|0)-(f[z>>2]|0)|0)/12|0)>>>0);v=1;u=d;return v|0}function Zb(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!a)return;b=a+-8|0;c=f[4198]|0;d=f[a+-4>>2]|0;a=d&-8;e=b+a|0;do if(!(d&1)){g=f[b>>2]|0;if(!(d&3))return;h=b+(0-g)|0;i=g+a|0;if(h>>>0<c>>>0)return;if((f[4199]|0)==(h|0)){j=e+4|0;k=f[j>>2]|0;if((k&3|0)!=3){l=h;m=i;n=h;break}f[4196]=i;f[j>>2]=k&-2;f[h+4>>2]=i|1;f[h+i>>2]=i;return}k=g>>>3;if(g>>>0<256){g=f[h+8>>2]|0;j=f[h+12>>2]|0;if((j|0)==(g|0)){f[4194]=f[4194]&~(1<<k);l=h;m=i;n=h;break}else{f[g+12>>2]=j;f[j+8>>2]=g;l=h;m=i;n=h;break}}g=f[h+24>>2]|0;j=f[h+12>>2]|0;do if((j|0)==(h|0)){k=h+16|0;o=k+4|0;p=f[o>>2]|0;if(!p){q=f[k>>2]|0;if(!q){r=0;break}else{s=q;t=k}}else{s=p;t=o}while(1){o=s+20|0;p=f[o>>2]|0;if(p|0){s=p;t=o;continue}o=s+16|0;p=f[o>>2]|0;if(!p)break;else{s=p;t=o}}f[t>>2]=0;r=s}else{o=f[h+8>>2]|0;f[o+12>>2]=j;f[j+8>>2]=o;r=j}while(0);if(g){j=f[h+28>>2]|0;o=17080+(j<<2)|0;if((f[o>>2]|0)==(h|0)){f[o>>2]=r;if(!r){f[4195]=f[4195]&~(1<<j);l=h;m=i;n=h;break}}else{f[g+16+(((f[g+16>>2]|0)!=(h|0)&1)<<2)>>2]=r;if(!r){l=h;m=i;n=h;break}}f[r+24>>2]=g;j=h+16|0;o=f[j>>2]|0;if(o|0){f[r+16>>2]=o;f[o+24>>2]=r}o=f[j+4>>2]|0;if(o){f[r+20>>2]=o;f[o+24>>2]=r;l=h;m=i;n=h}else{l=h;m=i;n=h}}else{l=h;m=i;n=h}}else{l=b;m=a;n=b}while(0);if(n>>>0>=e>>>0)return;b=e+4|0;a=f[b>>2]|0;if(!(a&1))return;if(!(a&2)){if((f[4200]|0)==(e|0)){r=(f[4197]|0)+m|0;f[4197]=r;f[4200]=l;f[l+4>>2]=r|1;if((l|0)!=(f[4199]|0))return;f[4199]=0;f[4196]=0;return}if((f[4199]|0)==(e|0)){r=(f[4196]|0)+m|0;f[4196]=r;f[4199]=n;f[l+4>>2]=r|1;f[n+r>>2]=r;return}r=(a&-8)+m|0;s=a>>>3;do if(a>>>0<256){t=f[e+8>>2]|0;c=f[e+12>>2]|0;if((c|0)==(t|0)){f[4194]=f[4194]&~(1<<s);break}else{f[t+12>>2]=c;f[c+8>>2]=t;break}}else{t=f[e+24>>2]|0;c=f[e+12>>2]|0;do if((c|0)==(e|0)){d=e+16|0;o=d+4|0;j=f[o>>2]|0;if(!j){p=f[d>>2]|0;if(!p){u=0;break}else{v=p;w=d}}else{v=j;w=o}while(1){o=v+20|0;j=f[o>>2]|0;if(j|0){v=j;w=o;continue}o=v+16|0;j=f[o>>2]|0;if(!j)break;else{v=j;w=o}}f[w>>2]=0;u=v}else{o=f[e+8>>2]|0;f[o+12>>2]=c;f[c+8>>2]=o;u=c}while(0);if(t|0){c=f[e+28>>2]|0;h=17080+(c<<2)|0;if((f[h>>2]|0)==(e|0)){f[h>>2]=u;if(!u){f[4195]=f[4195]&~(1<<c);break}}else{f[t+16+(((f[t+16>>2]|0)!=(e|0)&1)<<2)>>2]=u;if(!u)break}f[u+24>>2]=t;c=e+16|0;h=f[c>>2]|0;if(h|0){f[u+16>>2]=h;f[h+24>>2]=u}h=f[c+4>>2]|0;if(h|0){f[u+20>>2]=h;f[h+24>>2]=u}}}while(0);f[l+4>>2]=r|1;f[n+r>>2]=r;if((l|0)==(f[4199]|0)){f[4196]=r;return}else x=r}else{f[b>>2]=a&-2;f[l+4>>2]=m|1;f[n+m>>2]=m;x=m}m=x>>>3;if(x>>>0<256){n=16816+(m<<1<<2)|0;a=f[4194]|0;b=1<<m;if(!(a&b)){f[4194]=a|b;y=n;z=n+8|0}else{b=n+8|0;y=f[b>>2]|0;z=b}f[z>>2]=l;f[y+12>>2]=l;f[l+8>>2]=y;f[l+12>>2]=n;return}n=x>>>8;if(n)if(x>>>0>16777215)A=31;else{y=(n+1048320|0)>>>16&8;z=n<<y;n=(z+520192|0)>>>16&4;b=z<<n;z=(b+245760|0)>>>16&2;a=14-(n|y|z)+(b<<z>>>15)|0;A=x>>>(a+7|0)&1|a<<1}else A=0;a=17080+(A<<2)|0;f[l+28>>2]=A;f[l+20>>2]=0;f[l+16>>2]=0;z=f[4195]|0;b=1<<A;do if(z&b){y=x<<((A|0)==31?0:25-(A>>>1)|0);n=f[a>>2]|0;while(1){if((f[n+4>>2]&-8|0)==(x|0)){B=73;break}C=n+16+(y>>>31<<2)|0;m=f[C>>2]|0;if(!m){B=72;break}else{y=y<<1;n=m}}if((B|0)==72){f[C>>2]=l;f[l+24>>2]=n;f[l+12>>2]=l;f[l+8>>2]=l;break}else if((B|0)==73){y=n+8|0;t=f[y>>2]|0;f[t+12>>2]=l;f[y>>2]=l;f[l+8>>2]=t;f[l+12>>2]=n;f[l+24>>2]=0;break}}else{f[4195]=z|b;f[a>>2]=l;f[l+24>>2]=a;f[l+12>>2]=l;f[l+8>>2]=l}while(0);l=(f[4202]|0)+-1|0;f[4202]=l;if(!l)D=17232;else return;while(1){l=f[D>>2]|0;if(!l)break;else D=l+8|0}f[4202]=-1;return}function _b(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=Na,F=Na,G=Na,H=0,I=0,J=0,K=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;e=i;j=i;while(1){k=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;e=(X(k>>>24^k,1540483477)|0)^(X(e,1540483477)|0);j=j+-4|0;if(j>>>0<=3)break;else d=d+4|0}d=i+-4|0;j=d&-4;l=d-j|0;m=g+(j+4)|0;o=e}else{l=i;m=g;o=i}switch(l|0){case 3:{p=h[m+2>>0]<<16^o;q=6;break}case 2:{p=o;q=6;break}case 1:{r=o;q=7;break}default:s=o}if((q|0)==6){r=h[m+1>>0]<<8^p;q=7}if((q|0)==7)s=X(r^h[m>>0],1540483477)|0;m=X(s>>>13^s,1540483477)|0;s=m>>>15^m;m=a+4|0;r=f[m>>2]|0;p=(r|0)==0;a:do if(!p){o=r+-1|0;l=(o&r|0)==0;if(!l)if(s>>>0<r>>>0)t=s;else t=(s>>>0)%(r>>>0)|0;else t=s&o;e=f[(f[a>>2]|0)+(t<<2)>>2]|0;if((e|0)!=0?(j=f[e>>2]|0,(j|0)!=0):0){e=(i|0)==0;if(l){if(e){l=j;while(1){d=f[l+4>>2]|0;if(!((d|0)==(s|0)|(d&o|0)==(t|0))){u=t;break a}d=b[l+8+11>>0]|0;if(!((d<<24>>24<0?f[l+12>>2]|0:d&255)|0)){v=l;break}l=f[l>>2]|0;if(!l){u=t;break a}}w=v+20|0;return w|0}else x=j;b:while(1){l=f[x+4>>2]|0;if(!((l|0)==(s|0)|(l&o|0)==(t|0))){u=t;break a}l=x+8|0;d=b[l+11>>0]|0;k=d<<24>>24<0;y=d&255;do if(((k?f[x+12>>2]|0:y)|0)==(i|0)){d=f[l>>2]|0;if(k)if(!(fj(d,g,i)|0)){v=x;q=63;break b}else break;if((b[g>>0]|0)==(d&255)<<24>>24){d=l;z=y;A=g;do{z=z+-1|0;d=d+1|0;if(!z){v=x;q=63;break b}A=A+1|0}while((b[d>>0]|0)==(b[A>>0]|0))}}while(0);x=f[x>>2]|0;if(!x){u=t;break a}}if((q|0)==63){w=v+20|0;return w|0}}if(e){o=j;while(1){y=f[o+4>>2]|0;if((y|0)!=(s|0)){if(y>>>0<r>>>0)B=y;else B=(y>>>0)%(r>>>0)|0;if((B|0)!=(t|0)){u=t;break a}}y=b[o+8+11>>0]|0;if(!((y<<24>>24<0?f[o+12>>2]|0:y&255)|0)){v=o;break}o=f[o>>2]|0;if(!o){u=t;break a}}w=v+20|0;return w|0}else C=j;c:while(1){o=f[C+4>>2]|0;if((o|0)!=(s|0)){if(o>>>0<r>>>0)D=o;else D=(o>>>0)%(r>>>0)|0;if((D|0)!=(t|0)){u=t;break a}}o=C+8|0;e=b[o+11>>0]|0;y=e<<24>>24<0;l=e&255;do if(((y?f[C+12>>2]|0:l)|0)==(i|0)){e=f[o>>2]|0;if(y)if(!(fj(e,g,i)|0)){v=C;q=63;break c}else break;if((b[g>>0]|0)==(e&255)<<24>>24){e=o;k=l;A=g;do{k=k+-1|0;e=e+1|0;if(!k){v=C;q=63;break c}A=A+1|0}while((b[e>>0]|0)==(b[A>>0]|0))}}while(0);C=f[C>>2]|0;if(!C){u=t;break a}}if((q|0)==63){w=v+20|0;return w|0}}else u=t}else u=0;while(0);t=Yk(24)|0;zh(t+8|0,c);f[t+20>>2]=0;f[t+4>>2]=s;f[t>>2]=0;c=a+12|0;E=$(((f[c>>2]|0)+1|0)>>>0);F=$(r>>>0);G=$(n[a+16>>2]);do if(p|$(G*F)<E){C=r<<1|(r>>>0<3|(r+-1&r|0)!=0)&1;g=~~$(W($(E/G)))>>>0;pg(a,C>>>0<g>>>0?g:C);C=f[m>>2]|0;g=C+-1|0;if(!(g&C)){H=C;I=g&s;break}if(s>>>0<C>>>0){H=C;I=s}else{H=C;I=(s>>>0)%(C>>>0)|0}}else{H=r;I=u}while(0);u=(f[a>>2]|0)+(I<<2)|0;I=f[u>>2]|0;if(!I){r=a+8|0;f[t>>2]=f[r>>2];f[r>>2]=t;f[u>>2]=r;r=f[t>>2]|0;if(r|0){u=f[r+4>>2]|0;r=H+-1|0;if(r&H)if(u>>>0<H>>>0)J=u;else J=(u>>>0)%(H>>>0)|0;else J=u&r;K=(f[a>>2]|0)+(J<<2)|0;q=61}}else{f[t>>2]=f[I>>2];K=I;q=61}if((q|0)==61)f[K>>2]=t;f[c>>2]=(f[c>>2]|0)+1;v=t;w=v+20|0;return w|0}function $b(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=u;u=u+80|0;e=d+64|0;g=d;i=d+60|0;j=a+4|0;k=f[j>>2]|0;l=f[k+32>>2]|0;m=l+8|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=l+16|0;p=m;q=f[p>>2]|0;r=f[p+4>>2]|0;if(!((o|0)>(r|0)|(o|0)==(r|0)&n>>>0>q>>>0)){s=0;u=d;return s|0}p=f[l>>2]|0;l=b[p+q>>0]|0;t=Vl(q|0,r|0,1,0)|0;v=I;w=m;f[w>>2]=t;f[w+4>>2]=v;if(!((o|0)>(v|0)|(o|0)==(v|0)&n>>>0>t>>>0)){s=0;u=d;return s|0}v=b[p+t>>0]|0;t=Vl(q|0,r|0,2,0)|0;w=I;x=m;f[x>>2]=t;f[x+4>>2]=w;if(l<<24>>24>-1){x=l<<24>>24;y=f[a+216>>2]|0;if((((f[a+220>>2]|0)-y|0)/144|0)>>>0<=x>>>0){s=0;u=d;return s|0}z=y+(x*144|0)|0;if((f[z>>2]|0)>-1){s=0;u=d;return s|0}else A=z}else{z=a+212|0;if((f[z>>2]|0)>-1){s=0;u=d;return s|0}else A=z}f[A>>2]=c;do if((((h[k+36>>0]|0)<<8|(h[k+37>>0]|0))&65535)>257)if((o|0)>(w|0)|(o|0)==(w|0)&n>>>0>t>>>0){A=b[p+t>>0]|0;z=Vl(q|0,r|0,3,0)|0;x=m;f[x>>2]=z;f[x+4>>2]=I;B=A&255;break}else{s=0;u=d;return s|0}else B=0;while(0);m=f[k+44>>2]|0;if(!(v<<24>>24)){if(l<<24>>24<0)C=a+184|0;else{v=l<<24>>24;k=f[a+216>>2]|0;b[k+(v*144|0)+100>>0]=0;C=k+(v*144|0)+104|0}switch((B&255)<<24>>24){case 1:{He(e,a,C);D=f[e>>2]|0;break}case 0:{Yd(e,a,C);D=f[e>>2]|0;break}default:{s=0;u=d;return s|0}}if(!D){s=0;u=d;return s|0}else E=D}else{if(l<<24>>24<0|(B|0)!=0){s=0;u=d;return s|0}B=l<<24>>24;l=f[a+216>>2]|0;a=l+(B*144|0)+104|0;D=l+(B*144|0)+4|0;C=Yk(80)|0;f[C+4>>2]=0;f[C>>2]=3172;v=C+8|0;k=C+12|0;r=k+44|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(r|0));f[v>>2]=3196;q=C+56|0;f[q>>2]=0;f[C+60>>2]=0;f[C+64>>2]=0;f[C+68>>2]=m;f[C+72>>2]=a;f[C+76>>2]=0;t=g+4|0;k=t+4|0;r=k+40|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(r|0));f[g>>2]=3196;k=g+48|0;f[k>>2]=0;r=g+52|0;f[r>>2]=0;f[g+56>>2]=0;f[t>>2]=D;p=f[l+(B*144|0)+68>>2]|0;B=((f[p+4>>2]|0)-(f[p>>2]|0)>>2>>>0)/3|0;b[e>>0]=0;If(g+24|0,B,e);B=f[t>>2]|0;t=(f[B+56>>2]|0)-(f[B+52>>2]|0)>>2;b[e>>0]=0;If(g+36|0,t,e);f[g+8>>2]=D;f[g+12>>2]=a;f[g+16>>2]=m;f[g+20>>2]=C;te(v,g)|0;Re(q,f[k>>2]|0,f[r>>2]|0);q=C;f[g>>2]=3196;C=f[k>>2]|0;if(C|0){k=f[r>>2]|0;if((k|0)!=(C|0))f[r>>2]=k+(~((k+-4-C|0)>>>2)<<2);mp(C)}f[g>>2]=3216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|0)==(m|0)){o=g;p=d;q=d;r=n;s=n;t=h;v=l;w=l;x=k;y=i;z=j;A=i}else{l=0;do{if(Oi((f[k>>2]|0)+(l<<4)|0)|0){n=f[i>>2]|0;f[d>>2]=e;m=n+(l*144|0)+136|0;B=f[m>>2]|0;if(B>>>0<(f[n+(l*144|0)+140>>2]|0)>>>0){f[B>>2]=e;f[m>>2]=B+4}else dh(n+(l*144|0)+132|0,d)}l=l+1|0;C=f[j>>2]|0;D=f[i>>2]|0}while(l>>>0<((C-D|0)/144|0)>>>0);l=D;o=g;p=d;q=d;r=l;s=l;t=h;v=C;w=D;x=k;y=i;z=j;A=i}}else{E=d;F=d;G=i;H=k;I=g;J=h;K=j;L=i;M=5}}else{i=a+216|0;E=d;F=d;G=i;H=a+368|0;I=-1;J=-1;K=a+220|0;L=i;M=5}if((M|0)==5){M=f[K>>2]|0;i=f[L>>2]|0;a=i;if((M|0)==(i|0)){o=I;p=E;q=F;r=a;s=a;t=J;v=M;w=M;x=H;y=G;z=K;A=L}else{j=0;h=a;g=a;k=i;i=M;M=a;while(1){f[d>>2]=e;a=M+(j*144|0)+136|0;D=f[a>>2]|0;if(D>>>0<(f[M+(j*144|0)+140>>2]|0)>>>0){f[D>>2]=e;f[a>>2]=D+4;N=h;O=g;P=k;Q=i}else{dh(M+(j*144|0)+132|0,d);D=f[L>>2]|0;a=D;N=a;O=a;P=D;Q=f[K>>2]|0}j=j+1|0;if(j>>>0>=((Q-P|0)/144|0)>>>0){o=I;p=E;q=F;r=N;s=O;t=J;v=Q;w=P;x=H;y=G;z=K;A=L;break}else{h=N;g=O;k=P;i=Q;M=P}}}}if((t|0)!=-1?(f[(f[(f[b>>2]|0)+12>>2]|0)+(t<<2)>>2]|0)!=-1:0)if((v|0)==(w|0)){R=w;S=w;T=r}else{P=0;do{if(Oi((f[x>>2]|0)+(P<<4)|0)|0){M=f[y>>2]|0;f[d>>2]=t;Q=M+(P*144|0)+136|0;i=f[Q>>2]|0;if(i>>>0<(f[M+(P*144|0)+140>>2]|0)>>>0){f[i>>2]=t;f[Q>>2]=i+4}else dh(M+(P*144|0)+132|0,d)}P=P+1|0;U=f[z>>2]|0;V=f[A>>2]|0}while(P>>>0<((U-V|0)/144|0)>>>0);R=U;S=V;T=V}else if((v|0)==(w|0)){R=w;S=w;T=r}else{V=0;U=s;s=r;r=w;w=v;while(1){f[d>>2]=t;v=U+(V*144|0)+136|0;P=f[v>>2]|0;if(P>>>0<(f[U+(V*144|0)+140>>2]|0)>>>0){f[P>>2]=t;f[v>>2]=P+4;W=r;X=w;Y=s}else{dh(U+(V*144|0)+132|0,d);P=f[A>>2]|0;W=P;X=f[z>>2]|0;Y=P}V=V+1|0;if(V>>>0>=((X-W|0)/144|0)>>>0){R=X;S=W;T=Y;break}else{U=W;s=Y;r=W;w=X}}}if((o|0)!=-1?(f[(f[(f[b>>2]|0)+12>>2]|0)+(o<<2)>>2]|0)!=-1:0){if((R|0)==(S|0)){u=c;return 1}else Z=0;do{if(Oi((f[x>>2]|0)+(Z<<4)|0)|0){b=f[y>>2]|0;f[d>>2]=o;X=b+(Z*144|0)+136|0;w=f[X>>2]|0;if(w>>>0<(f[b+(Z*144|0)+140>>2]|0)>>>0){f[w>>2]=o;f[X>>2]=w+4}else dh(b+(Z*144|0)+132|0,d)}Z=Z+1|0}while(Z>>>0<(((f[z>>2]|0)-(f[A>>2]|0)|0)/144|0)>>>0);u=c;return 1}if((R|0)==(S|0)){u=c;return 1}else{_=0;$=T;aa=S;ba=R}while(1){f[d>>2]=o;R=$+(_*144|0)+136|0;S=f[R>>2]|0;if(S>>>0<(f[$+(_*144|0)+140>>2]|0)>>>0){f[S>>2]=o;f[R>>2]=S+4;ca=aa;da=ba}else{dh($+(_*144|0)+132|0,d);ca=f[A>>2]|0;da=f[z>>2]|0}_=_+1|0;if(_>>>0>=((da-ca|0)/144|0)>>>0)break;else{$=ca;aa=ca;ba=da}}u=c;return 1}function bc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;g=a+8|0;f[g>>2]=e;d=a+32|0;h=a+36|0;i=f[h>>2]|0;j=f[d>>2]|0;k=i-j>>2;l=j;j=i;if(k>>>0>=e>>>0)if(k>>>0>e>>>0?(i=l+(e<<2)|0,(i|0)!=(j|0)):0){f[h>>2]=j+(~((j+-4-i|0)>>>2)<<2);m=e}else m=e;else{Og(d,e-k|0);m=f[g>>2]|0}k=f[a+48>>2]|0;d=f[a+52>>2]|0;i=e>>>0>1073741823?-1:e<<2;j=jp(i)|0;Dh(j|0,0,i|0)|0;if((m|0)>0){i=a+16|0;h=a+32|0;l=a+12|0;n=0;do{o=f[j+(n<<2)>>2]|0;p=f[i>>2]|0;if((o|0)>(p|0)){q=f[h>>2]|0;f[q+(n<<2)>>2]=p;r=q}else{q=f[l>>2]|0;p=f[h>>2]|0;f[p+(n<<2)>>2]=(o|0)<(q|0)?q:o;r=p}n=n+1|0;s=f[g>>2]|0}while((n|0)<(s|0));if((s|0)>0){n=a+20|0;h=0;do{p=(f[b+(h<<2)>>2]|0)+(f[r+(h<<2)>>2]|0)|0;o=c+(h<<2)|0;f[o>>2]=p;if((p|0)<=(f[i>>2]|0)){if((p|0)<(f[l>>2]|0)){t=(f[n>>2]|0)+p|0;u=18}}else{t=p-(f[n>>2]|0)|0;u=18}if((u|0)==18){u=0;f[o>>2]=t}h=h+1|0;o=f[g>>2]|0}while((h|0)<(o|0));v=o}else v=s}else v=m;m=f[a+56>>2]|0;s=f[m>>2]|0;h=(f[m+4>>2]|0)-s|0;t=h>>2;if((h|0)<=4){kp(j);return 1}h=a+16|0;n=a+32|0;l=a+12|0;i=a+20|0;a=k+12|0;r=(e|0)>0;o=s;s=1;p=v;while(1){if(t>>>0<=s>>>0){u=24;break}v=f[o+(s<<2)>>2]|0;q=X(s,e)|0;if((v|0)!=-1?(w=f[(f[a>>2]|0)+(v<<2)>>2]|0,(w|0)!=-1):0){v=f[k>>2]|0;x=f[d>>2]|0;y=f[x+(f[v+(w<<2)>>2]<<2)>>2]|0;z=w+1|0;A=((z>>>0)%3|0|0)==0?w+-2|0:z;if((A|0)==-1)B=-1;else B=f[v+(A<<2)>>2]|0;A=f[x+(B<<2)>>2]|0;z=(((w>>>0)%3|0|0)==0?2:-1)+w|0;if((z|0)==-1)C=-1;else C=f[v+(z<<2)>>2]|0;z=f[x+(C<<2)>>2]|0;if((y|0)<(s|0)&(A|0)<(s|0)&(z|0)<(s|0)){x=X(y,e)|0;y=X(A,e)|0;A=X(z,e)|0;if(r){z=0;do{f[j+(z<<2)>>2]=(f[c+(z+A<<2)>>2]|0)+(f[c+(z+y<<2)>>2]|0)-(f[c+(z+x<<2)>>2]|0);z=z+1|0}while((z|0)!=(e|0))}z=b+(q<<2)|0;x=c+(q<<2)|0;if((p|0)>0){y=0;do{A=f[j+(y<<2)>>2]|0;v=f[h>>2]|0;if((A|0)>(v|0)){w=f[n>>2]|0;f[w+(y<<2)>>2]=v;D=w}else{w=f[l>>2]|0;v=f[n>>2]|0;f[v+(y<<2)>>2]=(A|0)<(w|0)?w:A;D=v}y=y+1|0;E=f[g>>2]|0}while((y|0)<(E|0));if((E|0)>0){y=0;do{v=(f[z+(y<<2)>>2]|0)+(f[D+(y<<2)>>2]|0)|0;A=x+(y<<2)|0;f[A>>2]=v;if((v|0)<=(f[h>>2]|0)){if((v|0)<(f[l>>2]|0)){F=(f[i>>2]|0)+v|0;u=56}}else{F=v-(f[i>>2]|0)|0;u=56}if((u|0)==56){u=0;f[A>>2]=F}y=y+1|0;A=f[g>>2]|0}while((y|0)<(A|0));G=A}else G=E}else G=p}else u=34}else u=34;if((u|0)==34){u=0;y=c+((X(s+-1|0,e)|0)<<2)|0;x=b+(q<<2)|0;z=c+(q<<2)|0;if((p|0)>0){A=0;do{v=f[y+(A<<2)>>2]|0;w=f[h>>2]|0;if((v|0)>(w|0)){H=f[n>>2]|0;f[H+(A<<2)>>2]=w;I=H}else{H=f[l>>2]|0;w=f[n>>2]|0;f[w+(A<<2)>>2]=(v|0)<(H|0)?H:v;I=w}A=A+1|0;J=f[g>>2]|0}while((A|0)<(J|0));if((J|0)>0){A=0;do{y=(f[x+(A<<2)>>2]|0)+(f[I+(A<<2)>>2]|0)|0;q=z+(A<<2)|0;f[q>>2]=y;if((y|0)<=(f[h>>2]|0)){if((y|0)<(f[l>>2]|0)){K=(f[i>>2]|0)+y|0;u=44}}else{K=y-(f[i>>2]|0)|0;u=44}if((u|0)==44){u=0;f[q>>2]=K}A=A+1|0;q=f[g>>2]|0}while((A|0)<(q|0));G=q}else G=J}else G=p}s=s+1|0;if((s|0)>=(t|0)){u=22;break}else p=G}if((u|0)==22){kp(j);return 1}else if((u|0)==24)Do(m);return 0}function cc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;g=a+8|0;f[g>>2]=e;d=a+32|0;h=a+36|0;i=f[h>>2]|0;j=f[d>>2]|0;k=i-j>>2;l=j;j=i;if(k>>>0>=e>>>0)if(k>>>0>e>>>0?(i=l+(e<<2)|0,(i|0)!=(j|0)):0){f[h>>2]=j+(~((j+-4-i|0)>>>2)<<2);m=e}else m=e;else{Og(d,e-k|0);m=f[g>>2]|0}k=f[a+48>>2]|0;d=f[a+52>>2]|0;i=e>>>0>1073741823?-1:e<<2;j=jp(i)|0;Dh(j|0,0,i|0)|0;if((m|0)>0){i=a+16|0;h=a+32|0;l=a+12|0;n=0;do{o=f[j+(n<<2)>>2]|0;p=f[i>>2]|0;if((o|0)>(p|0)){q=f[h>>2]|0;f[q+(n<<2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2)|0;x=c+(w<<2)|0;if((q|0)>0){z=0;do{B=f[j+(z<<2)>>2]|0;v=f[h>>2]|0;if((B|0)>(v|0)){y=f[n>>2]|0;f[y+(z<<2)>>2]=v;C=y}else{y=f[l>>2]|0;v=f[n>>2]|0;f[v+(z<<2)>>2]=(B|0)<(y|0)?y:B;C=v}z=z+1|0;D=f[g>>2]|0}while((z|0)<(D|0));if((D|0)>0){z=0;do{v=(f[A+(z<<2)>>2]|0)+(f[C+(z<<2)>>2]|0)|0;B=x+(z<<2)|0;f[B>>2]=v;if((v|0)<=(f[h>>2]|0)){if((v|0)<(f[l>>2]|0)){E=(f[i>>2]|0)+v|0;u=53}}else{E=v-(f[i>>2]|0)|0;u=53}if((u|0)==53){u=0;f[B>>2]=E}z=z+1|0;B=f[g>>2]|0}while((z|0)<(B|0));F=B}else F=D}else F=q}else{z=c+((X(s+-1|0,e)|0)<<2)|0;x=b+(w<<2)|0;A=c+(w<<2)|0;if((q|0)>0){B=0;do{v=f[z+(B<<2)>>2]|0;y=f[h>>2]|0;if((v|0)>(y|0)){G=f[n>>2]|0;f[G+(B<<2)>>2]=y;H=G}else{G=f[l>>2]|0;y=f[n>>2]|0;f[y+(B<<2)>>2]=(v|0)<(G|0)?G:v;H=y}B=B+1|0;I=f[g>>2]|0}while((B|0)<(I|0));if((I|0)>0){B=0;do{z=(f[x+(B<<2)>>2]|0)+(f[H+(B<<2)>>2]|0)|0;w=A+(B<<2)|0;f[w>>2]=z;if((z|0)<=(f[h>>2]|0)){if((z|0)<(f[l>>2]|0)){J=(f[i>>2]|0)+z|0;u=41}}else{J=z-(f[i>>2]|0)|0;u=41}if((u|0)==41){u=0;f[w>>2]=J}B=B+1|0;w=f[g>>2]|0}while((B|0)<(w|0));F=w}else F=I}else F=q}s=s+1|0;if((s|0)>=(t|0)){u=22;break}else q=F}if((u|0)==22){kp(j);return 1}else if((u|0)==24)Do(m);return 0}function dc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j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|0;s=Vl(m|0,n|0,4,0)|0;t=l;f[t>>2]=s;f[t+4>>2]=I;t=a+16|0;a=k;k=f[a>>2]|0;p=f[a+4>>2]|0;a=Vl(m|0,n|0,8,0)|0;n=I;if((p|0)<(n|0)|(p|0)==(n|0)&k>>>0<a>>>0){r=0;u=e;return r|0}a=(f[c>>2]|0)+s|0;s=h[a>>0]|h[a+1>>0]<<8|h[a+2>>0]<<16|h[a+3>>0]<<24;b[t>>0]=s;b[t+1>>0]=s>>8;b[t+2>>0]=s>>16;b[t+3>>0]=s>>24;a=l;k=Vl(f[a>>2]|0,f[a+4>>2]|0,4,0)|0;a=l;f[a>>2]=k;f[a+4>>2]=I;if(s>>>0>6){f[g>>2]=s;Ml(13647,g)|0;r=0;u=e;return r|0}f[i>>2]=d;a:do if(!q)v=17;else{ih(d,q);switch(f[t>>2]|0){case 0:{ve(j,3);Rd(j,c,i)|0;ye(j);v=17;break a;break}case 1:{ve(j,3);Qd(j,c,i)|0;ye(j);v=17;break a;break}case 2:{xe(j,3);Td(j,c,i)|0;Ke(j);v=17;break a;break}case 3:{xe(j,3);Sd(j,c,i)|0;Ke(j);v=17;break a;break}case 4:{re(j,3);Od(j,c,i)|0;Be(j);v=17;break a;break}case 5:{re(j,3);Nd(j,c,i)|0;Be(j);v=17;break a;break}case 6:{re(j,3);Md(j,c,i)|0;Be(j);v=17;break a;break}default:{w=0;break a}}}while(0);if((v|0)==17)w=(((f[d+4>>2]|0)-(f[d>>2]|0)|0)/12|0|0)==(f[o>>2]|0);r=w;u=e;return r|0}function ec(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;c=u;u=u+16|0;d=c;e=f[b>>2]|0;b=a+8|0;g=e+1|0;if((e|0)!=-1){h=((g>>>0)%3|0|0)==0?e+-2|0:g;g=e+(((e>>>0)%3|0|0)==0?2:-1)|0;i=(e>>>0)/3|0;j=a+216|0;k=a+220|0;l=a+368|0;m=f[(f[(f[b>>2]|0)+12>>2]|0)+(e<<2)>>2]|0;if((m|0)!=-1)if(((m>>>0)/3|0)>>>0>=i>>>0?(f[k>>2]|0)!=(f[j>>2]|0):0){m=0;do{if(Oi((f[l>>2]|0)+(m<<4)|0)|0){n=f[j>>2]|0;f[d>>2]=e;o=n+(m*144|0)+136|0;p=f[o>>2]|0;if(p>>>0<(f[n+(m*144|0)+140>>2]|0)>>>0){f[p>>2]=e;f[o>>2]=p+4}else dh(n+(m*144|0)+132|0,d)}m=m+1|0}while(m>>>0<(((f[k>>2]|0)-(f[j>>2]|0)|0)/144|0)>>>0);q=i;r=g;s=d;t=d;v=h;w=k;x=j;y=l;z=j}else{q=i;r=g;s=d;t=d;v=h;w=k;x=j;y=l;z=j}else{A=i;B=d;C=d;D=j;E=l;F=g;G=h;H=k;I=j;J=4}}else{j=a+216|0;A=-1;B=d;C=d;D=j;E=a+368|0;F=-1;G=-1;H=a+220|0;I=j;J=4}if((J|0)==4){j=f[H>>2]|0;a=f[I>>2]|0;if((j|0)==(a|0)){q=A;r=F;s=B;t=C;v=G;w=H;x=I;y=E;z=D}else{k=0;h=j;j=a;while(1){a=j;f[d>>2]=e;g=a+(k*144|0)+136|0;l=f[g>>2]|0;if(l>>>0<(f[a+(k*144|0)+140>>2]|0)>>>0){f[l>>2]=e;f[g>>2]=l+4;K=j;L=h}else{dh(a+(k*144|0)+132|0,d);K=f[I>>2]|0;L=f[H>>2]|0}k=k+1|0;if(k>>>0>=((L-K|0)/144|0)>>>0){q=A;r=F;s=B;t=C;v=G;w=H;x=I;y=E;z=D;break}else{h=L;j=K}}}}if((v|0)!=-1?(K=f[(f[(f[b>>2]|0)+12>>2]|0)+(v<<2)>>2]|0,(K|0)!=-1):0){if(((K>>>0)/3|0)>>>0>=q>>>0?(f[w>>2]|0)!=(f[x>>2]|0):0){K=0;do{if(Oi((f[y>>2]|0)+(K<<4)|0)|0){j=f[z>>2]|0;f[d>>2]=v;L=j+(K*144|0)+136|0;h=f[L>>2]|0;if(h>>>0<(f[j+(K*144|0)+140>>2]|0)>>>0){f[h>>2]=v;f[L>>2]=h+4}else dh(j+(K*144|0)+132|0,d)}K=K+1|0}while(K>>>0<(((f[w>>2]|0)-(f[x>>2]|0)|0)/144|0)>>>0)}}else J=27;if((J|0)==27?(J=f[w>>2]|0,K=f[x>>2]|0,(J|0)!=(K|0)):0){j=0;h=K;K=J;while(1){J=h;f[d>>2]=v;L=J+(j*144|0)+136|0;D=f[L>>2]|0;if(D>>>0<(f[J+(j*144|0)+140>>2]|0)>>>0){f[D>>2]=v;f[L>>2]=D+4;M=h;N=K}else{dh(J+(j*144|0)+132|0,d);M=f[x>>2]|0;N=f[w>>2]|0}j=j+1|0;if(j>>>0>=((N-M|0)/144|0)>>>0)break;else{h=M;K=N}}}if((r|0)!=-1?(N=f[(f[(f[b>>2]|0)+12>>2]|0)+(r<<2)>>2]|0,(N|0)!=-1):0){if(((N>>>0)/3|0)>>>0<q>>>0){u=c;return 1}if((f[w>>2]|0)==(f[x>>2]|0)){u=c;return 1}else O=0;do{if(Oi((f[y>>2]|0)+(O<<4)|0)|0){q=f[z>>2]|0;f[d>>2]=r;N=q+(O*144|0)+136|0;b=f[N>>2]|0;if(b>>>0<(f[q+(O*144|0)+140>>2]|0)>>>0){f[b>>2]=r;f[N>>2]=b+4}else dh(q+(O*144|0)+132|0,d)}O=O+1|0}while(O>>>0<(((f[w>>2]|0)-(f[x>>2]|0)|0)/144|0)>>>0);u=c;return 1}O=f[w>>2]|0;z=f[x>>2]|0;if((O|0)==(z|0)){u=c;return 1}else{P=0;Q=z;R=O}while(1){O=Q;f[d>>2]=r;z=O+(P*144|0)+136|0;y=f[z>>2]|0;if(y>>>0<(f[O+(P*144|0)+140>>2]|0)>>>0){f[y>>2]=r;f[z>>2]=y+4;S=Q;T=R}else{dh(O+(P*144|0)+132|0,d);S=f[x>>2]|0;T=f[w>>2]|0}P=P+1|0;if(P>>>0>=((T-S|0)/144|0)>>>0)break;else{Q=S;R=T}}u=c;return 1}function fc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=u;u=u+16|0;g=e;i=c+8|0;j=i;k=f[j>>2]|0;l=f[j+4>>2]|0;j=c+16|0;m=j;n=f[m>>2]|0;o=Vl(n|0,f[m+4>>2]|0,5,0)|0;m=I;if((l|0)<(m|0)|(l|0)==(m|0)&k>>>0<o>>>0){o=Yk(32)|0;f[g>>2]=o;f[g+8>>2]=-2147483616;f[g+4>>2]=29;p=o;q=13261;r=p+29|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[o+29>>0]=0;f[a>>2]=-2;zh(a+4|0,g);if((b[g+11>>0]|0)<0)mp(f[g>>2]|0);u=e;return}o=(f[c>>2]|0)+n|0;b[d>>0]=b[o>>0]|0;b[d+1>>0]=b[o+1>>0]|0;b[d+2>>0]=b[o+2>>0]|0;b[d+3>>0]=b[o+3>>0]|0;b[d+4>>0]=b[o+4>>0]|0;o=j;n=Vl(f[o>>2]|0,f[o+4>>2]|0,5,0)|0;o=I;k=j;f[k>>2]=n;f[k+4>>2]=o;if(fj(d,13291,5)|0){k=Yk(32)|0;f[g>>2]=k;f[g+8>>2]=-2147483616;f[g+4>>2]=17;p=k;q=13297;r=p+17|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[k+17>>0]=0;f[a>>2]=-1;zh(a+4|0,g);if((b[g+11>>0]|0)<0)mp(f[g>>2]|0);u=e;return}k=i;m=f[k+4>>2]|0;if(!((m|0)>(o|0)|((m|0)==(o|0)?(f[k>>2]|0)>>>0>n>>>0:0))){k=Yk(32)|0;f[g>>2]=k;f[g+8>>2]=-2147483616;f[g+4>>2]=29;p=k;q=13261;r=p+29|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[k+29>>0]=0;f[a>>2]=-2;zh(a+4|0,g);if((b[g+11>>0]|0)<0)mp(f[g>>2]|0);u=e;return}b[d+5>>0]=b[(f[c>>2]|0)+n>>0]|0;n=j;k=Vl(f[n>>2]|0,f[n+4>>2]|0,1,0)|0;n=I;o=j;f[o>>2]=k;f[o+4>>2]=n;o=i;m=f[o+4>>2]|0;if(!((m|0)>(n|0)|((m|0)==(n|0)?(f[o>>2]|0)>>>0>k>>>0:0))){o=Yk(32)|0;f[g>>2]=o;f[g+8>>2]=-2147483616;f[g+4>>2]=29;p=o;q=13261;r=p+29|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[o+29>>0]=0;f[a>>2]=-2;zh(a+4|0,g);if((b[g+11>>0]|0)<0)mp(f[g>>2]|0);u=e;return}b[d+6>>0]=b[(f[c>>2]|0)+k>>0]|0;k=j;o=Vl(f[k>>2]|0,f[k+4>>2]|0,1,0)|0;k=I;n=j;f[n>>2]=o;f[n+4>>2]=k;n=i;m=f[n+4>>2]|0;if(!((m|0)>(k|0)|((m|0)==(k|0)?(f[n>>2]|0)>>>0>o>>>0:0))){n=Yk(32)|0;f[g>>2]=n;f[g+8>>2]=-2147483616;f[g+4>>2]=29;p=n;q=13261;r=p+29|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[n+29>>0]=0;f[a>>2]=-2;zh(a+4|0,g);if((b[g+11>>0]|0)<0)mp(f[g>>2]|0);u=e;return}b[d+7>>0]=b[(f[c>>2]|0)+o>>0]|0;o=j;n=Vl(f[o>>2]|0,f[o+4>>2]|0,1,0)|0;o=I;k=j;f[k>>2]=n;f[k+4>>2]=o;k=i;m=f[k+4>>2]|0;if(!((m|0)>(o|0)|((m|0)==(o|0)?(f[k>>2]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;n=f[m>>2]|0;o=f[m+4>>2]|0;m=c+16|0;p=m;q=f[p>>2]|0;r=Vl(q|0,f[p+4>>2]|0,4,0)|0;p=I;if((o|0)<(p|0)|(o|0)==(p|0)&n>>>0<r>>>0){s=0;u=d;return s|0}else{n=(f[c>>2]|0)+q|0;q=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;f[e>>2]=q;n=m;f[n>>2]=r;f[n+4>>2]=p;t=q;break}}else if(Nh(e,c)|0){t=f[e>>2]|0;break}else{s=0;u=d;return s|0}while(0);if(!t){s=0;u=d;return s|0}q=a+4|0;p=a+8|0;n=f[p>>2]|0;r=f[q>>2]|0;m=n-r>>2;o=r;r=n;if(t>>>0>m>>>0){Og(q,t-m|0);if(!(f[e>>2]|0)){s=1;u=d;return s|0}}else if(t>>>0<m>>>0?(m=o+(t<<2)|0,(m|0)!=(r|0)):0)f[p>>2]=r+(~((r+-4-m|0)>>>2)<<2);m=f[a+32>>2]|0;r=c+8|0;p=c+16|0;t=g+60|0;o=m+8|0;n=a+16|0;v=a+20|0;a=0;while(1){w=r;x=f[w>>2]|0;y=f[w+4>>2]|0;w=p;z=f[w>>2]|0;A=f[w+4>>2]|0;if(!((y|0)>(A|0)|(y|0)==(A|0)&x>>>0>z>>>0)){s=0;B=49;break}w=f[c>>2]|0;C=b[w+z>>0]|0;D=Vl(z|0,A|0,1,0)|0;E=I;F=p;f[F>>2]=D;f[F+4>>2]=E;if(!((y|0)>(E|0)|(y|0)==(E|0)&x>>>0>D>>>0)){s=0;B=49;break}E=b[w+D>>0]|0;D=Vl(z|0,A|0,2,0)|0;F=I;G=p;f[G>>2]=D;f[G+4>>2]=F;if(!((y|0)>(F|0)|(y|0)==(F|0)&x>>>0>D>>>0)){s=0;B=49;break}F=b[w+D>>0]|0;D=Vl(z|0,A|0,3,0)|0;G=I;H=p;f[H>>2]=D;f[H+4>>2]=G;if(!((y|0)>(G|0)|(y|0)==(G|0)&x>>>0>D>>>0)){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x+(A<<2)|0,(F|0)!=(D|0)):0){f[v>>2]=D+(~((D+-4-F|0)>>>2)<<2);L=x}else L=x;else{$f(n,A-C|0,k);L=f[n>>2]|0}K=L}f[K+(E<<2)>>2]=a;a=a+1|0;if(a>>>0>=(f[e>>2]|0)>>>0){s=1;B=49;break}}if((B|0)==47){s=0;u=d;return s|0}else if((B|0)==49){u=d;return s|0}return 0}function hc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,t=0,v=Na,w=Na,x=Na,y=Na,z=0,A=0,B=0,C=Na,D=Na,E=Na,F=Na,G=Na,H=Na,I=Na,K=Na,M=Na,N=Na,O=Na,P=0;g=u;u=u+48|0;h=g+40|0;i=g+36|0;j=g+24|0;k=g+12|0;l=g;m=a+48|0;o=f[c>>2]|0;c=o+1|0;if((o|0)!=-1){p=((c>>>0)%3|0|0)==0?o+-2|0:c;c=o+(((o>>>0)%3|0|0)==0?2:-1)|0;if((p|0)==-1)q=-1;else q=f[(f[f[m>>2]>>2]|0)+(p<<2)>>2]|0;if((c|0)==-1){r=q;t=-1}else{r=q;t=f[(f[f[m>>2]>>2]|0)+(c<<2)>>2]|0}}else{r=-1;t=-1}c=f[a+52>>2]|0;m=f[c>>2]|0;q=(f[c+4>>2]|0)-m>>2;if(q>>>0<=r>>>0)Do(c);p=m;m=f[p+(r<<2)>>2]|0;if(q>>>0<=t>>>0)Do(c);c=f[p+(t<<2)>>2]|0;t=(m|0)<(e|0);if(t&(c|0)<(e|0)){p=f[a+72>>2]|0;q=X(p,m)|0;v=$(f[d+(q<<2)>>2]|0);w=$(f[d+(q+1<<2)>>2]|0);q=X(p,c)|0;x=$(f[d+(q<<2)>>2]|0);y=$(f[d+(q+1<<2)>>2]|0);if(!(x!=v|y!=w)){q=f[a+68>>2]|0;f[q>>2]=~~x;f[q+4>>2]=~~y;u=g;return}q=a+64|0;p=f[(f[q>>2]|0)+(e<<2)>>2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$(H+(l?O:v));v=$(-w);O=$(y+(l?w:v));l=~~+J(+(+O+.5));k=f[a+68>>2]|0;f[k>>2]=((n[s>>2]=O,f[s>>2]|0)&2147483647)>>>0>2139095040?-2147483648:l;l=~~+J(+(+x+.5));f[k+4>>2]=((n[s>>2]=x,f[s>>2]|0)&2147483647)>>>0>2139095040?-2147483648:l;u=g;return}else{do if(t)P=m;else{if((e|0)>0){P=e+-1|0;break}l=a+72|0;if((f[l>>2]|0)<=0){u=g;return}k=f[a+68>>2]|0;j=0;do{f[k+(j<<2)>>2]=0;j=j+1|0}while((j|0)<(f[l>>2]|0));u=g;return}while(0);e=a+72|0;m=f[e>>2]|0;t=X(m,P)|0;if((m|0)<=0){u=g;return}m=f[a+68>>2]|0;a=0;do{f[m+(a<<2)>>2]=f[d+(a+t<<2)>>2];a=a+1|0}while((a|0)<(f[e>>2]|0));u=g;return}}function ic(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;if((b|0)<0)return;c=a+12|0;d=f[c>>2]|0;e=f[a+8>>2]|0;g=e;h=d;if(d-e>>2>>>0<=b>>>0)return;e=g+(b<<2)|0;d=f[(f[e>>2]|0)+56>>2]|0;i=f[(f[g+(b<<2)>>2]|0)+60>>2]|0;g=e+4|0;if((g|0)!=(h|0)){j=g;g=e;do{k=f[j>>2]|0;f[j>>2]=0;l=f[g>>2]|0;f[g>>2]=k;if(l|0){k=l+88|0;m=f[k>>2]|0;f[k>>2]=0;if(m|0){k=f[m+8>>2]|0;if(k|0){n=m+12|0;if((f[n>>2]|0)!=(k|0))f[n>>2]=k;mp(k)}mp(m)}m=f[l+68>>2]|0;if(m|0){k=l+72|0;n=f[k>>2]|0;if((n|0)!=(m|0))f[k>>2]=n+(~((n+-4-m|0)>>>2)<<2);mp(m)}m=l+64|0;n=f[m>>2]|0;f[m>>2]=0;if(n|0){m=f[n>>2]|0;if(m|0){k=n+4|0;if((f[k>>2]|0)!=(m|0))f[k>>2]=m;mp(m)}mp(n)}mp(l)}j=j+4|0;g=g+4|0}while((j|0)!=(h|0));j=f[c>>2]|0;if((j|0)!=(g|0)){o=g;p=j;q=24}}else{o=e;p=h;q=24}if((q|0)==24){q=p;do{p=q+-4|0;f[c>>2]=p;h=f[p>>2]|0;f[p>>2]=0;if(h|0){p=h+88|0;e=f[p>>2]|0;f[p>>2]=0;if(e|0){p=f[e+8>>2]|0;if(p|0){j=e+12|0;if((f[j>>2]|0)!=(p|0))f[j>>2]=p;mp(p)}mp(e)}e=f[h+68>>2]|0;if(e|0){p=h+72|0;j=f[p>>2]|0;if((j|0)!=(e|0))f[p>>2]=j+(~((j+-4-e|0)>>>2)<<2);mp(e)}e=h+64|0;j=f[e>>2]|0;f[e>>2]=0;if(j|0){e=f[j>>2]|0;if(e|0){p=j+4|0;if((f[p>>2]|0)!=(e|0))f[p>>2]=e;mp(e)}mp(j)}mp(h)}q=f[c>>2]|0}while((q|0)!=(o|0))}o=f[a+4>>2]|0;a:do if(o|0){q=o+44|0;c=f[q>>2]|0;h=f[o+40>>2]|0;while(1){if((h|0)==(c|0))break a;r=h+4|0;if((f[(f[h>>2]|0)+40>>2]|0)==(i|0))break;else h=r}if((r|0)!=(c|0)){j=r;e=h;do{p=f[j>>2]|0;f[j>>2]=0;g=f[e>>2]|0;f[e>>2]=p;if(g|0){jh(g);mp(g)}j=j+4|0;e=e+4|0}while((j|0)!=(c|0));j=f[q>>2]|0;if((j|0)==(e|0))break;else{s=e;t=j}}else{s=h;t=c}j=t;do{g=j+-4|0;f[q>>2]=g;p=f[g>>2]|0;f[g>>2]=0;if(p|0){jh(p);mp(p)}j=f[q>>2]|0}while((j|0)!=(s|0))}while(0);b:do if((d|0)<5){s=f[a+20+(d*12|0)>>2]|0;t=a+20+(d*12|0)+4|0;r=f[t>>2]|0;i=r;c:do if((s|0)==(r|0))u=s;else{o=s;while(1){if((f[o>>2]|0)==(b|0)){u=o;break c}o=o+4|0;if((o|0)==(r|0))break b}}while(0);if((u|0)!=(r|0)){s=u+4|0;o=i-s|0;j=o>>2;if(!j)v=r;else{kk(u|0,s|0,o|0)|0;v=f[t>>2]|0}o=u+(j<<2)|0;if((v|0)!=(o|0))f[t>>2]=v+(~((v+-4-o|0)>>>2)<<2)}}while(0);v=f[a+24>>2]|0;u=f[a+20>>2]|0;d=u;if((v|0)!=(u|0)){o=v-u>>2;u=0;do{v=d+(u<<2)|0;j=f[v>>2]|0;if((j|0)>(b|0))f[v>>2]=j+-1;u=u+1|0}while(u>>>0<o>>>0)}o=f[a+36>>2]|0;u=f[a+32>>2]|0;d=u;if((o|0)!=(u|0)){j=o-u>>2;u=0;do{o=d+(u<<2)|0;v=f[o>>2]|0;if((v|0)>(b|0))f[o>>2]=v+-1;u=u+1|0}while(u>>>0<j>>>0)}j=f[a+48>>2]|0;u=f[a+44>>2]|0;d=u;if((j|0)!=(u|0)){v=j-u>>2;u=0;do{j=d+(u<<2)|0;o=f[j>>2]|0;if((o|0)>(b|0))f[j>>2]=o+-1;u=u+1|0}while(u>>>0<v>>>0)}v=f[a+60>>2]|0;u=f[a+56>>2]|0;d=u;if((v|0)!=(u|0)){o=v-u>>2;u=0;do{v=d+(u<<2)|0;j=f[v>>2]|0;if((j|0)>(b|0))f[v>>2]=j+-1;u=u+1|0}while(u>>>0<o>>>0)}o=f[a+72>>2]|0;u=f[a+68>>2]|0;a=u;if((o|0)==(u|0))return;d=o-u>>2;u=0;do{o=a+(u<<2)|0;j=f[o>>2]|0;if((j|0)>(b|0))f[o>>2]=j+-1;u=u+1|0}while(u>>>0<d>>>0);return}function jc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,t=Na,v=Na,w=Na,x=Na,y=0,z=0,A=0,B=0,C=Na,D=Na,E=Na,F=Na,G=Na,H=Na,I=Na,K=Na,M=Na,N=Na,O=Na,P=0;g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=f[m>>2]|0;if(!(b[q+84>>0]|0))B=f[(f[q+68>>2]|0)+(A<<2)>>2]|0;else B=A;f[i>>2]=B;B=b[q+24>>0]|0;f[h>>2]=f[i>>2];vb(q,h,B,l)|0;C=$(n[l>>2]);D=$(n[k>>2]);E=$(C-D);C=$(n[l+4>>2]);F=$(n[k+4>>2]);G=$(C-F);C=$(n[l+8>>2]);H=$(n[k+8>>2]);I=$(C-H);C=$($(n[j>>2])-D);D=$($(n[j+4>>2])-F);F=$($(n[j+8>>2])-H);H=$($($($(E*E)+$(0.0))+$(G*G))+$(I*I));if(H>$(0.0)?1:(f[a+88>>2]|0)<258){K=$($($($($(E*C)+$(0.0))+$(G*D))+$(I*F))/H);M=$(C-$(E*K));E=$(D-$(G*K));G=$(F-$(I*K));N=K;O=$(L($($($(G*G)+$($(E*E)+$($(M*M)+$(0.0))))/H)))}else{N=$(0.0);O=$(0.0)}H=$(w-t);w=$(x-v);x=$($(H*N)+t);t=$(H*O);H=$($(w*N)+v);v=$(w*O);j=a+80|0;k=(f[j>>2]|0)+-1|0;l=(1<<(k&31)&f[(f[a+76>>2]|0)+(k>>>5<<2)>>2]|0)==0;f[j>>2]=k;O=$(-t);w=$(H+(l?O:t));t=$(-v);O=$(x+(l?v:t));l=~~+J(+(+O+.5));k=f[a+68>>2]|0;f[k>>2]=((n[s>>2]=O,f[s>>2]|0)&2147483647)>>>0>2139095040?-2147483648:l;l=~~+J(+(+w+.5));f[k+4>>2]=((n[s>>2]=w,f[s>>2]|0)&2147483647)>>>0>2139095040?-2147483648:l;u=g;return}else{do if(r)P=o;else{if((e|0)>0){P=e+-1|0;break}l=a+72|0;if((f[l>>2]|0)<=0){u=g;return}k=f[a+68>>2]|0;j=0;do{f[k+(j<<2)>>2]=0;j=j+1|0}while((j|0)<(f[l>>2]|0));u=g;return}while(0);e=a+72|0;o=f[e>>2]|0;r=X(o,P)|0;if((o|0)<=0){u=g;return}o=f[a+68>>2]|0;a=0;do{f[o+(a<<2)>>2]=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0){a=0;do{F=(f[C+(a<<2)>>2]|0)+(f[T+(a<<2)>>2]|0)|0;E=D+(a<<2)|0;f[E>>2]=F;if((F|0)<=(f[v>>2]|0)){if((F|0)<(f[x>>2]|0)){V=(f[y>>2]|0)+F|0;W=44}}else{V=F-(f[y>>2]|0)|0;W=44}if((W|0)==44){W=0;f[E>>2]=V}a=a+1|0}while((a|0)<(f[t>>2]|0))}}A=A+1|0;if((A|0)>=(n|0)){W=3;break}a=f[g>>2]|0;B=f[a>>2]|0;if((f[a+4>>2]|0)-B>>2>>>0<=A>>>0){z=a;W=4;break}}if((W|0)==3){u=e;return 1}else if((W|0)==4)Do(z);return 0}function lc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0;e=u;u=u+32|0;d=e+28|0;h=e+16|0;i=e+8|0;j=e;k=a+60|0;f[a+68>>2]=g;g=a+56|0;l=f[g>>2]|0;m=(f[l+4>>2]|0)-(f[l>>2]|0)|0;n=m>>2;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;if((m|0)<=0){u=e;return 1}m=h+4|0;o=h+8|0;p=a+104|0;q=a+108|0;r=i+4|0;s=a+100|0;t=a+8|0;v=a+16|0;w=a+32|0;x=a+12|0;y=a+20|0;a=f[l>>2]|0;if((f[l+4>>2]|0)==(a|0)){z=l;Do(z)}else{A=0;B=a}while(1){f[j>>2]=f[B+(A<<2)>>2];f[d>>2]=f[j>>2];Pb(k,d,h);a=f[h>>2]|0;l=(a|0)>-1?a:0-a|0;C=f[m>>2]|0;D=(C|0)>-1?C:0-C|0;E=Vl(D|0,((D|0)<0)<<31>>31|0,l|0,((l|0)<0)<<31>>31|0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}}else{R=P;S=P}}else{R=F;S=F}while(0);f[i>>2]=R;f[r>>2]=S;F=A<<1;C=b+(F<<2)|0;D=c+(F<<2)|0;if((f[t>>2]|0)>0){F=0;a=R;while(1){E=f[v>>2]|0;if((a|0)>(E|0)){l=f[w>>2]|0;f[l+(F<<2)>>2]=E;T=l}else{l=f[x>>2]|0;E=f[w>>2]|0;f[E+(F<<2)>>2]=(a|0)<(l|0)?l:a;T=E}E=F+1|0;U=f[t>>2]|0;if((E|0)>=(U|0))break;F=E;a=f[i+(E<<2)>>2]|0}if((U|0)>0){a=0;do{F=(f[C+(a<<2)>>2]|0)+(f[T+(a<<2)>>2]|0)|0;E=D+(a<<2)|0;f[E>>2]=F;if((F|0)<=(f[v>>2]|0)){if((F|0)<(f[x>>2]|0)){V=(f[y>>2]|0)+F|0;W=44}}else{V=F-(f[y>>2]|0)|0;W=44}if((W|0)==44){W=0;f[E>>2]=V}a=a+1|0}while((a|0)<(f[t>>2]|0))}}A=A+1|0;if((A|0)>=(n|0)){W=3;break}a=f[g>>2]|0;B=f[a>>2]|0;if((f[a+4>>2]|0)-B>>2>>>0<=A>>>0){z=a;W=4;break}}if((W|0)==3){u=e;return 1}else if((W|0)==4)Do(z);return 0}function mc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;e=u;u=u+16|0;g=e+8|0;h=e+4|0;i=e;j=a+64|0;k=f[j>>2]|0;if((f[k+28>>2]|0)==(f[k+24>>2]|0)){u=e;return}l=c+96|0;c=a+52|0;m=d+84|0;n=d+68|0;d=a+56|0;o=a+60|0;p=a+12|0;q=a+28|0;r=a+40|0;s=a+44|0;t=a+48|0;v=0;w=0;x=k;while(1){k=f[(f[x+24>>2]|0)+(w<<2)>>2]|0;if((k|0)==-1){y=v;z=x}else{A=v+1|0;B=f[(f[l>>2]|0)+(((k|0)/3|0)*12|0)+(((k|0)%3|0)<<2)>>2]|0;if(!(b[m>>0]|0))C=f[(f[n>>2]|0)+(B<<2)>>2]|0;else C=B;f[g>>2]=C;B=f[d>>2]|0;if(B>>>0<(f[o>>2]|0)>>>0){f[B>>2]=C;f[d>>2]=B+4}else dh(c,g);f[g>>2]=k;f[h>>2]=0;a:do if(!(f[(f[p>>2]|0)+(w>>>5<<2)>>2]&1<<(w&31)))D=k;else{B=k+1|0;E=((B>>>0)%3|0|0)==0?k+-2|0:B;if(((E|0)!=-1?(f[(f[a>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)==0:0)?(B=f[(f[(f[j>>2]|0)+12>>2]|0)+(E<<2)>>2]|0,E=B+1|0,(B|0)!=-1):0){F=((E>>>0)%3|0|0)==0?B+-2|0:E;f[h>>2]=F;if((F|0)==-1){D=k;break}else G=F;while(1){f[g>>2]=G;F=G+1|0;E=((F>>>0)%3|0|0)==0?G+-2|0:F;if((E|0)==-1)break;if(f[(f[a>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)break;F=f[(f[(f[j>>2]|0)+12>>2]|0)+(E<<2)>>2]|0;E=F+1|0;if((F|0)==-1)break;B=((E>>>0)%3|0|0)==0?F+-2|0:E;f[h>>2]=B;if((B|0)==-1){D=G;break a}else G=B}f[h>>2]=-1;D=G;break}f[h>>2]=-1;D=k}while(0);f[(f[q>>2]|0)+(D<<2)>>2]=v;k=f[s>>2]|0;if((k|0)==(f[t>>2]|0))dh(r,g);else{f[k>>2]=f[g>>2];f[s>>2]=k+4}k=f[j>>2]|0;B=f[g>>2]|0;b:do if(((B|0)!=-1?(E=(((B>>>0)%3|0|0)==0?2:-1)+B|0,(E|0)!=-1):0)?(F=f[(f[k+12>>2]|0)+(E<<2)>>2]|0,(F|0)!=-1):0){E=F+(((F>>>0)%3|0|0)==0?2:-1)|0;f[h>>2]=E;if((E|0)!=-1&(E|0)!=(B|0)){F=A;H=v;I=E;while(1){E=I+1|0;J=((E>>>0)%3|0|0)==0?I+-2|0:E;do if(f[(f[a>>2]|0)+(J>>>5<<2)>>2]&1<<(J&31)){E=F+1|0;K=f[(f[l>>2]|0)+(((I|0)/3|0)*12|0)+(((I|0)%3|0)<<2)>>2]|0;if(!(b[m>>0]|0))L=f[(f[n>>2]|0)+(K<<2)>>2]|0;else L=K;f[i>>2]=L;K=f[d>>2]|0;if(K>>>0<(f[o>>2]|0)>>>0){f[K>>2]=L;f[d>>2]=K+4}else dh(c,i);K=f[s>>2]|0;if((K|0)==(f[t>>2]|0)){dh(r,h);M=E;N=F;break}else{f[K>>2]=f[h>>2];f[s>>2]=K+4;M=E;N=F;break}}else{M=F;N=H}while(0);f[(f[q>>2]|0)+(f[h>>2]<<2)>>2]=N;O=f[j>>2]|0;J=f[h>>2]|0;if((J|0)==-1)break;E=(((J>>>0)%3|0|0)==0?2:-1)+J|0;if((E|0)==-1)break;J=f[(f[O+12>>2]|0)+(E<<2)>>2]|0;if((J|0)==-1)break;I=J+(((J>>>0)%3|0|0)==0?2:-1)|0;f[h>>2]=I;if(!((I|0)!=-1?(I|0)!=(f[g>>2]|0):0)){P=M;Q=O;break b}else{F=M;H=N}}f[h>>2]=-1;P=M;Q=O}else{P=A;Q=k}}else R=28;while(0);if((R|0)==28){R=0;f[h>>2]=-1;P=A;Q=k}y=P;z=Q}w=w+1|0;if(w>>>0>=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2>>>0)break;else{v=y;x=z}}u=e;return}function nc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;b=u;u=u+32|0;c=b+4|0;d=b;e=a+16|0;g=f[e>>2]|0;if(g>>>0>340){f[e>>2]=g+-341;g=a+4|0;e=f[g>>2]|0;h=f[e>>2]|0;i=e+4|0;f[g>>2]=i;e=a+8|0;j=f[e>>2]|0;k=a+12|0;l=f[k>>2]|0;m=l;do if((j|0)==(l|0)){n=f[a>>2]|0;o=n;if(i>>>0>n>>>0){p=i;q=((p-o>>2)+1|0)/-2|0;r=i+(q<<2)|0;s=j-p|0;p=s>>2;if(!p)t=i;else{kk(r|0,i|0,s|0)|0;t=f[g>>2]|0}s=r+(p<<2)|0;f[e>>2]=s;f[g>>2]=t+(q<<2);v=s;break}s=m-o>>1;o=(s|0)==0?1:s;if(o>>>0>1073741823){s=ra(8)|0;dn(s,13708);f[s>>2]=4852;va(s|0,1176,105)}s=Yk(o<<2)|0;q=s;p=s+(o>>>2<<2)|0;r=p;w=s+(o<<2)|0;if((i|0)==(j|0)){x=r;y=n}else{n=p;p=r;o=i;do{f[n>>2]=f[o>>2];n=p+4|0;p=n;o=o+4|0}while((o|0)!=(j|0));x=p;y=f[a>>2]|0}f[a>>2]=q;f[g>>2]=r;f[e>>2]=x;f[k>>2]=w;if(!y)v=x;else{mp(y);v=f[e>>2]|0}}else v=j;while(0);f[v>>2]=h;f[e>>2]=(f[e>>2]|0)+4;u=b;return}e=a+8|0;h=f[e>>2]|0;v=a+4|0;j=h-(f[v>>2]|0)|0;y=a+12|0;x=f[y>>2]|0;k=x-(f[a>>2]|0)|0;if(j>>>0>=k>>>0){g=k>>1;k=(g|0)==0?1:g;f[c+12>>2]=0;f[c+16>>2]=a+12;if(k>>>0>1073741823){g=ra(8)|0;dn(g,13708);f[g>>2]=4852;va(g|0,1176,105)}g=Yk(k<<2)|0;f[c>>2]=g;i=g+(j>>2<<2)|0;j=c+8|0;f[j>>2]=i;m=c+4|0;f[m>>2]=i;i=c+12|0;f[i>>2]=g+(k<<2);k=Yk(4092)|0;f[d>>2]=k;ef(c,d);d=f[e>>2]|0;while(1){z=f[v>>2]|0;if((d|0)==(z|0))break;k=d+-4|0;We(c,k);d=k}k=z;z=f[a>>2]|0;f[a>>2]=f[c>>2];f[c>>2]=z;f[v>>2]=f[m>>2];f[m>>2]=k;m=f[e>>2]|0;f[e>>2]=f[j>>2];f[j>>2]=m;g=f[y>>2]|0;f[y>>2]=f[i>>2];f[i>>2]=g;g=m;if((d|0)!=(g|0))f[j>>2]=g+(~((g+-4-k|0)>>>2)<<2);if(z|0)mp(z);u=b;return}if((x|0)!=(h|0)){h=Yk(4092)|0;f[c>>2]=h;ef(a,c);u=b;return}h=Yk(4092)|0;f[c>>2]=h;We(a,c);c=f[v>>2]|0;h=f[c>>2]|0;x=c+4|0;f[v>>2]=x;c=f[e>>2]|0;z=f[y>>2]|0;k=z;do if((c|0)==(z|0)){g=f[a>>2]|0;j=g;if(x>>>0>g>>>0){d=x;m=((d-j>>2)+1|0)/-2|0;i=x+(m<<2)|0;t=c-d|0;d=t>>2;if(!d)A=x;else{kk(i|0,x|0,t|0)|0;A=f[v>>2]|0}t=i+(d<<2)|0;f[e>>2]=t;f[v>>2]=A+(m<<2);B=t;break}t=k-j>>1;j=(t|0)==0?1:t;if(j>>>0>1073741823){t=ra(8)|0;dn(t,13708);f[t>>2]=4852;va(t|0,1176,105)}t=Yk(j<<2)|0;m=t;d=t+(j>>>2<<2)|0;i=d;l=t+(j<<2)|0;if((x|0)==(c|0)){C=i;D=g}else{g=d;d=i;j=x;do{f[g>>2]=f[j>>2];g=d+4|0;d=g;j=j+4|0}while((j|0)!=(c|0));C=d;D=f[a>>2]|0}f[a>>2]=m;f[v>>2]=i;f[e>>2]=C;f[y>>2]=l;if(!D)B=C;else{mp(D);B=f[e>>2]|0}}else B=c;while(0);f[B>>2]=h;f[e>>2]=(f[e>>2]|0)+4;u=b;return}function oc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=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[o>>2]=B;f[q>>2]=x;K=E;L=B}else{K=C;L=f[o>>2]|0}do if((K|0)<=-1){if((L|0)<0){C=f[q>>2]|0;M=(C|0)>-1?C:0-C|0;N=C}else{C=f[q>>2]|0;M=(f[t>>2]|0)-((C|0)>-1?C:0-C|0)|0;N=C}if((N|0)<0){O=(L|0)>-1?L:0-L|0;P=M;break}else{O=(f[t>>2]|0)-((L|0)>-1?L:0-L|0)|0;P=M;break}}else{C=f[r>>2]|0;O=(f[q>>2]|0)+C|0;P=C+L|0}while(0);C=(P|0)==0;B=(O|0)==0;E=f[t>>2]|0;do if(O|P){x=(E|0)==(O|0);if(!(C&x)){D=(E|0)==(P|0);if(!(B&D)){if(C?(n=f[r>>2]|0,(n|0)<(O|0)):0){Q=0;R=(n<<1)-O|0;break}if(D?(D=f[r>>2]|0,(D|0)>(O|0)):0){Q=P;R=(D<<1)-O|0;break}if(x?(x=f[r>>2]|0,(x|0)>(P|0)):0){Q=(x<<1)-P|0;R=O;break}if(B){x=f[r>>2]|0;Q=(x|0)<(P|0)?(x<<1)-P|0:P;R=0}else{Q=P;R=O}}else{Q=P;R=P}}else{Q=O;R=O}}else{Q=E;R=E}while(0);E=z<<1;B=b+(E<<2)|0;C=c+(E<<2)|0;E=f[B>>2]|0;x=f[B+4>>2]|0;f[h>>2]=Q;f[a>>2]=R;f[i>>2]=E;f[v>>2]=x;Ec(d,l,h,i);f[C>>2]=f[d>>2];f[C+4>>2]=f[w>>2];z=z+1|0;if((z|0)>=(p|0)){S=5;break}C=f[g>>2]|0;A=f[C>>2]|0;if((f[C+4>>2]|0)-A>>2>>>0<=z>>>0){y=C;S=6;break}}if((S|0)==5){u=e;return 1}else if((S|0)==6)Do(y);return 0}function pc(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0;switch(c|0){case 1:{c=Yk(60)|0;f[c>>2]=1584;f[c+4>>2]=d;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[b+16>>2]=f[e+16>>2];f[b+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);b=c+44|0;f[b>>2]=f[g>>2];f[b+4>>2]=f[g+4>>2];f[b+8>>2]=f[g+8>>2];f[b+12>>2]=f[g+12>>2];f[c>>2]=2060;i=c;f[a>>2]=i;return}case 2:{c=Yk(60)|0;f[c>>2]=1584;f[c+4>>2]=d;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[b+16>>2]=f[e+16>>2];f[b+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);b=c+44|0;f[b>>2]=f[g>>2];f[b+4>>2]=f[g+4>>2];f[b+8>>2]=f[g+8>>2];f[b+12>>2]=f[g+12>>2];f[c>>2]=2116;i=c;f[a>>2]=i;return}case 4:{c=Yk(112)|0;f[c>>2]=1584;f[c+4>>2]=d;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[b+16>>2]=f[e+16>>2];f[b+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);b=c+44|0;f[b>>2]=f[g>>2];f[b+4>>2]=f[g+4>>2];f[b+8>>2]=f[g+8>>2];f[b+12>>2]=f[g+12>>2];f[c>>2]=2172;b=c+60|0;j=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));i=c;f[a>>2]=i;return}case 3:{c=Yk(92)|0;f[c>>2]=1584;f[c+4>>2]=d;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[b+16>>2]=f[e+16>>2];f[b+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);b=c+44|0;f[b>>2]=f[g>>2];f[b+4>>2]=f[g+4>>2];f[b+8>>2]=f[g+8>>2];f[b+12>>2]=f[g+12>>2];f[c>>2]=2228;b=c+60|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;f[b+24>>2]=0;f[c+88>>2]=h&65535;i=c;f[a>>2]=i;return}case 5:{c=Yk(104)|0;f[c>>2]=1584;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2284;f[c+60>>2]=0;f[c+64>>2]=0;f[c+76>>2]=0;f[c+80>>2]=0;f[c+84>>2]=0;h=c+88|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=Yk(124)|0;f[c>>2]=1584;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);e=c+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=2340;f[c+64>>2]=0;f[c+68>>2]=0;e=c+72|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+60>>2]=2396;f[c+88>>2]=1;g=c+92|0;f[g>>2]=-1;f[g+4>>2]=-1;f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5;break}C=f[g>>2]|0;A=f[C>>2]|0;if((f[C+4>>2]|0)-A>>2>>>0<=z>>>0){y=C;S=6;break}}if((S|0)==5){u=e;return 1}else if((S|0)==6)Do(y);return 0}function rc(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0;switch(c|0){case 1:{c=Yk(60)|0;f[c>>2]=1584;f[c+4>>2]=d;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[b+16>>2]=f[e+16>>2];f[b+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);b=c+44|0;f[b>>2]=f[g>>2];f[b+4>>2]=f[g+4>>2];f[b+8>>2]=f[g+8>>2];f[b+12>>2]=f[g+12>>2];f[c>>2]=1696;i=c;f[a>>2]=i;return}case 2:{c=Yk(60)|0;f[c>>2]=1584;f[c+4>>2]=d;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[b+16>>2]=f[e+16>>2];f[b+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);b=c+44|0;f[b>>2]=f[g>>2];f[b+4>>2]=f[g+4>>2];f[b+8>>2]=f[g+8>>2];f[b+12>>2]=f[g+12>>2];f[c>>2]=1752;i=c;f[a>>2]=i;return}case 4:{c=Yk(112)|0;f[c>>2]=1584;f[c+4>>2]=d;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[b+16>>2]=f[e+16>>2];f[b+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);b=c+44|0;f[b>>2]=f[g>>2];f[b+4>>2]=f[g+4>>2];f[b+8>>2]=f[g+8>>2];f[b+12>>2]=f[g+12>>2];f[c>>2]=1808;b=c+60|0;j=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));i=c;f[a>>2]=i;return}case 3:{c=Yk(92)|0;f[c>>2]=1584;f[c+4>>2]=d;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[b+16>>2]=f[e+16>>2];f[b+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);b=c+44|0;f[b>>2]=f[g>>2];f[b+4>>2]=f[g+4>>2];f[b+8>>2]=f[g+8>>2];f[b+12>>2]=f[g+12>>2];f[c>>2]=1864;b=c+60|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;f[b+24>>2]=0;f[c+88>>2]=h&65535;i=c;f[a>>2]=i;return}case 5:{c=Yk(104)|0;f[c>>2]=1584;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1920;f[c+60>>2]=0;f[c+64>>2]=0;f[c+76>>2]=0;f[c+80>>2]=0;f[c+84>>2]=0;h=c+88|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=Yk(124)|0;f[c>>2]=1584;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];ni(c+32|0,e+24|0);e=c+44|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x|0)<(P|0)?(x<<1)-P|0:P;R=0}else{Q=P;R=O}}else{Q=P;R=P}}else{Q=O;R=O}}else{Q=E;R=E}while(0);E=z<<1;B=b+(E<<2)|0;C=c+(E<<2)|0;E=f[B+4>>2]|0;f[d>>2]=f[B>>2];f[a>>2]=E;f[i>>2]=Q;f[v>>2]=R;kd(h,l,i,d);f[C>>2]=f[h>>2];f[C+4>>2]=f[w>>2];z=z+1|0;if((z|0)>=(p|0)){S=5;break}C=f[g>>2]|0;A=f[C>>2]|0;if((f[C+4>>2]|0)-A>>2>>>0<=z>>>0){y=C;S=6;break}}if((S|0)==5){u=e;return 1}else if((S|0)==6)Do(y);return 0}function tc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;d=u;u=u+32|0;e=d+16|0;g=d;if((j[c+38>>1]|0)<514){i=c+8|0;k=f[i+4>>2]|0;l=c+16|0;m=l;n=f[m>>2]|0;o=f[m+4>>2]|0;if(!((k|0)>(o|0)|((k|0)==(o|0)?(f[i>>2]|0)>>>0>n>>>0:0))){p=0;u=d;return p|0}i=b[(f[c>>2]|0)+n>>0]|0;k=Vl(n|0,o|0,1,0)|0;o=l;f[o>>2]=k;f[o+4>>2]=I;if(i<<24>>24){p=0;u=d;return p|0}}Nh(e,c)|0;i=f[e>>2]|0;if(i){o=a+60|0;ud(o,i,0);Zm(g);if(zd(g,c)|0){if(f[e>>2]|0){i=0;do{k=Oi(g)|0;l=(f[o>>2]|0)+(i>>>5<<2)|0;n=1<<(i&31);if(k)q=f[l>>2]|n;else q=f[l>>2]&~n;f[l>>2]=q;i=i+1|0}while(i>>>0<(f[e>>2]|0)>>>0)}r=13}}else r=13;do if((r|0)==13){Nh(e,c)|0;i=f[e>>2]|0;if(i|0){q=a+72|0;ud(q,i,0);Zm(g);if(!(zd(g,c)|0))break;if(f[e>>2]|0){i=0;do{o=Oi(g)|0;l=(f[q>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;if(!(y>>>0<0|(y|0)==0&k>>>0<2147483647)){p=0;u=d;return p|0}y=k+1|0;f[a+20>>2]=y;k=(y|0)/2|0;l=a+24|0;f[l>>2]=k;f[a+28>>2]=0-k;if(y&1|0){p=1;u=d;return p|0}f[l>>2]=k+-1;p=1;u=d;return p|0}while(0);p=0;u=d;return p|0}function uc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;e=u;u=u+48|0;d=e+32|0;h=e+24|0;i=e+16|0;j=e;k=e+12|0;l=a+8|0;m=f[l>>2]|0;if((m+-2|0)>>>0<=28){f[a+72>>2]=m;n=1<<m;f[a+76>>2]=n+-1;m=n+-2|0;f[a+80>>2]=m;f[a+84>>2]=(m|0)/2|0}m=a+40|0;f[a+48>>2]=g;g=a+36|0;n=f[g>>2]|0;o=(f[n+4>>2]|0)-(f[n>>2]|0)|0;p=o>>2;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;if((o|0)<=0){u=e;return 1}o=j+4|0;q=j+8|0;r=a+84|0;s=a+88|0;t=a+80|0;a=d+4|0;v=i+4|0;w=h+4|0;x=f[n>>2]|0;if((f[n+4>>2]|0)==(x|0)){y=n;Do(y)}else{z=0;A=x}while(1){f[k>>2]=f[A+(z<<2)>>2];f[d>>2]=f[k>>2];Pb(m,d,j);x=f[j>>2]|0;n=(x|0)>-1?x:0-x|0;B=f[o>>2]|0;C=(B|0)>-1?B:0-B|0;D=Vl(C|0,((C|0)<0)<<31>>31|0,n|0,((n|0)<0)<<31>>31|0)|0;n=f[q>>2]|0;C=(n|0)>-1;E=C?n:0-n|0;n=Vl(D|0,I|0,E|0,((E|0)<0)<<31>>31|0)|0;E=I;if((n|0)==0&(E|0)==0){F=f[r>>2]|0;G=j}else{D=f[r>>2]|0;H=((D|0)<0)<<31>>31;J=al(D|0,H|0,x|0,((x|0)<0)<<31>>31|0)|0;x=Li(J|0,I|0,n|0,E|0)|0;f[j>>2]=x;J=al(D|0,H|0,B|0,((B|0)<0)<<31>>31|0)|0;B=Li(J|0,I|0,n|0,E|0)|0;f[o>>2]=B;E=D-((x|0)>-1?x:0-x|0)-((B|0)>-1?B:0-B|0)|0;F=C?E:0-E|0;G=q}f[G>>2]=F;E=Oi(s)|0;C=f[j>>2]|0;if(E){E=0-C|0;B=0-(f[o>>2]|0)|0;x=0-(f[q>>2]|0)|0;f[j>>2]=E;f[o>>2]=B;f[q>>2]=x;K=E;L=B}else{K=C;L=f[o>>2]|0}do if((K|0)<=-1){if((L|0)<0){C=f[q>>2]|0;M=(C|0)>-1?C:0-C|0;N=C}else{C=f[q>>2]|0;M=(f[t>>2]|0)-((C|0)>-1?C:0-C|0)|0;N=C}if((N|0)<0){O=(L|0)>-1?L:0-L|0;P=M;break}else{O=(f[t>>2]|0)-((L|0)>-1?L:0-L|0)|0;P=M;break}}else{C=f[r>>2]|0;O=(f[q>>2]|0)+C|0;P=C+L|0}while(0);C=(P|0)==0;B=(O|0)==0;E=f[t>>2]|0;do if(O|P){x=(E|0)==(O|0);if(!(C&x)){D=(E|0)==(P|0);if(!(B&D)){if(C?(n=f[r>>2]|0,(n|0)<(O|0)):0){Q=0;R=(n<<1)-O|0;break}if(D?(D=f[r>>2]|0,(D|0)>(O|0)):0){Q=P;R=(D<<1)-O|0;break}if(x?(x=f[r>>2]|0,(x|0)>(P|0)):0){Q=(x<<1)-P|0;R=O;break}if(B){x=f[r>>2]|0;Q=(x|0)<(P|0)?(x<<1)-P|0:P;R=0}else{Q=P;R=O}}else{Q=P;R=P}}else{Q=O;R=O}}else{Q=E;R=E}while(0);E=z<<1;B=b+(E<<2)|0;C=c+(E<<2)|0;E=f[B+4>>2]|0;f[d>>2]=f[B>>2];f[a>>2]=E;f[i>>2]=Q;f[v>>2]=R;kd(h,l,i,d);f[C>>2]=f[h>>2];f[C+4>>2]=f[w>>2];z=z+1|0;if((z|0)>=(p|0)){S=5;break}C=f[g>>2]|0;A=f[C>>2]|0;if((f[C+4>>2]|0)-A>>2>>>0<=z>>>0){y=C;S=6;break}}if((S|0)==5){u=e;return 1}else if((S|0)==6)Do(y);return 0}function vc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;d=u;u=u+16|0;e=d+12|0;g=d;h=d+8|0;i=d+4|0;j=a+8+(b*12|0)|0;k=f[j>>2]|0;l=a+8+(b*12|0)+4|0;m=f[l>>2]|0;if((m|0)!=(k|0))f[l>>2]=m+(~((m+-4-k|0)>>>2)<<2);k=f[c>>2]|0;m=a+4|0;f[g>>2]=(k|0)==-1?-1:(k>>>0)/3|0;n=a+56|0;o=a+8+(b*12|0)+8|0;p=0;q=f[g>>2]|0;r=k;while(1){s=(f[n>>2]|0)+(q>>>5<<2)|0;t=1<<(q&31);v=f[s>>2]|0;if(t&v|0)break;f[s>>2]=v|t;t=f[l>>2]|0;if((t|0)==(f[o>>2]|0))dh(j,g);else{f[t>>2]=f[g>>2];f[l>>2]=t+4}t=p+1|0;if((p|0)>0){v=(r|0)==-1;do if(!(t&1))if(!v)if(!((r>>>0)%3|0)){w=r+2|0;break}else{w=r+-1|0;break}else w=-1;else{s=r+1|0;if(v)w=-1;else w=((s>>>0)%3|0|0)==0?r+-2|0:s}while(0);f[c>>2]=w;x=w}else x=r;f[i>>2]=x;f[e>>2]=f[i>>2];v=kf(a,e)|0;f[c>>2]=v;if((v|0)==-1)break;s=(v>>>0)/3|0;f[g>>2]=s;p=t;q=s;r=v}r=(k|0)==-1;do if(!r)if(!((k>>>0)%3|0)){y=k+2|0;break}else{y=k+-1|0;break}else y=-1;while(0);f[h>>2]=y;f[e>>2]=f[h>>2];do if((kf(a,e)|0)==-1)z=k;else{h=k+1|0;if(!r){y=((h>>>0)%3|0|0)==0?k+-2|0:h;f[c>>2]=y;h=f[m>>2]|0;q=y+1|0;if(((y|0)!=-1?(p=((q>>>0)%3|0|0)==0?y+-2|0:q,(p|0)!=-1):0)?(q=f[(f[h+12>>2]|0)+(p<<2)>>2]|0,p=q+1|0,(q|0)!=-1):0){h=((p>>>0)%3|0|0)==0?q+-2|0:p;f[c>>2]=h;if((h|0)==-1){z=k;break}else{A=h;B=0;C=k}while(1){h=(A>>>0)/3|0;f[g>>2]=h;p=(f[n>>2]|0)+(h>>>5<<2)|0;q=1<<(h&31);h=f[p>>2]|0;if(q&h|0){D=B;E=C;break}f[p>>2]=h|q;q=f[l>>2]|0;if((q|0)==(f[o>>2]|0))dh(j,g);else{f[q>>2]=f[g>>2];f[l>>2]=q+4}q=B+1|0;if((B|0)>0){h=(A|0)==-1;do if(!(q&1))if(!h)if(!((A>>>0)%3|0)){F=A+2|0;G=A;break}else{F=A+-1|0;G=A;break}else{F=-1;G=A}else{p=A+1|0;if(h){F=-1;G=C}else{F=((p>>>0)%3|0|0)==0?A+-2|0:p;G=C}}while(0);f[c>>2]=F;H=G;I=F}else{H=C;I=A}f[i>>2]=I;f[e>>2]=f[i>>2];A=kf(a,e)|0;f[c>>2]=A;if((A|0)==-1){D=q;E=H;break}else{B=q;C=H}}if(!(D&1)){z=E;break}t=f[l>>2]|0;h=f[t+-4>>2]|0;p=(f[n>>2]|0)+(h>>>5<<2)|0;f[p>>2]=f[p>>2]&~(1<<(h&31));f[l>>2]=t+-4;z=E;break}else J=k}else{f[c>>2]=-1;J=-1}f[c>>2]=-1;z=J}while(0);f[a+44+(b<<2)>>2]=z;z=f[l>>2]|0;l=f[j>>2]|0;j=l;if((z|0)==(l|0)){u=d;return}b=f[n>>2]|0;n=z-l>>2;l=0;do{z=f[j+(l<<2)>>2]|0;a=b+(z>>>5<<2)|0;f[a>>2]=f[a>>2]&~(1<<(z&31));l=l+1|0}while(l>>>0<n>>>0);u=d;return}function wc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;c=u;u=u+16|0;b=c+8|0;d=c+4|0;e=c;g=a+64|0;h=f[g>>2]|0;if((f[h+28>>2]|0)==(f[h+24>>2]|0)){u=c;return}i=a+52|0;j=a+56|0;k=a+60|0;l=a+12|0;m=a+28|0;n=a+40|0;o=a+44|0;p=a+48|0;q=0;r=0;s=h;while(1){h=f[(f[s+24>>2]|0)+(r<<2)>>2]|0;if((h|0)==-1){t=q;v=s}else{w=q+1|0;f[b>>2]=q;x=f[j>>2]|0;if((x|0)==(f[k>>2]|0))dh(i,b);else{f[x>>2]=q;f[j>>2]=x+4}f[d>>2]=h;f[e>>2]=0;a:do if(!(f[(f[l>>2]|0)+(r>>>5<<2)>>2]&1<<(r&31)))y=h;else{x=h+1|0;z=((x>>>0)%3|0|0)==0?h+-2|0:x;if(((z|0)!=-1?(f[(f[a>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)==0:0)?(x=f[(f[(f[g>>2]|0)+12>>2]|0)+(z<<2)>>2]|0,z=x+1|0,(x|0)!=-1):0){A=((z>>>0)%3|0|0)==0?x+-2|0:z;f[e>>2]=A;if((A|0)==-1){y=h;break}else B=A;while(1){f[d>>2]=B;A=B+1|0;z=((A>>>0)%3|0|0)==0?B+-2|0:A;if((z|0)==-1)break;if(f[(f[a>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)break;A=f[(f[(f[g>>2]|0)+12>>2]|0)+(z<<2)>>2]|0;z=A+1|0;if((A|0)==-1)break;x=((z>>>0)%3|0|0)==0?A+-2|0:z;f[e>>2]=x;if((x|0)==-1){y=B;break a}else B=x}f[e>>2]=-1;y=B;break}f[e>>2]=-1;y=h}while(0);f[(f[m>>2]|0)+(y<<2)>>2]=f[b>>2];h=f[o>>2]|0;if((h|0)==(f[p>>2]|0))dh(n,d);else{f[h>>2]=f[d>>2];f[o>>2]=h+4}h=f[g>>2]|0;x=f[d>>2]|0;b:do if(((x|0)!=-1?(z=(((x>>>0)%3|0|0)==0?2:-1)+x|0,(z|0)!=-1):0)?(A=f[(f[h+12>>2]|0)+(z<<2)>>2]|0,(A|0)!=-1):0){z=A+(((A>>>0)%3|0|0)==0?2:-1)|0;f[e>>2]=z;if((z|0)!=-1&(z|0)!=(x|0)){A=w;C=z;while(1){z=C+1|0;D=((z>>>0)%3|0|0)==0?C+-2|0:z;do if(f[(f[a>>2]|0)+(D>>>5<<2)>>2]&1<<(D&31)){z=A+1|0;f[b>>2]=A;E=f[j>>2]|0;if((E|0)==(f[k>>2]|0))dh(i,b);else{f[E>>2]=A;f[j>>2]=E+4}E=f[o>>2]|0;if((E|0)==(f[p>>2]|0)){dh(n,e);F=z;break}else{f[E>>2]=f[e>>2];f[o>>2]=E+4;F=z;break}}else F=A;while(0);f[(f[m>>2]|0)+(f[e>>2]<<2)>>2]=f[b>>2];G=f[g>>2]|0;D=f[e>>2]|0;if((D|0)==-1)break;z=(((D>>>0)%3|0|0)==0?2:-1)+D|0;if((z|0)==-1)break;D=f[(f[G+12>>2]|0)+(z<<2)>>2]|0;if((D|0)==-1)break;C=D+(((D>>>0)%3|0|0)==0?2:-1)|0;f[e>>2]=C;if(!((C|0)!=-1?(C|0)!=(f[d>>2]|0):0)){H=F;I=G;break b}else A=F}f[e>>2]=-1;H=F;I=G}else{H=w;I=h}}else J=26;while(0);if((J|0)==26){J=0;f[e>>2]=-1;H=w;I=h}t=H;v=I}r=r+1|0;if(r>>>0>=(f[v+28>>2]|0)-(f[v+24>>2]|0)>>2>>>0)break;else{q=t;s=v}}u=c;return}
+function _a(a){a=a|0;var b=0,c=0,d=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=l+8|0;q=f[i>>2]|0;r=i}f[r>>2]=n;f[q+12>>2]=n;f[n+8>>2]=q;f[n+12>>2]=l}f[4196]=j;f[4199]=k;o=e;u=b;return o|0}e=f[4195]|0;if(e){k=(e&0-e)+-1|0;j=k>>>12&16;l=k>>>j;k=l>>>5&8;n=l>>>k;l=n>>>2&4;i=n>>>l;n=i>>>1&2;h=i>>>n;i=h>>>1&1;s=f[17080+((k|j|l|n|i)+(h>>>i)<<2)>>2]|0;i=(f[s+4>>2]&-8)-d|0;h=f[s+16+(((f[s+16>>2]|0)==0&1)<<2)>>2]|0;if(!h){t=s;v=i}else{n=s;s=i;i=h;while(1){h=(f[i+4>>2]&-8)-d|0;l=h>>>0<s>>>0;j=l?h:s;h=l?i:n;i=f[i+16+(((f[i+16>>2]|0)==0&1)<<2)>>2]|0;if(!i){t=h;v=j;break}else{n=h;s=j}}}s=t+d|0;if(s>>>0>t>>>0){n=f[t+24>>2]|0;i=f[t+12>>2]|0;do if((i|0)==(t|0)){j=t+20|0;h=f[j>>2]|0;if(!h){l=t+16|0;k=f[l>>2]|0;if(!k){w=0;break}else{x=k;y=l}}else{x=h;y=j}while(1){j=x+20|0;h=f[j>>2]|0;if(h|0){x=h;y=j;continue}j=x+16|0;h=f[j>>2]|0;if(!h)break;else{x=h;y=j}}f[y>>2]=0;w=x}else{j=f[t+8>>2]|0;f[j+12>>2]=i;f[i+8>>2]=j;w=i}while(0);do if(n|0){i=f[t+28>>2]|0;j=17080+(i<<2)|0;if((t|0)==(f[j>>2]|0)){f[j>>2]=w;if(!w){f[4195]=e&~(1<<i);break}}else{f[n+16+(((f[n+16>>2]|0)!=(t|0)&1)<<2)>>2]=w;if(!w)break}f[w+24>>2]=n;i=f[t+16>>2]|0;if(i|0){f[w+16>>2]=i;f[i+24>>2]=w}i=f[t+20>>2]|0;if(i|0){f[w+20>>2]=i;f[i+24>>2]=w}}while(0);if(v>>>0<16){n=v+d|0;f[t+4>>2]=n|3;e=t+n+4|0;f[e>>2]=f[e>>2]|1}else{f[t+4>>2]=d|3;f[s+4>>2]=v|1;f[s+v>>2]=v;if(m|0){e=f[4199]|0;n=m>>>3;i=16816+(n<<1<<2)|0;j=1<<n;if(!(g&j)){f[4194]=g|j;z=i;A=i+8|0}else{j=i+8|0;z=f[j>>2]|0;A=j}f[A>>2]=e;f[z+12>>2]=e;f[e+8>>2]=z;f[e+12>>2]=i}f[4196]=v;f[4199]=s}o=t+8|0;u=b;return o|0}else B=d}else B=d}else B=d}else if(a>>>0<=4294967231){i=a+11|0;e=i&-8;j=f[4195]|0;if(j){n=0-e|0;h=i>>>8;if(h)if(e>>>0>16777215)C=31;else{i=(h+1048320|0)>>>16&8;l=h<<i;h=(l+520192|0)>>>16&4;k=l<<h;l=(k+245760|0)>>>16&2;D=14-(h|i|l)+(k<<l>>>15)|0;C=e>>>(D+7|0)&1|D<<1}else C=0;D=f[17080+(C<<2)>>2]|0;a:do if(!D){E=0;F=0;G=n;H=57}else{l=0;k=n;i=D;h=e<<((C|0)==31?0:25-(C>>>1)|0);I=0;while(1){J=(f[i+4>>2]&-8)-e|0;if(J>>>0<k>>>0)if(!J){K=0;L=i;M=i;H=61;break a}else{N=i;O=J}else{N=l;O=k}J=f[i+20>>2]|0;i=f[i+16+(h>>>31<<2)>>2]|0;P=(J|0)==0|(J|0)==(i|0)?I:J;J=(i|0)==0;if(J){E=P;F=N;G=O;H=57;break}else{l=N;k=O;h=h<<((J^1)&1);I=P}}}while(0);if((H|0)==57){if((E|0)==0&(F|0)==0){D=2<<C;n=j&(D|0-D);if(!n){B=e;break}D=(n&0-n)+-1|0;n=D>>>12&16;d=D>>>n;D=d>>>5&8;s=d>>>D;d=s>>>2&4;g=s>>>d;s=g>>>1&2;m=g>>>s;g=m>>>1&1;Q=0;R=f[17080+((D|n|d|s|g)+(m>>>g)<<2)>>2]|0}else{Q=F;R=E}if(!R){S=Q;T=G}else{K=G;L=R;M=Q;H=61}}if((H|0)==61)while(1){H=0;g=(f[L+4>>2]&-8)-e|0;m=g>>>0<K>>>0;s=m?g:K;g=m?L:M;L=f[L+16+(((f[L+16>>2]|0)==0&1)<<2)>>2]|0;if(!L){S=g;T=s;break}else{K=s;M=g;H=61}}if((S|0)!=0?T>>>0<((f[4196]|0)-e|0)>>>0:0){g=S+e|0;if(g>>>0<=S>>>0){o=0;u=b;return o|0}s=f[S+24>>2]|0;m=f[S+12>>2]|0;do if((m|0)==(S|0)){d=S+20|0;n=f[d>>2]|0;if(!n){D=S+16|0;I=f[D>>2]|0;if(!I){U=0;break}else{V=I;W=D}}else{V=n;W=d}while(1){d=V+20|0;n=f[d>>2]|0;if(n|0){V=n;W=d;continue}d=V+16|0;n=f[d>>2]|0;if(!n)break;else{V=n;W=d}}f[W>>2]=0;U=V}else{d=f[S+8>>2]|0;f[d+12>>2]=m;f[m+8>>2]=d;U=m}while(0);do if(s){m=f[S+28>>2]|0;d=17080+(m<<2)|0;if((S|0)==(f[d>>2]|0)){f[d>>2]=U;if(!U){d=j&~(1<<m);f[4195]=d;X=d;break}}else{f[s+16+(((f[s+16>>2]|0)!=(S|0)&1)<<2)>>2]=U;if(!U){X=j;break}}f[U+24>>2]=s;d=f[S+16>>2]|0;if(d|0){f[U+16>>2]=d;f[d+24>>2]=U}d=f[S+20>>2]|0;if(d){f[U+20>>2]=d;f[d+24>>2]=U;X=j}else X=j}else X=j;while(0);do if(T>>>0>=16){f[S+4>>2]=e|3;f[g+4>>2]=T|1;f[g+T>>2]=T;j=T>>>3;if(T>>>0<256){s=16816+(j<<1<<2)|0;d=f[4194]|0;m=1<<j;if(!(d&m)){f[4194]=d|m;Y=s;Z=s+8|0}else{m=s+8|0;Y=f[m>>2]|0;Z=m}f[Z>>2]=g;f[Y+12>>2]=g;f[g+8>>2]=Y;f[g+12>>2]=s;break}s=T>>>8;if(s)if(T>>>0>16777215)_=31;else{m=(s+1048320|0)>>>16&8;d=s<<m;s=(d+520192|0)>>>16&4;j=d<<s;d=(j+245760|0)>>>16&2;n=14-(s|m|d)+(j<<d>>>15)|0;_=T>>>(n+7|0)&1|n<<1}else _=0;n=17080+(_<<2)|0;f[g+28>>2]=_;d=g+16|0;f[d+4>>2]=0;f[d>>2]=0;d=1<<_;if(!(X&d)){f[4195]=X|d;f[n>>2]=g;f[g+24>>2]=n;f[g+12>>2]=g;f[g+8>>2]=g;break}d=T<<((_|0)==31?0:25-(_>>>1)|0);j=f[n>>2]|0;while(1){if((f[j+4>>2]&-8|0)==(T|0)){H=97;break}$=j+16+(d>>>31<<2)|0;n=f[$>>2]|0;if(!n){H=96;break}else{d=d<<1;j=n}}if((H|0)==96){f[$>>2]=g;f[g+24>>2]=j;f[g+12>>2]=g;f[g+8>>2]=g;break}else if((H|0)==97){d=j+8|0;n=f[d>>2]|0;f[n+12>>2]=g;f[d>>2]=g;f[g+8>>2]=n;f[g+12>>2]=j;f[g+24>>2]=0;break}}else{n=T+e|0;f[S+4>>2]=n|3;d=S+n+4|0;f[d>>2]=f[d>>2]|1}while(0);o=S+8|0;u=b;return o|0}else B=e}else B=e}else B=-1;while(0);S=f[4196]|0;if(S>>>0>=B>>>0){T=S-B|0;$=f[4199]|0;if(T>>>0>15){_=$+B|0;f[4199]=_;f[4196]=T;f[_+4>>2]=T|1;f[$+S>>2]=T;f[$+4>>2]=B|3}else{f[4196]=0;f[4199]=0;f[$+4>>2]=S|3;T=$+S+4|0;f[T>>2]=f[T>>2]|1}o=$+8|0;u=b;return o|0}$=f[4197]|0;if($>>>0>B>>>0){T=$-B|0;f[4197]=T;S=f[4200]|0;_=S+B|0;f[4200]=_;f[_+4>>2]=T|1;f[S+4>>2]=B|3;o=S+8|0;u=b;return o|0}if(!(f[4312]|0)){f[4314]=4096;f[4313]=4096;f[4315]=-1;f[4316]=-1;f[4317]=0;f[4305]=0;f[4312]=c&-16^1431655768;aa=4096}else aa=f[4314]|0;c=B+48|0;S=B+47|0;T=aa+S|0;_=0-aa|0;aa=T&_;if(aa>>>0<=B>>>0){o=0;u=b;return o|0}X=f[4304]|0;if(X|0?(Y=f[4302]|0,Z=Y+aa|0,Z>>>0<=Y>>>0|Z>>>0>X>>>0):0){o=0;u=b;return o|0}b:do if(!(f[4305]&4)){X=f[4200]|0;c:do if(X){Z=17224;while(1){Y=f[Z>>2]|0;if(Y>>>0<=X>>>0?(ba=Z+4|0,(Y+(f[ba>>2]|0)|0)>>>0>X>>>0):0)break;Y=f[Z+8>>2]|0;if(!Y){H=118;break c}else Z=Y}j=T-$&_;if(j>>>0<2147483647){Y=Tj(j|0)|0;if((Y|0)==((f[Z>>2]|0)+(f[ba>>2]|0)|0))if((Y|0)==(-1|0))ca=j;else{da=j;ea=Y;H=135;break b}else{fa=Y;ga=j;H=126}}else ca=0}else H=118;while(0);do if((H|0)==118){X=Tj(0)|0;if((X|0)!=(-1|0)?(e=X,j=f[4313]|0,Y=j+-1|0,U=((Y&e|0)==0?0:(Y+e&0-j)-e|0)+aa|0,e=f[4302]|0,j=U+e|0,U>>>0>B>>>0&U>>>0<2147483647):0){Y=f[4304]|0;if(Y|0?j>>>0<=e>>>0|j>>>0>Y>>>0:0){ca=0;break}Y=Tj(U|0)|0;if((Y|0)==(X|0)){da=U;ea=X;H=135;break b}else{fa=Y;ga=U;H=126}}else ca=0}while(0);do if((H|0)==126){U=0-ga|0;if(!(c>>>0>ga>>>0&(ga>>>0<2147483647&(fa|0)!=(-1|0))))if((fa|0)==(-1|0)){ca=0;break}else{da=ga;ea=fa;H=135;break b}Y=f[4314]|0;X=S-ga+Y&0-Y;if(X>>>0>=2147483647){da=ga;ea=fa;H=135;break b}if((Tj(X|0)|0)==(-1|0)){Tj(U|0)|0;ca=0;break}else{da=X+ga|0;ea=fa;H=135;break b}}while(0);f[4305]=f[4305]|4;ha=ca;H=133}else{ha=0;H=133}while(0);if(((H|0)==133?aa>>>0<2147483647:0)?(ca=Tj(aa|0)|0,aa=Tj(0)|0,fa=aa-ca|0,ga=fa>>>0>(B+40|0)>>>0,!((ca|0)==(-1|0)|ga^1|ca>>>0<aa>>>0&((ca|0)!=(-1|0)&(aa|0)!=(-1|0))^1)):0){da=ga?fa:ha;ea=ca;H=135}if((H|0)==135){ca=(f[4302]|0)+da|0;f[4302]=ca;if(ca>>>0>(f[4303]|0)>>>0)f[4303]=ca;ca=f[4200]|0;do if(ca){ha=17224;while(1){ia=f[ha>>2]|0;ja=ha+4|0;ka=f[ja>>2]|0;if((ea|0)==(ia+ka|0)){H=143;break}fa=f[ha+8>>2]|0;if(!fa)break;else ha=fa}if(((H|0)==143?(f[ha+12>>2]&8|0)==0:0)?ea>>>0>ca>>>0&ia>>>0<=ca>>>0:0){f[ja>>2]=ka+da;fa=(f[4197]|0)+da|0;ga=ca+8|0;aa=(ga&7|0)==0?0:0-ga&7;ga=ca+aa|0;S=fa-aa|0;f[4200]=ga;f[4197]=S;f[ga+4>>2]=S|1;f[ca+fa+4>>2]=40;f[4201]=f[4316];break}if(ea>>>0<(f[4198]|0)>>>0)f[4198]=ea;fa=ea+da|0;S=17224;while(1){if((f[S>>2]|0)==(fa|0)){H=151;break}ga=f[S+8>>2]|0;if(!ga){la=17224;break}else S=ga}if((H|0)==151)if(!(f[S+12>>2]&8)){f[S>>2]=ea;ha=S+4|0;f[ha>>2]=(f[ha>>2]|0)+da;ha=ea+8|0;ga=ea+((ha&7|0)==0?0:0-ha&7)|0;ha=fa+8|0;aa=fa+((ha&7|0)==0?0:0-ha&7)|0;ha=ga+B|0;c=aa-ga-B|0;f[ga+4>>2]=B|3;do if((ca|0)!=(aa|0)){if((f[4199]|0)==(aa|0)){ba=(f[4196]|0)+c|0;f[4196]=ba;f[4199]=ha;f[ha+4>>2]=ba|1;f[ha+ba>>2]=ba;break}ba=f[aa+4>>2]|0;if((ba&3|0)==1){_=ba&-8;$=ba>>>3;d:do if(ba>>>0<256){T=f[aa+8>>2]|0;X=f[aa+12>>2]|0;if((X|0)==(T|0)){f[4194]=f[4194]&~(1<<$);break}else{f[T+12>>2]=X;f[X+8>>2]=T;break}}else{T=f[aa+24>>2]|0;X=f[aa+12>>2]|0;do if((X|0)==(aa|0)){U=aa+16|0;Y=U+4|0;j=f[Y>>2]|0;if(!j){e=f[U>>2]|0;if(!e){ma=0;break}else{na=e;oa=U}}else{na=j;oa=Y}while(1){Y=na+20|0;j=f[Y>>2]|0;if(j|0){na=j;oa=Y;continue}Y=na+16|0;j=f[Y>>2]|0;if(!j)break;else{na=j;oa=Y}}f[oa>>2]=0;ma=na}else{Y=f[aa+8>>2]|0;f[Y+12>>2]=X;f[X+8>>2]=Y;ma=X}while(0);if(!T)break;X=f[aa+28>>2]|0;Y=17080+(X<<2)|0;do if((f[Y>>2]|0)!=(aa|0)){f[T+16+(((f[T+16>>2]|0)!=(aa|0)&1)<<2)>>2]=ma;if(!ma)break d}else{f[Y>>2]=ma;if(ma|0)break;f[4195]=f[4195]&~(1<<X);break d}while(0);f[ma+24>>2]=T;X=aa+16|0;Y=f[X>>2]|0;if(Y|0){f[ma+16>>2]=Y;f[Y+24>>2]=ma}Y=f[X+4>>2]|0;if(!Y)break;f[ma+20>>2]=Y;f[Y+24>>2]=ma}while(0);pa=aa+_|0;qa=_+c|0}else{pa=aa;qa=c}$=pa+4|0;f[$>>2]=f[$>>2]&-2;f[ha+4>>2]=qa|1;f[ha+qa>>2]=qa;$=qa>>>3;if(qa>>>0<256){ba=16816+($<<1<<2)|0;Z=f[4194]|0;Y=1<<$;if(!(Z&Y)){f[4194]=Z|Y;ra=ba;sa=ba+8|0}else{Y=ba+8|0;ra=f[Y>>2]|0;sa=Y}f[sa>>2]=ha;f[ra+12>>2]=ha;f[ha+8>>2]=ra;f[ha+12>>2]=ba;break}ba=qa>>>8;do if(!ba)ta=0;else{if(qa>>>0>16777215){ta=31;break}Y=(ba+1048320|0)>>>16&8;Z=ba<<Y;$=(Z+520192|0)>>>16&4;X=Z<<$;Z=(X+245760|0)>>>16&2;j=14-($|Y|Z)+(X<<Z>>>15)|0;ta=qa>>>(j+7|0)&1|j<<1}while(0);ba=17080+(ta<<2)|0;f[ha+28>>2]=ta;_=ha+16|0;f[_+4>>2]=0;f[_>>2]=0;_=f[4195]|0;j=1<<ta;if(!(_&j)){f[4195]=_|j;f[ba>>2]=ha;f[ha+24>>2]=ba;f[ha+12>>2]=ha;f[ha+8>>2]=ha;break}j=qa<<((ta|0)==31?0:25-(ta>>>1)|0);_=f[ba>>2]|0;while(1){if((f[_+4>>2]&-8|0)==(qa|0)){H=192;break}ua=_+16+(j>>>31<<2)|0;ba=f[ua>>2]|0;if(!ba){H=191;break}else{j=j<<1;_=ba}}if((H|0)==191){f[ua>>2]=ha;f[ha+24>>2]=_;f[ha+12>>2]=ha;f[ha+8>>2]=ha;break}else if((H|0)==192){j=_+8|0;ba=f[j>>2]|0;f[ba+12>>2]=ha;f[j>>2]=ha;f[ha+8>>2]=ba;f[ha+12>>2]=_;f[ha+24>>2]=0;break}}else{ba=(f[4197]|0)+c|0;f[4197]=ba;f[4200]=ha;f[ha+4>>2]=ba|1}while(0);o=ga+8|0;u=b;return o|0}else la=17224;while(1){ha=f[la>>2]|0;if(ha>>>0<=ca>>>0?(va=ha+(f[la+4>>2]|0)|0,va>>>0>ca>>>0):0)break;la=f[la+8>>2]|0}ga=va+-47|0;ha=ga+8|0;c=ga+((ha&7|0)==0?0:0-ha&7)|0;ha=ca+16|0;ga=c>>>0<ha>>>0?ca:c;c=ga+8|0;aa=da+-40|0;fa=ea+8|0;S=(fa&7|0)==0?0:0-fa&7;fa=ea+S|0;ba=aa-S|0;f[4200]=fa;f[4197]=ba;f[fa+4>>2]=ba|1;f[ea+aa+4>>2]=40;f[4201]=f[4316];aa=ga+4|0;f[aa>>2]=27;f[c>>2]=f[4306];f[c+4>>2]=f[4307];f[c+8>>2]=f[4308];f[c+12>>2]=f[4309];f[4306]=ea;f[4307]=da;f[4309]=0;f[4308]=c;c=ga+24|0;do{ba=c;c=c+4|0;f[c>>2]=7}while((ba+8|0)>>>0<va>>>0);if((ga|0)!=(ca|0)){c=ga-ca|0;f[aa>>2]=f[aa>>2]&-2;f[ca+4>>2]=c|1;f[ga>>2]=c;ba=c>>>3;if(c>>>0<256){fa=16816+(ba<<1<<2)|0;S=f[4194]|0;j=1<<ba;if(!(S&j)){f[4194]=S|j;wa=fa;xa=fa+8|0}else{j=fa+8|0;wa=f[j>>2]|0;xa=j}f[xa>>2]=ca;f[wa+12>>2]=ca;f[ca+8>>2]=wa;f[ca+12>>2]=fa;break}fa=c>>>8;if(fa)if(c>>>0>16777215)ya=31;else{j=(fa+1048320|0)>>>16&8;S=fa<<j;fa=(S+520192|0)>>>16&4;ba=S<<fa;S=(ba+245760|0)>>>16&2;Z=14-(fa|j|S)+(ba<<S>>>15)|0;ya=c>>>(Z+7|0)&1|Z<<1}else ya=0;Z=17080+(ya<<2)|0;f[ca+28>>2]=ya;f[ca+20>>2]=0;f[ha>>2]=0;S=f[4195]|0;ba=1<<ya;if(!(S&ba)){f[4195]=S|ba;f[Z>>2]=ca;f[ca+24>>2]=Z;f[ca+12>>2]=ca;f[ca+8>>2]=ca;break}ba=c<<((ya|0)==31?0:25-(ya>>>1)|0);S=f[Z>>2]|0;while(1){if((f[S+4>>2]&-8|0)==(c|0)){H=213;break}za=S+16+(ba>>>31<<2)|0;Z=f[za>>2]|0;if(!Z){H=212;break}else{ba=ba<<1;S=Z}}if((H|0)==212){f[za>>2]=ca;f[ca+24>>2]=S;f[ca+12>>2]=ca;f[ca+8>>2]=ca;break}else if((H|0)==213){ba=S+8|0;c=f[ba>>2]|0;f[c+12>>2]=ca;f[ba>>2]=ca;f[ca+8>>2]=c;f[ca+12>>2]=S;f[ca+24>>2]=0;break}}}else{c=f[4198]|0;if((c|0)==0|ea>>>0<c>>>0)f[4198]=ea;f[4306]=ea;f[4307]=da;f[4309]=0;f[4203]=f[4312];f[4202]=-1;f[4207]=16816;f[4206]=16816;f[4209]=16824;f[4208]=16824;f[4211]=16832;f[4210]=16832;f[4213]=16840;f[4212]=16840;f[4215]=16848;f[4214]=16848;f[4217]=16856;f[4216]=16856;f[4219]=16864;f[4218]=16864;f[4221]=16872;f[4220]=16872;f[4223]=16880;f[4222]=16880;f[4225]=16888;f[4224]=16888;f[4227]=16896;f[4226]=16896;f[4229]=16904;f[4228]=16904;f[4231]=16912;f[4230]=16912;f[4233]=16920;f[4232]=16920;f[4235]=16928;f[4234]=16928;f[4237]=16936;f[4236]=16936;f[4239]=16944;f[4238]=16944;f[4241]=16952;f[4240]=16952;f[4243]=16960;f[4242]=16960;f[4245]=16968;f[4244]=16968;f[4247]=16976;f[4246]=16976;f[4249]=16984;f[4248]=16984;f[4251]=16992;f[4250]=16992;f[4253]=17e3;f[4252]=17e3;f[4255]=17008;f[4254]=17008;f[4257]=17016;f[4256]=17016;f[4259]=17024;f[4258]=17024;f[4261]=17032;f[4260]=17032;f[4263]=17040;f[4262]=17040;f[4265]=17048;f[4264]=17048;f[4267]=17056;f[4266]=17056;f[4269]=17064;f[4268]=17064;c=da+-40|0;ba=ea+8|0;ha=(ba&7|0)==0?0:0-ba&7;ba=ea+ha|0;ga=c-ha|0;f[4200]=ba;f[4197]=ga;f[ba+4>>2]=ga|1;f[ea+c+4>>2]=40;f[4201]=f[4316]}while(0);ea=f[4197]|0;if(ea>>>0>B>>>0){da=ea-B|0;f[4197]=da;ea=f[4200]|0;ca=ea+B|0;f[4200]=ca;f[ca+4>>2]=da|1;f[ea+4>>2]=B|3;o=ea+8|0;u=b;return o|0}}ea=tp()|0;f[ea>>2]=12;o=0;u=b;return o|0}function $a(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=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Q=R;while(1){T=f[Q+4>>2]|0;if((T|0)==(K|0)){if((f[Q+8>>2]|0)==(K|0)){ma=Q;break f}}else{if(T>>>0<ea>>>0)na=T;else na=(T>>>0)%(ea>>>0)|0;if((na|0)!=(ja|0)){ka=ca;la=M;break e}}Q=f[Q>>2]|0;if(!Q){ka=ca;la=M;break e}}}while(0);R=ma+12|0;if((M|0)==(f[F>>2]|0)){dh(g,R);ka=f[g>>2]|0;la=f[o>>2]|0;break}else{f[M>>2]=f[R>>2];f[o>>2]=aa;ka=ca;la=aa;break}}else{ka=ca;la=M}}else{ka=ca;la=M}while(0);if((ka|0)==(la|0)){Y=-1;N=193;break a}M=f[la+-4>>2]|0;ca=(M|0)==-1;if(!ca?(f[(f[(f[B>>2]|0)+12>>2]|0)+(M<<2)>>2]|0)!=-1:0){Y=-1;N=193;break a}aa=(da|0)==-1;ea=f[B>>2]|0;R=f[ea+12>>2]|0;if(!aa?(f[R+(da<<2)>>2]|0)!=-1:0){Y=-1;N=193;break a}Z=K*3|0;S=Z+2|0;f[R+(M<<2)>>2]=S;f[R+(S<<2)>>2]=M;Q=Z+1|0;f[R+(da<<2)>>2]=Q;f[R+(Q<<2)>>2]=da;if(!ca){ca=(((M>>>0)%3|0|0)==0?2:-1)+M|0;if((ca|0)==-1)oa=-1;else oa=f[(f[ea>>2]|0)+(ca<<2)>>2]|0;ca=f[ea>>2]|0;f[ca+(Z<<2)>>2]=oa;T=M+1|0;U=((T>>>0)%3|0|0)==0?M+-2|0:T;if((U|0)==-1){pa=-1;qa=oa;ra=ca;sa=ea}else{pa=f[ca+(U<<2)>>2]|0;qa=oa;ra=ca;sa=ea}}else{ca=f[ea>>2]|0;f[ca+(Z<<2)>>2]=-1;pa=-1;qa=-1;ra=ca;sa=ea}f[ra+(Q<<2)>>2]=pa;if(!aa){aa=(((da>>>0)%3|0|0)==0?2:-1)+da|0;if((aa|0)!=-1){Q=f[ra+(aa<<2)>>2]|0;f[ra+(S<<2)>>2]=Q;if((Q|0)!=-1)f[(f[ea+24>>2]|0)+(Q<<2)>>2]=S}else f[ra+(S<<2)>>2]=-1;Q=da+1|0;aa=((Q>>>0)%3|0|0)==0?da+-2|0:Q;if((aa|0)==-1){ta=-1;ua=-1}else{ta=f[ra+(aa<<2)>>2]|0;ua=aa}}else{f[ra+(S<<2)>>2]=-1;ta=-1;ua=-1}f[e>>2]=ta;S=f[D>>2]|0;aa=S+(qa<<2)|0;f[aa>>2]=(f[aa>>2]|0)+(f[S+(ta<<2)>>2]|0);S=f[ea+24>>2]|0;if((qa|0)!=-1)f[S+(qa<<2)>>2]=f[S+(f[e>>2]<<2)>>2];g:do if((ua|0)!=-1){ea=f[sa>>2]|0;aa=ua;do{f[ea+(aa<<2)>>2]=qa;Q=aa+1|0;ca=((Q>>>0)%3|0|0)==0?aa+-2|0:Q;if((ca|0)==-1)break g;Q=f[R+(ca<<2)>>2]|0;ca=Q+1|0;if((Q|0)==-1)break g;aa=((ca>>>0)%3|0|0)==0?Q+-2|0:ca}while((aa|0)!=-1)}while(0);f[S+(f[e>>2]<<2)>>2]=-1;do if(q){R=f[p>>2]|0;if((R|0)==(f[E>>2]|0)){dh(k,e);va=f[o>>2]|0;break}else{f[R>>2]=f[e>>2];f[p>>2]=R+4;va=la;break}}else va=la;while(0);f[va+-4>>2]=Z;f[l>>2]=f[va+-4>>2];f[e>>2]=f[l>>2];Mc(t,e);break d;break}case 7:{f[e>>2]=K*3;S=f[B>>2]|0;R=S+24|0;da=S+28|0;aa=f[da>>2]|0;if((aa|0)==(f[S+32>>2]|0)){dh(R,3160);wa=f[da>>2]|0}else{f[aa>>2]=-1;S=aa+4|0;f[da>>2]=S;wa=S}S=wa-(f[R>>2]|0)>>2;R=S+-1|0;da=f[B>>2]|0;aa=f[e>>2]|0;ea=f[da>>2]|0;f[ea+(aa<<2)>>2]=R;ca=da+24|0;Q=da+28|0;U=f[Q>>2]|0;if((U|0)==(f[da+32>>2]|0)){dh(ca,3160);xa=f[Q>>2]|0;ya=f[da>>2]|0}else{f[U>>2]=-1;da=U+4|0;f[Q>>2]=da;xa=da;ya=ea}f[ya+(aa+1<<2)>>2]=(xa-(f[ca>>2]|0)>>2)+-1;ca=f[B>>2]|0;aa=(f[e>>2]|0)+2|0;ea=ca+24|0;da=ca+28|0;Q=f[da>>2]|0;if((Q|0)==(f[ca+32>>2]|0)){dh(ea,3160);za=f[da>>2]|0}else{f[Q>>2]=-1;U=Q+4|0;f[da>>2]=U;za=U}f[(f[ca>>2]|0)+(aa<<2)>>2]=(za-(f[ea>>2]|0)>>2)+-1;ea=f[B>>2]|0;aa=f[ea+24>>2]|0;ca=aa;if(((f[ea+28>>2]|0)-aa>>2|0)>(s|0))break b;aa=f[e>>2]|0;if(S){f[ca+(R<<2)>>2]=aa;if((S|0)!=-1){f[ca+(S<<2)>>2]=(f[e>>2]|0)+1;R=S+1|0;if((R|0)!=-1){Aa=R;N=116}}else{Aa=0;N=116}}else{f[ca+(S<<2)>>2]=aa+1;Aa=1;N=116}if((N|0)==116){N=0;f[ca+(Aa<<2)>>2]=(f[e>>2]|0)+2}ca=f[o>>2]|0;if((ca|0)==(f[F>>2]|0)){dh(g,e);Ba=f[o>>2]|0}else{f[ca>>2]=f[e>>2];aa=ca+4|0;f[o>>2]=aa;Ba=aa}ia=Ba;break}default:{Y=-1;N=193;break a}}f[l>>2]=f[ia+-4>>2];f[e>>2]=f[l>>2];Mc(t,e);aa=c-K+-1|0;ca=f[H>>2]|0;if((ca|0)!=(f[G>>2]|0)){S=ca;do{ca=S;R=f[ca+-8>>2]|0;if(R>>>0>aa>>>0){Y=-1;N=193;break a}if((R|0)!=(aa|0))break d;R=b[ca+-4>>0]|0;ea=f[ca+-12>>2]|0;f[H>>2]=ca+-12;if((ea|0)<0){Y=-1;N=193;break a}ca=f[(f[o>>2]|0)+-4>>2]|0;U=(ca|0)==-1;do if(!(R&1))if(!U)if(!((ca>>>0)%3|0)){Ca=ca+2|0;break}else{Ca=ca+-1|0;break}else Ca=-1;else{da=ca+1|0;if(U)Ca=-1;else Ca=((da>>>0)%3|0|0)==0?ca+-2|0:da}while(0);f[e>>2]=I-ea;ca=Zc(i,e)|0;f[ca>>2]=Ca;S=f[H>>2]|0}while((S|0)!=(f[G>>2]|0))}}while(0);if((L|0)<(c|0))K=L;else{Da=L;Ea=B;N=135;break a}}Y=-1;N=193}else{Da=0;Ea=a+8|0;N=135}while(0);h:do if((N|0)==135){c=f[Ea>>2]|0;if(((f[c+28>>2]|0)-(f[c+24>>2]|0)>>2|0)<=(s|0)){Ca=f[o>>2]|0;do if((Ca|0)!=(f[g>>2]|0)){l=a+270|0;ia=a+364|0;Ba=a+360|0;Aa=a+352|0;za=a+356|0;xa=a+60|0;ya=a+64|0;wa=a+68|0;va=a+76|0;la=a+80|0;q=a+72|0;qa=a+312|0;ua=Da;sa=Ca;i:while(1){ta=sa;f[e>>2]=f[ta+-4>>2];f[o>>2]=ta+-4;if((j[l>>1]|0)<514)if(b[ia>>0]|0){ta=f[Ba>>2]|0;ra=(f[Aa>>2]|0)+(ta>>>3)|0;if(ra>>>0<(f[za>>2]|0)>>>0){pa=(h[ra>>0]|0)>>>(ta&7)&1;f[Ba>>2]=ta+1;Fa=pa;N=143}else N=166}else N=144;else{Fa=(Oi(qa)|0)&1;N=143}if((N|0)==143){N=0;if(!Fa)N=166;else N=144}do if((N|0)==144){N=0;pa=f[Ea>>2]|0;ta=f[pa>>2]|0;ra=ta;if((ua|0)>=(((f[pa+4>>2]|0)-ta>>2>>>0)/3|0|0)){N=174;break i}ta=f[e>>2]|0;oa=ta+1|0;if((ta|0)!=-1?(ka=((oa>>>0)%3|0|0)==0?ta+-2|0:oa,(ka|0)!=-1):0)Ga=f[ra+(ka<<2)>>2]|0;else Ga=-1;ka=f[pa+24>>2]|0;oa=f[ka+(Ga<<2)>>2]|0;ma=oa+1|0;if((oa|0)!=-1?(ja=((ma>>>0)%3|0|0)==0?oa+-2|0:ma,ma=ja+1|0,(ja|0)!=-1):0){oa=((ma>>>0)%3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0?ra:ta):2147483647);Oa=f[ya>>2]|0}else Oa=ja;f[ya>>2]=Oa+1;ja=(f[xa>>2]|0)+(Oa>>>5<<2)|0;f[ja>>2]=f[ja>>2]|1<<(Oa&31);ja=f[va>>2]|0;if((ja|0)==(f[la>>2]|0))dh(q,m);else{f[ja>>2]=f[m>>2];f[va>>2]=ja+4}Pa=oa}else if((N|0)==166){N=0;oa=f[ya>>2]|0;ja=f[wa>>2]|0;if((oa|0)==(ja<<5|0)){if((oa+1|0)<0){N=168;break i}ta=ja<<6;ja=oa+32&-32;Jg(xa,oa>>>0<1073741823?(ta>>>0<ja>>>0?ja:ta):2147483647);Qa=f[ya>>2]|0}else Qa=oa;f[ya>>2]=Qa+1;oa=(f[xa>>2]|0)+(Qa>>>5<<2)|0;f[oa>>2]=f[oa>>2]&~(1<<(Qa&31));oa=f[va>>2]|0;if((oa|0)==(f[la>>2]|0)){dh(q,e);Pa=ua;break}else{f[oa>>2]=f[e>>2];f[va>>2]=oa+4;Pa=ua;break}}while(0);sa=f[o>>2]|0;if((sa|0)==(f[g>>2]|0)){N=175;break}else ua=Pa}if((N|0)==158)Do(xa);else if((N|0)==168)Do(xa);else if((N|0)==174){Y=-1;N=193;break h}else if((N|0)==175){Ra=Pa;Sa=f[Ea>>2]|0;break}}else{Ra=Da;Sa=c}while(0);if((Ra|0)==(((f[Sa+4>>2]|0)-(f[Sa>>2]|0)>>2>>>0)/3|0|0)){c=(f[Sa+28>>2]|0)-(f[Sa+24>>2]|0)>>2;Ca=f[k>>2]|0;ua=f[p>>2]|0;if((Ca|0)==(ua|0)){Ta=c;Ua=Ca}else{sa=e+4|0;va=e+8|0;q=e+12|0;la=c;c=Ca;Ca=Sa;while(1){ya=f[c>>2]|0;wa=la+-1|0;qa=f[Ca+24>>2]|0;if((f[qa+(wa<<2)>>2]|0)==-1){Ba=la;while(1){za=Ba+-1|0;Aa=Ba+-2|0;if((f[qa+(Aa<<2)>>2]|0)==-1)Ba=za;else{Va=za;Wa=Aa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}G=R-(f[O>>2]|0)>>2;O=G+-1|0;P=f[v>>2]|0;Q=f[P+24>>2]|0;S=Q;if(((f[P+28>>2]|0)-Q>>2|0)>(s|0)){I=-1;J=181;break a}Q=f[P>>2]|0;f[Q+(N<<2)>>2]=O;if(G|0)f[S+(O<<2)>>2]=N;if((K|0)!=-1){N=(((K>>>0)%3|0|0)==0?2:-1)+K|0;if((N|0)!=-1){O=f[Q+(N<<2)>>2]|0;f[Q+(L<<2)>>2]=O;if((O|0)!=-1)f[S+(O<<2)>>2]=L}else f[Q+(L<<2)>>2]=-1;O=K+1|0;S=((O>>>0)%3|0|0)==0?K+-2|0:O;if((S|0)==-1)T=-1;else T=f[Q+(S<<2)>>2]|0}else{f[Q+(L<<2)>>2]=-1;T=-1}f[Q+(M<<2)>>2]=T;M=f[o>>2]|0;f[M+-4>>2]=H;U=M;break}case 1:{M=f[g>>2]|0;H=f[o>>2]|0;if((M|0)==(H|0)){I=-1;J=181;break a}Q=H+-4|0;L=f[Q>>2]|0;f[o>>2]=Q;S=f[z>>2]|0;d:do if(S){O=S+-1|0;K=(O&S|0)==0;if(!K)if(D>>>0<S>>>0)V=D;else V=(D>>>0)%(S>>>0)|0;else V=O&D;N=f[(f[i>>2]|0)+(V<<2)>>2]|0;if((N|0)!=0?(G=f[N>>2]|0,(G|0)!=0):0){e:do if(K){N=G;while(1){P=f[N+4>>2]|0;W=(P|0)==(D|0);if(!(W|(P&O|0)==(V|0))){X=M;Y=Q;break d}if(W?(f[N+8>>2]|0)==(D|0):0){Z=N;break e}N=f[N>>2]|0;if(!N){X=M;Y=Q;break d}}}else{N=G;while(1){W=f[N+4>>2]|0;if((W|0)==(D|0)){if((f[N+8>>2]|0)==(D|0)){Z=N;break e}}else{if(W>>>0<S>>>0)_=W;else _=(W>>>0)%(S>>>0)|0;if((_|0)!=(V|0)){X=M;Y=Q;break d}}N=f[N>>2]|0;if(!N){X=M;Y=Q;break d}}}while(0);G=Z+12|0;if((Q|0)==(f[C>>2]|0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);K=f[S+24>>2]|0;if((ca|0)!=-1)f[K+(ca<<2)>>2]=f[K+(f[e>>2]<<2)>>2];f:do if((ga|0)!=-1){S=f[ea>>2]|0;H=ga;do{f[S+(H<<2)>>2]=ca;N=H+1|0;M=((N>>>0)%3|0|0)==0?H+-2|0:N;if((M|0)==-1)break f;N=f[G+(M<<2)>>2]|0;M=N+1|0;if((N|0)==-1)break f;H=((M>>>0)%3|0|0)==0?N+-2|0:M}while((H|0)!=-1)}while(0);f[K+(f[e>>2]<<2)>>2]=-1;do if(q){G=f[p>>2]|0;if((G|0)==(f[B>>2]|0)){dh(k,e);ha=f[o>>2]|0;break}else{f[G>>2]=f[e>>2];f[p>>2]=G+4;ha=Y;break}}else ha=Y;while(0);f[ha+-4>>2]=O;f[l>>2]=f[ha+-4>>2];f[e>>2]=f[l>>2];Tc(t,e);break c;break}case 7:{f[e>>2]=D*3;K=f[v>>2]|0;G=K+24|0;L=K+28|0;H=f[L>>2]|0;if((H|0)==(f[K+32>>2]|0)){dh(G,3160);ia=f[L>>2]|0}else{f[H>>2]=-1;K=H+4|0;f[L>>2]=K;ia=K}K=ia-(f[G>>2]|0)>>2;G=K+-1|0;L=f[v>>2]|0;H=f[e>>2]|0;S=f[L>>2]|0;f[S+(H<<2)>>2]=G;M=L+24|0;N=L+28|0;P=f[N>>2]|0;if((P|0)==(f[L+32>>2]|0)){dh(M,3160);ja=f[N>>2]|0;ka=f[L>>2]|0}else{f[P>>2]=-1;L=P+4|0;f[N>>2]=L;ja=L;ka=S}f[ka+(H+1<<2)>>2]=(ja-(f[M>>2]|0)>>2)+-1;M=f[v>>2]|0;H=(f[e>>2]|0)+2|0;S=M+24|0;L=M+28|0;N=f[L>>2]|0;if((N|0)==(f[M+32>>2]|0)){dh(S,3160);la=f[L>>2]|0}else{f[N>>2]=-1;P=N+4|0;f[L>>2]=P;la=P}f[(f[M>>2]|0)+(H<<2)>>2]=(la-(f[S>>2]|0)>>2)+-1;S=f[v>>2]|0;H=f[S+24>>2]|0;M=H;if(((f[S+28>>2]|0)-H>>2|0)>(s|0))break b;H=f[e>>2]|0;if(K){f[M+(G<<2)>>2]=H;if((K|0)!=-1){f[M+(K<<2)>>2]=(f[e>>2]|0)+1;G=K+1|0;if((G|0)!=-1){ma=G;J=104}}else{ma=0;J=104}}else{f[M+(K<<2)>>2]=H+1;ma=1;J=104}if((J|0)==104){J=0;f[M+(ma<<2)>>2]=(f[e>>2]|0)+2}M=f[o>>2]|0;if((M|0)==(f[C>>2]|0)){dh(g,e);na=f[o>>2]|0}else{f[M>>2]=f[e>>2];H=M+4|0;f[o>>2]=H;na=H}U=na;break}default:{I=-1;J=181;break a}}f[l>>2]=f[U+-4>>2];f[e>>2]=f[l>>2];Tc(t,e);H=c-D+-1|0;M=f[x>>2]|0;if((M|0)!=(f[w>>2]|0)){K=M;do{M=K;G=f[M+-8>>2]|0;if(G>>>0>H>>>0){I=-1;J=181;break a}if((G|0)!=(H|0))break c;G=b[M+-4>>0]|0;S=f[M+-12>>2]|0;f[x>>2]=M+-12;if((S|0)<0){I=-1;J=181;break a}M=f[(f[o>>2]|0)+-4>>2]|0;P=(M|0)==-1;do if(!(G&1))if(!P)if(!((M>>>0)%3|0)){oa=M+2|0;break}else{oa=M+-1|0;break}else oa=-1;else{L=M+1|0;if(P)oa=-1;else oa=((L>>>0)%3|0|0)==0?M+-2|0:L}while(0);f[e>>2]=y-S;M=Zc(i,e)|0;f[M>>2]=oa;K=f[x>>2]|0}while((K|0)!=(f[w>>2]|0))}}else{K=f[o>>2]|0;if((f[g>>2]|0)==(K|0)){I=-1;J=181;break a}H=K+-4|0;O=f[H>>2]|0;M=f[v>>2]|0;P=(O|0)==-1;G=O+1|0;if(!P?(L=((G>>>0)%3|0|0)==0?O+-2|0:G,(L|0)!=-1):0)pa=f[(f[M>>2]|0)+(L<<2)>>2]|0;else pa=-1;L=f[M+24>>2]|0;G=f[L+(pa<<2)>>2]|0;N=G+1|0;if((G|0)==-1)qa=-1;else qa=((N>>>0)%3|0|0)==0?G+-2|0:N;N=D*3|0;G=N+1|0;W=f[M+12>>2]|0;f[W+(O<<2)>>2]=G;f[W+(G<<2)>>2]=O;Q=N+2|0;f[W+(qa<<2)>>2]=Q;f[W+(Q<<2)>>2]=qa;W=f[M>>2]|0;f[W+(N<<2)>>2]=pa;M=qa+1|0;if((qa|0)!=-1?(ra=((M>>>0)%3|0|0)==0?qa+-2|0:M,(ra|0)!=-1):0)sa=f[W+(ra<<2)>>2]|0;else sa=-1;f[W+(G<<2)>>2]=sa;if(!P?(P=(((O>>>0)%3|0|0)==0?2:-1)+O|0,(P|0)!=-1):0){O=f[W+(P<<2)>>2]|0;f[W+(Q<<2)>>2]=O;if((O|0)!=-1)f[L+(O<<2)>>2]=Q}else f[W+(Q<<2)>>2]=-1;Q=(f[r>>2]|0)+(pa>>>5<<2)|0;f[Q>>2]=f[Q>>2]&~(1<<(pa&31));f[H>>2]=N;f[l>>2]=f[K+-4>>2];f[e>>2]=f[l>>2];Tc(t,e)}while(0);if((E|0)<(c|0))D=E;else{ta=E;ua=v;J=123;break a}}I=-1;J=181}else{ta=0;ua=a+8|0;J=123}while(0);g:do if((J|0)==123){c=f[ua>>2]|0;if(((f[c+28>>2]|0)-(f[c+24>>2]|0)>>2|0)<=(s|0)){l=f[o>>2]|0;do if((l|0)!=(f[g>>2]|0)){pa=a+270|0;sa=a+364|0;qa=a+360|0;oa=a+352|0;U=a+356|0;na=a+60|0;ma=a+64|0;la=a+68|0;ja=a+76|0;ka=a+80|0;ia=a+72|0;ha=a+312|0;Y=ta;q=l;h:while(1){ca=q;f[e>>2]=f[ca+-4>>2];f[o>>2]=ca+-4;if((j[pa>>1]|0)<514)if(b[sa>>0]|0){ca=f[qa>>2]|0;ga=(f[oa>>2]|0)+(ca>>>3)|0;if(ga>>>0<(f[U>>2]|0)>>>0){ea=(h[ga>>0]|0)>>>(ca&7)&1;f[qa>>2]=ca+1;va=ea;J=131}else J=154}else J=132;else{va=(Oi(ha)|0)&1;J=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f[m>>2]|0)+1|0;if((fa|0)==-1)Ca=-1;else Ca=f[ga+(fa<<2)>>2]|0;fa=aa+(Ca>>>5<<2)|0;f[fa>>2]=f[fa>>2]&~(1<<(Ca&31));fa=(f[m>>2]|0)+2|0;if((fa|0)==-1)Da=-1;else Da=f[ga+(fa<<2)>>2]|0;fa=aa+(Da>>>5<<2)|0;f[fa>>2]=f[fa>>2]&~(1<<(Da&31));fa=Y+1|0;aa=f[ma>>2]|0;ga=f[la>>2]|0;if((aa|0)==(ga<<5|0)){if((aa+1|0)<0){J=146;break h}ca=ga<<6;ga=aa+32&-32;Jg(na,aa>>>0<1073741823?(ca>>>0<ga>>>0?ga:ca):2147483647);Ea=f[ma>>2]|0}else Ea=aa;f[ma>>2]=Ea+1;aa=(f[na>>2]|0)+(Ea>>>5<<2)|0;f[aa>>2]=f[aa>>2]|1<<(Ea&31);aa=f[ja>>2]|0;if((aa|0)==(f[ka>>2]|0))dh(ia,m);else{f[aa>>2]=f[m>>2];f[ja>>2]=aa+4}Fa=fa}else if((J|0)==154){J=0;fa=f[ma>>2]|0;aa=f[la>>2]|0;if((fa|0)==(aa<<5|0)){if((fa+1|0)<0){J=156;break h}ca=aa<<6;aa=fa+32&-32;Jg(na,fa>>>0<1073741823?(ca>>>0<aa>>>0?aa:ca):2147483647);Ga=f[ma>>2]|0}else Ga=fa;f[ma>>2]=Ga+1;fa=(f[na>>2]|0)+(Ga>>>5<<2)|0;f[fa>>2]=f[fa>>2]&~(1<<(Ga&31));fa=f[ja>>2]|0;if((fa|0)==(f[ka>>2]|0)){dh(ia,e);Fa=Y;break}else{f[fa>>2]=f[e>>2];f[ja>>2]=fa+4;Fa=Y;break}}while(0);q=f[o>>2]|0;if((q|0)==(f[g>>2]|0)){J=163;break}else Y=Fa}if((J|0)==146)Do(na);else if((J|0)==156)Do(na);else if((J|0)==162){I=-1;J=181;break g}else if((J|0)==163){Ha=Fa;Ia=f[ua>>2]|0;break}}else{Ha=ta;Ia=c}while(0);if((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[s>>0]|0))G=43;else{H=f[y>>2]|0;I=f[z>>2]|0;J=f[A>>2]|0;K=I+(H>>>3)|0;if(K>>>0<J>>>0?(L=h[K>>0]|0,K=H+1|0,f[y>>2]=K,1<<(H&7)&L|0):0){L=I+(K>>>3)|0;if(L>>>0<J>>>0){M=(h[L>>0]|0)>>>(K&7)&1;L=H+2|0;f[y>>2]=L;N=M;O=L}else{N=0;O=K}K=I+(O>>>3)|0;if(K>>>0<J>>>0){J=(h[K>>0]|0)>>>(O&7);f[y>>2]=O+1;P=J<<1&2}else P=0;J=(P|N)<<1|1;K=(J|0)==5;switch(J&7){case 1:{G=43;break c;break}case 3:case 5:{J=f[m>>2]|0;if((f[e>>2]|0)==(J|0)){Q=-1;G=188;break a}I=f[J+-4>>2]|0;J=E*3|0;L=K?J:J+2|0;M=J+(K&1)|0;H=(K?2:1)+J|0;K=f[v>>2]|0;R=f[K+12>>2]|0;f[R+(H<<2)>>2]=I;f[R+(I<<2)>>2]=H;R=K+24|0;S=K+28|0;T=f[S>>2]|0;if((T|0)==(f[K+32>>2]|0)){dh(R,3160);U=f[S>>2]|0}else{f[T>>2]=-1;K=T+4|0;f[S>>2]=K;U=K}K=U-(f[R>>2]|0)>>2;R=K+-1|0;S=f[v>>2]|0;T=f[S+24>>2]|0;V=T;if(((f[S+28>>2]|0)-T>>2|0)>(r|0)){Q=-1;G=188;break a}T=f[S>>2]|0;f[T+(H<<2)>>2]=R;if(K|0)f[V+(R<<2)>>2]=H;if((I|0)!=-1){H=(((I>>>0)%3|0|0)==0?2:-1)+I|0;if((H|0)!=-1){R=f[T+(H<<2)>>2]|0;f[T+(L<<2)>>2]=R;if((R|0)!=-1)f[V+(R<<2)>>2]=L}else f[T+(L<<2)>>2]=-1;R=I+1|0;V=((R>>>0)%3|0|0)==0?I+-2|0:R;if((V|0)==-1)W=-1;else W=f[T+(V<<2)>>2]|0}else{f[T+(L<<2)>>2]=-1;W=-1}f[T+(M<<2)>>2]=W;f[(f[m>>2]|0)+-4>>2]=J;break}case 7:{f[k>>2]=E*3;J=f[v>>2]|0;M=J+24|0;T=J+28|0;L=f[T>>2]|0;if((L|0)==(f[J+32>>2]|0)){dh(M,3160);X=f[T>>2]|0}else{f[L>>2]=-1;J=L+4|0;f[T>>2]=J;X=J}J=X-(f[M>>2]|0)>>2;M=J+-1|0;T=f[v>>2]|0;L=f[k>>2]|0;V=f[T>>2]|0;f[V+(L<<2)>>2]=M;R=T+24|0;I=T+28|0;H=f[I>>2]|0;if((H|0)==(f[T+32>>2]|0)){dh(R,3160);Y=f[I>>2]|0;Z=f[T>>2]|0}else{f[H>>2]=-1;T=H+4|0;f[I>>2]=T;Y=T;Z=V}f[Z+(L+1<<2)>>2]=(Y-(f[R>>2]|0)>>2)+-1;R=f[v>>2]|0;L=(f[k>>2]|0)+2|0;V=R+24|0;T=R+28|0;I=f[T>>2]|0;if((I|0)==(f[R+32>>2]|0)){dh(V,3160);_=f[T>>2]|0}else{f[I>>2]=-1;H=I+4|0;f[T>>2]=H;_=H}f[(f[R>>2]|0)+(L<<2)>>2]=(_-(f[V>>2]|0)>>2)+-1;V=f[v>>2]|0;L=f[V+24>>2]|0;R=L;if(((f[V+28>>2]|0)-L>>2|0)>(r|0)){G=114;break b}L=f[k>>2]|0;if(J){f[R+(M<<2)>>2]=L;if((J|0)!=-1){f[R+(J<<2)>>2]=(f[k>>2]|0)+1;M=J+1|0;if((M|0)!=-1){aa=M;G=109}}else{aa=0;G=109}}else{f[R+(J<<2)>>2]=L+1;aa=1;G=109}if((G|0)==109){G=0;f[R+(aa<<2)>>2]=(f[k>>2]|0)+2}R=f[m>>2]|0;if((R|0)==(f[x>>2]|0))dh(e,k);else{f[R>>2]=f[k>>2];f[m>>2]=R+4}break}default:{G=187;break b}}R=c-E+-1|0;L=f[C>>2]|0;if((L|0)==(f[B>>2]|0))break;else ba=L;while(1){L=ba;J=f[L+-8>>2]|0;if(J>>>0>R>>>0){Q=-1;G=188;break a}if((J|0)!=(R|0))break c;J=b[L+-4>>0]|0;M=f[L+-12>>2]|0;f[C>>2]=L+-12;if((M|0)<0){Q=-1;G=188;break a}L=f[(f[m>>2]|0)+-4>>2]|0;V=(L|0)==-1;do if(!(J&1))if(!V)if(!((L>>>0)%3|0)){ca=L+2|0;break}else{ca=L+-1|0;break}else ca=-1;else{H=L+1|0;if(V)ca=-1;else ca=((H>>>0)%3|0|0)==0?L+-2|0:H}while(0);f[k>>2]=D-M;L=Zc(g,k)|0;f[L>>2]=ca;ba=f[C>>2]|0;if((ba|0)==(f[B>>2]|0))break c}}R=f[m>>2]|0;if((f[e>>2]|0)==(R|0)){Q=-1;G=188;break a}L=R+-4|0;R=f[L>>2]|0;V=f[v>>2]|0;J=(R|0)==-1;H=R+1|0;if(!J?(T=((H>>>0)%3|0|0)==0?R+-2|0:H,(T|0)!=-1):0)da=f[(f[V>>2]|0)+(T<<2)>>2]|0;else da=-1;T=f[V+24>>2]|0;H=f[T+(da<<2)>>2]|0;I=H+1|0;if((H|0)==-1)ea=-1;else ea=((I>>>0)%3|0|0)==0?H+-2|0:I;I=E*3|0;H=I+1|0;K=f[V+12>>2]|0;f[K+(R<<2)>>2]=H;f[K+(H<<2)>>2]=R;S=I+2|0;f[K+(ea<<2)>>2]=S;f[K+(S<<2)>>2]=ea;K=f[V>>2]|0;f[K+(I<<2)>>2]=da;V=ea+1|0;if((ea|0)!=-1?(fa=((V>>>0)%3|0|0)==0?ea+-2|0:V,(fa|0)!=-1):0)ga=f[K+(fa<<2)>>2]|0;else ga=-1;f[K+(H<<2)>>2]=ga;if(!J?(J=(((R>>>0)%3|0|0)==0?2:-1)+R|0,(J|0)!=-1):0){R=f[K+(J<<2)>>2]|0;f[K+(S<<2)>>2]=R;if((R|0)!=-1)f[T+(R<<2)>>2]=S}else f[K+(S<<2)>>2]=-1;S=(f[q>>2]|0)+(da>>>5<<2)|0;f[S>>2]=f[S>>2]&~(1<<(da&31));f[L>>2]=I}while(0);if((G|0)==43){G=0;I=f[e>>2]|0;L=f[m>>2]|0;if((I|0)==(L|0)){Q=-1;G=188;break a}S=L+-4|0;K=f[S>>2]|0;f[m>>2]=S;R=f[t>>2]|0;d:do if(R){T=R+-1|0;J=(T&R|0)==0;if(!J)if(E>>>0<R>>>0)ha=E;else ha=(E>>>0)%(R>>>0)|0;else ha=T&E;H=f[(f[g>>2]|0)+(ha<<2)>>2]|0;if((H|0)!=0?(fa=f[H>>2]|0,(fa|0)!=0):0){e:do if(J){H=fa;while(1){V=f[H+4>>2]|0;ia=(V|0)==(E|0);if(!(ia|(V&T|0)==(ha|0))){ja=I;ka=S;break d}if(ia?(f[H+8>>2]|0)==(E|0):0){la=H;break e}H=f[H>>2]|0;if(!H){ja=I;ka=S;break d}}}else{H=fa;while(1){M=f[H+4>>2]|0;if((M|0)==(E|0)){if((f[H+8>>2]|0)==(E|0)){la=H;break e}}else{if(M>>>0<R>>>0)ma=M;else ma=(M>>>0)%(R>>>0)|0;if((ma|0)!=(ha|0)){ja=I;ka=S;break d}}H=f[H>>2]|0;if(!H){ja=I;ka=S;break d}}}while(0);fa=la+12|0;if((S|0)==(f[x>>2]|0)){dh(e,fa);ja=f[e>>2]|0;ka=f[m>>2]|0;break}else{f[S>>2]=f[fa>>2];f[m>>2]=L;ja=I;ka=L;break}}else{ja=I;ka=S}}else{ja=I;ka=S}while(0);if((ja|0)==(ka|0)){Q=-1;G=188;break a}S=f[ka+-4>>2]|0;I=(S|0)==-1;if(!I?(f[(f[(f[v>>2]|0)+12>>2]|0)+(S<<2)>>2]|0)!=-1:0){Q=-1;G=188;break a}L=(K|0)==-1;R=f[v>>2]|0;fa=f[R+12>>2]|0;if(!L?(f[fa+(K<<2)>>2]|0)!=-1:0){Q=-1;G=188;break a}T=E*3|0;J=T+2|0;f[fa+(S<<2)>>2]=J;f[fa+(J<<2)>>2]=S;H=T+1|0;f[fa+(K<<2)>>2]=H;f[fa+(H<<2)>>2]=K;if(!I){I=(((S>>>0)%3|0|0)==0?2:-1)+S|0;if((I|0)==-1)na=-1;else na=f[(f[R>>2]|0)+(I<<2)>>2]|0;I=f[R>>2]|0;f[I+(T<<2)>>2]=na;M=S+1|0;ia=((M>>>0)%3|0|0)==0?S+-2|0:M;if((ia|0)==-1){oa=-1;pa=na;qa=I;ra=R}else{oa=f[I+(ia<<2)>>2]|0;pa=na;qa=I;ra=R}}else{I=f[R>>2]|0;f[I+(T<<2)>>2]=-1;oa=-1;pa=-1;qa=I;ra=R}f[qa+(H<<2)>>2]=oa;if(!L){L=(((K>>>0)%3|0|0)==0?2:-1)+K|0;if((L|0)!=-1){H=f[qa+(L<<2)>>2]|0;f[qa+(J<<2)>>2]=H;if((H|0)!=-1)f[(f[R+24>>2]|0)+(H<<2)>>2]=J}else f[qa+(J<<2)>>2]=-1;H=K+1|0;L=((H>>>0)%3|0|0)==0?K+-2|0:H;if((L|0)==-1){sa=-1;ta=-1}else{sa=f[qa+(L<<2)>>2]|0;ta=L}}else{f[qa+(J<<2)>>2]=-1;sa=-1;ta=-1}f[k>>2]=sa;J=f[R+24>>2]|0;if((pa|0)!=-1)f[J+(pa<<2)>>2]=f[J+(sa<<2)>>2];f:do if((ta|0)!=-1){R=f[ra>>2]|0;L=ta;do{f[R+(L<<2)>>2]=pa;H=L+1|0;I=((H>>>0)%3|0|0)==0?L+-2|0:H;if((I|0)==-1)break f;H=f[fa+(I<<2)>>2]|0;I=H+1|0;if((H|0)==-1)break f;L=((I>>>0)%3|0|0)==0?H+-2|0:I}while((L|0)!=-1)}while(0);f[J+(f[k>>2]<<2)>>2]=-1;do if(p){fa=f[o>>2]|0;if((fa|0)==(f[w>>2]|0)){dh(i,k);ua=f[m>>2]|0;break}else{f[fa>>2]=f[k>>2];f[o>>2]=fa+4;ua=ka;break}}else ua=ka;while(0);f[ua+-4>>2]=T}if((F|0)<(c|0))E=F;else{va=F;wa=v;G=129;break a}}if((G|0)==114){Q=-1;G=188;break}}else{va=0;wa=a+8|0;G=129}while(0);g:do if((G|0)==129){c=f[wa>>2]|0;if(((f[c+28>>2]|0)-(f[c+24>>2]|0)>>2|0)<=(r|0)){ua=f[m>>2]|0;do if((ua|0)!=(f[e>>2]|0)){ka=a+270|0;p=a+364|0;pa=a+360|0;ta=a+352|0;ra=a+356|0;sa=a+60|0;qa=a+64|0;oa=a+68|0;na=a+76|0;ja=a+80|0;la=a+72|0;ha=a+312|0;ma=va;da=ua;h:while(1){ga=da;f[k>>2]=f[ga+-4>>2];f[m>>2]=ga+-4;if((j[ka>>1]|0)<514)if(b[p>>0]|0){ga=f[pa>>2]|0;ea=(f[ta>>2]|0)+(ga>>>3)|0;if(ea>>>0<(f[ra>>2]|0)>>>0){ba=(h[ea>>0]|0)>>>(ga&7)&1;f[pa>>2]=ga+1;xa=ba;G=137}else G=160}else G=138;else{xa=(Oi(ha)|0)&1;G=137}if((G|0)==137){G=0;if(!xa)G=160;else G=138}do if((G|0)==138){G=0;ba=f[wa>>2]|0;ga=f[ba>>2]|0;ea=ga;if((ma|0)>=(((f[ba+4>>2]|0)-ga>>2>>>0)/3|0|0)){G=168;break h}ga=f[k>>2]|0;ca=ga+1|0;if((ga|0)!=-1?(aa=((ca>>>0)%3|0|0)==0?ga+-2|0:ca,(aa|0)!=-1):0)ya=f[ea+(aa<<2)>>2]|0;else ya=-1;aa=f[ba+24>>2]|0;ca=f[aa+(ya<<2)>>2]|0;_=ca+1|0;if((ca|0)!=-1?(Y=((_>>>0)%3|0|0)==0?ca+-2|0:_,_=Y+1|0,(Y|0)!=-1):0){ca=((_>>>0)%3|0|0)==0?Y+-2|0:_;if((ca|0)==-1){za=-1;Aa=Y}else{za=f[ea+(ca<<2)>>2]|0;Aa=Y}}else{za=-1;Aa=-1}Y=f[aa+(za<<2)>>2]|0;aa=Y+1|0;if((Y|0)!=-1?(ca=((aa>>>0)%3|0|0)==0?Y+-2|0:aa,aa=ca+1|0,(ca|0)!=-1):0){Y=((aa>>>0)%3|0|0)==0?ca+-2|0:aa;if((Y|0)==-1){Ba=-1;Ca=ca}else{Ba=f[ea+(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){G=162;break h}ga=Y<<6;Y=ca+32&-32;Jg(sa,ca>>>0<1073741823?(ga>>>0<Y>>>0?Y:ga):2147483647);Ia=f[qa>>2]|0}else Ia=ca;f[qa>>2]=Ia+1;ca=(f[sa>>2]|0)+(Ia>>>5<<2)|0;f[ca>>2]=f[ca>>2]&~(1<<(Ia&31));ca=f[na>>2]|0;if((ca|0)==(f[ja>>2]|0)){dh(la,k);Ha=ma;break}else{f[ca>>2]=f[k>>2];f[na>>2]=ca+4;Ha=ma;break}}while(0);da=f[m>>2]|0;if((da|0)==(f[e>>2]|0)){G=169;break}else ma=Ha}if((G|0)==152)Do(sa);else if((G|0)==162)Do(sa);else if((G|0)==168){Q=-1;G=188;break g}else if((G|0)==169){Ja=Ha;Ka=f[wa>>2]|0;break}}else{Ja=va;Ka=c}while(0);if((Ja|0)==(((f[Ka+4>>2]|0)-(f[Ka>>2]|0)>>2>>>0)/3|0|0)){c=(f[Ka+28>>2]|0)-(f[Ka+24>>2]|0)>>2;ua=f[i>>2]|0;ma=f[o>>2]|0;if((ua|0)==(ma|0)){La=c;Ma=ua}else{da=k+4|0;na=k+8|0;la=k+12|0;ja=c;c=ua;ua=Ka;while(1){qa=f[c>>2]|0;oa=ja+-1|0;ha=f[ua+24>>2]|0;if((f[ha+(oa<<2)>>2]|0)==-1){pa=ja;while(1){ra=pa+-1|0;ta=pa+-2|0;if((f[ha+(ta<<2)>>2]|0)==-1)pa=ra;else{Na=ra;Oa=ta;break}}}else{Na=ja;Oa=oa}if(Oa>>>0<qa>>>0){Pa=Na;Qa=ua}else{f[k>>2]=ua;pa=f[ha+(Oa<<2)>>2]|0;f[da>>2]=pa;f[na>>2]=pa;b[la>>0]=1;if((pa|0)==-1){Ra=ha;Sa=ua}else{sa=ua;ta=pa;do{f[(f[sa>>2]|0)+(ta<<2)>>2]=qa;eg(k);ta=f[na>>2]|0;sa=f[wa>>2]|0}while((ta|0)!=-1);Ra=f[sa+24>>2]|0;Sa=sa}if((qa|0)==-1)Ta=Ra+(Oa<<2)|0;else{ta=Ra+(Oa<<2)|0;f[Ra+(qa<<2)>>2]=f[ta>>2];Ta=ta}f[Ta>>2]=-1;ta=f[q>>2]|0;ha=ta+(Oa>>>5<<2)|0;oa=1<<(Oa&31);pa=ta+(qa>>>5<<2)|0;ta=1<<(qa&31);if(!(f[ha>>2]&oa))Ua=f[pa>>2]&~ta;else Ua=f[pa>>2]|ta;f[pa>>2]=Ua;f[ha>>2]=f[ha>>2]&~oa;Pa=Na+-1|0;Qa=Sa}c=c+4|0;if((c|0)==(ma|0)){Q=Pa;G=188;break}else{ja=Pa;ua=Qa}}}}else{Q=-1;G=188}}else{Q=-1;G=188}}while(0);if((G|0)==188){La=Q;Ma=f[i>>2]|0}if(Ma|0){i=f[o>>2]|0;if((i|0)!=(Ma|0))f[o>>2]=i+(~((i+-4-Ma|0)>>>2)<<2);mp(Ma)}Ma=f[g+8>>2]|0;if(Ma|0){i=Ma;do{Ma=i;i=f[i>>2]|0;mp(Ma)}while((i|0)!=0)}i=f[g>>2]|0;f[g>>2]=0;if(i|0)mp(i);i=f[e>>2]|0;if(!i){u=d;return La|0}e=f[m>>2]|0;if((e|0)!=(i|0))f[m>>2]=e+(~((e+-4-i|0)>>>2)<<2);mp(i);u=d;return La|0}function cb(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;b=u;u=u+16|0;c=b;d=b+8|0;e=b+4|0;f[d>>2]=a;do if(a>>>0>=212){g=(a>>>0)/210|0;h=g*210|0;f[e>>2]=a-h;i=0;j=g;g=(Mj(4548,4740,e,c)|0)-4548>>2;k=h;a:while(1){l=(f[4548+(g<<2)>>2]|0)+k|0;h=5;while(1){if(h>>>0>=47){m=211;n=i;o=8;break}p=f[4356+(h<<2)>>2]|0;q=(l>>>0)/(p>>>0)|0;if(q>>>0<p>>>0){o=106;break a}if((l|0)==(X(q,p)|0)){r=i;break}else h=h+1|0}b:do if((o|0)==8){c:while(1){o=0;h=(l>>>0)/(m>>>0)|0;do if(h>>>0>=m>>>0)if((l|0)!=(X(h,m)|0)){p=m+10|0;q=(l>>>0)/(p>>>0)|0;if(q>>>0>=p>>>0)if((l|0)!=(X(q,p)|0)){q=m+12|0;s=(l>>>0)/(q>>>0)|0;if(s>>>0>=q>>>0)if((l|0)!=(X(s,q)|0)){s=m+16|0;t=(l>>>0)/(s>>>0)|0;if(t>>>0>=s>>>0)if((l|0)!=(X(t,s)|0)){t=m+18|0;v=(l>>>0)/(t>>>0)|0;if(v>>>0>=t>>>0)if((l|0)!=(X(v,t)|0)){v=m+22|0;w=(l>>>0)/(v>>>0)|0;if(w>>>0>=v>>>0)if((l|0)!=(X(w,v)|0)){w=m+28|0;x=(l>>>0)/(w>>>0)|0;if(x>>>0>=w>>>0)if((l|0)==(X(x,w)|0)){y=w;z=9;A=n}else{x=m+30|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+36|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+40|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+42|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+46|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+52|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+58|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+60|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+66|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+70|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+72|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+78|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+82|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+88|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+96|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+100|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+102|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+106|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+108|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+112|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+120|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+126|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+130|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+136|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+138|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+142|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+148|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+150|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+156|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+162|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+166|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+168|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+172|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+178|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+180|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+186|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+190|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+192|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+196|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+198|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+208|0;B=(l>>>0)/(x>>>0)|0;C=B>>>0<x>>>0;D=(l|0)==(X(B,x)|0);y=C|D?x:m+210|0;z=C?1:D?9:0;A=C?l:n}else{y=w;z=1;A=l}}else{y=v;z=9;A=n}else{y=v;z=1;A=l}}else{y=t;z=9;A=n}else{y=t;z=1;A=l}}else{y=s;z=9;A=n}else{y=s;z=1;A=l}}else{y=q;z=9;A=n}else{y=q;z=1;A=l}}else{y=p;z=9;A=n}else{y=p;z=1;A=l}}else{y=m;z=9;A=n}else{y=m;z=1;A=l}while(0);switch(z&15){case 9:{r=A;break b;break}case 0:{m=y;n=A;o=8;break}default:break c}}if(!z)r=A;else{o=107;break a}}while(0);h=g+1|0;p=(h|0)==48;q=j+(p&1)|0;i=r;j=q;g=p?0:h;k=q*210|0}if((o|0)==106){f[d>>2]=l;E=l;break}else if((o|0)==107){f[d>>2]=l;E=A;break}}else{k=Mj(4356,4548,d,c)|0;E=f[k>>2]|0}while(0);u=b;return E|0}function db(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0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=f[F+(G<<2)>>2]|0;I=G+1|0;J=((I>>>0)%3|0|0)==0?G+-2|0:I;if((J|0)==-1)K=-1;else K=f[F+(J<<2)>>2]|0;J=(((G>>>0)%3|0|0)==0?2:-1)+G|0;if((J|0)==-1)L=-1;else L=f[F+(J<<2)>>2]|0;if((H|0)!=(K|0)?!((H|0)==(L|0)|(K|0)==(L|0)):0){H=0;J=A;F=E;I=D;while(1){M=H+G|0;if(!(f[(f[e>>2]|0)+(M>>>5<<2)>>2]&1<<(M&31))){N=f[(f[a>>2]|0)+(M<<2)>>2]|0;f[g>>2]=N;if(!(f[F+(N>>>5<<2)>>2]&1<<(N&31))){O=0;P=J;Q=N}else{N=f[i>>2]|0;if((N|0)==(f[y>>2]|0))dh(h,3672);else{f[N>>2]=-1;f[i>>2]=N+4}N=f[v>>2]|0;if((N|0)==(f[w>>2]|0))dh(z,g);else{f[N>>2]=f[g>>2];f[v>>2]=N+4}N=f[l>>2]|0;R=f[j>>2]|0;if((N|0)==(R<<5|0)){if((N+1|0)<0){S=50;break a}T=R<<6;R=N+32&-32;Jg(d,N>>>0<1073741823?(T>>>0<R>>>0?R:T):2147483647);U=f[l>>2]|0}else U=N;f[l>>2]=U+1;N=(f[d>>2]|0)+(U>>>5<<2)|0;f[N>>2]=f[N>>2]&~(1<<(U&31));f[g>>2]=J;O=1;P=J+1|0;Q=J}N=f[d>>2]|0;T=N+(Q>>>5<<2)|0;f[T>>2]=f[T>>2]|1<<(Q&31);T=N;b:do if(O){R=M;while(1){if((R|0)==-1){S=64;break b}V=(f[e>>2]|0)+(R>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(R&31);V=f[g>>2]|0;f[(f[h>>2]|0)+(V<<2)>>2]=R;f[(f[a>>2]|0)+(R<<2)>>2]=V;V=R+1|0;W=((V>>>0)%3|0|0)==0?R+-2|0:V;do if((W|0)==-1)X=-1;else{V=f[(f[x>>2]|0)+(W<<2)>>2]|0;Y=V+1|0;if((V|0)==-1){X=-1;break}X=((Y>>>0)%3|0|0)==0?V+-2|0:Y}while(0);if((X|0)==(M|0))break;else R=X}}else{R=M;while(1){if((R|0)==-1){S=64;break b}W=(f[e>>2]|0)+(R>>>5<<2)|0;f[W>>2]=f[W>>2]|1<<(R&31);f[(f[h>>2]|0)+(f[g>>2]<<2)>>2]=R;W=R+1|0;Y=((W>>>0)%3|0|0)==0?R+-2|0:W;do if((Y|0)==-1)Z=-1;else{W=f[(f[x>>2]|0)+(Y<<2)>>2]|0;V=W+1|0;if((W|0)==-1){Z=-1;break}Z=((V>>>0)%3|0|0)==0?W+-2|0:V}while(0);if((Z|0)==(M|0))break;else R=Z}}while(0);c:do if((S|0)==64){S=0;if((M|0)==-1)break;R=(((M>>>0)%3|0|0)==0?2:-1)+M|0;if((R|0)==-1)break;Y=f[(f[x>>2]|0)+(R<<2)>>2]|0;if((Y|0)==-1)break;R=Y+(((Y>>>0)%3|0|0)==0?2:-1)|0;if((R|0)==-1)break;if(!O){Y=R;while(1){V=(f[e>>2]|0)+(Y>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(Y&31);V=(((Y>>>0)%3|0|0)==0?2:-1)+Y|0;if((V|0)==-1)break c;W=f[(f[x>>2]|0)+(V<<2)>>2]|0;if((W|0)==-1)break c;Y=W+(((W>>>0)%3|0|0)==0?2:-1)|0;if((Y|0)==-1)break c}}Y=f[a>>2]|0;W=R;do{V=(f[e>>2]|0)+(W>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(W&31);f[Y+(W<<2)>>2]=f[g>>2];V=(((W>>>0)%3|0|0)==0?2:-1)+W|0;if((V|0)==-1)break c;_=f[(f[x>>2]|0)+(V<<2)>>2]|0;if((_|0)==-1)break c;W=_+(((_>>>0)%3|0|0)==0?2:-1)|0}while((W|0)!=-1)}while(0);$=P;aa=T;ba=N}else{$=J;aa=I;ba=F}if((H|0)<2){H=H+1|0;J=$;F=ba;I=aa}else{ca=$;da=aa;ea=ba;break}}}else{ca=A;da=D;ea=E}}else{ca=A;da=D;ea=E}C=C+1|0;B=f[a>>2]|0;if(C>>>0>=(((f[m>>2]|0)-B>>2>>>0)/3|0)>>>0){S=18;break}else{A=ca;D=da;E=ea}}if((S|0)==18){fa=da;ga=f[l>>2]|0;break}else if((S|0)==50)Do(d)}else{fa=q;ga=p}}else{fa=q;ga=p}while(0);p=a+44|0;f[p>>2]=0;a=fa;fa=ga>>>5;q=a+(fa<<2)|0;S=ga&31;ga=(fa|0)!=0;d:do if(fa|S|0)if(!S){l=a;da=0;ea=ga;while(1){e:do if(ea){if(!(f[l>>2]&1)){ca=da+1|0;f[p>>2]=ca;ha=ca}else ha=da;if(!(f[l>>2]&2)){ca=ha+1|0;f[p>>2]=ca;ia=ca}else ia=ha;if(!(f[l>>2]&4)){ca=ia+1|0;f[p>>2]=ca;ja=ca}else ja=ia;if(!(f[l>>2]&8)){ca=ja+1|0;f[p>>2]=ca;ka=ca}else ka=ja;if(!(f[l>>2]&16)){ca=ka+1|0;f[p>>2]=ca;la=ca}else la=ka;if(!(f[l>>2]&32)){ca=la+1|0;f[p>>2]=ca;ma=ca}else ma=la;if(!(f[l>>2]&64)){ca=ma+1|0;f[p>>2]=ca;na=ca}else na=ma;if(!(f[l>>2]&128)){ca=na+1|0;f[p>>2]=ca;oa=ca}else oa=na;if(!(f[l>>2]&256)){ca=oa+1|0;f[p>>2]=ca;pa=ca}else pa=oa;if(!(f[l>>2]&512)){ca=pa+1|0;f[p>>2]=ca;qa=ca}else qa=pa;if(!(f[l>>2]&1024)){ca=qa+1|0;f[p>>2]=ca;ra=ca}else ra=qa;if(!(f[l>>2]&2048)){ca=ra+1|0;f[p>>2]=ca;sa=ca}else sa=ra;if(!(f[l>>2]&4096)){ca=sa+1|0;f[p>>2]=ca;ta=ca}else ta=sa;if(!(f[l>>2]&8192)){ca=ta+1|0;f[p>>2]=ca;ua=ca}else ua=ta;if(!(f[l>>2]&16384)){ca=ua+1|0;f[p>>2]=ca;va=ca}else va=ua;if(!(f[l>>2]&32768)){ca=va+1|0;f[p>>2]=ca;wa=ca}else wa=va;if(!(f[l>>2]&65536)){ca=wa+1|0;f[p>>2]=ca;xa=ca}else xa=wa;if(!(f[l>>2]&131072)){ca=xa+1|0;f[p>>2]=ca;ya=ca}else ya=xa;if(!(f[l>>2]&262144)){ca=ya+1|0;f[p>>2]=ca;za=ca}else za=ya;if(!(f[l>>2]&524288)){ca=za+1|0;f[p>>2]=ca;Aa=ca}else Aa=za;if(!(f[l>>2]&1048576)){ca=Aa+1|0;f[p>>2]=ca;Ba=ca}else Ba=Aa;if(!(f[l>>2]&2097152)){ca=Ba+1|0;f[p>>2]=ca;Ca=ca}else Ca=Ba;if(!(f[l>>2]&4194304)){ca=Ca+1|0;f[p>>2]=ca;Da=ca}else Da=Ca;if(!(f[l>>2]&8388608)){ca=Da+1|0;f[p>>2]=ca;Ea=ca}else Ea=Da;if(!(f[l>>2]&16777216)){ca=Ea+1|0;f[p>>2]=ca;Fa=ca}else Fa=Ea;if(!(f[l>>2]&33554432)){ca=Fa+1|0;f[p>>2]=ca;Ga=ca}else Ga=Fa;if(!(f[l>>2]&67108864)){ca=Ga+1|0;f[p>>2]=ca;Ha=ca}else Ha=Ga;if(!(f[l>>2]&134217728)){ca=Ha+1|0;f[p>>2]=ca;Ia=ca}else Ia=Ha;if(!(f[l>>2]&268435456)){ca=Ia+1|0;f[p>>2]=ca;Ja=ca}else Ja=Ia;if(!(f[l>>2]&536870912)){ca=Ja+1|0;f[p>>2]=ca;Ka=ca}else Ka=Ja;if(!(f[l>>2]&1073741824)){ca=Ka+1|0;f[p>>2]=ca;La=ca}else La=Ka;if((f[l>>2]|0)<=-1){Ma=La;break}ca=La+1|0;f[p>>2]=ca;Ma=ca}else{ca=0;m=da;while(1){if(!(f[l>>2]&1<<ca)){ba=m+1|0;f[p>>2]=ba;Na=ba}else Na=m;if((ca|0)==31){Ma=Na;break e}ca=ca+1|0;if(!ca)break d;else m=Na}}while(0);l=l+4|0;if((q|0)==(l|0))break;else{da=Ma;ea=1}}}else{if(ga){ea=0;da=a;l=0;while(1){if(!(f[da>>2]&1)){m=l+1|0;f[p>>2]=m;Oa=m;Pa=m}else{Oa=l;Pa=ea}if(!(f[da>>2]&2)){m=Oa+1|0;f[p>>2]=m;Qa=m;Ra=m}else{Qa=Oa;Ra=Pa}if(!(f[da>>2]&4)){m=Qa+1|0;f[p>>2]=m;Sa=m;Ta=m}else{Sa=Qa;Ta=Ra}if(!(f[da>>2]&8)){m=Sa+1|0;f[p>>2]=m;Ua=m;Va=m}else{Ua=Sa;Va=Ta}if(!(f[da>>2]&16)){m=Ua+1|0;f[p>>2]=m;Wa=m;Xa=m}else{Wa=Ua;Xa=Va}if(!(f[da>>2]&32)){m=Wa+1|0;f[p>>2]=m;Ya=m;Za=m}else{Ya=Wa;Za=Xa}if(!(f[da>>2]&64)){m=Ya+1|0;f[p>>2]=m;_a=m;$a=m}else{_a=Ya;$a=Za}if(!(f[da>>2]&128)){m=_a+1|0;f[p>>2]=m;ab=m;bb=m}else{ab=_a;bb=$a}if(!(f[da>>2]&256)){m=ab+1|0;f[p>>2]=m;cb=m;db=m}else{cb=ab;db=bb}if(!(f[da>>2]&512)){m=cb+1|0;f[p>>2]=m;eb=m;fb=m}else{eb=cb;fb=db}if(!(f[da>>2]&1024)){m=eb+1|0;f[p>>2]=m;gb=m;hb=m}else{gb=eb;hb=fb}if(!(f[da>>2]&2048)){m=gb+1|0;f[p>>2]=m;ib=m;jb=m}else{ib=gb;jb=hb}if(!(f[da>>2]&4096)){m=ib+1|0;f[p>>2]=m;kb=m;lb=m}else{kb=ib;lb=jb}if(!(f[da>>2]&8192)){m=kb+1|0;f[p>>2]=m;mb=m;nb=m}else{mb=kb;nb=lb}if(!(f[da>>2]&16384)){m=mb+1|0;f[p>>2]=m;ob=m;pb=m}else{ob=mb;pb=nb}if(!(f[da>>2]&32768)){m=ob+1|0;f[p>>2]=m;qb=m;rb=m}else{qb=ob;rb=pb}if(!(f[da>>2]&65536)){m=qb+1|0;f[p>>2]=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b=m;Zb=Xb;break}else{ea=Xb;da=m;l=Wb}}}else{Yb=a;Zb=0}l=0;da=Zb;while(1){if(!(f[Yb>>2]&1<<l)){ea=da+1|0;f[p>>2]=ea;_b=ea}else _b=da;l=l+1|0;if((l|0)==(S|0))break;else da=_b}}while(0);_b=f[e>>2]|0;if(_b|0)mp(_b);_b=f[d>>2]|0;if(!_b){u=c;return 1}mp(_b);u=c;return 1}function eb(a){a=a|0;var c=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;c=u;u=u+80|0;e=c+68|0;g=c+64|0;i=c+60|0;k=c+52|0;l=c+44|0;m=c;n=c+56|0;o=c+48|0;p=c+40|0;q=a+132|0;f[q>>2]=0;r=a+148|0;if(f[r>>2]|0){s=a+144|0;t=f[s>>2]|0;if(t|0){v=t;do{t=v;v=f[v>>2]|0;mp(t)}while((v|0)!=0)}f[s>>2]=0;s=f[a+140>>2]|0;if(s|0){v=a+136|0;t=0;do{f[(f[v>>2]|0)+(t<<2)>>2]=0;t=t+1|0}while((t|0)!=(s|0))}f[r>>2]=0}r=a+4|0;s=f[r>>2]|0;t=b[s+36>>0]|0;v=(t&255)<<8;do if(((v|h[s+37>>0])&65535)<514){w=f[s+32>>2]|0;if((v&65535)<512){x=w+8|0;y=f[x>>2]|0;z=f[x+4>>2]|0;x=w+16|0;A=x;B=f[A>>2]|0;C=Vl(B|0,f[A+4>>2]|0,4,0)|0;A=I;if(!((z|0)<(A|0)|(z|0)==(A|0)&y>>>0<C>>>0)){y=(f[w>>2]|0)+B|0;B=h[y>>0]|h[y+1>>0]<<8|h[y+2>>0]<<16|h[y+3>>0]<<24;f[e>>2]=B;y=x;f[y>>2]=C;f[y+4>>2]=A;D=s;E=t;F=B;G=14}}else if(Nh(e,w)|0){w=f[r>>2]|0;D=w;E=b[w+36>>0]|0;F=f[e>>2]|0;G=14}if((G|0)==14){f[q>>2]=F;H=E;J=D;break}K=0;u=c;return K|0}else{H=t;J=s}while(0);s=f[J+32>>2]|0;if(((H&255)<<8&65535)<512){J=s+8|0;t=f[J>>2]|0;D=f[J+4>>2]|0;J=s+16|0;E=J;F=f[E>>2]|0;q=Vl(F|0,f[E+4>>2]|0,4,0)|0;E=I;if((D|0)<(E|0)|(D|0)==(E|0)&t>>>0<q>>>0)L=0;else{t=(f[s>>2]|0)+F|0;F=h[t>>0]|h[t+1>>0]<<8|h[t+2>>0]<<16|h[t+3>>0]<<24;f[g>>2]=F;t=J;f[t>>2]=q;f[t+4>>2]=E;M=F;N=H;O=s;G=21}}else if(Nh(g,s)|0){s=f[r>>2]|0;M=f[g>>2]|0;N=b[s+36>>0]|0;O=f[s+32>>2]|0;G=21}else L=0;if((G|0)==21){s=a+156|0;f[s>>2]=M;if(((N&255)<<8&65535)<512){N=O+8|0;M=f[N>>2]|0;g=f[N+4>>2]|0;N=O+16|0;H=N;F=f[H>>2]|0;E=Vl(F|0,f[H+4>>2]|0,4,0)|0;H=I;if((g|0)<(H|0)|(g|0)==(H|0)&M>>>0<E>>>0)P=0;else{M=(f[O>>2]|0)+F|0;F=h[M>>0]|h[M+1>>0]<<8|h[M+2>>0]<<16|h[M+3>>0]<<24;f[i>>2]=F;M=N;f[M>>2]=E;f[M+4>>2]=H;Q=F;G=26}}else if(Nh(i,O)|0){Q=f[i>>2]|0;G=26}else P=0;if((G|0)==26)if((Q>>>0<=1431655765?(f[s>>2]|0)>>>0<=(Q*3|0)>>>0:0)?(O=f[r>>2]|0,F=f[O+32>>2]|0,H=F+8|0,M=f[H>>2]|0,E=f[H+4>>2]|0,H=F+16|0,N=H,g=f[N>>2]|0,t=f[N+4>>2]|0,(E|0)>(t|0)|(E|0)==(t|0)&M>>>0>g>>>0):0){N=f[F>>2]|0;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a+176|0;t=f[J>>2]|0;if((t|0)!=(F|0))f[J>>2]=t+(~((t+-4-F|0)>>>2)<<2);pi(T,f[i>>2]|0);T=f[a+36>>2]|0;F=a+40|0;t=f[F>>2]|0;if((t|0)!=(T|0))f[F>>2]=t+(~(((t+-12-T|0)>>>0)/12|0)*12|0);T=f[a+48>>2]|0;t=a+52|0;F=f[t>>2]|0;if((F|0)!=(T|0))f[t>>2]=F+(~((F+-4-T|0)>>>2)<<2);f[a+64>>2]=0;T=f[a+72>>2]|0;F=a+76|0;t=f[F>>2]|0;if((t|0)!=(T|0))f[F>>2]=t+(~((t+-4-T|0)>>>2)<<2);f[a+84>>2]=-1;f[a+92>>2]=-1;f[a+88>>2]=-1;T=a+216|0;t=f[T>>2]|0;F=a+220|0;J=f[F>>2]|0;if((J|0)!=(t|0)){O=J;do{f[F>>2]=O+-144;J=f[O+-12>>2]|0;if(J|0){S=O+-8|0;Q=f[S>>2]|0;if((Q|0)!=(J|0))f[S>>2]=Q+(~((Q+-4-J|0)>>>2)<<2);mp(J)}J=f[O+-28>>2]|0;if(J|0){Q=O+-24|0;S=f[Q>>2]|0;if((S|0)!=(J|0))f[Q>>2]=S+(~((S+-4-J|0)>>>2)<<2);mp(J)}J=f[O+-40>>2]|0;if(J|0){S=O+-36|0;Q=f[S>>2]|0;if((Q|0)!=(J|0))f[S>>2]=Q+(~((Q+-4-J|0)>>>2)<<2);mp(J)}ah(O+-140|0);O=f[F>>2]|0}while((O|0)!=(t|0))}t=q&255;og(T,t);if(!(ph(f[M>>2]|0,f[i>>2]|0,(f[l>>2]|0)+(f[s>>2]|0)|0)|0)){U=0;break}O=(f[l>>2]|0)+(f[s>>2]|0)|0;b[e>>0]=1;If(a+120|0,O,e);O=f[r>>2]|0;J=h[O+36>>0]<<8;b:do if(((J|h[O+37>>0])&65535)>=514)if((Sb(a,f[O+32>>2]|0)|0)==-1){U=0;break a}else X=-1;else{Q=f[O+32>>2]|0;do if((J&65535)<512){S=Q+8|0;H=f[S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0)+(f[s>>2]|0);f[a+372>>2]=t;wk(m);c:do if(Pf(J,m)|0){D=$a(a,f[k>>2]|0)|0;if((D|0)==-1){Z=0;break}E=f[(f[r>>2]|0)+32>>2]|0;O=m+16|0;Q=f[O>>2]|0;H=(f[m>>2]|0)+Q|0;N=m+8|0;g=Xl(f[N>>2]|0,f[N+4>>2]|0,Q|0,f[O+4>>2]|0)|0;Tk(E,H,g,d[E+38>>1]|0);E=f[r>>2]|0;g=(h[E+36>>0]<<8|h[E+37>>0])&65535;if((g&65535)<514){H=(f[E+32>>2]|0)+16|0;E=H;O=Vl(f[E>>2]|0,f[E+4>>2]|0,X|0,((X|0)<0)<<31>>31|0)|0;E=H;f[E>>2]=O;f[E+4>>2]=I}do if((f[F>>2]|0)!=(f[T>>2]|0)){E=f[M>>2]|0;O=(f[E+4>>2]|0)!=(f[E>>2]|0);if((g&65535)<513){if(!O)break;E=0;do{f[n>>2]=E;f[e>>2]=f[n>>2];E=E+3|0;if(!(ac(a,e)|0)){Z=0;break c}H=f[M>>2]|0}while(E>>>0<(f[H+4>>2]|0)-(f[H>>2]|0)>>2>>>0)}else{if(!O)break;E=0;do{f[o>>2]=E;f[e>>2]=f[o>>2];E=E+3|0;if(!(ec(a,e)|0)){Z=0;break c}H=f[M>>2]|0}while(E>>>0<(f[H+4>>2]|0)-(f[H>>2]|0)>>2>>>0)}}while(0);if(b[a+308>>0]|0)_j(a+272|0);if((j[a+270>>1]|0)<514)_j(a+328|0);g=f[T>>2]|0;if((f[F>>2]|0)!=(g|0)){E=0;O=g;do{Sf(O+(E*144|0)+4|0,f[M>>2]|0)|0;g=f[T>>2]|0;H=f[g+(E*144|0)+132>>2]|0;Q=f[g+(E*144|0)+136>>2]|0;if((H|0)==(Q|0))_=g;else{N=H;H=g;while(1){f[p>>2]=f[N>>2];f[e>>2]=f[p>>2];uf(H+(E*144|0)+4|0,e);N=N+4|0;g=f[T>>2]|0;if((N|0)==(Q|0)){_=g;break}else H=g}}Jj(_+(E*144|0)+4|0,0,0);E=E+1|0;O=f[T>>2]|0}while(E>>>0<(((f[F>>2]|0)-O|0)/144|0)>>>0)}O=f[M>>2]|0;E=(f[O+28>>2]|0)-(f[O+24>>2]|0)>>2;O=a+196|0;H=a+200|0;Q=f[H>>2]|0;N=f[O>>2]|0;g=Q-N>>2;S=N;N=Q;do if(E>>>0>g>>>0)Og(O,E-g|0);else{if(E>>>0>=g>>>0)break;Q=S+(E<<2)|0;if((Q|0)==(N|0))break;f[H>>2]=N+(~((N+-4-Q|0)>>>2)<<2)}while(0);pi(a+184|0,E);N=f[T>>2]|0;if((f[F>>2]|0)!=(N|0)){H=0;S=N;do{N=S;g=(f[N+(H*144|0)+60>>2]|0)-(f[N+(H*144|0)+56>>2]|0)>>2;O=f[M>>2]|0;Q=(f[O+28>>2]|0)-(f[O+24>>2]|0)>>2;O=(g|0)<(Q|0)?Q:g;g=N+(H*144|0)+116|0;Q=N+(H*144|0)+120|0;v=f[Q>>2]|0;w=f[g>>2]|0;B=v-w>>2;A=w;w=v;do if(O>>>0>B>>>0)Og(g,O-B|0);else{if(O>>>0>=B>>>0)break;v=A+(O<<2)|0;if((v|0)==(w|0))break;f[Q>>2]=w+(~((w+-4-v|0)>>>2)<<2)}while(0);pi(N+(H*144|0)+104|0,O);H=H+1|0;S=f[T>>2]|0}while(H>>>0<(((f[F>>2]|0)-S|0)/144|0)>>>0)}Z=Ab(a,D)|0}else Z=0;while(0);U=Z}while(0);R=U}else R=0;P=R}else P=0;L=P}K=L;u=c;return K|0}function fb(a){a=a|0;var c=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;c=u;u=u+80|0;e=c+68|0;g=c+64|0;i=c+60|0;k=c+52|0;l=c+44|0;m=c;n=c+56|0;o=c+48|0;p=c+40|0;q=a+132|0;f[q>>2]=0;r=a+148|0;if(f[r>>2]|0){s=a+144|0;t=f[s>>2]|0;if(t|0){v=t;do{t=v;v=f[v>>2]|0;mp(t)}while((v|0)!=0)}f[s>>2]=0;s=f[a+140>>2]|0;if(s|0){v=a+136|0;t=0;do{f[(f[v>>2]|0)+(t<<2)>>2]=0;t=t+1|0}while((t|0)!=(s|0))}f[r>>2]=0}r=a+4|0;s=f[r>>2]|0;t=b[s+36>>0]|0;v=(t&255)<<8;do if(((v|h[s+37>>0])&65535)<514){w=f[s+32>>2]|0;if((v&65535)<512){x=w+8|0;y=f[x>>2]|0;z=f[x+4>>2]|0;x=w+16|0;A=x;B=f[A>>2]|0;C=Vl(B|0,f[A+4>>2]|0,4,0)|0;A=I;if(!((z|0)<(A|0)|(z|0)==(A|0)&y>>>0<C>>>0)){y=(f[w>>2]|0)+B|0;B=h[y>>0]|h[y+1>>0]<<8|h[y+2>>0]<<16|h[y+3>>0]<<24;f[e>>2]=B;y=x;f[y>>2]=C;f[y+4>>2]=A;D=s;E=t;F=B;G=14}}else if(Nh(e,w)|0){w=f[r>>2]|0;D=w;E=b[w+36>>0]|0;F=f[e>>2]|0;G=14}if((G|0)==14){f[q>>2]=F;H=E;J=D;break}K=0;u=c;return K|0}else{H=t;J=s}while(0);s=f[J+32>>2]|0;if(((H&255)<<8&65535)<512){J=s+8|0;t=f[J>>2]|0;D=f[J+4>>2]|0;J=s+16|0;E=J;F=f[E>>2]|0;q=Vl(F|0,f[E+4>>2]|0,4,0)|0;E=I;if((D|0)<(E|0)|(D|0)==(E|0)&t>>>0<q>>>0)L=0;else{t=(f[s>>2]|0)+F|0;F=h[t>>0]|h[t+1>>0]<<8|h[t+2>>0]<<16|h[t+3>>0]<<24;f[g>>2]=F;t=J;f[t>>2]=q;f[t+4>>2]=E;M=F;N=H;O=s;G=21}}else if(Nh(g,s)|0){s=f[r>>2]|0;M=f[g>>2]|0;N=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;if(J|0){S=O+-8|0;Q=f[S>>2]|0;if((Q|0)!=(J|0))f[S>>2]=Q+(~((Q+-4-J|0)>>>2)<<2);mp(J)}J=f[O+-28>>2]|0;if(J|0){Q=O+-24|0;S=f[Q>>2]|0;if((S|0)!=(J|0))f[Q>>2]=S+(~((S+-4-J|0)>>>2)<<2);mp(J)}J=f[O+-40>>2]|0;if(J|0){S=O+-36|0;Q=f[S>>2]|0;if((Q|0)!=(J|0))f[S>>2]=Q+(~((Q+-4-J|0)>>>2)<<2);mp(J)}ah(O+-140|0);O=f[F>>2]|0}while((O|0)!=(t|0))}t=q&255;og(T,t);if(!(ph(f[M>>2]|0,f[i>>2]|0,(f[l>>2]|0)+(f[s>>2]|0)|0)|0)){U=0;break}O=(f[l>>2]|0)+(f[s>>2]|0)|0;b[e>>0]=1;If(a+120|0,O,e);O=f[r>>2]|0;J=h[O+36>>0]<<8;b:do if(((J|h[O+37>>0])&65535)>=514)if((Sb(a,f[O+32>>2]|0)|0)==-1){U=0;break a}else X=-1;else{Q=f[O+32>>2]|0;do if((J&65535)<512){S=Q+8|0;H=f[S>>2]|0;N=f[S+4>>2]|0;S=Q+16|0;E=S;g=f[E>>2]|0;D=Vl(g|0,f[E+4>>2]|0,4,0)|0;E=I;if((N|0)<(E|0)|(N|0)==(E|0)&H>>>0<D>>>0)break;H=(f[Q>>2]|0)+g|0;g=h[H>>0]|h[H+1>>0]<<8|h[H+2>>0]<<16|h[H+3>>0]<<24;f[e>>2]=g;H=S;f[H>>2]=D;f[H+4>>2]=E;Y=g;G=77}else{if(!(Nh(e,Q)|0))break;Y=f[e>>2]|0;G=77}while(0);do if((G|0)==77){if(!Y)break;Q=f[(f[r>>2]|0)+32>>2]|0;g=Q+8|0;E=Q+16|0;Q=Xl(f[g>>2]|0,f[g+4>>2]|0,f[E>>2]|0,f[E+4>>2]|0)|0;E=I;if((E|0)<0|(E|0)==0&Q>>>0<Y>>>0)break;wk(m);Q=f[(f[r>>2]|0)+32>>2]|0;E=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if(!O)break;E=0;do{f[n>>2]=E;f[e>>2]=f[n>>2];E=E+3|0;if(!(ac(a,e)|0)){Z=0;break c}H=f[M>>2]|0}while(E>>>0<(f[H+4>>2]|0)-(f[H>>2]|0)>>2>>>0)}else{if(!O)break;E=0;do{f[o>>2]=E;f[e>>2]=f[o>>2];E=E+3|0;if(!(ec(a,e)|0)){Z=0;break c}H=f[M>>2]|0}while(E>>>0<(f[H+4>>2]|0)-(f[H>>2]|0)>>2>>>0)}}while(0);if(b[a+308>>0]|0)_j(a+272|0);if((j[a+270>>1]|0)<514)_j(a+328|0);g=f[T>>2]|0;if((f[F>>2]|0)!=(g|0)){E=0;O=g;do{Sf(O+(E*144|0)+4|0,f[M>>2]|0)|0;g=f[T>>2]|0;H=f[g+(E*144|0)+132>>2]|0;Q=f[g+(E*144|0)+136>>2]|0;if((H|0)==(Q|0))_=g;else{N=H;H=g;while(1){f[p>>2]=f[N>>2];f[e>>2]=f[p>>2];uf(H+(E*144|0)+4|0,e);N=N+4|0;g=f[T>>2]|0;if((N|0)==(Q|0)){_=g;break}else H=g}}Jj(_+(E*144|0)+4|0,0,0);E=E+1|0;O=f[T>>2]|0}while(E>>>0<(((f[F>>2]|0)-O|0)/144|0)>>>0)}O=f[M>>2]|0;E=(f[O+28>>2]|0)-(f[O+24>>2]|0)>>2;O=a+196|0;H=a+200|0;Q=f[H>>2]|0;N=f[O>>2]|0;g=Q-N>>2;S=N;N=Q;do if(E>>>0>g>>>0)Og(O,E-g|0);else{if(E>>>0>=g>>>0)break;Q=S+(E<<2)|0;if((Q|0)==(N|0))break;f[H>>2]=N+(~((N+-4-Q|0)>>>2)<<2)}while(0);pi(a+184|0,E);N=f[T>>2]|0;if((f[F>>2]|0)!=(N|0)){H=0;S=N;do{N=S;g=(f[N+(H*144|0)+60>>2]|0)-(f[N+(H*144|0)+56>>2]|0)>>2;O=f[M>>2]|0;Q=(f[O+28>>2]|0)-(f[O+24>>2]|0)>>2;O=(g|0)<(Q|0)?Q:g;g=N+(H*144|0)+116|0;Q=N+(H*144|0)+120|0;v=f[Q>>2]|0;w=f[g>>2]|0;B=v-w>>2;A=w;w=v;do if(O>>>0>B>>>0)Og(g,O-B|0);else{if(O>>>0>=B>>>0)break;v=A+(O<<2)|0;if((v|0)==(w|0))break;f[Q>>2]=w+(~((w+-4-v|0)>>>2)<<2)}while(0);pi(N+(H*144|0)+104|0,O);H=H+1|0;S=f[T>>2]|0}while(H>>>0<(((f[F>>2]|0)-S|0)/144|0)>>>0)}Z=Ab(a,D)|0}else Z=0;while(0);U=Z}while(0);R=U}else R=0;P=R}else P=0;L=P}K=L;u=c;return K|0}function gb(a){a=a|0;var c=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;c=u;u=u+80|0;e=c+68|0;g=c+64|0;i=c+60|0;k=c+52|0;l=c+44|0;m=c;n=c+56|0;o=c+48|0;p=c+40|0;q=a+132|0;f[q>>2]=0;r=a+148|0;if(f[r>>2]|0){s=a+144|0;t=f[s>>2]|0;if(t|0){v=t;do{t=v;v=f[v>>2]|0;mp(t)}while((v|0)!=0)}f[s>>2]=0;s=f[a+140>>2]|0;if(s|0){v=a+136|0;t=0;do{f[(f[v>>2]|0)+(t<<2)>>2]=0;t=t+1|0}while((t|0)!=(s|0))}f[r>>2]=0}r=a+4|0;s=f[r>>2]|0;t=b[s+36>>0]|0;v=(t&255)<<8;do if(((v|h[s+37>>0])&65535)<514){w=f[s+32>>2]|0;if((v&65535)<512){x=w+8|0;y=f[x>>2]|0;z=f[x+4>>2]|0;x=w+16|0;A=x;B=f[A>>2]|0;C=Vl(B|0,f[A+4>>2]|0,4,0)|0;A=I;if(!((z|0)<(A|0)|(z|0)==(A|0)&y>>>0<C>>>0)){y=(f[w>>2]|0)+B|0;B=h[y>>0]|h[y+1>>0]<<8|h[y+2>>0]<<16|h[y+3>>0]<<24;f[e>>2]=B;y=x;f[y>>2]=C;f[y+4>>2]=A;D=s;E=t;F=B;G=14}}else if(Nh(e,w)|0){w=f[r>>2]|0;D=w;E=b[w+36>>0]|0;F=f[e>>2]|0;G=14}if((G|0)==14){f[q>>2]=F;H=E;J=D;break}K=0;u=c;return K|0}else{H=t;J=s}while(0);s=f[J+32>>2]|0;if(((H&255)<<8&65535)<512){J=s+8|0;t=f[J>>2]|0;D=f[J+4>>2]|0;J=s+16|0;E=J;F=f[E>>2]|0;q=Vl(F|0,f[E+4>>2]|0,4,0)|0;E=I;if((D|0)<(E|0)|(D|0)==(E|0)&t>>>0<q>>>0)L=0;else{t=(f[s>>2]|0)+F|0;F=h[t>>0]|h[t+1>>0]<<8|h[t+2>>0]<<16|h[t+3>>0]<<24;f[g>>2]=F;t=J;f[t>>2]=q;f[t+4>>2]=E;M=F;N=H;O=s;G=21}}else if(Nh(g,s)|0){s=f[r>>2]|0;M=f[g>>2]|0;N=b[s+36>>0]|0;O=f[s+32>>2]|0;G=21}else L=0;if((G|0)==21){s=a+156|0;f[s>>2]=M;if(((N&255)<<8&65535)<512){N=O+8|0;M=f[N>>2]|0;g=f[N+4>>2]|0;N=O+16|0;H=N;F=f[H>>2]|0;E=Vl(F|0,f[H+4>>2]|0,4,0)|0;H=I;if((g|0)<(H|0)|(g|0)==(H|0)&M>>>0<E>>>0)P=0;else{M=(f[O>>2]|0)+F|0;F=h[M>>0]|h[M+1>>0]<<8|h[M+2>>0]<<16|h[M+3>>0]<<24;f[i>>2]=F;M=N;f[M>>2]=E;f[M+4>>2]=H;Q=F;G=26}}else if(Nh(i,O)|0){Q=f[i>>2]|0;G=26}else P=0;if((G|0)==26)if((Q>>>0<=1431655765?(f[s>>2]|0)>>>0<=(Q*3|0)>>>0:0)?(O=f[r>>2]|0,F=f[O+32>>2]|0,H=F+8|0,M=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>2]&127](a)|0)+32|0;Tk(J,O,E,d[(f[D>>2]|0)+38>>1]|0);f[a+372>>2]=t;wk(m);c:do if(Kd(J,m)|0){D=bb(a,f[k>>2]|0)|0;if((D|0)==-1){Z=0;break}E=f[(f[r>>2]|0)+32>>2]|0;O=m+16|0;Q=f[O>>2]|0;H=(f[m>>2]|0)+Q|0;N=m+8|0;g=Xl(f[N>>2]|0,f[N+4>>2]|0,Q|0,f[O+4>>2]|0)|0;Tk(E,H,g,d[E+38>>1]|0);E=f[r>>2]|0;g=(h[E+36>>0]<<8|h[E+37>>0])&65535;if((g&65535)<514){H=(f[E+32>>2]|0)+16|0;E=H;O=Vl(f[E>>2]|0,f[E+4>>2]|0,X|0,((X|0)<0)<<31>>31|0)|0;E=H;f[E>>2]=O;f[E+4>>2]=I}do if((f[F>>2]|0)!=(f[T>>2]|0)){E=f[M>>2]|0;O=(f[E+4>>2]|0)!=(f[E>>2]|0);if((g&65535)<513){if(!O)break;E=0;do{f[n>>2]=E;f[e>>2]=f[n>>2];E=E+3|0;if(!(ac(a,e)|0)){Z=0;break c}H=f[M>>2]|0}while(E>>>0<(f[H+4>>2]|0)-(f[H>>2]|0)>>2>>>0)}else{if(!O)break;E=0;do{f[o>>2]=E;f[e>>2]=f[o>>2];E=E+3|0;if(!(ec(a,e)|0)){Z=0;break c}H=f[M>>2]|0}while(E>>>0<(f[H+4>>2]|0)-(f[H>>2]|0)>>2>>>0)}}while(0);if(b[a+308>>0]|0)_j(a+272|0);if((j[a+270>>1]|0)<514)_j(a+328|0);g=f[T>>2]|0;if((f[F>>2]|0)!=(g|0)){E=0;O=g;do{Sf(O+(E*144|0)+4|0,f[M>>2]|0)|0;g=f[T>>2]|0;H=f[g+(E*144|0)+132>>2]|0;Q=f[g+(E*144|0)+136>>2]|0;if((H|0)==(Q|0))_=g;else{N=H;H=g;while(1){f[p>>2]=f[N>>2];f[e>>2]=f[p>>2];uf(H+(E*144|0)+4|0,e);N=N+4|0;g=f[T>>2]|0;if((N|0)==(Q|0)){_=g;break}else H=g}}Jj(_+(E*144|0)+4|0,0,0);E=E+1|0;O=f[T>>2]|0}while(E>>>0<(((f[F>>2]|0)-O|0)/144|0)>>>0)}O=f[M>>2]|0;E=(f[O+28>>2]|0)-(f[O+24>>2]|0)>>2;O=a+196|0;H=a+200|0;Q=f[H>>2]|0;N=f[O>>2]|0;g=Q-N>>2;S=N;N=Q;do if(E>>>0>g>>>0)Og(O,E-g|0);else{if(E>>>0>=g>>>0)break;Q=S+(E<<2)|0;if((Q|0)==(N|0))break;f[H>>2]=N+(~((N+-4-Q|0)>>>2)<<2)}while(0);pi(a+184|0,E);N=f[T>>2]|0;if((f[F>>2]|0)!=(N|0)){H=0;S=N;do{N=S;g=(f[N+(H*144|0)+60>>2]|0)-(f[N+(H*144|0)+56>>2]|0)>>2;O=f[M>>2]|0;Q=(f[O+28>>2]|0)-(f[O+24>>2]|0)>>2;O=(g|0)<(Q|0)?Q:g;g=N+(H*144|0)+116|0;Q=N+(H*144|0)+120|0;v=f[Q>>2]|0;w=f[g>>2]|0;B=v-w>>2;A=w;w=v;do if(O>>>0>B>>>0)Og(g,O-B|0);else{if(O>>>0>=B>>>0)break;v=A+(O<<2)|0;if((v|0)==(w|0))break;f[Q>>2]=w+(~((w+-4-v|0)>>>2)<<2)}while(0);pi(N+(H*144|0)+104|0,O);H=H+1|0;S=f[T>>2]|0}while(H>>>0<(((f[F>>2]|0)-S|0)/144|0)>>>0)}Z=Ab(a,D)|0}else Z=0;while(0);U=Z}while(0);R=U}else R=0;P=R}else P=0;L=P}K=L;u=c;return K|0}function hb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,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|0)+12|0;Y=V+(T*20|0)+16|0;Z=(f[O>>2]|0)+(f[V+(T*20|0)+4>>2]<<2)|0;V=f[X>>2]|0;do if((V|0)==4)$=Z;else{aa=f[m>>2]|0;if(!(f[Y>>2]|0)){$=aa;break}else{ba=aa;ca=0;da=V}while(1){Ef(ba|0,Z+(ca<<2)|0,da|0)|0;ca=ca+1|0;aa=f[X>>2]|0;if(ca>>>0>=(f[Y>>2]|0)>>>0)break;else{ba=ba+aa|0;da=aa}}$=f[m>>2]|0}while(0);Y=f[v>>2]|0;if(!(b[W+84>>0]|0))ea=f[(f[W+68>>2]|0)+(Y<<2)>>2]|0;else ea=Y;if(ea>>>0>=(f[W+80>>2]|0)>>>0)break c;Y=W+40|0;X=f[Y>>2]|0;Z=al(X|0,f[Y+4>>2]|0,ea|0,0)|0;Ef((f[f[W+64>>2]>>2]|0)+Z|0,$|0,X|0)|0;T=T+1|0;U=f[p>>2]|0}while(T>>>0<(((f[r>>2]|0)-U|0)/20|0)>>>0)}while(0);f[v>>2]=(f[v>>2]|0)+1;f[w>>2]=(f[w>>2]|0)+1;N=N+1|0;if((N|0)==(L|0)){R=23;break}}}else if(L>>>0<3){N=f[q>>2]|0;f[N>>2]=M;S=f[h>>2]|0;if(S>>>0>1){U=1;T=S;X=M;while(1){X=(X|0)==(T+-1|0)?0:X+1|0;f[N+(U<<2)>>2]=X;U=U+1|0;Z=f[h>>2]|0;if(U>>>0>=Z>>>0){fa=Z;break}else T=Z}}else fa=S;if(!L){R=23;break}T=0;U=fa;while(1){if(U|0){X=f[q>>2]|0;N=f[j>>2]|0;Z=f[J>>2]|0;Y=0;do{V=X+(Y<<2)|0;f[N+(f[V>>2]<<2)>>2]=0;aa=f[V>>2]|0;ga=(f[a>>2]|0)-(f[Z+(aa<<2)>>2]|0)|0;do if(ga|0){ha=N+(aa<<2)|0;ia=f[k>>2]|0;ja=32-ia|0;if((ga|0)>(ja|0)){ka=f[i>>2]|0;la=ka+4|0;if((la|0)==(f[n>>2]|0)){f[ha>>2]=0;break}else{ma=f[ka>>2]<<ia;ka=ga-ja|0;f[k>>2]=ka;f[i>>2]=la;na=32-ka|0;f[ha>>2]=(f[la>>2]|0)>>>na|ma>>>(na-ja|0);break}}ja=f[i>>2]|0;if((ja|0)==(f[n>>2]|0)){f[ha>>2]=0;break}f[ha>>2]=f[ja>>2]<<ia>>>(32-ga|0);ia=(f[k>>2]|0)+ga|0;f[k>>2]=ia;if((ia|0)!=32)break;f[i>>2]=ja+4;f[k>>2]=0}while(0);ga=f[V>>2]|0;aa=N+(ga<<2)|0;f[aa>>2]=f[aa>>2]|f[(f[O>>2]|0)+(ga<<2)>>2];Y=Y+1|0}while(Y>>>0<(f[h>>2]|0)>>>0)}Y=f[p>>2]|0;d:do if((f[r>>2]|0)!=(Y|0)){N=0;Z=Y;do{X=Z;ga=f[X+(N*20|0)>>2]|0;aa=X+(N*20|0)+12|0;ja=X+(N*20|0)+16|0;ia=(f[j>>2]|0)+(f[X+(N*20|0)+4>>2]<<2)|0;X=f[aa>>2]|0;do if((X|0)==4)oa=ia;else{ha=f[m>>2]|0;if(!(f[ja>>2]|0)){oa=ha;break}else{pa=ha;qa=0;ra=X}while(1){Ef(pa|0,ia+(qa<<2)|0,ra|0)|0;qa=qa+1|0;ha=f[aa>>2]|0;if(qa>>>0>=(f[ja>>2]|0)>>>0)break;else{pa=pa+ha|0;ra=ha}}oa=f[m>>2]|0}while(0);ja=f[v>>2]|0;if(!(b[ga+84>>0]|0))sa=f[(f[ga+68>>2]|0)+(ja<<2)>>2]|0;else sa=ja;if(sa>>>0>=(f[ga+80>>2]|0)>>>0)break d;ja=ga+40|0;aa=f[ja>>2]|0;ia=al(aa|0,f[ja+4>>2]|0,sa|0,0)|0;Ef((f[f[ga+64>>2]>>2]|0)+ia|0,oa|0,aa|0)|0;N=N+1|0;Z=f[p>>2]|0}while(N>>>0<(((f[r>>2]|0)-Z|0)/20|0)>>>0)}while(0);f[v>>2]=(f[v>>2]|0)+1;f[w>>2]=(f[w>>2]|0)+1;Y=T+1|0;if((Y|0)==(L|0)){R=23;break b}T=Y;U=f[h>>2]|0}}else{if((f[w>>2]|0)>>>0>(f[o>>2]|0)>>>0){B=0;break a}U=Q+1|0;T=f[l>>2]|0;S=T+(U*12|0)|0;if((S|0)==(O|0))ta=T;else{ff(S,f[O>>2]|0,f[K+(Q*12|0)+4>>2]|0);ta=f[l>>2]|0}S=(f[ta+(U*12|0)>>2]|0)+(M<<2)|0;f[S>>2]=(f[S>>2]|0)+(1<<P+-1);S=(_(L|0)|0)^31;T=f[C>>2]|0;Y=32-T|0;do if((S|0)>(Y|0)){Z=f[D>>2]|0;N=Z+4|0;if((N|0)==(f[E>>2]|0))ua=0;else{V=f[Z>>2]<<T;Z=S-Y|0;f[C>>2]=Z;f[D>>2]=N;aa=32-Z|0;ua=(f[N>>2]|0)>>>aa|V>>>(aa-Y|0)}}else{aa=f[D>>2]|0;if((aa|0)==(f[E>>2]|0))ua=0;else{V=f[aa>>2]<<T>>>(32-S|0);N=T+S|0;f[C>>2]=N;if((N|0)!=32){ua=V;break}f[D>>2]=aa+4;f[C>>2]=0;ua=V}}while(0);S=(L>>>1)-ua|0;T=L-S|0;e:do if((S|0)==(T|0)){va=S;wa=S}else{Y=f[F>>2]|0;V=f[H>>2]|0;do if((V|0)!=(f[G>>2]|0)){aa=(f[V>>2]&1<<31-Y|0)!=0;N=Y+1|0;f[F>>2]=N;if((N|0)==32){f[H>>2]=V+4;f[F>>2]=0;if(aa){va=S;wa=T;break e}else break}else if(aa){va=S;wa=T;break e}else break}while(0);va=T;wa=S}while(0);S=f[t>>2]|0;T=f[S+(Q*12|0)>>2]|0;V=T+(M<<2)|0;f[V>>2]=(f[V>>2]|0)+1;ff(S+(U*12|0)|0,T,f[S+(Q*12|0)+4>>2]|0);if(va|0){S=f[x>>2]|0;T=f[z>>2]|0;V=S-T>>2;Y=f[s>>2]|0;aa=f[y>>2]|0;if((((V|0)==0?0:(V*341|0)+-1|0)|0)==(aa+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+12|0;j=a+96|0;k=a+52|0;i=a+48|0;n=a+40|0;o=a+4|0;C=a+32|0;D=a+28|0;E=a+20|0;F=a+92|0;G=a+80|0;H=a+88|0;I=A;while(1){J=f[s>>2]|0;K=I+-1|0;L=J+K|0;M=f[z>>2]|0;N=f[M+(((L>>>0)/341|0)<<2)>>2]|0;O=(L>>>0)%341|0;L=f[N+(O*12|0)>>2]|0;P=f[N+(O*12|0)+4>>2]|0;Q=f[N+(O*12|0)+8>>2]|0;f[y>>2]=K;K=f[x>>2]|0;O=K-M>>2;if((1-I-J+((O|0)==0?0:(O*341|0)+-1|0)|0)>>>0>681){mp(f[K+-4>>2]|0);f[x>>2]=(f[x>>2]|0)+-4}K=f[l>>2]|0;O=K+(Q*12|0)|0;if(L>>>0>c>>>0){B=0;break a}J=f[h>>2]|0;M=(J+-1|0)==(P|0)?0:P+1|0;if(M>>>0>=J>>>0){B=0;break a}J=(f[t>>2]|0)+(Q*12|0)|0;P=(f[a>>2]|0)-(f[(f[J>>2]|0)+(M<<2)>>2]|0)|0;b:do if(!P)if(!L)R=23;else{N=0;while(1){S=f[p>>2]|0;c:do if((f[r>>2]|0)!=(S|0)){T=0;U=S;do{V=U;W=f[V+(T*20|0)>>2]|0;X=V+(T*20|0)+12|0;Y=V+(T*20|0)+16|0;Z=(f[O>>2]|0)+(f[V+(T*20|0)+4>>2]<<2)|0;V=f[X>>2]|0;do if((V|0)==4)$=Z;else{aa=f[m>>2]|0;if(!(f[Y>>2]|0)){$=aa;break}else{ba=aa;ca=0;da=V}while(1){Ef(ba|0,Z+(ca<<2)|0,da|0)|0;ca=ca+1|0;aa=f[X>>2]|0;if(ca>>>0>=(f[Y>>2]|0)>>>0)break;else{ba=ba+aa|0;da=aa}}$=f[m>>2]|0}while(0);Y=f[v>>2]|0;if(!(b[W+84>>0]|0))ea=f[(f[W+68>>2]|0)+(Y<<2)>>2]|0;else ea=Y;if(ea>>>0>=(f[W+80>>2]|0)>>>0)break c;Y=W+40|0;X=f[Y>>2]|0;Z=al(X|0,f[Y+4>>2]|0,ea|0,0)|0;Ef((f[f[W+64>>2]>>2]|0)+Z|0,$|0,X|0)|0;T=T+1|0;U=f[p>>2]|0}while(T>>>0<(((f[r>>2]|0)-U|0)/20|0)>>>0)}while(0);f[v>>2]=(f[v>>2]|0)+1;f[w>>2]=(f[w>>2]|0)+1;N=N+1|0;if((N|0)==(L|0)){R=23;break}}}else{if(L>>>0>=3){if((f[w>>2]|0)>>>0>(f[o>>2]|0)>>>0){B=0;break a}N=Q+1|0;ff(K+(N*12|0)|0,f[O>>2]|0,f[K+(Q*12|0)+4>>2]|0);S=(f[(f[l>>2]|0)+(N*12|0)>>2]|0)+(M<<2)|0;f[S>>2]=(f[S>>2]|0)+(1<<P+-1);S=(_(L|0)|0)^31;U=f[C>>2]|0;T=32-U|0;if((S|0)>(T|0)){X=f[D>>2]|0;Z=X+4|0;if((Z|0)==(f[E>>2]|0))fa=0;else{Y=f[X>>2]<<U;X=S-T|0;f[C>>2]=X;f[D>>2]=Z;V=32-X|0;fa=(f[Z>>2]|0)>>>V|Y>>>(V-T|0)}}else{T=f[D>>2]|0;if((T|0)!=(f[E>>2]|0)){V=f[T>>2]<<U>>>(32-S|0);Y=U+S|0;f[C>>2]=Y;if((Y|0)==32){f[D>>2]=T+4;f[C>>2]=0;fa=V}else fa=V}else fa=0}V=(L>>>1)-fa|0;T=L-V|0;d:do if((V|0)==(T|0)){ga=V;ha=V}else{Y=f[F>>2]|0;S=f[H>>2]|0;do if((S|0)!=(f[G>>2]|0)){U=(f[S>>2]&1<<31-Y|0)!=0;Z=Y+1|0;f[F>>2]=Z;if((Z|0)==32){f[H>>2]=S+4;f[F>>2]=0;if(U){ga=V;ha=T;break d}else break}else if(U){ga=V;ha=T;break d}else break}while(0);ga=T;ha=V}while(0);V=f[t>>2]|0;T=f[V+(Q*12|0)>>2]|0;S=T+(M<<2)|0;f[S>>2]=(f[S>>2]|0)+1;ff(V+(N*12|0)|0,T,f[V+(Q*12|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V+1|0;N=f[p>>2]|0}while(V>>>0<(((f[r>>2]|0)-N|0)/20|0)>>>0)}while(0);f[v>>2]=(f[v>>2]|0)+1;f[w>>2]=(f[w>>2]|0)+1;Z=Y+1|0;if((Z|0)==(L|0)){R=23;break b}Y=Z;S=f[h>>2]|0}}}while(0);if((R|0)==23){R=0;sa=f[y>>2]|0}if(!sa){B=1;break}else I=sa}}while(0);sa=f[z>>2]|0;h=f[s>>2]|0;Ca=sa+(((h>>>0)/341|0)<<2)|0;Ga=f[x>>2]|0;Fa=Ga;Da=sa;if((Ga|0)==(sa|0)){Ha=0;Ia=0}else{Ea=(f[y>>2]|0)+h|0;Ha=(f[sa+(((Ea>>>0)/341|0)<<2)>>2]|0)+(((Ea>>>0)%341|0)*12|0)|0;Ia=(f[Ca>>2]|0)+(((h>>>0)%341|0)*12|0)|0}h=Ca;Ca=Ia;f:while(1){Ia=Ca;do{Ea=Ia;if((Ha|0)==(Ea|0))break f;Ia=Ea+12|0}while((Ia-(f[h>>2]|0)|0)!=4092);Ia=h+4|0;h=Ia;Ca=f[Ia>>2]|0}f[y>>2]=0;y=Fa-Da>>2;if(y>>>0>2){Da=sa;do{mp(f[Da>>2]|0);Da=(f[z>>2]|0)+4|0;f[z>>2]=Da;Ja=f[x>>2]|0;Ka=Ja-Da>>2}while(Ka>>>0>2);La=Ka;Ma=Da;Na=Ja}else{La=y;Ma=sa;Na=Ga}switch(La|0){case 1:{Oa=170;R=107;break}case 2:{Oa=341;R=107;break}default:{}}if((R|0)==107)f[s>>2]=Oa;if((Ma|0)!=(Na|0)){Oa=Ma;do{mp(f[Oa>>2]|0);Oa=Oa+4|0}while((Oa|0)!=(Na|0));Na=f[z>>2]|0;z=f[x>>2]|0;if((z|0)!=(Na|0))f[x>>2]=z+(~((z+-4-Na|0)>>>2)<<2)}Na=f[g>>2]|0;if(!Na){u=e;return B|0}mp(Na);u=e;return B|0}function jb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=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<2)>>2]|0)|0;b:do if(!M)if(!I)O=23;else{K=0;while(1){P=f[p>>2]|0;c:do if((f[r>>2]|0)!=(P|0)){Q=0;R=P;do{S=R;T=f[S+(Q*20|0)>>2]|0;U=S+(Q*20|0)+12|0;V=S+(Q*20|0)+16|0;W=(f[L>>2]|0)+(f[S+(Q*20|0)+4>>2]<<2)|0;S=f[U>>2]|0;do if((S|0)==4)X=W;else{Y=f[m>>2]|0;if(!(f[V>>2]|0)){X=Y;break}else{Z=Y;$=0;aa=S}while(1){Ef(Z|0,W+($<<2)|0,aa|0)|0;$=$+1|0;Y=f[U>>2]|0;if($>>>0>=(f[V>>2]|0)>>>0)break;else{Z=Z+Y|0;aa=Y}}X=f[m>>2]|0}while(0);V=f[v>>2]|0;if(!(b[T+84>>0]|0))ba=f[(f[T+68>>2]|0)+(V<<2)>>2]|0;else ba=V;if(ba>>>0>=(f[T+80>>2]|0)>>>0)break c;V=T+40|0;U=f[V>>2]|0;W=al(U|0,f[V+4>>2]|0,ba|0,0)|0;Ef((f[f[T+64>>2]>>2]|0)+W|0,X|0,U|0)|0;Q=Q+1|0;R=f[p>>2]|0}while(Q>>>0<(((f[r>>2]|0)-R|0)/20|0)>>>0)}while(0);f[v>>2]=(f[v>>2]|0)+1;f[w>>2]=(f[w>>2]|0)+1;K=K+1|0;if((K|0)==(I|0)){O=23;break}}}else{if(I>>>0>=3){if((f[w>>2]|0)>>>0>(f[o>>2]|0)>>>0){B=0;break a}K=N+1|0;P=f[l>>2]|0;R=P+(K*12|0)|0;if((R|0)==(L|0))ca=P;else{ff(R,f[L>>2]|0,f[H+(N*12|0)+4>>2]|0);ca=f[l>>2]|0}R=(f[ca+(K*12|0)>>2]|0)+(J<<2)|0;f[R>>2]=(f[R>>2]|0)+(1<<M+-1);R=(_(I|0)|0)^31;if(!R)da=0;else{P=0;Q=0;while(1){U=Q<<1|(Oi(a+16+(P<<4)|0)|0)&1;P=P+1|0;if((P|0)==(R|0)){da=U;break}else Q=U}}Q=(I>>>1)-da|0;R=I-Q|0;d:do if((Q|0)==(R|0)){ea=Q;fa=Q}else{P=f[C>>2]|0;U=f[E>>2]|0;do if((U|0)!=(f[D>>2]|0)){W=(f[U>>2]&1<<31-P|0)!=0;V=P+1|0;f[C>>2]=V;if((V|0)==32){f[E>>2]=U+4;f[C>>2]=0;if(W){ea=Q;fa=R;break d}else break}else if(W){ea=Q;fa=R;break d}else break}while(0);ea=R;fa=Q}while(0);Q=f[t>>2]|0;R=f[Q+(N*12|0)>>2]|0;U=R+(J<<2)|0;f[U>>2]=(f[U>>2]|0)+1;ff(Q+(K*12|0)|0,R,f[Q+(N*12|0)+4>>2]|0);if(ea|0){Q=f[x>>2]|0;R=f[z>>2]|0;U=Q-R>>2;P=f[s>>2]|0;W=f[y>>2]|0;if((((U|0)==0?0:(U*341|0)+-1|0)|0)==(W+P|0)){nc(g);ga=f[s>>2]|0;ha=f[y>>2]|0;ia=f[x>>2]|0;ja=f[z>>2]|0}else{ga=P;ha=W;ia=Q;ja=R}R=ha+ga|0;if((ia|0)==(ja|0))ka=0;else ka=(f[ja+(((R>>>0)/341|0)<<2)>>2]|0)+(((R>>>0)%341|0)*12|0)|0;f[ka>>2]=ea;f[ka+4>>2]=J;f[ka+8>>2]=N;f[y>>2]=(f[y>>2]|0)+1}if(!fa){O=23;break}R=f[x>>2]|0;Q=f[z>>2]|0;W=R-Q>>2;P=f[s>>2]|0;U=f[y>>2]|0;if((((W|0)==0?0:(W*341|0)+-1|0)|0)==(U+P|0)){nc(g);la=f[s>>2]|0;ma=f[y>>2]|0;na=f[x>>2]|0;oa=f[z>>2]|0}else{la=P;ma=U;na=R;oa=Q}Q=ma+la|0;if((na|0)==(oa|0))pa=0;else pa=(f[oa+(((Q>>>0)/341|0)<<2)>>2]|0)+(((Q>>>0)%341|0)*12|0)|0;f[pa>>2]=fa;f[pa+4>>2]=J;f[pa+8>>2]=K;Q=(f[y>>2]|0)+1|0;f[y>>2]=Q;qa=Q;break}Q=f[q>>2]|0;f[Q>>2]=J;R=f[h>>2]|0;if(R>>>0>1){U=1;P=R;W=J;while(1){W=(W|0)==(P+-1|0)?0:W+1|0;f[Q+(U<<2)>>2]=W;U=U+1|0;V=f[h>>2]|0;if(U>>>0>=V>>>0){ra=V;break}else P=V}}else ra=R;if(!I)O=23;else{P=0;U=ra;while(1){if(U|0){W=f[q>>2]|0;Q=f[j>>2]|0;K=f[G>>2]|0;V=0;do{S=W+(V<<2)|0;f[Q+(f[S>>2]<<2)>>2]=0;Y=f[S>>2]|0;sa=(f[a>>2]|0)-(f[K+(Y<<2)>>2]|0)|0;do if(sa|0){ta=Q+(Y<<2)|0;ua=f[k>>2]|0;va=32-ua|0;if((sa|0)>(va|0)){wa=f[i>>2]|0;xa=wa+4|0;if((xa|0)==(f[n>>2]|0)){f[ta>>2]=0;break}else{ya=f[wa>>2]<<ua;wa=sa-va|0;f[k>>2]=wa;f[i>>2]=xa;za=32-wa|0;f[ta>>2]=(f[xa>>2]|0)>>>za|ya>>>(za-va|0);break}}va=f[i>>2]|0;if((va|0)==(f[n>>2]|0)){f[ta>>2]=0;break}f[ta>>2]=f[va>>2]<<ua>>>(32-sa|0);ua=(f[k>>2]|0)+sa|0;f[k>>2]=ua;if((ua|0)!=32)break;f[i>>2]=va+4;f[k>>2]=0}while(0);sa=f[S>>2]|0;Y=Q+(sa<<2)|0;f[Y>>2]=f[Y>>2]|f[(f[L>>2]|0)+(sa<<2)>>2];V=V+1|0}while(V>>>0<(f[h>>2]|0)>>>0)}V=f[p>>2]|0;e:do if((f[r>>2]|0)!=(V|0)){Q=0;K=V;do{W=K;sa=f[W+(Q*20|0)>>2]|0;Y=W+(Q*20|0)+12|0;va=W+(Q*20|0)+16|0;ua=(f[j>>2]|0)+(f[W+(Q*20|0)+4>>2]<<2)|0;W=f[Y>>2]|0;do if((W|0)==4)Aa=ua;else{ta=f[m>>2]|0;if(!(f[va>>2]|0)){Aa=ta;break}else{Ba=ta;Ca=0;Da=W}while(1){Ef(Ba|0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;La=Ha}else{Ja=y;Ka=qa;La=Ea}switch(Ja|0){case 1:{Ma=170;O=105;break}case 2:{Ma=341;O=105;break}default:{}}if((O|0)==105)f[s>>2]=Ma;if((Ka|0)!=(La|0)){Ma=Ka;do{mp(f[Ma>>2]|0);Ma=Ma+4|0}while((Ma|0)!=(La|0));La=f[z>>2]|0;z=f[x>>2]|0;if((z|0)!=(La|0))f[x>>2]=z+(~((z+-4-La|0)>>>2)<<2)}La=f[g>>2]|0;if(!La){u=e;return B|0}mp(La);u=e;return B|0}function kb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0;e=u;u=u+32|0;g=e;h=a+12|0;i=f[h>>2]|0;f[g>>2]=0;j=g+4|0;f[j>>2]=0;f[g+8>>2]=0;do if(i)if(i>>>0>1073741823)Do(g);else{k=i<<2;l=Yk(k)|0;f[g>>2]=l;m=l+(i<<2)|0;f[g+8>>2]=m;Dh(l|0,0,k|0)|0;f[j>>2]=m;n=m;o=l;break}else{n=0;o=0}while(0);l=a+628|0;m=f[l>>2]|0;k=f[m>>2]|0;p=m+4|0;if(!k){q=m+8|0;r=o;s=n;t=i}else{i=f[p>>2]|0;if((i|0)!=(k|0))f[p>>2]=i+(~((i+-4-k|0)>>>2)<<2);mp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(L*12|0)>>2]|0;M=f[K+(L*12|0)+4>>2]|0;N=f[K+(L*12|0)+8>>2]|0;f[y>>2]=H;H=f[x>>2]|0;L=H-J>>2;if((1-F-G+((L|0)==0?0:(L*341|0)+-1|0)|0)>>>0>681){mp(f[H+-4>>2]|0);f[x>>2]=(f[x>>2]|0)+-4}H=f[l>>2]|0;L=H+(N*12|0)|0;G=(f[t>>2]|0)+(N*12|0)|0;if(I>>>0>c>>>0){B=0;break a}J=ql(a,I,G,M)|0;if(J>>>0>=(f[h>>2]|0)>>>0){B=0;break a}M=(f[a>>2]|0)-(f[(f[G>>2]|0)+(J<<2)>>2]|0)|0;b:do if(!M)if(!I)O=23;else{K=0;while(1){P=f[p>>2]|0;c:do if((f[r>>2]|0)!=(P|0)){Q=0;R=P;do{S=R;T=f[S+(Q*20|0)>>2]|0;U=S+(Q*20|0)+12|0;V=S+(Q*20|0)+16|0;W=(f[L>>2]|0)+(f[S+(Q*20|0)+4>>2]<<2)|0;S=f[U>>2]|0;do if((S|0)==4)X=W;else{Y=f[m>>2]|0;if(!(f[V>>2]|0)){X=Y;break}else{Z=Y;$=0;aa=S}while(1){Ef(Z|0,W+($<<2)|0,aa|0)|0;$=$+1|0;Y=f[U>>2]|0;if($>>>0>=(f[V>>2]|0)>>>0)break;else{Z=Z+Y|0;aa=Y}}X=f[m>>2]|0}while(0);V=f[v>>2]|0;if(!(b[T+84>>0]|0))ba=f[(f[T+68>>2]|0)+(V<<2)>>2]|0;else ba=V;if(ba>>>0>=(f[T+80>>2]|0)>>>0)break c;V=T+40|0;U=f[V>>2]|0;W=al(U|0,f[V+4>>2]|0,ba|0,0)|0;Ef((f[f[T+64>>2]>>2]|0)+W|0,X|0,U|0)|0;Q=Q+1|0;R=f[p>>2]|0}while(Q>>>0<(((f[r>>2]|0)-R|0)/20|0)>>>0)}while(0);f[v>>2]=(f[v>>2]|0)+1;f[w>>2]=(f[w>>2]|0)+1;K=K+1|0;if((K|0)==(I|0)){O=23;break}}}else{if(I>>>0>=3){if((f[w>>2]|0)>>>0>(f[o>>2]|0)>>>0){B=0;break a}K=N+1|0;P=f[l>>2]|0;R=P+(K*12|0)|0;if((R|0)==(L|0))ca=P;else{ff(R,f[L>>2]|0,f[H+(N*12|0)+4>>2]|0);ca=f[l>>2]|0}R=(f[ca+(K*12|0)>>2]|0)+(J<<2)|0;f[R>>2]=(f[R>>2]|0)+(1<<M+-1);R=(_(I|0)|0)^31;if(!R)da=0;else{P=0;Q=0;while(1){U=Q<<1|(Oi(a+16+(P<<4)|0)|0)&1;P=P+1|0;if((P|0)==(R|0)){da=U;break}else Q=U}}Q=(I>>>1)-da|0;R=I-Q|0;d:do if((Q|0)==(R|0)){ea=Q;fa=Q}else{P=f[C>>2]|0;U=f[E>>2]|0;do if((U|0)!=(f[D>>2]|0)){W=(f[U>>2]&1<<31-P|0)!=0;V=P+1|0;f[C>>2]=V;if((V|0)==32){f[E>>2]=U+4;f[C>>2]=0;if(W){ea=Q;fa=R;break d}else break}else if(W){ea=Q;fa=R;break d}else break}while(0);ea=R;fa=Q}while(0);Q=f[t>>2]|0;R=f[Q+(N*12|0)>>2]|0;U=R+(J<<2)|0;f[U>>2]=(f[U>>2]|0)+1;ff(Q+(K*12|0)|0,R,f[Q+(N*12|0)+4>>2]|0);if(ea|0){Q=f[x>>2]|0;R=f[z>>2]|0;U=Q-R>>2;P=f[s>>2]|0;W=f[y>>2]|0;if((((U|0)==0?0:(U*341|0)+-1|0)|0)==(W+P|0)){nc(g);ga=f[s>>2]|0;ha=f[y>>2]|0;ia=f[x>>2]|0;ja=f[z>>2]|0}else{ga=P;ha=W;ia=Q;ja=R}R=ha+ga|0;if((ia|0)==(ja|0))ka=0;else ka=(f[ja+(((R>>>0)/341|0)<<2)>>2]|0)+(((R>>>0)%341|0)*12|0)|0;f[ka>>2]=ea;f[ka+4>>2]=J;f[ka+8>>2]=N;f[y>>2]=(f[y>>2]|0)+1}if(!fa){O=23;break}R=f[x>>2]|0;Q=f[z>>2]|0;W=R-Q>>2;P=f[s>>2]|0;U=f[y>>2]|0;if((((W|0)==0?0:(W*341|0)+-1|0)|0)==(U+P|0)){nc(g);la=f[s>>2]|0;ma=f[y>>2]|0;na=f[x>>2]|0;oa=f[z>>2]|0}else{la=P;ma=U;na=R;oa=Q}Q=ma+la|0;if((na|0)==(oa|0))pa=0;else pa=(f[oa+(((Q>>>0)/341|0)<<2)>>2]|0)+(((Q>>>0)%341|0)*12|0)|0;f[pa>>2]=fa;f[pa+4>>2]=J;f[pa+8>>2]=K;Q=(f[y>>2]|0)+1|0;f[y>>2]=Q;qa=Q;break}Q=f[q>>2]|0;f[Q>>2]=J;R=f[h>>2]|0;if(R>>>0>1){U=1;P=R;W=J;while(1){W=(W|0)==(P+-1|0)?0:W+1|0;f[Q+(U<<2)>>2]=W;U=U+1|0;V=f[h>>2]|0;if(U>>>0>=V>>>0){ra=V;break}else P=V}}else ra=R;if(!I)O=23;else{P=0;U=ra;while(1){if(U|0){W=f[q>>2]|0;Q=f[j>>2]|0;K=f[G>>2]|0;V=0;do{S=W+(V<<2)|0;f[Q+(f[S>>2]<<2)>>2]=0;Y=f[S>>2]|0;sa=(f[a>>2]|0)-(f[K+(Y<<2)>>2]|0)|0;do if(sa|0){ta=Q+(Y<<2)|0;ua=f[k>>2]|0;va=32-ua|0;if((sa|0)>(va|0)){wa=f[i>>2]|0;xa=wa+4|0;if((xa|0)==(f[n>>2]|0)){f[ta>>2]=0;break}else{ya=f[wa>>2]<<ua;wa=sa-va|0;f[k>>2]=wa;f[i>>2]=xa;za=32-wa|0;f[ta>>2]=(f[xa>>2]|0)>>>za|ya>>>(za-va|0);break}}va=f[i>>2]|0;if((va|0)==(f[n>>2]|0)){f[ta>>2]=0;break}f[ta>>2]=f[va>>2]<<ua>>>(32-sa|0);ua=(f[k>>2]|0)+sa|0;f[k>>2]=ua;if((ua|0)!=32)break;f[i>>2]=va+4;f[k>>2]=0}while(0);sa=f[S>>2]|0;Y=Q+(sa<<2)|0;f[Y>>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2]|0)+(((q>>>0)%341|0)*12|0)|0;f[A>>2]=c;f[A+4>>2]=0;f[A+8>>2]=0;A=(f[y>>2]|0)+1|0;f[y>>2]=A;a:do if(!A)B=1;else{q=a+616|0;p=d+16|0;r=d+20|0;v=d+28|0;w=a+8|0;m=d+12|0;j=a+604|0;k=a+560|0;i=a+556|0;n=a+548|0;o=a+4|0;C=a+600|0;D=a+588|0;E=a+596|0;F=A;while(1){G=f[s>>2]|0;H=F+-1|0;I=G+H|0;J=f[z>>2]|0;K=f[J+(((I>>>0)/341|0)<<2)>>2]|0;L=(I>>>0)%341|0;I=f[K+(L*12|0)>>2]|0;M=f[K+(L*12|0)+4>>2]|0;N=f[K+(L*12|0)+8>>2]|0;f[y>>2]=H;H=f[x>>2]|0;L=H-J>>2;if((1-F-G+((L|0)==0?0:(L*341|0)+-1|0)|0)>>>0>681){mp(f[H+-4>>2]|0);f[x>>2]=(f[x>>2]|0)+-4}H=f[l>>2]|0;L=H+(N*12|0)|0;if(I>>>0>c>>>0){B=0;break a}G=f[h>>2]|0;J=(G+-1|0)==(M|0)?0:M+1|0;if(J>>>0>=G>>>0){B=0;break a}G=(f[t>>2]|0)+(N*12|0)|0;M=(f[a>>2]|0)-(f[(f[G>>2]|0)+(J<<2)>>2]|0)|0;b:do if(!M)if(!I)O=23;else{K=0;while(1){P=f[p>>2]|0;c:do if((f[r>>2]|0)!=(P|0)){Q=0;R=P;do{S=R;T=f[S+(Q*20|0)>>2]|0;U=S+(Q*20|0)+12|0;V=S+(Q*20|0)+16|0;W=(f[L>>2]|0)+(f[S+(Q*20|0)+4>>2]<<2)|0;S=f[U>>2]|0;do if((S|0)==4)X=W;else{Y=f[m>>2]|0;if(!(f[V>>2]|0)){X=Y;break}else{Z=Y;$=0;aa=S}while(1){Ef(Z|0,W+($<<2)|0,aa|0)|0;$=$+1|0;Y=f[U>>2]|0;if($>>>0>=(f[V>>2]|0)>>>0)break;else{Z=Z+Y|0;aa=Y}}X=f[m>>2]|0}while(0);V=f[v>>2]|0;if(!(b[T+84>>0]|0))ba=f[(f[T+68>>2]|0)+(V<<2)>>2]|0;else ba=V;if(ba>>>0>=(f[T+80>>2]|0)>>>0)break c;V=T+40|0;U=f[V>>2]|0;W=al(U|0,f[V+4>>2]|0,ba|0,0)|0;Ef((f[f[T+64>>2]>>2]|0)+W|0,X|0,U|0)|0;Q=Q+1|0;R=f[p>>2]|0}while(Q>>>0<(((f[r>>2]|0)-R|0)/20|0)>>>0)}while(0);f[v>>2]=(f[v>>2]|0)+1;f[w>>2]=(f[w>>2]|0)+1;K=K+1|0;if((K|0)==(I|0)){O=23;break}}}else{if(I>>>0>=3){if((f[w>>2]|0)>>>0>(f[o>>2]|0)>>>0){B=0;break a}K=N+1|0;ff(H+(K*12|0)|0,f[L>>2]|0,f[H+(N*12|0)+4>>2]|0);P=(f[(f[l>>2]|0)+(K*12|0)>>2]|0)+(J<<2)|0;f[P>>2]=(f[P>>2]|0)+(1<<M+-1);P=(_(I|0)|0)^31;if(!P)ca=0;else{R=0;Q=0;while(1){U=Q<<1|(Oi(a+16+(R<<4)|0)|0)&1;R=R+1|0;if((R|0)==(P|0)){ca=U;break}else Q=U}}Q=(I>>>1)-ca|0;P=I-Q|0;d:do if((Q|0)==(P|0)){da=Q;ea=Q}else{R=f[C>>2]|0;U=f[E>>2]|0;do if((U|0)!=(f[D>>2]|0)){W=(f[U>>2]&1<<31-R|0)!=0;V=R+1|0;f[C>>2]=V;if((V|0)==32){f[E>>2]=U+4;f[C>>2]=0;if(W){da=Q;ea=P;break d}else break}else if(W){da=Q;ea=P;break d}else break}while(0);da=P;ea=Q}while(0);Q=f[t>>2]|0;P=f[Q+(N*12|0)>>2]|0;U=P+(J<<2)|0;f[U>>2]=(f[U>>2]|0)+1;ff(Q+(K*12|0)|0,P,f[Q+(N*12|0)+4>>2]|0);if(da|0){Q=f[x>>2]|0;P=f[z>>2]|0;U=Q-P>>2;R=f[s>>2]|0;W=f[y>>2]|0;if((((U|0)==0?0:(U*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>2]|0)+1;V=R+1|0;if((V|0)==(I|0)){O=23;break b}R=V;U=f[h>>2]|0}}}while(0);if((O|0)==23){O=0;pa=f[y>>2]|0}if(!pa){B=1;break}else F=pa}}while(0);pa=f[z>>2]|0;h=f[s>>2]|0;za=pa+(((h>>>0)/341|0)<<2)|0;Da=f[x>>2]|0;Ca=Da;Aa=pa;if((Da|0)==(pa|0)){Ea=0;Fa=0}else{Ba=(f[y>>2]|0)+h|0;Ea=(f[pa+(((Ba>>>0)/341|0)<<2)>>2]|0)+(((Ba>>>0)%341|0)*12|0)|0;Fa=(f[za>>2]|0)+(((h>>>0)%341|0)*12|0)|0}h=za;za=Fa;f:while(1){Fa=za;do{Ba=Fa;if((Ea|0)==(Ba|0))break f;Fa=Ba+12|0}while((Fa-(f[h>>2]|0)|0)!=4092);Fa=h+4|0;h=Fa;za=f[Fa>>2]|0}f[y>>2]=0;y=Ca-Aa>>2;if(y>>>0>2){Aa=pa;do{mp(f[Aa>>2]|0);Aa=(f[z>>2]|0)+4|0;f[z>>2]=Aa;Ga=f[x>>2]|0;Ha=Ga-Aa>>2}while(Ha>>>0>2);Ia=Ha;Ja=Aa;Ka=Ga}else{Ia=y;Ja=pa;Ka=Da}switch(Ia|0){case 1:{La=170;O=103;break}case 2:{La=341;O=103;break}default:{}}if((O|0)==103)f[s>>2]=La;if((Ja|0)!=(Ka|0)){La=Ja;do{mp(f[La>>2]|0);La=La+4|0}while((La|0)!=(Ka|0));Ka=f[z>>2]|0;z=f[x>>2]|0;if((z|0)!=(Ka|0))f[x>>2]=z+(~((z+-4-Ka|0)>>>2)<<2)}Ka=f[g>>2]|0;if(!Ka){u=e;return B|0}mp(Ka);u=e;return B|0}function mb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,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(R*20|0)>>2]|0;V=T+(R*20|0)+12|0;W=T+(R*20|0)+16|0;X=(f[N>>2]|0)+(f[T+(R*20|0)+4>>2]<<2)|0;T=f[V>>2]|0;do if((T|0)==4)Y=X;else{Z=f[n>>2]|0;if(!(f[W>>2]|0)){Y=Z;break}else{$=Z;aa=0;ba=T}while(1){Ef($|0,X+(aa<<2)|0,ba|0)|0;aa=aa+1|0;Z=f[V>>2]|0;if(aa>>>0>=(f[W>>2]|0)>>>0)break;else{$=$+Z|0;ba=Z}}Y=f[n>>2]|0}while(0);W=f[w>>2]|0;if(!(b[U+84>>0]|0))ca=f[(f[U+68>>2]|0)+(W<<2)>>2]|0;else ca=W;if(ca>>>0>=(f[U+80>>2]|0)>>>0)break c;W=U+40|0;V=f[W>>2]|0;X=al(V|0,f[W+4>>2]|0,ca|0,0)|0;Ef((f[f[U+64>>2]>>2]|0)+X|0,Y|0,V|0)|0;R=R+1|0;S=f[q>>2]|0}while(R>>>0<(((f[s>>2]|0)-S|0)/20|0)>>>0)}while(0);f[w>>2]=(f[w>>2]|0)+1;f[x>>2]=(f[x>>2]|0)+1;M=M+1|0}while((M|0)!=(K|0))}}else{if(K>>>0>=3){if((f[x>>2]|0)>>>0>(f[p>>2]|0)>>>0){C=0;break a}M=P+1|0;Q=f[m>>2]|0;S=Q+(M*12|0)|0;if((S|0)==(N|0))da=Q;else{ff(S,f[N>>2]|0,f[J+(P*12|0)+4>>2]|0);da=f[m>>2]|0}S=(f[da+(M*12|0)>>2]|0)+(L<<2)|0;f[S>>2]=(f[S>>2]|0)+(1<<O+-1);S=(_(K|0)|0)^31;f[h>>2]=0;Eh(D,S,h);S=(K>>>1)-(f[h>>2]|0)|0;Q=K-S|0;d:do if((S|0)==(Q|0)){ea=S;fa=S}else{R=f[E>>2]|0;V=f[G>>2]|0;do if((V|0)!=(f[F>>2]|0)){X=(f[V>>2]&1<<31-R|0)!=0;W=R+1|0;f[E>>2]=W;if((W|0)==32){f[G>>2]=V+4;f[E>>2]=0;if(X){ea=S;fa=Q;break d}else break}else if(X){ea=S;fa=Q;break d}else break}while(0);ea=Q;fa=S}while(0);S=f[v>>2]|0;Q=f[S+(P*12|0)>>2]|0;V=Q+(L<<2)|0;f[V>>2]=(f[V>>2]|0)+1;ff(S+(M*12|0)|0,Q,f[S+(P*12|0)+4>>2]|0);if(ea|0){S=f[y>>2]|0;Q=f[A>>2]|0;V=S-Q>>2;R=f[t>>2]|0;X=f[z>>2]|0;if((((V|0)==0?0:(V*341|0)+-1|0)|0)==(X+R|0)){nc(g);ga=f[t>>2]|0;ha=f[z>>2]|0;ia=f[y>>2]|0;ja=f[A>>2]|0}else{ga=R;ha=X;ia=S;ja=Q}Q=ha+ga|0;if((ia|0)==(ja|0))ka=0;else ka=(f[ja+(((Q>>>0)/341|0)<<2)>>2]|0)+(((Q>>>0)%341|0)*12|0)|0;f[ka>>2]=ea;f[ka+4>>2]=L;f[ka+8>>2]=P;f[z>>2]=(f[z>>2]|0)+1}if(fa|0){Q=f[y>>2]|0;S=f[A>>2]|0;X=Q-S>>2;R=f[t>>2]|0;V=f[z>>2]|0;if((((X|0)==0?0:(X*341|0)+-1|0)|0)==(V+R|0)){nc(g);la=f[t>>2]|0;ma=f[z>>2]|0;na=f[y>>2]|0;oa=f[A>>2]|0}else{la=R;ma=V;na=Q;oa=S}S=ma+la|0;if((na|0)==(oa|0))pa=0;else pa=(f[oa+(((S>>>0)/341|0)<<2)>>2]|0)+(((S>>>0)%341|0)*12|0)|0;f[pa>>2]=fa;f[pa+4>>2]=L;f[pa+8>>2]=M;f[z>>2]=(f[z>>2]|0)+1}break}S=f[r>>2]|0;f[S>>2]=L;Q=f[i>>2]|0;if(Q>>>0>1){V=1;R=Q;X=L;while(1){X=(X|0)==(R+-1|0)?0:X+1|0;f[S+(V<<2)>>2]=X;V=V+1|0;W=f[i>>2]|0;if(V>>>0>=W>>>0){qa=W;break}else R=W}}else qa=Q;if(K|0){R=0;V=qa;while(1){if(V|0){X=f[r>>2]|0;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>>0>=(f[ra+80>>2]|0)>>>0)break e;ua=ra+40|0;Z=f[ua>>2]|0;ta=al(Z|0,f[ua+4>>2]|0,Da|0,0)|0;Ef((f[f[ra+64>>2]>>2]|0)+ta|0,za|0,Z|0)|0;S=S+1|0;M=f[q>>2]|0}while(S>>>0<(((f[s>>2]|0)-M|0)/20|0)>>>0)}while(0);f[w>>2]=(f[w>>2]|0)+1;f[x>>2]=(f[x>>2]|0)+1;W=R+1|0;if((W|0)==(K|0))break b;R=W;V=f[i>>2]|0}}}while(0);H=f[z>>2]|0;if(!H){C=1;break}}}while(0);i=f[A>>2]|0;za=f[t>>2]|0;Da=i+(((za>>>0)/341|0)<<2)|0;Ca=f[y>>2]|0;Aa=Ca;Ba=i;if((Ca|0)==(i|0)){Ea=0;Fa=0}else{a=(f[z>>2]|0)+za|0;Ea=(f[i+(((a>>>0)/341|0)<<2)>>2]|0)+(((a>>>0)%341|0)*12|0)|0;Fa=(f[Da>>2]|0)+(((za>>>0)%341|0)*12|0)|0}za=Da;Da=Fa;f:while(1){Fa=Da;do{a=Fa;if((Ea|0)==(a|0))break f;Fa=a+12|0}while((Fa-(f[za>>2]|0)|0)!=4092);Fa=za+4|0;za=Fa;Da=f[Fa>>2]|0}f[z>>2]=0;z=Aa-Ba>>2;if(z>>>0>2){Ba=i;do{mp(f[Ba>>2]|0);Ba=(f[A>>2]|0)+4|0;f[A>>2]=Ba;Ga=f[y>>2]|0;Ha=Ga-Ba>>2}while(Ha>>>0>2);Ia=Ha;Ja=Ba;Ka=Ga}else{Ia=z;Ja=i;Ka=Ca}switch(Ia|0){case 1:{La=170;Ma=103;break}case 2:{La=341;Ma=103;break}default:{}}if((Ma|0)==103)f[t>>2]=La;if((Ja|0)!=(Ka|0)){La=Ja;do{mp(f[La>>2]|0);La=La+4|0}while((La|0)!=(Ka|0));Ka=f[A>>2]|0;A=f[y>>2]|0;if((A|0)!=(Ka|0))f[y>>2]=A+(~((A+-4-Ka|0)>>>2)<<2)}Ka=f[g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h>>2]|0)|0;S=K-Q|0;d:do if((Q|0)==(S|0)){da=Q;ea=Q}else{R=f[E>>2]|0;V=f[G>>2]|0;do if((V|0)!=(f[F>>2]|0)){X=(f[V>>2]&1<<31-R|0)!=0;W=R+1|0;f[E>>2]=W;if((W|0)==32){f[G>>2]=V+4;f[E>>2]=0;if(X){da=Q;ea=S;break d}else break}else if(X){da=Q;ea=S;break d}else break}while(0);da=S;ea=Q}while(0);Q=f[v>>2]|0;S=f[Q+(P*12|0)>>2]|0;V=S+(L<<2)|0;f[V>>2]=(f[V>>2]|0)+1;ff(Q+(M*12|0)|0,S,f[Q+(P*12|0)+4>>2]|0);if(da|0){Q=f[y>>2]|0;S=f[A>>2]|0;V=Q-S>>2;R=f[t>>2]|0;X=f[z>>2]|0;if((((V|0)==0?0:(V*341|0)+-1|0)|0)==(X+R|0)){nc(g);fa=f[t>>2]|0;ga=f[z>>2]|0;ha=f[y>>2]|0;ia=f[A>>2]|0}else{fa=R;ga=X;ha=Q;ia=S}S=ga+fa|0;if((ha|0)==(ia|0))ja=0;else ja=(f[ia+(((S>>>0)/341|0)<<2)>>2]|0)+(((S>>>0)%341|0)*12|0)|0;f[ja>>2]=da;f[ja+4>>2]=L;f[ja+8>>2]=P;f[z>>2]=(f[z>>2]|0)+1}if(ea|0){S=f[y>>2]|0;Q=f[A>>2]|0;X=S-Q>>2;R=f[t>>2]|0;V=f[z>>2]|0;if((((X|0)==0?0:(X*341|0)+-1|0)|0)==(V+R|0)){nc(g);ka=f[t>>2]|0;la=f[z>>2]|0;ma=f[y>>2]|0;na=f[A>>2]|0}else{ka=R;la=V;ma=S;na=Q}Q=la+ka|0;if((ma|0)==(na|0))oa=0;else oa=(f[na+(((Q>>>0)/341|0)<<2)>>2]|0)+(((Q>>>0)%341|0)*12|0)|0;f[oa>>2]=ea;f[oa+4>>2]=L;f[oa+8>>2]=M;f[z>>2]=(f[z>>2]|0)+1}break}Q=f[r>>2]|0;f[Q>>2]=L;S=f[i>>2]|0;if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)+8>>2]|0;f[y>>2]=K;K=f[x>>2]|0;O=K-M>>2;if((1-I-J+((O|0)==0?0:(O*341|0)+-1|0)|0)>>>0>681){mp(f[K+-4>>2]|0);f[x>>2]=(f[x>>2]|0)+-4}K=f[l>>2]|0;O=K+(Q*12|0)|0;J=(f[t>>2]|0)+(Q*12|0)|0;if(L>>>0>b>>>0){B=0;break a}M=ql(a,L,J,P)|0;if(M>>>0>=(f[h>>2]|0)>>>0){B=0;break a}P=(f[a>>2]|0)-(f[(f[J>>2]|0)+(M<<2)>>2]|0)|0;b:do if(!P)if(!L)R=23;else{N=0;do{S=f[O>>2]|0;T=f[S>>2]|0;f[e>>2]=T;f[G>>2]=f[S+4>>2];f[H>>2]=f[S+8>>2];S=f[c>>2]|0;U=S+4|0;V=f[U>>2]|0;if(V>>>0<(f[S+8>>2]|0)>>>0){f[V>>2]=T;f[V+4>>2]=f[G>>2];f[V+8>>2]=f[H>>2];f[U>>2]=V+12}else Kf(S,e);f[v>>2]=(f[v>>2]|0)+1;N=N+1|0}while(N>>>0<L>>>0);R=23}else{if(L>>>0<3){N=f[q>>2]|0;f[N>>2]=M;S=f[h>>2]|0;if(S>>>0>1){V=1;U=S;T=M;while(1){T=(T|0)==(U+-1|0)?0:T+1|0;f[N+(V<<2)>>2]=T;V=V+1|0;W=f[h>>2]|0;if(V>>>0>=W>>>0){X=W;break}else U=W}}else X=S;if(!L){R=23;break}U=0;V=X;while(1){if(!V)Y=f[w>>2]|0;else{T=f[q>>2]|0;N=f[w>>2]|0;W=f[J>>2]|0;Z=0;do{$=T+(Z<<2)|0;f[N+(f[$>>2]<<2)>>2]=0;aa=f[$>>2]|0;ba=(f[a>>2]|0)-(f[W+(aa<<2)>>2]|0)|0;do if(ba|0){ca=N+(aa<<2)|0;da=f[m>>2]|0;ea=32-da|0;if((ba|0)>(ea|0)){fa=f[j>>2]|0;ga=fa+4|0;if((ga|0)==(f[k>>2]|0)){f[ca>>2]=0;break}else{ha=f[fa>>2]<<da;fa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[Z>>2]<<U>>>(32-S|0);N=U+S|0;f[n>>2]=N;if((N|0)==32){f[o>>2]=Z+4;f[n>>2]=0;ka=ba}else ka=ba}else ka=0}ba=(L>>>1)-ka|0;Z=L-ba|0;c:do if((ba|0)==(Z|0)){la=ba;ma=ba}else{N=f[D>>2]|0;S=f[F>>2]|0;do if((S|0)!=(f[E>>2]|0)){U=(f[S>>2]&1<<31-N|0)!=0;W=N+1|0;f[D>>2]=W;if((W|0)==32){f[F>>2]=S+4;f[D>>2]=0;if(U){la=ba;ma=Z;break c}else break}else if(U){la=ba;ma=Z;break c}else break}while(0);la=Z;ma=ba}while(0);ba=f[t>>2]|0;Z=f[ba+(Q*12|0)>>2]|0;S=Z+(M<<2)|0;f[S>>2]=(f[S>>2]|0)+1;ff(ba+(V*12|0)|0,Z,f[ba+(Q*12|0)+4>>2]|0);if(la|0){ba=f[x>>2]|0;Z=f[z>>2]|0;S=ba-Z>>2;N=f[s>>2]|0;U=f[y>>2]|0;if((((S|0)==0?0:(S*341|0)+-1|0)|0)==(U+N|0)){nc(g);na=f[s>>2]|0;oa=f[y>>2]|0;pa=f[x>>2]|0;qa=f[z>>2]|0}else{na=N;oa=U;pa=ba;qa=Z}Z=oa+na|0;if((pa|0)==(qa|0))ra=0;else ra=(f[qa+(((Z>>>0)/341|0)<<2)>>2]|0)+(((Z>>>0)%341|0)*12|0)|0;f[ra>>2]=la;f[ra+4>>2]=M;f[ra+8>>2]=Q;f[y>>2]=(f[y>>2]|0)+1}if(!ma)R=23;else{Z=f[x>>2]|0;ba=f[z>>2]|0;U=Z-ba>>2;N=f[s>>2]|0;S=f[y>>2]|0;if((((U|0)==0?0:(U*341|0)+-1|0)|0)==(S+N|0)){nc(g);sa=f[s>>2]|0;ta=f[y>>2]|0;ua=f[x>>2]|0;va=f[z>>2]|0}else{sa=N;ta=S;ua=Z;va=ba}ba=ta+sa|0;if((ua|0)==(va|0))wa=0;else wa=(f[va+(((ba>>>0)/341|0)<<2)>>2]|0)+(((ba>>>0)%341|0)*12|0)|0;f[wa>>2]=ma;f[wa+4>>2]=M;f[wa+8>>2]=V;ba=(f[y>>2]|0)+1|0;f[y>>2]=ba;xa=ba}}while(0);if((R|0)==23){R=0;xa=f[y>>2]|0}if(!xa){B=1;break}else I=xa}}while(0);xa=f[z>>2]|0;wa=f[s>>2]|0;ma=xa+(((wa>>>0)/341|0)<<2)|0;va=f[x>>2]|0;ua=va;sa=xa;if((va|0)==(xa|0)){ya=0;za=0}else{ta=(f[y>>2]|0)+wa|0;ya=(f[xa+(((ta>>>0)/341|0)<<2)>>2]|0)+(((ta>>>0)%341|0)*12|0)|0;za=(f[ma>>2]|0)+(((wa>>>0)%341|0)*12|0)|0}wa=ma;ma=za;d:while(1){za=ma;do{ta=za;if((ya|0)==(ta|0))break d;za=ta+12|0}while((za-(f[wa>>2]|0)|0)!=4092);za=wa+4|0;wa=za;ma=f[za>>2]|0}f[y>>2]=0;y=ua-sa>>2;if(y>>>0>2){sa=xa;do{mp(f[sa>>2]|0);sa=(f[z>>2]|0)+4|0;f[z>>2]=sa;Aa=f[x>>2]|0;Ba=Aa-sa>>2}while(Ba>>>0>2);Ca=Ba;Da=sa;Ea=Aa}else{Ca=y;Da=xa;Ea=va}switch(Ca|0){case 1:{Fa=170;R=98;break}case 2:{Fa=341;R=98;break}default:{}}if((R|0)==98)f[s>>2]=Fa;if((Da|0)!=(Ea|0)){Fa=Da;do{mp(f[Fa>>2]|0);Fa=Fa+4|0}while((Fa|0)!=(Ea|0));Ea=f[z>>2]|0;z=f[x>>2]|0;if((z|0)!=(Ea|0))f[x>>2]=z+(~((z+-4-Ea|0)>>>2)<<2)}Ea=f[g>>2]|0;if(!Ea){u=d;return B|0}mp(Ea);u=d;return B|0}function pb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E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f[S+4>>2];f[H>>2]=f[S+8>>2];S=f[c>>2]|0;U=S+4|0;V=f[U>>2]|0;if(V>>>0<(f[S+8>>2]|0)>>>0){f[V>>2]=T;f[V+4>>2]=f[G>>2];f[V+8>>2]=f[H>>2];f[U>>2]=V+12}else Kf(S,e);f[v>>2]=(f[v>>2]|0)+1;N=N+1|0}while(N>>>0<L>>>0);R=23}else{if(L>>>0<3){N=f[q>>2]|0;f[N>>2]=M;S=f[h>>2]|0;if(S>>>0>1){V=1;U=S;T=M;while(1){T=(T|0)==(U+-1|0)?0:T+1|0;f[N+(V<<2)>>2]=T;V=V+1|0;W=f[h>>2]|0;if(V>>>0>=W>>>0){X=W;break}else U=W}}else X=S;if(!L){R=23;break}U=0;V=X;while(1){if(!V)Y=f[w>>2]|0;else{T=f[q>>2]|0;N=f[w>>2]|0;W=f[J>>2]|0;Z=0;do{$=T+(Z<<2)|0;f[N+(f[$>>2]<<2)>>2]=0;aa=f[$>>2]|0;ba=(f[a>>2]|0)-(f[W+(aa<<2)>>2]|0)|0;do if(ba|0){ca=N+(aa<<2)|0;da=f[m>>2]|0;ea=32-da|0;if((ba|0)>(ea|0)){fa=f[j>>2]|0;ga=fa+4|0;if((ga|0)==(f[k>>2]|0)){f[ca>>2]=0;break}else{ha=f[fa>>2]<<da;fa=ba-ea|0;f[m>>2]=fa;f[j>>2]=ga;ia=32-fa|0;f[ca>>2]=(f[ga>>2]|0)>>>ia|ha>>>(ia-ea|0);break}}ea=f[j>>2]|0;if((ea|0)==(f[k>>2]|0)){f[ca>>2]=0;break}f[ca>>2]=f[ea>>2]<<da>>>(32-ba|0);da=(f[m>>2]|0)+ba|0;f[m>>2]=da;if((da|0)!=32)break;f[j>>2]=ea+4;f[m>>2]=0}while(0);ba=f[$>>2]|0;aa=N+(ba<<2)|0;f[aa>>2]=f[aa>>2]|f[(f[O>>2]|0)+(ba<<2)>>2];Z=Z+1|0}while(Z>>>0<(f[h>>2]|0)>>>0);Y=N}N=f[Y>>2]|0;f[e>>2]=N;f[p>>2]=f[Y+4>>2];f[r>>2]=f[Y+8>>2];Z=f[c>>2]|0;W=Z+4|0;T=f[W>>2]|0;if(T>>>0<(f[Z+8>>2]|0)>>>0){f[T>>2]=N;f[T+4>>2]=f[p>>2];f[T+8>>2]=f[r>>2];f[W>>2]=T+12}else Kf(Z,e);f[v>>2]=(f[v>>2]|0)+1;Z=U+1|0;if(Z>>>0>=L>>>0){R=23;break b}U=Z;V=f[h>>2]|0}}if((f[v>>2]|0)>>>0>(f[i>>2]|0)>>>0){B=0;break a}V=Q+1|0;ff(K+(V*12|0)|0,f[O>>2]|0,f[K+(Q*12|0)+4>>2]|0);U=(f[(f[l>>2]|0)+(V*12|0)>>2]|0)+(M<<2)|0;f[U>>2]=(f[U>>2]|0)+(1<<P+-1);U=(_(L|0)|0)^31;S=f[n>>2]|0;Z=32-S|0;if((U|0)>(Z|0)){T=f[o>>2]|0;W=T+4|0;if((W|0)==(f[C>>2]|0))ja=0;else{N=f[T>>2]<<S;T=U-Z|0;f[n>>2]=T;f[o>>2]=W;ba=32-T|0;ja=(f[W>>2]|0)>>>ba|N>>>(ba-Z|0)}}else{Z=f[o>>2]|0;if((Z|0)!=(f[C>>2]|0)){ba=f[Z>>2]<<S>>>(32-U|0);N=S+U|0;f[n>>2]=N;if((N|0)==32){f[o>>2]=Z+4;f[n>>2]=0;ja=ba}else ja=ba}else ja=0}ba=(L>>>1)-ja|0;Z=L-ba|0;c:do if((ba|0)==(Z|0)){ka=ba;la=ba}else{N=f[D>>2]|0;U=f[F>>2]|0;do if((U|0)!=(f[E>>2]|0)){S=(f[U>>2]&1<<31-N|0)!=0;W=N+1|0;f[D>>2]=W;if((W|0)==32){f[F>>2]=U+4;f[D>>2]=0;if(S){ka=ba;la=Z;break c}else break}else if(S){ka=ba;la=Z;break c}else break}while(0);ka=Z;la=ba}while(0);ba=f[t>>2]|0;Z=f[ba+(Q*12|0)>>2]|0;U=Z+(M<<2)|0;f[U>>2]=(f[U>>2]|0)+1;ff(ba+(V*12|0)|0,Z,f[ba+(Q*12|0)+4>>2]|0);if(ka|0){ba=f[x>>2]|0;Z=f[z>>2]|0;U=ba-Z>>2;N=f[s>>2]|0;S=f[y>>2]|0;if((((U|0)==0?0:(U*341|0)+-1|0)|0)==(S+N|0)){nc(g);ma=f[s>>2]|0;na=f[y>>2]|0;oa=f[x>>2]|0;pa=f[z>>2]|0}else{ma=N;na=S;oa=ba;pa=Z}Z=na+ma|0;if((oa|0)==(pa|0))qa=0;else qa=(f[pa+(((Z>>>0)/341|0)<<2)>>2]|0)+(((Z>>>0)%341|0)*12|0)|0;f[qa>>2]=ka;f[qa+4>>2]=M;f[qa+8>>2]=Q;f[y>>2]=(f[y>>2]|0)+1}if(!la)R=23;else{Z=f[x>>2]|0;ba=f[z>>2]|0;S=Z-ba>>2;N=f[s>>2]|0;U=f[y>>2]|0;if((((S|0)==0?0:(S*341|0)+-1|0)|0)==(U+N|0)){nc(g);ra=f[s>>2]|0;sa=f[y>>2]|0;ta=f[x>>2]|0;ua=f[z>>2]|0}else{ra=N;sa=U;ta=Z;ua=ba}ba=sa+ra|0;if((ta|0)==(ua|0))va=0;else va=(f[ua+(((ba>>>0)/341|0)<<2)>>2]|0)+(((ba>>>0)%341|0)*12|0)|0;f[va>>2]=la;f[va+4>>2]=M;f[va+8>>2]=V;ba=(f[y>>2]|0)+1|0;f[y>>2]=ba;wa=ba}}while(0);if((R|0)==23){R=0;wa=f[y>>2]|0}if(!wa){B=1;break}else I=wa}}while(0);wa=f[z>>2]|0;va=f[s>>2]|0;la=wa+(((va>>>0)/341|0)<<2)|0;ua=f[x>>2]|0;ta=ua;ra=wa;if((ua|0)==(wa|0)){xa=0;ya=0}else{sa=(f[y>>2]|0)+va|0;xa=(f[wa+(((sa>>>0)/341|0)<<2)>>2]|0)+(((sa>>>0)%341|0)*12|0)|0;ya=(f[la>>2]|0)+(((va>>>0)%341|0)*12|0)|0}va=la;la=ya;d:while(1){ya=la;do{sa=ya;if((xa|0)==(sa|0))break d;ya=sa+12|0}while((ya-(f[va>>2]|0)|0)!=4092);ya=va+4|0;va=ya;la=f[ya>>2]|0}f[y>>2]=0;y=ta-ra>>2;if(y>>>0>2){ra=wa;do{mp(f[ra>>2]|0);ra=(f[z>>2]|0)+4|0;f[z>>2]=ra;za=f[x>>2]|0;Aa=za-ra>>2}while(Aa>>>0>2);Ba=Aa;Ca=ra;Da=za}else{Ba=y;Ca=wa;Da=ua}switch(Ba|0){case 1:{Ea=170;R=96;break}case 2:{Ea=341;R=96;break}default:{}}if((R|0)==96)f[s>>2]=Ea;if((Ca|0)!=(Da|0)){Ea=Ca;do{mp(f[Ea>>2]|0);Ea=Ea+4|0}while((Ea|0)!=(Da|0));Da=f[z>>2]|0;z=f[x>>2]|0;if((z|0)!=(Da|0))f[x>>2]=z+(~((z+-4-Da|0)>>>2)<<2)}Da=f[g>>2]|0;if(!Da){u=d;return B|0}mp(Da);u=d;return B|0}function qb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0;d=u;u=u+48|0;e=d+24|0;g=d;h=a+12|0;i=f[h>>2]|0;f[e>>2]=0;j=e+4|0;f[j>>2]=0;f[e+8>>2]=0;do if(i)if(i>>>0>1073741823)Do(e);else{k=i<<2;l=Yk(k)|0;f[e>>2]=l;m=l+(i<<2)|0;f[e+8>>2]=m;Dh(l|0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a+560|0;j=a+556|0;k=a+548|0;i=a+4|0;n=a+600|0;o=a+588|0;C=a+596|0;D=e+4|0;E=e+8|0;F=A;while(1){G=f[s>>2]|0;H=F+-1|0;I=G+H|0;J=f[z>>2]|0;K=f[J+(((I>>>0)/341|0)<<2)>>2]|0;L=(I>>>0)%341|0;I=f[K+(L*12|0)>>2]|0;M=f[K+(L*12|0)+4>>2]|0;N=f[K+(L*12|0)+8>>2]|0;f[y>>2]=H;H=f[x>>2]|0;L=H-J>>2;if((1-F-G+((L|0)==0?0:(L*341|0)+-1|0)|0)>>>0>681){mp(f[H+-4>>2]|0);f[x>>2]=(f[x>>2]|0)+-4}H=f[l>>2]|0;L=H+(N*12|0)|0;G=(f[t>>2]|0)+(N*12|0)|0;if(I>>>0>b>>>0){B=0;break a}J=Gg(a,I,G,M)|0;if(J>>>0>=(f[h>>2]|0)>>>0){B=0;break a}M=(f[a>>2]|0)-(f[(f[G>>2]|0)+(J<<2)>>2]|0)|0;b:do if(!M)if(!I)O=23;else{K=0;do{P=f[L>>2]|0;Q=f[P>>2]|0;f[e>>2]=Q;f[D>>2]=f[P+4>>2];f[E>>2]=f[P+8>>2];P=f[c>>2]|0;R=P+4|0;S=f[R>>2]|0;if(S>>>0<(f[P+8>>2]|0)>>>0){f[S>>2]=Q;f[S+4>>2]=f[D>>2];f[S+8>>2]=f[E>>2];f[R>>2]=S+12}else Kf(P,e);f[v>>2]=(f[v>>2]|0)+1;K=K+1|0}while(K>>>0<I>>>0);O=23}else{if(I>>>0<3){K=f[q>>2]|0;f[K>>2]=J;P=f[h>>2]|0;if(P>>>0>1){S=1;R=P;Q=J;while(1){Q=(Q|0)==(R+-1|0)?0:Q+1|0;f[K+(S<<2)>>2]=Q;S=S+1|0;T=f[h>>2]|0;if(S>>>0>=T>>>0){U=T;break}else R=T}}else U=P;if(!I){O=23;break}R=0;S=U;while(1){if(!S)V=f[w>>2]|0;else{Q=f[q>>2]|0;K=f[w>>2]|0;T=f[G>>2]|0;W=0;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0)^31;if(!P)ha=0;else{R=0;W=0;while(1){Q=W<<1|(Oi(a+16+(R<<4)|0)|0)&1;R=R+1|0;if((R|0)==(P|0)){ha=Q;break}else W=Q}}W=(I>>>1)-ha|0;P=I-W|0;c:do if((W|0)==(P|0)){ia=W;ja=W}else{R=f[n>>2]|0;Q=f[C>>2]|0;do if((Q|0)!=(f[o>>2]|0)){T=(f[Q>>2]&1<<31-R|0)!=0;K=R+1|0;f[n>>2]=K;if((K|0)==32){f[C>>2]=Q+4;f[n>>2]=0;if(T){ia=W;ja=P;break c}else break}else if(T){ia=W;ja=P;break c}else break}while(0);ia=P;ja=W}while(0);W=f[t>>2]|0;P=f[W+(N*12|0)>>2]|0;Q=P+(J<<2)|0;f[Q>>2]=(f[Q>>2]|0)+1;ff(W+(S*12|0)|0,P,f[W+(N*12|0)+4>>2]|0);if(ia|0){W=f[x>>2]|0;P=f[z>>2]|0;Q=W-P>>2;R=f[s>>2]|0;T=f[y>>2]|0;if((((Q|0)==0?0:(Q*341|0)+-1|0)|0)==(T+R|0)){nc(g);ka=f[s>>2]|0;la=f[y>>2]|0;ma=f[x>>2]|0;na=f[z>>2]|0}else{ka=R;la=T;ma=W;na=P}P=la+ka|0;if((ma|0)==(na|0))oa=0;else oa=(f[na+(((P>>>0)/341|0)<<2)>>2]|0)+(((P>>>0)%341|0)*12|0)|0;f[oa>>2]=ia;f[oa+4>>2]=J;f[oa+8>>2]=N;f[y>>2]=(f[y>>2]|0)+1}if(!ja)O=23;else{P=f[x>>2]|0;W=f[z>>2]|0;T=P-W>>2;R=f[s>>2]|0;Q=f[y>>2]|0;if((((T|0)==0?0:(T*341|0)+-1|0)|0)==(Q+R|0)){nc(g);pa=f[s>>2]|0;qa=f[y>>2]|0;ra=f[x>>2]|0;sa=f[z>>2]|0}else{pa=R;qa=Q;ra=P;sa=W}W=qa+pa|0;if((ra|0)==(sa|0))ta=0;else ta=(f[sa+(((W>>>0)/341|0)<<2)>>2]|0)+(((W>>>0)%341|0)*12|0)|0;f[ta>>2]=ja;f[ta+4>>2]=J;f[ta+8>>2]=S;W=(f[y>>2]|0)+1|0;f[y>>2]=W;ua=W}}while(0);if((O|0)==23){O=0;ua=f[y>>2]|0}if(!ua){B=1;break}else F=ua}}while(0);ua=f[z>>2]|0;ta=f[s>>2]|0;ja=ua+(((ta>>>0)/341|0)<<2)|0;sa=f[x>>2]|0;ra=sa;pa=ua;if((sa|0)==(ua|0)){va=0;wa=0}else{qa=(f[y>>2]|0)+ta|0;va=(f[ua+(((qa>>>0)/341|0)<<2)>>2]|0)+(((qa>>>0)%341|0)*12|0)|0;wa=(f[ja>>2]|0)+(((ta>>>0)%341|0)*12|0)|0}ta=ja;ja=wa;d:while(1){wa=ja;do{qa=wa;if((va|0)==(qa|0))break d;wa=qa+12|0}while((wa-(f[ta>>2]|0)|0)!=4092);wa=ta+4|0;ta=wa;ja=f[wa>>2]|0}f[y>>2]=0;y=ra-pa>>2;if(y>>>0>2){pa=ua;do{mp(f[pa>>2]|0);pa=(f[z>>2]|0)+4|0;f[z>>2]=pa;xa=f[x>>2]|0;ya=xa-pa>>2}while(ya>>>0>2);za=ya;Aa=pa;Ba=xa}else{za=y;Aa=ua;Ba=sa}switch(za|0){case 1:{Ca=170;O=94;break}case 2:{Ca=341;O=94;break}default:{}}if((O|0)==94)f[s>>2]=Ca;if((Aa|0)!=(Ba|0)){Ca=Aa;do{mp(f[Ca>>2]|0);Ca=Ca+4|0}while((Ca|0)!=(Ba|0));Ba=f[z>>2]|0;z=f[x>>2]|0;if((z|0)!=(Ba|0))f[x>>2]=z+(~((z+-4-Ba|0)>>>2)<<2)}Ba=f[g>>2]|0;if(!Ba){u=d;return B|0}mp(Ba);u=d;return B|0}function rb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0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;Q=f[T>>2]|0;if(Q>>>0<(f[W+8>>2]|0)>>>0){f[Q>>2]=K;f[Q+4>>2]=f[p>>2];f[Q+8>>2]=f[r>>2];f[T>>2]=Q+12}else Kf(W,e);f[v>>2]=(f[v>>2]|0)+1;W=R+1|0;if(W>>>0>=I>>>0){O=23;break b}R=W;S=f[h>>2]|0}}if((f[v>>2]|0)>>>0>(f[i>>2]|0)>>>0){B=0;break a}S=N+1|0;R=f[l>>2]|0;P=R+(S*12|0)|0;if((P|0)==(L|0))ga=R;else{ff(P,f[L>>2]|0,f[H+(N*12|0)+4>>2]|0);ga=f[l>>2]|0}P=(f[ga+(S*12|0)>>2]|0)+(J<<2)|0;f[P>>2]=(f[P>>2]|0)+(1<<M+-1);P=(_(I|0)|0)^31;if(!P)ha=0;else{R=0;W=0;while(1){Q=W<<1|(Oi(a+16+(R<<4)|0)|0)&1;R=R+1|0;if((R|0)==(P|0)){ha=Q;break}else W=Q}}W=(I>>>1)-ha|0;P=I-W|0;c:do if((W|0)==(P|0)){ia=W;ja=W}else{R=f[n>>2]|0;Q=f[C>>2]|0;do if((Q|0)!=(f[o>>2]|0)){T=(f[Q>>2]&1<<31-R|0)!=0;K=R+1|0;f[n>>2]=K;if((K|0)==32){f[C>>2]=Q+4;f[n>>2]=0;if(T){ia=W;ja=P;break c}else break}else if(T){ia=W;ja=P;break c}else break}while(0);ia=P;ja=W}while(0);W=f[t>>2]|0;P=f[W+(N*12|0)>>2]|0;Q=P+(J<<2)|0;f[Q>>2]=(f[Q>>2]|0)+1;ff(W+(S*12|0)|0,P,f[W+(N*12|0)+4>>2]|0);if(ia|0){W=f[x>>2]|0;P=f[z>>2]|0;Q=W-P>>2;R=f[s>>2]|0;T=f[y>>2]|0;if((((Q|0)==0?0:(Q*341|0)+-1|0)|0)==(T+R|0)){nc(g);ka=f[s>>2]|0;la=f[y>>2]|0;ma=f[x>>2]|0;na=f[z>>2]|0}else{ka=R;la=T;ma=W;na=P}P=la+ka|0;if((ma|0)==(na|0))oa=0;else oa=(f[na+(((P>>>0)/341|0)<<2)>>2]|0)+(((P>>>0)%341|0)*12|0)|0;f[oa>>2]=ia;f[oa+4>>2]=J;f[oa+8>>2]=N;f[y>>2]=(f[y>>2]|0)+1}if(!ja)O=23;else{P=f[x>>2]|0;W=f[z>>2]|0;T=P-W>>2;R=f[s>>2]|0;Q=f[y>>2]|0;if((((T|0)==0?0:(T*341|0)+-1|0)|0)==(Q+R|0)){nc(g);pa=f[s>>2]|0;qa=f[y>>2]|0;ra=f[x>>2]|0;sa=f[z>>2]|0}else{pa=R;qa=Q;ra=P;sa=W}W=qa+pa|0;if((ra|0)==(sa|0))ta=0;else ta=(f[sa+(((W>>>0)/341|0)<<2)>>2]|0)+(((W>>>0)%341|0)*12|0)|0;f[ta>>2]=ja;f[ta+4>>2]=J;f[ta+8>>2]=S;W=(f[y>>2]|0)+1|0;f[y>>2]=W;ua=W}}while(0);if((O|0)==23){O=0;ua=f[y>>2]|0}if(!ua){B=1;break}else F=ua}}while(0);ua=f[z>>2]|0;ta=f[s>>2]|0;ja=ua+(((ta>>>0)/341|0)<<2)|0;sa=f[x>>2]|0;ra=sa;pa=ua;if((sa|0)==(ua|0)){va=0;wa=0}else{qa=(f[y>>2]|0)+ta|0;va=(f[ua+(((qa>>>0)/341|0)<<2)>>2]|0)+(((qa>>>0)%341|0)*12|0)|0;wa=(f[ja>>2]|0)+(((ta>>>0)%341|0)*12|0)|0}ta=ja;ja=wa;d:while(1){wa=ja;do{qa=wa;if((va|0)==(qa|0))break d;wa=qa+12|0}while((wa-(f[ta>>2]|0)|0)!=4092);wa=ta+4|0;ta=wa;ja=f[wa>>2]|0}f[y>>2]=0;y=ra-pa>>2;if(y>>>0>2){pa=ua;do{mp(f[pa>>2]|0);pa=(f[z>>2]|0)+4|0;f[z>>2]=pa;xa=f[x>>2]|0;ya=xa-pa>>2}while(ya>>>0>2);za=ya;Aa=pa;Ba=xa}else{za=y;Aa=ua;Ba=sa}switch(za|0){case 1:{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0;L=H-J>>2;if((1-F-G+((L|0)==0?0:(L*341|0)+-1|0)|0)>>>0>681){mp(f[H+-4>>2]|0);f[x>>2]=(f[x>>2]|0)+-4}H=f[l>>2]|0;L=H+(N*12|0)|0;if(I>>>0>b>>>0){B=0;break a}G=f[h>>2]|0;J=(G+-1|0)==(M|0)?0:M+1|0;if(J>>>0>=G>>>0){B=0;break a}G=(f[t>>2]|0)+(N*12|0)|0;M=(f[a>>2]|0)-(f[(f[G>>2]|0)+(J<<2)>>2]|0)|0;b:do if(!M)if(!I)O=23;else{K=0;do{P=f[L>>2]|0;Q=f[P>>2]|0;f[e>>2]=Q;f[D>>2]=f[P+4>>2];f[E>>2]=f[P+8>>2];P=f[c>>2]|0;R=P+4|0;S=f[R>>2]|0;if(S>>>0<(f[P+8>>2]|0)>>>0){f[S>>2]=Q;f[S+4>>2]=f[D>>2];f[S+8>>2]=f[E>>2];f[R>>2]=S+12}else Kf(P,e);f[v>>2]=(f[v>>2]|0)+1;K=K+1|0}while(K>>>0<I>>>0);O=23}else{if(I>>>0>=3){if((f[v>>2]|0)>>>0>(f[i>>2]|0)>>>0){B=0;break a}K=N+1|0;ff(H+(K*12|0)|0,f[L>>2]|0,f[H+(N*12|0)+4>>2]|0);P=(f[(f[l>>2]|0)+(K*12|0)>>2]|0)+(J<<2)|0;f[P>>2]=(f[P>>2]|0)+(1<<M+-1);P=(_(I|0)|0)^31;if(!P)T=0;else{S=0;R=0;while(1){Q=R<<1|(Oi(a+16+(S<<4)|0)|0)&1;S=S+1|0;if((S|0)==(P|0)){T=Q;break}else R=Q}}R=(I>>>1)-T|0;P=I-R|0;c:do if((R|0)==(P|0)){U=R;V=R}else{S=f[n>>2]|0;Q=f[C>>2]|0;do if((Q|0)!=(f[o>>2]|0)){W=(f[Q>>2]&1<<31-S|0)!=0;X=S+1|0;f[n>>2]=X;if((X|0)==32){f[C>>2]=Q+4;f[n>>2]=0;if(W){U=R;V=P;break c}else break}else if(W){U=R;V=P;break c}else break}while(0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|0;X=0;do{ka=W+(X<<2)|0;f[R+(f[ka>>2]<<2)>>2]=0;la=f[ka>>2]|0;ma=(f[a>>2]|0)-(f[K+(la<<2)>>2]|0)|0;do if(ma|0){na=R+(la<<2)|0;oa=f[m>>2]|0;pa=32-oa|0;if((ma|0)>(pa|0)){qa=f[j>>2]|0;ra=qa+4|0;if((ra|0)==(f[k>>2]|0)){f[na>>2]=0;break}else{sa=f[qa>>2]<<oa;qa=ma-pa|0;f[m>>2]=qa;f[j>>2]=ra;ta=32-qa|0;f[na>>2]=(f[ra>>2]|0)>>>ta|sa>>>(ta-pa|0);break}}pa=f[j>>2]|0;if((pa|0)==(f[k>>2]|0)){f[na>>2]=0;break}f[na>>2]=f[pa>>2]<<oa>>>(32-ma|0);oa=(f[m>>2]|0)+ma|0;f[m>>2]=oa;if((oa|0)!=32)break;f[j>>2]=pa+4;f[m>>2]=0}while(0);ma=f[ka>>2]|0;la=R+(ma<<2)|0;f[la>>2]=f[la>>2]|f[(f[L>>2]|0)+(ma<<2)>>2];X=X+1|0}while(X>>>0<(f[h>>2]|0)>>>0);ja=R}R=f[ja>>2]|0;f[e>>2]=R;f[p>>2]=f[ja+4>>2];f[r>>2]=f[ja+8>>2];X=f[c>>2]|0;K=X+4|0;W=f[K>>2]|0;if(W>>>0<(f[X+8>>2]|0)>>>0){f[W>>2]=R;f[W+4>>2]=f[p>>2];f[W+8>>2]=f[r>>2];f[K>>2]=W+12}else Kf(X,e);f[v>>2]=(f[v>>2]|0)+1;X=S+1|0;if(X>>>0>=I>>>0){O=23;break b}S=X;Q=f[h>>2]|0}}}while(0);if((O|0)==23){O=0;ha=f[y>>2]|0}if(!ha){B=1;break}else F=ha}}while(0);ha=f[z>>2]|0;h=f[s>>2]|0;e=ha+(((h>>>0)/341|0)<<2)|0;c=f[x>>2]|0;ja=c;a=ha;if((c|0)==(ha|0)){ua=0;va=0}else{ia=(f[y>>2]|0)+h|0;ua=(f[ha+(((ia>>>0)/341|0)<<2)>>2]|0)+(((ia>>>0)%341|0)*12|0)|0;va=(f[e>>2]|0)+(((h>>>0)%341|0)*12|0)|0}h=e;e=va;d:while(1){va=e;do{ia=va;if((ua|0)==(ia|0))break d;va=ia+12|0}while((va-(f[h>>2]|0)|0)!=4092);va=h+4|0;h=va;e=f[va>>2]|0}f[y>>2]=0;y=ja-a>>2;if(y>>>0>2){a=ha;do{mp(f[a>>2]|0);a=(f[z>>2]|0)+4|0;f[z>>2]=a;wa=f[x>>2]|0;xa=wa-a>>2}while(xa>>>0>2);ya=xa;za=a;Aa=wa}else{ya=y;za=ha;Aa=c}switch(ya|0){case 1:{Ba=170;O=92;break}case 2:{Ba=341;O=92;break}default:{}}if((O|0)==92)f[s>>2]=Ba;if((za|0)!=(Aa|0)){Ba=za;do{mp(f[Ba>>2]|0);Ba=Ba+4|0}while((Ba|0)!=(Aa|0));Aa=f[z>>2]|0;z=f[x>>2]|0;if((z|0)!=(Aa|0))f[x>>2]=z+(~((z+-4-Aa|0)>>>2)<<2)}Aa=f[g>>2]|0;if(!Aa){u=d;return B|0}mp(Aa);u=d;return B|0}function tb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0;d=u;u=u+48|0;e=d+24|0;g=d;h=a+12|0;i=f[h>>2]|0;f[e>>2]=0;j=e+4|0;f[j>>2]=0;f[e+8>>2]=0;do if(i)if(i>>>0>1073741823)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f[y>>2]=A;a:do if(!A)B=1;else{q=a+104|0;p=e+4|0;r=e+8|0;v=a+8|0;w=a+92|0;m=a+48|0;j=a+44|0;k=a+36|0;i=a+4|0;n=a+16|0;o=a+88|0;C=a+76|0;D=a+84|0;E=e+4|0;F=e+8|0;G=A;while(1){H=f[s>>2]|0;I=G+-1|0;J=H+I|0;K=f[z>>2]|0;L=f[K+(((J>>>0)/341|0)<<2)>>2]|0;M=(J>>>0)%341|0;J=f[L+(M*12|0)>>2]|0;N=f[L+(M*12|0)+4>>2]|0;O=f[L+(M*12|0)+8>>2]|0;f[y>>2]=I;I=f[x>>2]|0;M=I-K>>2;if((1-G-H+((M|0)==0?0:(M*341|0)+-1|0)|0)>>>0>681){mp(f[I+-4>>2]|0);f[x>>2]=(f[x>>2]|0)+-4}I=f[l>>2]|0;M=I+(O*12|0)|0;H=(f[t>>2]|0)+(O*12|0)|0;if(J>>>0>b>>>0){B=0;break a}K=ql(a,J,H,N)|0;if(K>>>0>=(f[h>>2]|0)>>>0){B=0;break a}N=(f[a>>2]|0)-(f[(f[H>>2]|0)+(K<<2)>>2]|0)|0;b:do if(!N){if(J|0){L=0;do{P=f[M>>2]|0;Q=f[P>>2]|0;f[e>>2]=Q;f[E>>2]=f[P+4>>2];f[F>>2]=f[P+8>>2];P=f[c>>2]|0;R=P+4|0;S=f[R>>2]|0;if(S>>>0<(f[P+8>>2]|0)>>>0){f[S>>2]=Q;f[S+4>>2]=f[E>>2];f[S+8>>2]=f[F>>2];f[R>>2]=S+12}else Kf(P,e);f[v>>2]=(f[v>>2]|0)+1;L=L+1|0}while(L>>>0<J>>>0)}}else if(J>>>0<3){L=f[q>>2]|0;f[L>>2]=K;P=f[h>>2]|0;if(P>>>0>1){S=1;R=P;Q=K;while(1){Q=(Q|0)==(R+-1|0)?0:Q+1|0;f[L+(S<<2)>>2]=Q;S=S+1|0;T=f[h>>2]|0;if(S>>>0>=T>>>0){U=T;break}else R=T}}else U=P;if(!J)break;R=0;S=U;while(1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|0)>>2]|0)+(K<<2)|0;f[P>>2]=(f[P>>2]|0)+(1<<N+-1);P=(_(J|0)|0)^31;f[e>>2]=0;Eh(n,P,e);P=(J>>>1)-(f[e>>2]|0)|0;R=J-P|0;c:do if((P|0)==(R|0)){ha=P;ia=P}else{W=f[o>>2]|0;Q=f[D>>2]|0;do if((Q|0)!=(f[C>>2]|0)){T=(f[Q>>2]&1<<31-W|0)!=0;L=W+1|0;f[o>>2]=L;if((L|0)==32){f[D>>2]=Q+4;f[o>>2]=0;if(T){ha=P;ia=R;break c}else break}else if(T){ha=P;ia=R;break c}else break}while(0);ha=R;ia=P}while(0);P=f[t>>2]|0;R=f[P+(O*12|0)>>2]|0;Q=R+(K<<2)|0;f[Q>>2]=(f[Q>>2]|0)+1;ff(P+(S*12|0)|0,R,f[P+(O*12|0)+4>>2]|0);if(ha|0){P=f[x>>2]|0;R=f[z>>2]|0;Q=P-R>>2;W=f[s>>2]|0;T=f[y>>2]|0;if((((Q|0)==0?0:(Q*341|0)+-1|0)|0)==(T+W|0)){nc(g);ja=f[s>>2]|0;ka=f[y>>2]|0;la=f[x>>2]|0;ma=f[z>>2]|0}else{ja=W;ka=T;la=P;ma=R}R=ka+ja|0;if((la|0)==(ma|0))na=0;else na=(f[ma+(((R>>>0)/341|0)<<2)>>2]|0)+(((R>>>0)%341|0)*12|0)|0;f[na>>2]=ha;f[na+4>>2]=K;f[na+8>>2]=O;f[y>>2]=(f[y>>2]|0)+1}if(ia|0){R=f[x>>2]|0;P=f[z>>2]|0;T=R-P>>2;W=f[s>>2]|0;Q=f[y>>2]|0;if((((T|0)==0?0:(T*341|0)+-1|0)|0)==(Q+W|0)){nc(g);oa=f[s>>2]|0;pa=f[y>>2]|0;qa=f[x>>2]|0;ra=f[z>>2]|0}else{oa=W;pa=Q;qa=R;ra=P}P=pa+oa|0;if((qa|0)==(ra|0))sa=0;else sa=(f[ra+(((P>>>0)/341|0)<<2)>>2]|0)+(((P>>>0)%341|0)*12|0)|0;f[sa>>2]=ia;f[sa+4>>2]=K;f[sa+8>>2]=S;f[y>>2]=(f[y>>2]|0)+1}break}while(0);G=f[y>>2]|0;if(!G){B=1;break}}}while(0);sa=f[z>>2]|0;ia=f[s>>2]|0;ra=sa+(((ia>>>0)/341|0)<<2)|0;qa=f[x>>2]|0;oa=qa;pa=sa;if((qa|0)==(sa|0)){ta=0;ua=0}else{na=(f[y>>2]|0)+ia|0;ta=(f[sa+(((na>>>0)/341|0)<<2)>>2]|0)+(((na>>>0)%341|0)*12|0)|0;ua=(f[ra>>2]|0)+(((ia>>>0)%341|0)*12|0)|0}ia=ra;ra=ua;d:while(1){ua=ra;do{na=ua;if((ta|0)==(na|0))break d;ua=na+12|0}while((ua-(f[ia>>2]|0)|0)!=4092);ua=ia+4|0;ia=ua;ra=f[ua>>2]|0}f[y>>2]=0;y=oa-pa>>2;if(y>>>0>2){pa=sa;do{mp(f[pa>>2]|0);pa=(f[z>>2]|0)+4|0;f[z>>2]=pa;va=f[x>>2]|0;wa=va-pa>>2}while(wa>>>0>2);xa=wa;ya=pa;za=va}else{xa=y;ya=sa;za=qa}switch(xa|0){case 1:{Aa=170;Ba=92;break}case 2:{Aa=341;Ba=92;break}default:{}}if((Ba|0)==92)f[s>>2]=Aa;if((ya|0)!=(za|0)){Aa=ya;do{mp(f[Aa>>2]|0);Aa=Aa+4|0}while((Aa|0)!=(za|0));za=f[z>>2]|0;z=f[x>>2]|0;if((z|0)!=(za|0))f[x>>2]=z+(~((z+-4-za|0)>>>2)<<2)}za=f[g>>2]|0;if(!za){u=d;return B|0}mp(za);u=d;return B|0}function ub(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=Na,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0;d=u;u=u+720|0;e=d;g=d+688|0;i=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H>>0]|0;H=Vl(J|0,F|0,5,0)|0;F=o;f[F>>2]=H;f[F+4>>2]=I;if((D&255)>31){K=0;break}f[g>>2]=1276;f[p>>2]=-1;f[q>>2]=0;f[q+4>>2]=0;f[q+8>>2]=0;f[q+12>>2]=0;Kj(g,D&255,f[i>>2]|0,C,N);do if(bj(g,f[(f[v>>2]|0)+((((f[t>>2]|0)-(f[r>>2]|0)|0)/24|0)<<2)>>2]|0)|0){C=f[t>>2]|0;if((C|0)==(f[w>>2]|0)){Ae(r,g);O=0;break}f[C>>2]=1276;f[C+4>>2]=f[p>>2];P=C+8|0;f[P>>2]=0;D=C+12|0;f[D>>2]=0;f[C+16>>2]=0;F=(f[y>>2]|0)-(f[x>>2]|0)|0;H=F>>2;if(H|0){if(H>>>0>1073741823){B=20;break a}J=Yk(F)|0;f[D>>2]=J;f[P>>2]=J;f[C+16>>2]=J+(H<<2);H=f[x>>2]|0;F=(f[y>>2]|0)-H|0;if((F|0)>0){Ef(J|0,H|0,F|0)|0;f[D>>2]=J+(F>>>2<<2)}}f[C+20>>2]=f[z>>2];f[t>>2]=(f[t>>2]|0)+24;O=0}else O=1;while(0);f[g>>2]=1276;C=f[q>>2]|0;if(C|0){F=f[y>>2]|0;if((F|0)!=(C|0))f[y>>2]=F+(~((F+-4-C|0)>>>2)<<2);mp(C)}if(O|0){K=0;break}}A=A+1|0}if((B|0)==20)Do(P);if((B|0)==4){P=a+48|0;A=a+52|0;if((f[A>>2]|0)==(f[P>>2]|0))K=1;else{O=0;y=0;while(1){if(Nh(g,c)|0){q=f[g>>2]|0;Q=q<<31>>31^q>>>1}else Q=y;q=f[P>>2]|0;f[q+(O<<2)>>2]=Q;O=O+1|0;if(O>>>0>=(f[A>>2]|0)-q>>2>>>0){K=1;break}else y=Q}}}Q=f[i>>2]|0;if(Q|0){y=f[l>>2]|0;if((y|0)!=(Q|0))f[l>>2]=y+(~((y+-4-Q|0)>>>2)<<2);mp(Q)}R=K;u=d;return R|0}K=Pa[f[(f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l(x|0,q|0,2,0)|0;r=O;f[r>>2]=P;f[r+4>>2]=I;r=Vl(x|0,q|0,6,0)|0;w=I;if((T|0)<(w|0)|(T|0)==(w|0)&l>>>0<r>>>0){V=0;break b}v=z+P|0;P=h[v>>0]|h[v+1>>0]<<8|h[v+2>>0]<<16|h[v+3>>0]<<24;v=O;f[v>>2]=r;f[v+4>>2]=w;Jh(A,P)|0;Fm(i);Vf(k,g);P=Ud(i,c,k)|0;w=f[k+16>>2]|0;if(w|0){v=k+20|0;r=f[v>>2]|0;if((r|0)!=(w|0))f[v>>2]=r+(~(((r+-20-w|0)>>>0)/20|0)*20|0);mp(w)}w=f[k>>2]|0;if(w|0){r=k+4|0;if((f[r>>2]|0)!=(w|0))f[r>>2]=w;mp(w)}if(!P){V=0;break b}break}case 1:{if(!((T|0)>(p|0)|(T|0)==(p|0)&l>>>0>t>>>0)){V=0;break b}p=b[z+t>>0]|0;t=Vl(x|0,q|0,2,0)|0;P=O;f[P>>2]=t;f[P+4>>2]=I;if((p&255)>6){f[e>>2]=p&255;Ml(5038,e)|0;V=0;break b}P=Vl(x|0,q|0,6,0)|0;w=I;if((T|0)<(w|0)|(T|0)==(w|0)&l>>>0<P>>>0){V=0;break b}r=z+t|0;t=h[r>>0]|h[r+1>>0]<<8|h[r+2>>0]<<16|h[r+3>>0]<<24;r=O;f[r>>2]=P;f[r+4>>2]=w;if(!y){w=0;do{r=Qa[f[(f[U>>2]|0)+20>>2]&127](a,w)|0;P=(Pa[f[(f[a>>2]|0)+28>>2]&127](a)|0)+4|0;z=f[(f[(f[P>>2]|0)+8>>2]|0)+(r<<2)>>2]|0;Jh(z,t)|0;b[z+84>>0]=1;r=f[z+68>>2]|0;P=z+72|0;z=f[P>>2]|0;if((z|0)!=(r|0))f[P>>2]=z+(~((z+-4-r|0)>>>2)<<2);w=w+1|0}while(w>>>0<K>>>0)}Vf(i,g);switch(p<<24>>24){case 0:{ve(k,S);w=de(k,c,i)|0;ye(k);if(w)B=77;else W=1;break}case 1:{ve(k,S);w=ce(k,c,i)|0;ye(k);if(w)B=77;else W=1;break}case 2:{xe(k,S);w=fe(k,c,i)|0;Ke(k);if(w)B=77;else W=1;break}case 3:{xe(k,S);w=ee(k,c,i)|0;Ke(k);if(w)B=77;else W=1;break}case 4:{re(k,S);w=$d(k,c,i)|0;Be(k);if(w)B=77;else W=1;break}case 5:{re(k,S);w=_d(k,c,i)|0;Be(k);if(w)B=77;else W=1;break}case 6:{re(k,S);w=Zd(k,c,i)|0;Be(k);if(w)B=77;else W=1;break}default:W=1}if((B|0)==77)W=0;w=f[i+16>>2]|0;if(w|0){t=i+20|0;r=f[t>>2]|0;if((r|0)!=(w|0))f[t>>2]=r+(~(((r+-20-w|0)>>>0)/20|0)*20|0);mp(w)}w=f[i>>2]|0;if(w|0){r=i+4|0;if((f[r>>2]|0)!=(w|0))f[r>>2]=w;mp(w)}if(W|0){V=0;break b}break}default:{V=0;break b}}V=1}else V=0;while(0);W=f[g>>2]|0;if(W|0){g=f[Q>>2]|0;if((g|0)!=(W|0))f[Q>>2]=g+(~(((g+-20-W|0)>>>0)/20|0)*20|0);mp(W)}R=V;u=d;return R|0}function vb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=Na,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vl(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;if(!(b[a+32>>0]|0)){r=o;m=0;while(1){s=$(b[r>>0]|0);n[g+(m<<2)>>2]=s;m=m+1|0;q=b[k>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){t=q;break}else r=r+1|0}}else{r=o;m=0;while(1){s=$($(b[r>>0]|0)/$(127.0));n[g+(m<<2)>>2]=s;m=m+1|0;q=b[k>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){t=q;break}else r=r+1|0}}}else t=l;r=t<<24>>24;if(t<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 2:{r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;q=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;u=Vl(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+u|0;if(!(b[a+32>>0]|0)){u=o;k=0;while(1){s=$(h[u>>0]|0);n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){v=q;break}else u=u+1|0}}else{u=o;k=0;while(1){s=$($(h[u>>0]|0)/$(255.0));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){v=l;break}else u=u+1|0}}}else v=m;u=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 3:{u=a+48|0;k=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vl(al(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,k|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;l=0;while(1){s=$(d[u>>1]|0);n[g+(l<<2)>>2]=s;l=l+1|0;q=b[r>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){w=q;break}else u=u+2|0}}else{u=o;l=0;while(1){s=$($(d[u>>1]|0)/$(32767.0));n[g+(l<<2)>>2]=s;l=l+1|0;m=b[r>>0]|0;if((l|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else u=u+2|0}}else w=k;u=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 4:{u=a+48|0;l=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vl(al(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,l|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;m=0;while(1){s=$(j[u>>1]|0);n[g+(m<<2)>>2]=s;m=m+1|0;q=b[r>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){x=q;break}else u=u+2|0}}else{u=o;m=0;while(1){s=$($(j[u>>1]|0)/$(65535.0));n[g+(m<<2)>>2]=s;m=m+1|0;k=b[r>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){x=k;break}else u=u+2|0}}else x=l;u=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 5:{u=a+48|0;m=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vl(al(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,m|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;k=0;while(1){s=$(f[u>>2]|0);n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){y=q;break}else u=u+4|0}}else{u=o;k=0;while(1){s=$($(f[u>>2]|0)*$(4.65661287e-10));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){y=l;break}else u=u+4|0}}else y=m;u=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 6:{u=a+48|0;k=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vl(al(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,k|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;l=0;while(1){s=$((f[u>>2]|0)>>>0);n[g+(l<<2)>>2]=s;l=l+1|0;q=b[r>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){z=q;break}else u=u+4|0}}else{u=o;l=0;while(1){s=$($((f[u>>2]|0)>>>0)*$(2.32830644e-10));n[g+(l<<2)>>2]=s;l=l+1|0;m=b[r>>0]|0;if((l|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){z=m;break}else u=u+4|0}}else z=k;u=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 7:{u=a+48|0;l=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vl(al(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,l|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;m=0;while(1){q=u;s=$(+((f[q>>2]|0)>>>0)+4294967296.0*+(f[q+4>>2]|0));n[g+(m<<2)>>2]=s;m=m+1|0;q=b[r>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else u=u+8|0}}else{u=o;m=0;while(1){k=u;s=$($(+((f[k>>2]|0)>>>0)+4294967296.0*+(f[k+4>>2]|0))*$(1.08420217e-19));n[g+(m<<2)>>2]=s;m=m+1|0;k=b[r>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){A=k;break}else u=u+8|0}}else A=l;u=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 8:{u=a+48|0;m=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vl(al(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,m|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;k=0;while(1){q=u;s=$(+((f[q>>2]|0)>>>0)+4294967296.0*+((f[q+4>>2]|0)>>>0));n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){B=q;break}else u=u+8|0}}else{u=o;k=0;while(1){l=u;s=$($(+((f[l>>2]|0)>>>0)+4294967296.0*+((f[l+4>>2]|0)>>>0))*$(5.42101086e-20));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){B=l;break}else u=u+8|0}}else B=m;u=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 9:{u=a+24|0;k=b[u>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){r=f[f[a>>2]>>2]|0;o=a+40|0;l=al(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;q=Vl(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=r+q|0;q=0;while(1){f[g+(q<<2)>>2]=f[o>>2];q=q+1|0;r=b[u>>0]|0;if((q|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){C=r;break}else o=o+4|0}}else C=k;o=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 10:{o=a+24|0;q=b[o>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){u=f[f[a>>2]>>2]|0;m=a+40|0;r=al(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;l=Vl(r|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=u+l|0;l=0;while(1){s=$(+p[m>>3]);n[g+(l<<2)>>2]=s;l=l+1|0;u=b[o>>0]|0;if((l|0)>=((u<<24>>24>e<<24>>24?e:u)<<24>>24|0)){D=u;break}else m=m+8|0}}else D=q;m=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 11:{m=a+24|0;l=b[m>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){o=f[f[a>>2]>>2]|0;k=a+40|0;u=al(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=Vl(u|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=o+r|0;r=0;while(1){s=$((b[k>>0]|0)!=0&1);n[g+(r<<2)>>2]=s;r=r+1|0;o=b[m>>0]|0;if((r|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){E=o;break}else k=k+1|0}}else E=l;k=E<<24>>24;if(E<<24>>24>=e<<24>>24){i=1;return i|0}Dh(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}
+function Tf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=32768){if((h|0)!=32768?(e=i+131072|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else Og(a,32768-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else Of(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>32768){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==32768;return k|0}function Uf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=65536){if((h|0)!=65536?(e=i+262144|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else Og(a,65536-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else Of(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>65536){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==65536;return k|0}function Vf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f[a>>2]=0;c=a+4|0;f[c>>2]=0;f[a+8>>2]=0;d=a+16|0;ci(d,b);f[a+28>>2]=0;b=f[a+20>>2]|0;e=f[d>>2]|0;d=e;if((b|0)!=(e|0)){g=(b-e|0)/20|0;e=0;b=0;do{h=X(f[d+(e*20|0)+16>>2]|0,f[d+(e*20|0)+12>>2]|0)|0;b=b>>>0<h>>>0?h:b;e=e+1|0}while(e>>>0<g>>>0);g=f[c>>2]|0;e=f[a>>2]|0;d=g-e|0;if(b>>>0>d>>>0){Rg(a,b-d|0);i=f[a>>2]|0;j=a+12|0;f[j>>2]=i;return}else{k=b;l=g;m=e;n=d}}else{d=f[c>>2]|0;e=f[a>>2]|0;k=0;l=d;m=e;n=d-e|0}if(k>>>0>=n>>>0){i=m;j=a+12|0;f[j>>2]=i;return}n=m+k|0;if((n|0)==(l|0)){i=m;j=a+12|0;f[j>>2]=i;return}f[c>>2]=n;i=m;j=a+12|0;f[j>>2]=i;return}function Wf(a,b){a=a|0;b=b|0;var c=0;c=a+8|0;te(c,b)|0;if((c|0)==(b|0)){f[a+92>>2]=f[b+84>>2];return}else{Re(a+56|0,f[b+48>>2]|0,f[b+52>>2]|0);Re(a+68|0,f[b+60>>2]|0,f[b+64>>2]|0);Re(a+80|0,f[b+72>>2]|0,f[b+76>>2]|0);f[a+92>>2]=f[b+84>>2];ff(a+96|0,f[b+88>>2]|0,f[b+92>>2]|0);return}}function Xf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=8192){if((h|0)!=8192?(e=i+32768|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else Og(a,8192-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else Of(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>8192){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==8192;return k|0}function Yf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=4096){if((h|0)!=4096?(e=i+16384|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else Og(a,4096-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else Of(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>4096){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==4096;return k|0}function Zf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=u;u=u+224|0;g=e+120|0;h=e+80|0;i=e;j=e+136|0;k=h;l=k+40|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(l|0));f[g>>2]=f[d>>2];if((Bb(0,c,g,i,h)|0)<0)m=-1;else{if((f[a+76>>2]|0)>-1)n=rp(a)|0;else n=0;d=f[a>>2]|0;k=d&32;if((b[a+74>>0]|0)<1)f[a>>2]=d&-33;d=a+48|0;if(!(f[d>>2]|0)){l=a+44|0;o=f[l>>2]|0;f[l>>2]=j;p=a+28|0;f[p>>2]=j;q=a+20|0;f[q>>2]=j;f[d>>2]=80;r=a+16|0;f[r>>2]=j+80;j=Bb(a,c,g,i,h)|0;if(!o)s=j;else{Ra[f[a+36>>2]&31](a,0,0)|0;t=(f[q>>2]|0)==0?-1:j;f[l>>2]=o;f[d>>2]=0;f[r>>2]=0;f[p>>2]=0;f[q>>2]=0;s=t}}else s=Bb(a,c,g,i,h)|0;h=f[a>>2]|0;f[a>>2]=h|k;if(n|0)qp(a);m=(h&32|0)==0?s:-1}u=e;return m|0}function _f(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e>>2;h=d;if(g>>>0<b>>>0){ue(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+(b<<2)|0;if((g|0)==(h|0))return;else i=h;do{h=i+-4|0;f[c>>2]=h;b=f[h>>2]|0;f[h>>2]=0;if(b|0){h=b+88|0;e=f[h>>2]|0;f[h>>2]=0;if(e|0){h=f[e+8>>2]|0;if(h|0){a=e+12|0;if((f[a>>2]|0)!=(h|0))f[a>>2]=h;mp(h)}mp(e)}e=f[b+68>>2]|0;if(e|0){h=b+72|0;a=f[h>>2]|0;if((a|0)!=(e|0))f[h>>2]=a+(~((a+-4-e|0)>>>2)<<2);mp(e)}e=b+64|0;a=f[e>>2]|0;f[e>>2]=0;if(a|0){e=f[a>>2]|0;if(e|0){h=a+4|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;mp(e)}mp(a)}mp(b)}i=f[c>>2]|0}while((i|0)!=(g|0));return}function $f(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;i=h;if(e-h>>2>>>0>=b>>>0){j=b;k=i;while(1){f[k>>2]=f[c>>2];j=j+-1|0;if(!j)break;else k=k+4|0}f[g>>2]=i+(b<<2);return}i=f[a>>2]|0;k=h-i|0;h=k>>2;j=h+b|0;if(j>>>0>1073741823)Do(a);l=e-i|0;e=l>>1;m=l>>2>>>0<536870911?(e>>>0<j>>>0?j:e):1073741823;do if(m)if(m>>>0>1073741823){e=ra(8)|0;dn(e,13708);f[e>>2]=4852;va(e|0,1176,105)}else{e=Yk(m<<2)|0;n=e;o=e;break}else{n=0;o=0}while(0);e=n+(h<<2)|0;h=n+(m<<2)|0;m=b;j=e;while(1){f[j>>2]=f[c>>2];m=m+-1|0;if(!m)break;else j=j+4|0}if((k|0)>0)Ef(o|0,i|0,k|0)|0;f[a>>2]=n;f[g>>2]=e+(b<<2);f[d>>2]=h;if(!i)return;mp(i);return}function ag(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=(f[a>>2]|0)+1794895138|0;g=Hn(f[a+8>>2]|0,e)|0;h=Hn(f[a+12>>2]|0,e)|0;i=Hn(f[a+16>>2]|0,e)|0;a:do if((g>>>0<c>>>2>>>0?(j=c-(g<<2)|0,h>>>0<j>>>0&i>>>0<j>>>0):0)?((i|h)&3|0)==0:0){j=h>>>2;k=i>>>2;l=0;m=g;while(1){n=m>>>1;o=l+n|0;p=o<<1;q=p+j|0;r=Hn(f[a+(q<<2)>>2]|0,e)|0;s=Hn(f[a+(q+1<<2)>>2]|0,e)|0;if(!(s>>>0<c>>>0&r>>>0<(c-s|0)>>>0)){t=0;break a}if(b[a+(s+r)>>0]|0){t=0;break a}r=rj(d,a+s|0)|0;if(!r)break;s=(r|0)<0;if((m|0)==1){t=0;break a}else{l=s?l:o;m=s?n:m-n|0}}m=p+k|0;l=Hn(f[a+(m<<2)>>2]|0,e)|0;j=Hn(f[a+(m+1<<2)>>2]|0,e)|0;if(j>>>0<c>>>0&l>>>0<(c-j|0)>>>0)t=(b[a+(j+l)>>0]|0)==0?a+j|0:0;else t=0}else t=0;while(0);return t|0}function bg(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h=u;u=u+64|0;i=h;j=f[a>>2]|0;k=a+(f[j+-8>>2]|0)|0;l=f[j+-4>>2]|0;f[i>>2]=e;f[i+4>>2]=a;f[i+8>>2]=c;f[i+12>>2]=g;g=i+16|0;c=i+20|0;a=i+24|0;j=i+28|0;m=i+32|0;n=i+40|0;o=g;p=o+36|0;do{f[o>>2]=0;o=o+4|0}while((o|0)<(p|0));d[g+36>>1]=0;b[g+38>>0]=0;a:do if(Gn(l,e,0)|0){f[i+48>>2]=1;Za[f[(f[l>>2]|0)+20>>2]&3](l,i,k,k,1,0);q=(f[a>>2]|0)==1?k:0}else{Ya[f[(f[l>>2]|0)+24>>2]&3](l,i,k,1,0);switch(f[i+36>>2]|0){case 0:{q=(f[n>>2]|0)==1&(f[j>>2]|0)==1&(f[m>>2]|0)==1?f[c>>2]|0:0;break a;break}case 1:break;default:{q=0;break a}}if((f[a>>2]|0)!=1?!((f[n>>2]|0)==0&(f[j>>2]|0)==1&(f[m>>2]|0)==1):0){q=0;break}q=f[g>>2]|0}while(0);u=h;return q|0}function cg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=Na;d=u;u=u+32|0;e=d+16|0;g=d;h=a+8|0;i=b[(f[h>>2]|0)+24>>0]<<2;j=f[a+16>>2]|0;if(!(f[j+80>>2]|0))k=0;else k=(f[f[j>>2]>>2]|0)+(f[j+48>>2]|0)|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;j=f[a+24>>2]|0;if((j+-2|0)>>>0>28){l=0;u=d;return l|0}f[g>>2]=j;a=1<<j;f[g+4>>2]=a+-1;j=a+-2|0;a=g+8|0;f[a>>2]=j;f[g+12>>2]=(j|0)/2|0;if(!c){l=1;u=d;return l|0}m=0;n=0;o=0;p=j;while(1){q=$($(1.0)/$(p|0));Ue(g,$(q*$(f[k+(m<<2)>>2]|0)),$(q*$(f[k+((m|1)<<2)>>2]|0)),e);Ef((f[f[(f[h>>2]|0)+64>>2]>>2]|0)+o|0,e|0,i|0)|0;j=n+1|0;if((j|0)==(c|0)){l=1;break}m=m+2|0;n=j;o=o+i|0;p=f[a>>2]|0}u=d;return l|0}function dg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(d-g>>2>>>0>=b>>>0){i=b;j=h;while(1){f[j>>2]=1;i=i+-1|0;if(!i)break;else j=j+4|0}f[e>>2]=h+(b<<2);return}h=f[a>>2]|0;j=g-h|0;g=j>>2;i=g+b|0;if(i>>>0>1073741823)Do(a);k=d-h|0;d=k>>1;l=k>>2>>>0<536870911?(d>>>0<i>>>0?i:d):1073741823;do if(l)if(l>>>0>1073741823){d=ra(8)|0;dn(d,13708);f[d>>2]=4852;va(d|0,1176,105)}else{d=Yk(l<<2)|0;m=d;n=d;break}else{m=0;n=0}while(0);d=m+(g<<2)|0;g=m+(l<<2)|0;l=b;i=d;while(1){f[i>>2]=1;l=l+-1|0;if(!l)break;else i=i+4|0}if((j|0)>0)Ef(n|0,h|0,j|0)|0;f[a>>2]=m;f[e>>2]=d+(b<<2);f[c>>2]=g;if(!h)return;mp(h);return}function eg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a+12|0;d=f[a>>2]|0;e=a+8|0;g=f[e>>2]|0;h=(g|0)==-1;if(!(b[c>>0]|0)){do if((!h?(i=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(i|0)!=-1):0)?(j=f[(f[d+12>>2]|0)+(i<<2)>>2]|0,(j|0)!=-1):0)if(!((j>>>0)%3|0)){k=j+2|0;break}else{k=j+-1|0;break}else k=-1;while(0);f[e>>2]=k;return}k=g+1|0;if((!h?(h=((k>>>0)%3|0|0)==0?g+-2|0:k,(h|0)!=-1):0)?(k=f[(f[d+12>>2]|0)+(h<<2)>>2]|0,h=k+1|0,(k|0)!=-1):0){g=((h>>>0)%3|0|0)==0?k+-2|0:h;f[e>>2]=g;if((g|0)!=-1){if((g|0)!=(f[a+4>>2]|0))return;f[e>>2]=-1;return}}else f[e>>2]=-1;g=f[a+4>>2]|0;do if(((g|0)!=-1?(a=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(a|0)!=-1):0)?(h=f[(f[d+12>>2]|0)+(a<<2)>>2]|0,(h|0)!=-1):0)if(!((h>>>0)%3|0)){l=h+2|0;break}else{l=h+-1|0;break}else l=-1;while(0);f[e>>2]=l;b[c>>0]=0;return}function fg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=f[a+4>>2]|0;if(!d){e=0;return e|0}a=b[c+11>>0]|0;g=a<<24>>24<0;h=g?f[c+4>>2]|0:a&255;a=g?f[c>>2]|0:c;c=d;while(1){d=c+16|0;g=b[d+11>>0]|0;i=g<<24>>24<0;j=i?f[c+20>>2]|0:g&255;g=j>>>0<h>>>0;k=g?j:h;if((k|0)!=0?(l=fj(a,i?f[d>>2]|0:d,k)|0,(l|0)!=0):0)if((l|0)<0)m=7;else m=8;else if(h>>>0<j>>>0)m=7;else m=8;if((m|0)==7){m=0;n=c}else if((m|0)==8){m=0;l=h>>>0<j>>>0?h:j;if((l|0)!=0?(j=fj(i?f[d>>2]|0:d,a,l)|0,(j|0)!=0):0){if((j|0)>=0){e=1;m=14;break}}else m=10;if((m|0)==10?(m=0,!g):0){e=1;m=14;break}n=c+4|0}c=f[n>>2]|0;if(!c){e=0;m=14;break}}if((m|0)==14)return e|0;return 0}function gg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=u;u=u+32|0;e=d+12|0;g=d;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;h=Rh(c)|0;if(h>>>0>4294967279)Do(e);if(h>>>0<11){b[e+11>>0]=h;if(!h)i=e;else{j=e;k=6}}else{l=h+16&-16;m=Yk(l)|0;f[e>>2]=m;f[e+8>>2]=l|-2147483648;f[e+4>>2]=h;j=m;k=6}if((k|0)==6){Ef(j|0,c|0,h|0)|0;i=j}b[i+h>>0]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=g+11|0;b[h>>0]=4;f[g>>2]=1701667182;b[g+4>>0]=0;i=f[a+4>>2]|0;if((i|0)!=0?(j=Dd(i,g,e)|0,(j|0)!=0):0)n=dj(a,f[j+40>>2]|0)|0;else n=-1;if((b[h>>0]|0)<0)mp(f[g>>2]|0);if((b[e+11>>0]|0)>=0){u=d;return n|0}mp(f[e>>2]|0);u=d;return n|0}function hg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,i=0;if((b|0)==-2)g=0;else{i=f[(f[(f[d+4>>2]|0)+8>>2]|0)+(c<<2)>>2]|0;do if((Pa[f[(f[d>>2]|0)+8>>2]&127](d)|0)==1){Oe(a,d,b,c,e,((h[d+36>>0]|0)<<8|(h[d+37>>0]|0))&65535);if(!(f[a>>2]|0)){f[a>>2]=0;break}else return}while(0);d=Yk(44)|0;f[d>>2]=1584;f[d+4>>2]=i;i=d+8|0;f[i>>2]=f[e>>2];f[i+4>>2]=f[e+4>>2];f[i+8>>2]=f[e+8>>2];f[i+12>>2]=f[e+12>>2];f[i+16>>2]=f[e+16>>2];f[i+20>>2]=f[e+20>>2];ni(d+32|0,e+24|0);f[d>>2]=1640;g=d}f[a>>2]=g;return}function ig(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+16|0;if(b[d+84>>0]|0){g=f[e>>2]|0;return g|0}a=f[e>>2]|0;if(!a){g=f[e>>2]|0;return g|0}h=a+84|0;if(!(b[h>>0]|0)){g=f[e>>2]|0;return g|0}i=(f[d+72>>2]|0)-(f[d+68>>2]|0)>>2;b[h>>0]=0;h=a+68|0;j=a+72|0;a=f[j>>2]|0;k=f[h>>2]|0;l=a-k>>2;m=k;k=a;if(i>>>0<=l>>>0)if(i>>>0<l>>>0?(a=m+(i<<2)|0,(a|0)!=(k|0)):0){f[j>>2]=k+(~((k+-4-a|0)>>>2)<<2);n=d}else n=d;else{$f(h,i-l|0,1452);n=f[c>>2]|0}if(b[n+84>>0]|0){g=f[e>>2]|0;return g|0}c=f[n+68>>2]|0;l=c;i=(f[n+72>>2]|0)-c>>2;if(!i){g=f[e>>2]|0;return g|0}c=f[(f[e>>2]|0)+68>>2]|0;n=0;do{f[c+(n<<2)>>2]=f[l+(n<<2)>>2];n=n+1|0}while(n>>>0<i>>>0);g=f[e>>2]|0;return g|0}function jg(a){a=a|0;Zm(a);Zm(a+16|0);Zm(a+32|0);Zm(a+48|0);Zm(a+64|0);Zm(a+80|0);Zm(a+96|0);Zm(a+112|0);Zm(a+128|0);Zm(a+144|0);Zm(a+160|0);Zm(a+176|0);Zm(a+192|0);Zm(a+208|0);Zm(a+224|0);Zm(a+240|0);Zm(a+256|0);Zm(a+272|0);Zm(a+288|0);Zm(a+304|0);Zm(a+320|0);Zm(a+336|0);Zm(a+352|0);Zm(a+368|0);Zm(a+384|0);Zm(a+400|0);Zm(a+416|0);Zm(a+432|0);Zm(a+448|0);Zm(a+464|0);Zm(a+480|0);Zm(a+496|0);return}function kg(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=a+8|0;g=f[e>>2]|0;h=b[g+24>>0]|0;i=h<<24>>24;j=i<<1;k=jp(i>>>0>2147483647?-1:i<<1)|0;l=f[a+16>>2]|0;if(!(f[l+80>>2]|0))m=0;else m=(f[f[l>>2]>>2]|0)+(f[l+48>>2]|0)|0;if(!c){kp(k);return}if(h<<24>>24>0){h=0;l=0;a=0;while(1){n=0;o=a;while(1){d[k+(n<<1)>>1]=f[m+(o<<2)>>2];n=n+1|0;if((n|0)==(i|0))break;else o=o+1|0}Ef((f[f[(f[e>>2]|0)+64>>2]>>2]|0)+l|0,k|0,j|0)|0;h=h+1|0;if((h|0)==(c|0))break;else{l=l+j|0;a=a+i|0}}kp(k);return}else{Ef(f[f[g+64>>2]>>2]|0,k|0,j|0)|0;if((c|0)==1){kp(k);return}else{p=0;q=1}do{p=p+j|0;Ef((f[f[(f[e>>2]|0)+64>>2]>>2]|0)+p|0,k|0,j|0)|0;q=q+1|0}while((q|0)!=(c|0));kp(k);return}}function lg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=a+8|0;e=f[d>>2]|0;g=b[e+24>>0]|0;h=g<<24>>24;i=h<<2;j=jp(h>>>0>1073741823?-1:h<<2)|0;k=f[a+16>>2]|0;if(!(f[k+80>>2]|0))l=0;else l=(f[f[k>>2]>>2]|0)+(f[k+48>>2]|0)|0;if(!c){kp(j);return}if(g<<24>>24>0){g=0;k=0;a=0;while(1){m=0;n=a;while(1){f[j+(m<<2)>>2]=f[l+(n<<2)>>2];m=m+1|0;if((m|0)==(h|0))break;else n=n+1|0}Ef((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+k|0,j|0,i|0)|0;g=g+1|0;if((g|0)==(c|0))break;else{k=k+i|0;a=a+h|0}}kp(j);return}else{Ef(f[f[e+64>>2]>>2]|0,j|0,i|0)|0;if((c|0)==1){kp(j);return}else{o=0;p=1}do{o=o+i|0;Ef((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+o|0,j|0,i|0)|0;p=p+1|0}while((p|0)!=(c|0));kp(j);return}}function mg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=f[a+196>>2]|0;if(b|0){c=a+200|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=a+184|0;d=f[b>>2]|0;if(d|0){c=a+188|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;while(1){e=h+-12|0;f[c>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);mp(i);j=f[c>>2]|0}if((j|0)==(d|0))break;else h=j}g=f[b>>2]|0}mp(g)}g=f[a+156>>2]|0;if(g|0){b=a+160|0;j=f[b>>2]|0;if((j|0)!=(g|0))f[b>>2]=j+(~((j+-4-g|0)>>>2)<<2);mp(g)}g=a+136|0;a=f[g>>2]|0;f[g>>2]=0;if(!a)return;g=a+-4|0;j=f[g>>2]|0;if(j|0){b=a+(j<<4)|0;do b=b+-16|0;while((b|0)!=(a|0))}kp(g);return}function ng(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+32|0;e=d+16|0;g=d;switch(c<<24>>24){case 0:{c=Yk(48)|0;Yn(c);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=c;u=d;return}case 1:{c=Yk(52)|0;an(c);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=c;u=d;return}default:{c=Yk(32)|0;f[g>>2]=c;f[g+8>>2]=-2147483616;f[g+4>>2]=28;h=c;i=11797;j=h+28|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[c+28>>0]=0;f[e>>2]=-1;c=e+4|0;zh(c,g);f[a>>2]=f[e>>2];zh(a+4|0,c);f[a+16>>2]=0;if((b[c+11>>0]|0)<0)mp(f[c>>2]|0);if((b[g+11>>0]|0)<0)mp(f[g>>2]|0);u=d;return}}}function og(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=(d-e|0)/144|0;h=d;if(g>>>0<b>>>0){Bd(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+(b*144|0)|0;if((g|0)==(h|0))return;else i=h;do{f[c>>2]=i+-144;h=f[i+-12>>2]|0;if(h|0){b=i+-8|0;e=f[b>>2]|0;if((e|0)!=(h|0))f[b>>2]=e+(~((e+-4-h|0)>>>2)<<2);mp(h)}h=f[i+-28>>2]|0;if(h|0){e=i+-24|0;b=f[e>>2]|0;if((b|0)!=(h|0))f[e>>2]=b+(~((b+-4-h|0)>>>2)<<2);mp(h)}h=f[i+-40>>2]|0;if(h|0){b=i+-36|0;e=f[b>>2]|0;if((e|0)!=(h|0))f[b>>2]=e+(~((e+-4-h|0)>>>2)<<2);mp(h)}ah(i+-140|0);i=f[c>>2]|0}while((i|0)!=(g|0));return}function pg(a,b){a=a|0;b=b|0;var c=0,d=Na,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){yc(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;yc(a,e);return}function qg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=1464;b=a+60|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Ua[f[(f[c>>2]|0)+4>>2]&127](c);c=f[a+48>>2]|0;if(c|0){b=a+52|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);mp(c)}c=a+36|0;d=f[c>>2]|0;if(d|0){b=a+40|0;e=f[b>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[b>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0)Ua[f[(f[i>>2]|0)+4>>2]&127](i);h=f[b>>2]|0}while((h|0)!=(d|0));g=f[c>>2]|0}mp(g)}f[a>>2]=1304;g=f[a+16>>2]|0;if(g|0){c=a+20|0;d=f[c>>2]|0;if((d|0)!=(g|0))f[c>>2]=d+(~((d+-4-g|0)>>>2)<<2);mp(g)}g=f[a+4>>2]|0;if(!g)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(g|0))f[d>>2]=a+(~((a+-4-g|0)>>>2)<<2);mp(g);return}function rg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d;do{d=g+-4|0;f[c>>2]=d;h=f[d>>2]|0;f[d>>2]=0;if(h|0){d=h+88|0;i=f[d>>2]|0;f[d>>2]=0;if(i|0){d=f[i+8>>2]|0;if(d|0){j=i+12|0;if((f[j>>2]|0)!=(d|0))f[j>>2]=d;mp(d)}mp(i)}i=f[h+68>>2]|0;if(i|0){d=h+72|0;j=f[d>>2]|0;if((j|0)!=(i|0))f[d>>2]=j+(~((j+-4-i|0)>>>2)<<2);mp(i)}i=h+64|0;j=f[i>>2]|0;f[i>>2]=0;if(j|0){i=f[j>>2]|0;if(i|0){d=j+4|0;if((f[d>>2]|0)!=(i|0))f[d>>2]=i;mp(i)}mp(j)}mp(h)}g=f[c>>2]|0}while((g|0)!=(b|0));e=f[a>>2]|0}mp(e);return}function sg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=(d|0)<0;do if(!b){if(e){g=0;return g|0}h=a+4|0;i=f[h>>2]|0;j=f[a>>2]|0;k=i-j|0;if(k>>>0<c>>>0){Rg(a,c-k|0);break}if(k>>>0>c>>>0?(k=j+c|0,(k|0)!=(i|0)):0)f[h>>2]=k}else{if(e){g=0;return g|0}k=a+4|0;h=f[k>>2]|0;i=f[a>>2]|0;j=h-i|0;do if(0<(d|0)|0==(d|0)&j>>>0<c>>>0){if(j>>>0<c>>>0){Rg(a,c-j|0);break}if(j>>>0>c>>>0?(l=i+c|0,(l|0)!=(h|0)):0){f[k>>2]=l;m=15}else m=15}else m=15;while(0);if((m|0)==15?(c|0)==0:0)break;kk(f[a>>2]|0,b|0,c|0)|0}while(0);c=a+24|0;a=c;b=Vl(f[a>>2]|0,f[a+4>>2]|0,1,0)|0;a=c;f[a>>2]=b;f[a+4>>2]=I;g=1;return g|0}function tg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0;c=b+8|0;d=f[c>>2]|0;e=f[c+4>>2]|0;c=b+16|0;g=c;i=f[g>>2]|0;k=f[g+4>>2]|0;g=Vl(i|0,k|0,4,0)|0;l=I;if((e|0)<(l|0)|(e|0)==(l|0)&d>>>0<g>>>0){m=0;return m|0}n=(f[b>>2]|0)+i|0;o=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;n=c;f[n>>2]=g;f[n+4>>2]=l;do if((j[b+38>>1]|0)<514){l=Vl(i|0,k|0,8,0)|0;n=I;if((e|0)<(n|0)|(e|0)==(n|0)&d>>>0<l>>>0){m=0;return m|0}else{g=c;f[g>>2]=l;f[g+4>>2]=n;break}}while(0);if(!(o&1)){m=0;return m|0}c=(_(o|0)|0)^31;if((c+-1|0)>>>0>28){m=0;return m|0}f[a+8>>2]=c+1;o=2<<c;f[a+12>>2]=o+-1;c=o+-2|0;f[a+16>>2]=c;f[a+20>>2]=(c|0)/2|0;m=1;return m|0}function ug(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=f[a+4>>2]|0;c=a+8|0;d=f[c>>2]|0;if((d|0)!=(b|0)){e=d;do{d=e+-4|0;f[c>>2]=d;g=f[d>>2]|0;f[d>>2]=0;if(g|0){d=g+88|0;h=f[d>>2]|0;f[d>>2]=0;if(h|0){d=f[h+8>>2]|0;if(d|0){i=h+12|0;if((f[i>>2]|0)!=(d|0))f[i>>2]=d;mp(d)}mp(h)}h=f[g+68>>2]|0;if(h|0){d=g+72|0;i=f[d>>2]|0;if((i|0)!=(h|0))f[d>>2]=i+(~((i+-4-h|0)>>>2)<<2);mp(h)}h=g+64|0;i=f[h>>2]|0;f[h>>2]=0;if(i|0){h=f[i>>2]|0;if(h|0){d=i+4|0;if((f[d>>2]|0)!=(h|0))f[d>>2]=h;mp(h)}mp(i)}mp(g)}e=f[c>>2]|0}while((e|0)!=(b|0))}b=f[a>>2]|0;if(!b)return;mp(b);return}function vg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=Yk(72)|0;gl(c);d=c;if((b|0)<0){Ua[f[(f[c>>2]|0)+4>>2]&127](c);e=0;return e|0}c=a+8|0;g=a+12|0;a=f[g>>2]|0;h=f[c>>2]|0;i=a-h>>2;do if((i|0)<=(b|0)){j=b+1|0;k=a;if(j>>>0>i>>>0){cf(c,j-i|0);break}if(j>>>0<i>>>0?(l=h+(j<<2)|0,(l|0)!=(k|0)):0){j=k;do{k=j+-4|0;f[g>>2]=k;m=f[k>>2]|0;f[k>>2]=0;if(m|0)Ua[f[(f[m>>2]|0)+4>>2]&127](m);j=f[g>>2]|0}while((j|0)!=(l|0))}}while(0);g=(f[c>>2]|0)+(b<<2)|0;b=f[g>>2]|0;f[g>>2]=d;if(!b){e=1;return e|0}Ua[f[(f[b>>2]|0)+4>>2]&127](b);e=1;return e|0}function wg(a,b){a=a|0;b=b|0;var c=0,d=Na,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Ic(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;Ic(a,e);return}function xg(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=Yk(32)|0;f[a>>2]=g;f[a+4>>2]=c+8;c=a+8|0;b[c>>0]=0;h=g+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;h=g+20|0;i=e+12|0;f[h>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;g=e+16|0;e=f[g>>2]|0;j=f[i>>2]|0;k=e-j|0;if(!k){l=j;m=e;n=0}else{Rg(h,k);l=f[i>>2]|0;m=f[g>>2]|0;n=f[h>>2]|0}Ef(n|0,l|0,m-l|0)|0;b[c>>0]=1;c=f[a>>2]|0;f[c+4>>2]=d;f[c>>2]=0;return}function yg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=a+60|0;d=f[c>>2]|0;if(!d){e=0;return e|0}f[d+4>>2]=a+48;if(!(Pa[f[(f[d>>2]|0)+12>>2]&127](d)|0)){e=0;return e|0}d=Pa[f[(f[a>>2]|0)+24>>2]&127](a)|0;a:do if((d|0)>0){g=0;while(1){h=(Pa[f[(f[a>>2]|0)+28>>2]&127](a)|0)+4|0;i=f[h>>2]|0;h=Qa[f[(f[a>>2]|0)+20>>2]&127](a,g)|0;j=f[c>>2]|0;g=g+1|0;if(!(Qa[f[(f[j>>2]|0)+8>>2]&127](j,f[(f[i+8>>2]|0)+(h<<2)>>2]|0)|0)){e=0;break}if((g|0)>=(d|0))break a}return e|0}while(0);if(!(Qa[f[(f[a>>2]|0)+36>>2]&127](a,b)|0)){e=0;return e|0}if(!(Qa[f[(f[a>>2]|0)+40>>2]&127](a,b)|0)){e=0;return e|0}e=Pa[f[(f[a>>2]|0)+44>>2]&127](a)|0;return e|0}function zg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a=u;u=u+32|0;e=a+12|0;g=a;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=Rh(d)|0;if(h>>>0>4294967279)Do(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=Yk(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){Ef(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;Ah(c,g,e)|0;c=e+11|0;h=b[c>>0]|0;i=h<<24>>24<0?f[e>>2]|0:e;if((b[g+11>>0]|0)<0){mp(f[g>>2]|0);n=b[c>>0]|0}else n=h;if(n<<24>>24>=0){u=a;return i|0}mp(f[e>>2]|0);u=a;return i|0}function Ag(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=d+16|0;g=f[e>>2]|0;if(!g)if(!(Dj(d)|0)){h=f[e>>2]|0;i=5}else j=0;else{h=g;i=5}a:do if((i|0)==5){g=d+20|0;e=f[g>>2]|0;k=e;if((h-e|0)>>>0<c>>>0){j=Ra[f[d+36>>2]&31](d,a,c)|0;break}b:do if((b[d+75>>0]|0)>-1){e=c;while(1){if(!e){l=0;m=a;n=c;o=k;break b}p=e+-1|0;if((b[a+p>>0]|0)==10)break;else e=p}p=Ra[f[d+36>>2]&31](d,a,e)|0;if(p>>>0<e>>>0){j=p;break a}l=e;m=a+e|0;n=c-e|0;o=f[g>>2]|0}else{l=0;m=a;n=c;o=k}while(0);Ef(o|0,m|0,n|0)|0;f[g>>2]=(f[g>>2]|0)+n;j=l+n|0}while(0);return j|0}function Bg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+12|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d+28>>2]|0;if(c|0){e=c;do{c=e;e=f[e>>2]|0;Bg(c+8|0);mp(c)}while((e|0)!=0)}e=d+20|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0)mp(c);c=f[d+8>>2]|0;if(c|0){e=c;do{c=e;e=f[e>>2]|0;g=c+8|0;h=f[c+20>>2]|0;if(h|0){i=c+24|0;if((f[i>>2]|0)!=(h|0))f[i>>2]=h;mp(h)}if((b[g+11>>0]|0)<0)mp(f[g>>2]|0);mp(c)}while((e|0)!=0)}e=f[d>>2]|0;f[d>>2]=0;if(e|0)mp(e);mp(d)}if((b[a+11>>0]|0)>=0)return;mp(f[a>>2]|0);return}function Cg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0;c=a+4|0;if((Pa[f[(f[b>>2]|0)+20>>2]&127](b)|0)<=0){d=1;return d|0}a=0;while(1){e=f[(f[c>>2]|0)+4>>2]|0;g=fk(e,Qa[f[(f[b>>2]|0)+24>>2]&127](b,a)|0)|0;if((g|0)==-1){d=0;i=9;break}e=f[c>>2]|0;if(((h[e+36>>0]|0)<<8&65535)<512){if(!(Qa[f[(f[b>>2]|0)+28>>2]&127](b,f[(f[(f[e+4>>2]|0)+8>>2]|0)+(g<<2)>>2]|0)|0)){d=0;i=9;break}}else{j=qj(e,g)|0;if(!j){d=0;i=9;break}if(!(Qa[f[(f[b>>2]|0)+28>>2]&127](b,j)|0)){d=0;i=9;break}}a=a+1|0;if((a|0)>=(Pa[f[(f[b>>2]|0)+20>>2]&127](b)|0)){d=1;i=9;break}}if((i|0)==9)return d|0;return 0}function Dg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=(f[b+4>>2]|0)-(f[b>>2]|0)|0;b=d>>2;e=a+8|0;a=f[(f[e>>2]|0)+40>>2]|0;g=jp((a|0)>-1?a:-1)|0;h=c+8|0;if((d|0)<=0){i=1;kp(g);return i|0}d=c+16|0;j=0;k=0;while(1){l=h;m=f[l>>2]|0;n=f[l+4>>2]|0;l=d;o=f[l>>2]|0;p=Vl(o|0,f[l+4>>2]|0,a|0,0)|0;l=I;if((n|0)<(l|0)|(n|0)==(l|0)&m>>>0<p>>>0){i=0;q=5;break}Ef(g|0,(f[c>>2]|0)+o|0,a|0)|0;o=d;f[o>>2]=p;f[o+4>>2]=l;Ef((f[f[(f[e>>2]|0)+64>>2]>>2]|0)+j|0,g|0,a|0)|0;k=k+1|0;if((k|0)>=(b|0)){i=1;q=5;break}else j=j+a|0}if((q|0)==5){kp(g);return i|0}return 0}function Eg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=a+216|0;e=a+220|0;g=f[d>>2]|0;if((f[e>>2]|0)==(g|0)){h=0;return h|0}i=a+4|0;a=0;j=g;a:while(1){g=f[j+(a*144|0)>>2]|0;if(((g|0)>=0?(k=f[i>>2]|0,l=f[k+8>>2]|0,(g|0)<((f[k+12>>2]|0)-l>>2|0)):0)?(k=f[l+(g<<2)>>2]|0,(Pa[f[(f[k>>2]|0)+24>>2]&127](k)|0)>0):0){g=0;do{if((Qa[f[(f[k>>2]|0)+20>>2]&127](k,g)|0)==(c|0))break a;g=g+1|0}while((g|0)<(Pa[f[(f[k>>2]|0)+24>>2]&127](k)|0))}k=a+1|0;j=f[d>>2]|0;if(k>>>0>=(((f[e>>2]|0)-j|0)/144|0)>>>0){h=0;m=11;break}else a=k}if((m|0)==11)return h|0;m=f[d>>2]|0;h=(b[m+(a*144|0)+100>>0]|0)==0?0:m+(a*144|0)+4|0;return h|0}function Fg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0;c=b+8|0;d=f[c>>2]|0;e=f[c+4>>2]|0;c=b+16|0;g=c;i=f[g>>2]|0;j=f[g+4>>2]|0;g=Vl(i|0,j|0,4,0)|0;k=I;if((e|0)<(k|0)|(e|0)==(k|0)&d>>>0<g>>>0){l=0;return l|0}m=(f[b>>2]|0)+i|0;b=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=c;f[m>>2]=g;f[m+4>>2]=k;k=Vl(i|0,j|0,8,0)|0;j=I;if((e|0)<(j|0)|(e|0)==(j|0)&d>>>0<k>>>0){l=0;return l|0}d=c;f[d>>2]=k;f[d+4>>2]=j;if(!(b&1)){l=0;return l|0}j=(_(b|0)|0)^31;if((j+-1|0)>>>0>28){l=0;return l|0}f[a+8>>2]=j+1;b=2<<j;f[a+12>>2]=b+-1;j=b+-2|0;f[a+16>>2]=j;f[a+20>>2]=(j|0)/2|0;l=1;return l|0}function Gg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;if(b>>>0<64){b=f[a+12>>2]|0;if(b>>>0<=1){e=0;return e|0}d=f[c>>2]|0;c=0;g=1;while(1){h=(f[d+(c<<2)>>2]|0)>>>0>(f[d+(g<<2)>>2]|0)>>>0?g:c;g=g+1|0;if(g>>>0>=b>>>0){e=h;break}else c=h}return e|0}c=a+580|0;b=f[c>>2]|0;g=32-b|0;d=a+576|0;if((g|0)<4){h=f[d>>2]|0;i=h+4|0;if((i|0)==(f[a+568>>2]|0)){e=0;return e|0}j=f[h>>2]<<b;h=4-g|0;f[c>>2]=h;f[d>>2]=i;k=32-h|0;e=(f[i>>2]|0)>>>k|j>>>(k-g|0);return e|0}g=f[d>>2]|0;if((g|0)==(f[a+568>>2]|0)){e=0;return e|0}a=f[g>>2]<<b>>>28;k=b+4|0;f[c>>2]=k;if((k|0)!=32){e=a;return e|0}f[d>>2]=g+4;f[c>>2]=0;e=a;return e|0}function Hg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=a+216|0;d=a+220|0;e=f[c>>2]|0;a:do if((f[d>>2]|0)!=(e|0)){g=a+4|0;h=0;i=e;b:while(1){j=f[i+(h*144|0)>>2]|0;if(((j|0)>=0?(k=f[g>>2]|0,l=f[k+8>>2]|0,(j|0)<((f[k+12>>2]|0)-l>>2|0)):0)?(k=f[l+(j<<2)>>2]|0,(Pa[f[(f[k>>2]|0)+24>>2]&127](k)|0)>0):0){j=0;do{if((Qa[f[(f[k>>2]|0)+20>>2]&127](k,j)|0)==(b|0))break b;j=j+1|0}while((j|0)<(Pa[f[(f[k>>2]|0)+24>>2]&127](k)|0))}k=h+1|0;i=f[c>>2]|0;if(k>>>0>=(((f[d>>2]|0)-i|0)/144|0)>>>0)break a;else h=k}m=(f[c>>2]|0)+(h*144|0)+104|0;return m|0}while(0);m=a+184|0;return m|0}function Ig(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;f[a>>2]=1360;rg(a+60|0);b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=a+36|0;d=f[b>>2]|0;if(d|0){c=a+40|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-24|0;f[c>>2]=e;Ua[f[f[e>>2]>>2]&127](e);h=f[c>>2]|0}while((h|0)!=(d|0));g=f[b>>2]|0}mp(g)}f[a>>2]=1304;g=f[a+16>>2]|0;if(g|0){b=a+20|0;d=f[b>>2]|0;if((d|0)!=(g|0))f[b>>2]=d+(~((d+-4-g|0)>>>2)<<2);mp(g)}g=f[a+4>>2]|0;if(!g)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(g|0))f[d>>2]=a+(~((a+-4-g|0)>>>2)<<2);mp(g);return}function Jg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=u;u=u+32|0;d=c+16|0;e=c+8|0;g=c;h=a+8|0;if(f[h>>2]<<5>>>0>=b>>>0){u=c;return}f[d>>2]=0;i=d+4|0;f[i>>2]=0;j=d+8|0;f[j>>2]=0;if((b|0)<0)Do(d);k=((b+-1|0)>>>5)+1|0;b=Yk(k<<2)|0;f[d>>2]=b;f[i>>2]=0;f[j>>2]=k;k=f[a>>2]|0;f[e>>2]=k;f[e+4>>2]=0;b=a+4|0;l=f[b>>2]|0;f[g>>2]=k+(l>>>5<<2);f[g+4>>2]=l&31;Ye(d,e,g);g=f[a>>2]|0;f[a>>2]=f[d>>2];f[d>>2]=g;d=f[b>>2]|0;f[b>>2]=f[i>>2];f[i>>2]=d;d=f[h>>2]|0;f[h>>2]=f[j>>2];f[j>>2]=d;if(g|0)mp(g);u=c;return}function Kg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=u;u=u+16|0;e=c;do if(((h[(f[a+4>>2]|0)+36>>0]|0)<<8&65535)>511){g=d+8|0;i=f[g+4>>2]|0;j=d+16|0;k=j;l=f[k>>2]|0;m=f[k+4>>2]|0;if((i|0)>(m|0)|((i|0)==(m|0)?(f[g>>2]|0)>>>0>l>>>0:0)){g=b[(f[d>>2]|0)+l>>0]|0;i=Vl(l|0,m|0,1,0)|0;m=j;f[m>>2]=i;f[m+4>>2]=I;m=g&255;f[a+24>>2]=m;n=m;break}else{o=0;u=c;return o|0}}else n=f[a+24>>2]|0;while(0);f[e>>2]=1248;f[e+4>>2]=-1;Ln(e,n);o=bj(e,f[a+16>>2]|0)|0;u=c;return o|0}function Lg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d|0;g=(e|0)/12|0;h=g+1|0;if(h>>>0>357913941)Do(a);i=a+8|0;j=((f[i>>2]|0)-d|0)/12|0;k=j<<1;l=j>>>0<178956970?(k>>>0<h>>>0?h:k):357913941;do if(l)if(l>>>0>357913941){k=ra(8)|0;dn(k,13708);f[k>>2]=4852;va(k|0,1176,105)}else{m=Yk(l*12|0)|0;break}else m=0;while(0);k=m+(g*12|0)|0;f[k>>2]=f[b>>2];f[k+4>>2]=f[b+4>>2];f[k+8>>2]=f[b+8>>2];b=k+(((e|0)/-12|0)*12|0)|0;if((e|0)>0)Ef(b|0,d|0,e|0)|0;f[a>>2]=b;f[c>>2]=k+12;f[i>>2]=m+(l*12|0);if(!d)return;mp(d);return}function Mg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=u;u=u+16|0;d=c;e=Xe(a,d,b)|0;g=f[e>>2]|0;if(g|0){h=g;i=h+28|0;u=c;return i|0}g=Yk(40)|0;zh(g+16|0,b);b=g+28|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;b=f[d>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=b;f[e>>2]=g;b=f[f[a>>2]>>2]|0;if(!b)j=g;else{f[a>>2]=b;j=f[e>>2]|0}Cd(f[a+4>>2]|0,j);j=a+8|0;f[j>>2]=(f[j>>2]|0)+1;h=g;i=h+28|0;u=c;return i|0}function Ng(a,c,d,e,g,h,i,j){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0;k=u;u=u+16|0;l=k;if((-18-c|0)>>>0<d>>>0)Do(a);if((b[a+11>>0]|0)<0)m=f[a>>2]|0;else m=a;if(c>>>0<2147483623){n=d+c|0;d=c<<1;o=n>>>0<d>>>0?d:n;p=o>>>0<11?11:o+16&-16}else p=-17;o=Yk(p)|0;if(g|0)Um(o,m,g)|0;if(i|0)Um(o+g|0,j,i)|0;j=e-h|0;e=j-g|0;if(e|0)Um(o+g+i|0,m+g+h|0,e)|0;if((c|0)!=10)mp(m);f[a>>2]=o;f[a+8>>2]=p|-2147483648;p=j+i|0;f[a+4>>2]=p;b[l>>0]=0;Zn(o+p|0,l);u=k;return}function Og(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;if(d-g>>2>>>0>=b>>>0){Dh(g|0,0,b<<2|0)|0;f[e>>2]=g+(b<<2);return}h=f[a>>2]|0;i=g-h|0;g=i>>2;j=g+b|0;if(j>>>0>1073741823)Do(a);k=d-h|0;d=k>>1;l=k>>2>>>0<536870911?(d>>>0<j>>>0?j:d):1073741823;do if(l)if(l>>>0>1073741823){d=ra(8)|0;dn(d,13708);f[d>>2]=4852;va(d|0,1176,105)}else{d=Yk(l<<2)|0;m=d;n=d;break}else{m=0;n=0}while(0);d=m+(g<<2)|0;Dh(d|0,0,b<<2|0)|0;if((i|0)>0)Ef(n|0,h|0,i|0)|0;f[a>>2]=m;f[e>>2]=d+(b<<2);f[c>>2]=m+(l<<2);if(!h)return;mp(h);return}function Pg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d;do{f[c>>2]=g+-144;d=f[g+-12>>2]|0;if(d|0){h=g+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);mp(d)}d=f[g+-28>>2]|0;if(d|0){i=g+-24|0;h=f[i>>2]|0;if((h|0)!=(d|0))f[i>>2]=h+(~((h+-4-d|0)>>>2)<<2);mp(d)}d=f[g+-40>>2]|0;if(d|0){h=g+-36|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);mp(d)}ah(g+-140|0);g=f[c>>2]|0}while((g|0)!=(b|0));e=f[a>>2]|0}mp(e);return}function Qg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0;a=u;u=u+16|0;e=a;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;g=Rh(d)|0;if(g>>>0>4294967279)Do(e);if(g>>>0<11){b[e+11>>0]=g;if(!g)h=e;else{i=e;j=6}}else{k=g+16&-16;l=Yk(k)|0;f[e>>2]=l;f[e+8>>2]=k|-2147483648;f[e+4>>2]=g;i=l;j=6}if((j|0)==6){Ef(i|0,d|0,g|0)|0;h=i}b[h+g>>0]=0;g=(Bc(c,e)|0)!=0;if((b[e+11>>0]|0)>=0){u=a;return g|0}mp(f[e>>2]|0);u=a;return g|0}function Rg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if((e-h|0)>>>0>=c>>>0){i=c;j=h;do{b[j>>0]=0;j=(f[g>>2]|0)+1|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=h-i|0;h=j+c|0;if((h|0)<0)Do(a);k=e-i|0;i=k<<1;e=k>>>0<1073741823?(i>>>0<h>>>0?h:i):2147483647;if(!e)l=0;else l=Yk(e)|0;i=l+j|0;j=l+e|0;e=c;c=i;l=i;do{b[l>>0]=0;l=c+1|0;c=l;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;l=(f[g>>2]|0)-e|0;h=i+(0-l)|0;if((l|0)>0)Ef(h|0,e|0,l|0)|0;f[a>>2]=h;f[g>>2]=c;f[d>>2]=j;if(!e)return;mp(e);return}function Sg(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3396;b=a+84|0;c=a+4|0;d=c+80|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+88>>2]=-1;f[a+92>>2]=-1;b=a+152|0;c=a+96|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));n[b>>2]=$(1.0);b=a+212|0;c=a+156|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+216>>2]=0;f[a+220>>2]=0;f[a+224>>2]=0;Ck(a+232|0);b=a+380|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[a+400>>2]=-1;f[a+404>>2]=-1;f[a+408>>2]=2;f[a+412>>2]=7;b=a+416|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;return}function Tg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0;d=u;u=u+32|0;c=d;if((h[(f[a+4>>2]|0)+36>>0]<<8&65535)>511?!(Pa[f[(f[a>>2]|0)+52>>2]&127](a)|0):0){e=0;u=d;return e|0}f[c>>2]=1276;f[c+4>>2]=-1;g=c+8|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;Kj(c,f[a+24>>2]|0,f[a+28>>2]|0,b[(f[a+8>>2]|0)+24>>0]|0,$(n[a+32>>2]));i=bj(c,f[a+16>>2]|0)|0;f[c>>2]=1276;a=f[g>>2]|0;if(a|0){g=c+12|0;c=f[g>>2]|0;if((c|0)!=(a|0))f[g>>2]=c+(~((c+-4-a|0)>>>2)<<2);mp(a)}e=i;u=d;return e|0}function Ug(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=f[a+4>>2]|0;c=a+8|0;d=f[c>>2]|0;if((d|0)!=(b|0)){e=d;do{f[c>>2]=e+-144;d=f[e+-12>>2]|0;if(d|0){g=e+-8|0;h=f[g>>2]|0;if((h|0)!=(d|0))f[g>>2]=h+(~((h+-4-d|0)>>>2)<<2);mp(d)}d=f[e+-28>>2]|0;if(d|0){h=e+-24|0;g=f[h>>2]|0;if((g|0)!=(d|0))f[h>>2]=g+(~((g+-4-d|0)>>>2)<<2);mp(d)}d=f[e+-40>>2]|0;if(d|0){g=e+-36|0;h=f[g>>2]|0;if((h|0)!=(d|0))f[g>>2]=h+(~((h+-4-d|0)>>>2)<<2);mp(d)}ah(e+-140|0);e=f[c>>2]|0}while((e|0)!=(b|0))}b=f[a>>2]|0;if(!b)return;mp(b);return}function Vg(a){a=a|0;var b=0,c=0,d=0;b=f[a+76>>2]|0;if(b|0){c=a+80|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+64>>2]|0;if(b|0){d=a+68|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;mp(b)}b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+24>>2]|0;if(b|0){c=a+28|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+12>>2]|0;if(b|0){d=a+16|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a>>2]|0;if(!b)return;c=a+4|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);mp(b);return}function Wg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a=u;u=u+32|0;e=a+12|0;g=a;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=Rh(d)|0;if(h>>>0>4294967279)Do(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=Yk(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){Ef(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;h=Ah(c,g,e)|0;if((b[g+11>>0]|0)<0)mp(f[g>>2]|0);if((b[e+11>>0]|0)>=0){u=a;return h|0}mp(f[e>>2]|0);u=a;return h|0}function Xg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=u;u=u+16|0;g=e;h=c+11|0;i=b[h>>0]|0;if(i<<24>>24<0)j=f[c+4>>2]|0;else j=i&255;k=j;j=i;while(1){if(j<<24>>24<0)l=f[c>>2]|0;else l=c;f[g>>2]=d;m=rl(l,k+1|0,16202,g)|0;if((m|0)>-1)if(m>>>0>k>>>0)n=m;else break;else n=k<<1|1;Sh(c,n,0);k=n;j=b[h>>0]|0}Sh(c,m,0);f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];a=0;while(1){if((a|0)==3)break;f[c+(a<<2)>>2]=0;a=a+1|0}u=e;return}function Yg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;b=a+8|0;c=f[b>>2]|0;if((c|0)<0){d=0;return d|0}e=a+4|0;a=f[e>>2]|0;g=a+4|0;h=f[g>>2]|0;i=f[a>>2]|0;j=h-i>>2;k=i;i=h;if(c>>>0<=j>>>0)if(c>>>0<j>>>0?(h=k+(c<<2)|0,(h|0)!=(i|0)):0){f[g>>2]=i+(~((i+-4-h|0)>>>2)<<2);l=c}else l=c;else{Og(a,c-j|0);l=f[b>>2]|0}if((l|0)<=0){d=1;return d|0}b=f[e>>2]|0;e=f[b>>2]|0;j=(f[b+4>>2]|0)-e>>2;c=e;e=0;while(1){if(j>>>0<=e>>>0){m=10;break}f[c+(e<<2)>>2]=e;e=e+1|0;if((e|0)>=(l|0)){d=1;m=12;break}}if((m|0)==10)Do(b);else if((m|0)==12)return d|0;return 0}function Zg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0;b=a+140|0;c=f[b>>2]|0;if((c|0)<=0){d=1;return d|0}e=c<<4;g=jp(c>>>0>268435455|e>>>0>4294967291?-1:e+4|0)|0;f[g>>2]=c;e=g+4|0;g=e+(c<<4)|0;c=e;do{Zm(c);c=c+16|0}while((c|0)!=(g|0));g=a+136|0;c=f[g>>2]|0;f[g>>2]=e;if(c|0){e=c+-4|0;h=f[e>>2]|0;if(h|0){i=c+(h<<4)|0;do i=i+-16|0;while((i|0)!=(c|0))}kp(e)}if((f[b>>2]|0)<=0){d=1;return d|0}e=0;while(1){if(!(zd((f[g>>2]|0)+(e<<4)|0,a)|0)){d=0;j=13;break}e=e+1|0;if((e|0)>=(f[b>>2]|0)){d=1;j=13;break}}if((j|0)==13)return d|0;return 0}function _g(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;c=f[a>>2]|0;f[a>>2]=0;if(!c)return;a=f[c+28>>2]|0;if(a|0){d=a;do{a=d;d=f[d>>2]|0;e=a+8|0;_g(a+20|0);if((b[e+11>>0]|0)<0)mp(f[e>>2]|0);mp(a)}while((d|0)!=0)}d=c+20|0;a=f[d>>2]|0;f[d>>2]=0;if(a|0)mp(a);a=f[c+8>>2]|0;if(a|0){d=a;do{a=d;d=f[d>>2]|0;e=a+8|0;g=f[a+20>>2]|0;if(g|0){h=a+24|0;if((f[h>>2]|0)!=(g|0))f[h>>2]=g;mp(g)}if((b[e+11>>0]|0)<0)mp(f[e>>2]|0);mp(a)}while((d|0)!=0)}d=f[c>>2]|0;f[c>>2]=0;if(d|0)mp(d);mp(c);return}function $g(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=Bc(a,c)|0;if(!e){g=0;return g|0}c=f[e+20>>2]|0;if(((f[e+24>>2]|0)-c|0)!=8){g=0;return g|0}e=c;c=e;a=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;c=e+4|0;e=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;c=d;d=c;b[d>>0]=a;b[d+1>>0]=a>>8;b[d+2>>0]=a>>16;b[d+3>>0]=a>>24;a=c+4|0;b[a>>0]=e;b[a+1>>0]=e>>8;b[a+2>>0]=e>>16;b[a+3>>0]=e>>24;g=1;return g|0}function ah(a){a=a|0;var b=0,c=0,d=0;b=f[a+84>>2]|0;if(b|0){c=a+88|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+72>>2]|0;if(b|0){d=a+76|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;mp(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+40>>2]|0;if(b|0){c=a+44|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+28>>2]|0;if(b|0){d=a+32|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+12>>2]|0;if(b|0)mp(b);b=f[a>>2]|0;if(!b)return;mp(b);return}function bh(){var a=0,b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;a=u;u=u+48|0;b=a+32|0;c=a+24|0;d=a+16|0;e=a;g=a+36|0;a=$k()|0;if(a|0?(h=f[a>>2]|0,h|0):0){a=h+48|0;i=f[a>>2]|0;j=f[a+4>>2]|0;if(!((i&-256|0)==1126902528&(j|0)==1129074247)){f[c>>2]=16341;xl(16291,c)}if((i|0)==1126902529&(j|0)==1129074247)k=f[h+44>>2]|0;else k=h+80|0;f[g>>2]=k;k=f[h>>2]|0;h=f[k+4>>2]|0;if(Ra[f[(f[274]|0)+16>>2]&31](1096,k,g)|0){k=f[g>>2]|0;g=Pa[f[(f[k>>2]|0)+8>>2]&127](k)|0;f[e>>2]=16341;f[e+4>>2]=h;f[e+8>>2]=g;xl(16205,e)}else{f[d>>2]=16341;f[d+4>>2]=h;xl(16250,d)}}xl(16329,b)}function ch(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;do if(a){if(c>>>0<128){b[a>>0]=c;e=1;break}d=(gp()|0)+188|0;if(!(f[f[d>>2]>>2]|0))if((c&-128|0)==57216){b[a>>0]=c;e=1;break}else{d=tp()|0;f[d>>2]=84;e=-1;break}if(c>>>0<2048){b[a>>0]=c>>>6|192;b[a+1>>0]=c&63|128;e=2;break}if(c>>>0<55296|(c&-8192|0)==57344){b[a>>0]=c>>>12|224;b[a+1>>0]=c>>>6&63|128;b[a+2>>0]=c&63|128;e=3;break}if((c+-65536|0)>>>0<1048576){b[a>>0]=c>>>18|240;b[a+1>>0]=c>>>12&63|128;b[a+2>>0]=c>>>6&63|128;b[a+3>>0]=c&63|128;e=4;break}else{d=tp()|0;f[d>>2]=84;e=-1;break}}else e=1;while(0);return e|0}function dh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d|0;g=e>>2;h=g+1|0;if(h>>>0>1073741823)Do(a);i=a+8|0;j=(f[i>>2]|0)-d|0;k=j>>1;l=j>>2>>>0<536870911?(k>>>0<h>>>0?h:k):1073741823;do if(l)if(l>>>0>1073741823){k=ra(8)|0;dn(k,13708);f[k>>2]=4852;va(k|0,1176,105)}else{k=Yk(l<<2)|0;m=k;n=k;break}else{m=0;n=0}while(0);k=m+(g<<2)|0;f[k>>2]=f[b>>2];if((e|0)>0)Ef(n|0,d|0,e|0)|0;f[a>>2]=m;f[c>>2]=k+4;f[i>>2]=m+(l<<2);if(!d)return;mp(d);return}function eh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3328;b=f[a+88>>2]|0;if(b|0){c=a+92|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+72>>2]|0;if(b|0){d=a+76|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}b=f[a+60>>2]|0;if(b|0){c=a+64|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b)}f[a>>2]=3284;b=f[a+36>>2]|0;if(b|0)mp(b);b=f[a+24>>2]|0;if(!b)return;mp(b);return}function fh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0.0;a=u;u=u+32|0;e=a;g=a+8|0;p[e>>3]=0.0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=Rh(d)|0;if(h>>>0>4294967279)Do(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=Yk(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){Ef(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;$g(c,g,e)|0;n=+p[e>>3];if((b[g+11>>0]|0)>=0){u=a;return +n}mp(f[g>>2]|0);u=a;return +n}function gh(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=u;u=u+128|0;h=g+124|0;i=g;j=i;k=4232;l=j+124|0;do{f[j>>2]=f[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(l|0));if((c+-1|0)>>>0>2147483646)if(!c){m=h;n=1;o=4}else{h=tp()|0;f[h>>2]=75;p=-1}else{m=a;n=c;o=4}if((o|0)==4){o=-2-m|0;c=n>>>0>o>>>0?o:n;f[i+48>>2]=c;n=i+20|0;f[n>>2]=m;f[i+44>>2]=m;o=m+c|0;m=i+16|0;f[m>>2]=o;f[i+28>>2]=o;o=Zf(i,d,e)|0;if(!c)p=o;else{c=f[n>>2]|0;b[c+(((c|0)==(f[m>>2]|0))<<31>>31)>>0]=0;p=o}}u=g;return p|0}function hh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a=u;u=u+16|0;e=a+12|0;g=a;f[e>>2]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=Rh(d)|0;if(h>>>0>4294967279)Do(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=Yk(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){Ef(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;Mh(c,g,e)|0;c=f[e>>2]|0;if((b[g+11>>0]|0)>=0){u=a;return c|0}mp(f[g>>2]|0);u=a;return c|0}function ih(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=a+8|0;d=f[a>>2]|0;e=d;if((((f[c>>2]|0)-d|0)/12|0)>>>0>=b>>>0)return;g=a+4|0;if(b>>>0>357913941){h=ra(8)|0;dn(h,13708);f[h>>2]=4852;va(h|0,1176,105)}h=f[g>>2]|0;i=Yk(b*12|0)|0;j=i+(((h-d|0)/12|0)*12|0)|0;k=j;l=i+(b*12|0)|0;b=h;if((b|0)==(e|0))m=k;else{h=b;b=j;do{j=h;h=h+-12|0;f[b+-12>>2]=f[h>>2];f[b+-8>>2]=f[j+-8>>2];f[b+-4>>2]=f[j+-4>>2];b=b+-12|0}while((h|0)!=(e|0));m=b}f[a>>2]=m;f[g>>2]=k;f[c>>2]=l;if(!d)return;mp(d);return}function jh(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;c=f[a+28>>2]|0;if(c|0){d=c;do{c=d;d=f[d>>2]|0;e=c+8|0;g=c+20|0;h=f[g>>2]|0;f[g>>2]=0;if(h|0){jh(h);mp(h)}if((b[e+11>>0]|0)<0)mp(f[e>>2]|0);mp(c)}while((d|0)!=0)}d=a+20|0;c=f[d>>2]|0;f[d>>2]=0;if(c|0)mp(c);c=f[a+8>>2]|0;if(c|0){d=c;do{c=d;d=f[d>>2]|0;e=c+8|0;h=f[c+20>>2]|0;if(h|0){g=c+24|0;if((f[g>>2]|0)!=(h|0))f[g>>2]=h;mp(h)}if((b[e+11>>0]|0)<0)mp(f[e>>2]|0);mp(c)}while((d|0)!=0)}d=f[a>>2]|0;f[a>>2]=0;if(!d)return;mp(d);return}function kh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a=u;u=u+32|0;e=a;g=a+8|0;p[e>>3]=0.0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=Rh(d)|0;if(h>>>0>4294967279)Do(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=Yk(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){Ef(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;h=$g(c,g,e)|0;if((b[g+11>>0]|0)>=0){u=a;return h|0}mp(f[g>>2]|0);u=a;return h|0}function lh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a=u;u=u+16|0;e=a+12|0;g=a;f[e>>2]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=Rh(d)|0;if(h>>>0>4294967279)Do(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=Yk(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){Ef(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;h=Mh(c,g,e)|0;if((b[g+11>>0]|0)>=0){u=a;return h|0}mp(f[g>>2]|0);u=a;return h|0}function mh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3348;b=a+84|0;c=a+4|0;d=c+80|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+88>>2]=-1;f[a+92>>2]=-1;b=a+152|0;c=a+96|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));n[b>>2]=$(1.0);b=a+212|0;c=a+156|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+216>>2]=0;f[a+220>>2]=0;f[a+224>>2]=0;Ck(a+232|0);b=a+380|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;Zm(a+400|0);f[a+416>>2]=-1;f[a+420>>2]=-1;return}function nh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=c+8|0;e=f[d+4>>2]|0;g=c+16|0;h=g;i=f[h>>2]|0;j=f[h+4>>2]|0;if(!((e|0)>(j|0)|((e|0)==(j|0)?(f[d>>2]|0)>>>0>i>>>0:0))){k=0;return k|0}d=b[(f[c>>2]|0)+i>>0]|0;e=Vl(i|0,j|0,1,0)|0;j=g;f[j>>2]=e;f[j+4>>2]=I;do if(d<<24>>24<0)if(nh(a,c)|0){j=a;e=Sl(f[j>>2]|0,f[j+4>>2]|0,7)|0;j=I;g=a;f[g>>2]=e;f[g+4>>2]=j;l=e|d&127;m=j;break}else{k=0;return k|0}else{l=d&255;m=0}while(0);d=a;f[d>>2]=l;f[d+4>>2]=m;k=1;return k|0}function oh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0;do if(((h[(f[a+4>>2]|0)+36>>0]|0)<<8&65535)<512){e=d+8|0;g=f[e+4>>2]|0;i=d+16|0;j=i;k=f[j>>2]|0;l=f[j+4>>2]|0;if((g|0)>(l|0)|((g|0)==(l|0)?(f[e>>2]|0)>>>0>k>>>0:0)){e=b[(f[d>>2]|0)+k>>0]|0;g=Vl(k|0,l|0,1,0)|0;l=i;f[l>>2]=g;f[l+4>>2]=I;f[a+24>>2]=e&255;break}else{m=0;return m|0}}while(0);m=xc(a,c,d)|0;return m|0}function ph(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;if(b>>>0>1431655765|(c|b|0)<0){d=0;return d|0}e=b*3|0;Ne(a,e,3676);Ne(a+12|0,e,3672);pi(a+24|0,c);c=a+76|0;e=f[c>>2]|0;b=a+80|0;g=f[b>>2]|0;if((g|0)!=(e|0))f[b>>2]=g+(~((g+-4-e|0)>>>2)<<2);f[c>>2]=0;f[b>>2]=0;f[a+84>>2]=0;if(e|0)mp(e);e=a+64|0;b=f[e>>2]|0;c=a+68|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;f[e>>2]=0;f[c>>2]=0;f[a+72>>2]=0;if(!b){d=1;return d|0}mp(b);d=1;return d|0}function qh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;e=u;u=u+48|0;g=e+4|0;h=e;if((d|0)!=1){f[a>>2]=0;u=e;return}d=f[b+12>>2]|0;i=f[b+4>>2]|0;b=g;j=b+36|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));hg(h,c,d,i,g);i=f[g+24>>2]|0;if(i|0){d=g+28|0;g=f[d>>2]|0;if((g|0)!=(i|0))f[d>>2]=g+(~((g+-4-i|0)>>>2)<<2);mp(i)}f[a>>2]=f[h>>2];u=e;return}function rh(a,b){a=a|0;b=b|0;var c=0,d=0;c=a+16|0;a=f[b>>2]|0;f[b>>2]=0;b=f[c>>2]|0;f[c>>2]=a;if(!b)return;a=b+88|0;c=f[a>>2]|0;f[a>>2]=0;if(c|0){a=f[c+8>>2]|0;if(a|0){d=c+12|0;if((f[d>>2]|0)!=(a|0))f[d>>2]=a;mp(a)}mp(c)}c=f[b+68>>2]|0;if(c|0){a=b+72|0;d=f[a>>2]|0;if((d|0)!=(c|0))f[a>>2]=d+(~((d+-4-c|0)>>>2)<<2);mp(c)}c=b+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){a=d+4|0;if((f[a>>2]|0)!=(c|0))f[a>>2]=c;mp(c)}mp(d)}mp(b);return}function sh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;if(c|0){h=a+11|0;i=b[h>>0]|0;if(i<<24>>24<0){j=f[a+4>>2]|0;k=(f[a+8>>2]&2147483647)+-1|0}else{j=i&255;k=10}if((k-j|0)>>>0<c>>>0){Hh(a,k,c-k+j|0,j,j,0,0);l=b[h>>0]|0}else l=i;if(l<<24>>24<0)m=f[a>>2]|0;else m=a;Pl(m+j|0,c,d)|0;d=j+c|0;if((b[h>>0]|0)<0)f[a+4>>2]=d;else b[h>>0]=d;b[g>>0]=0;Zn(m+d|0,g)}u=e;return a|0}function th(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j)k=(f[a+8>>2]&2147483647)+-1|0;else k=10;do if(k>>>0>=d>>>0){if(j)l=f[a>>2]|0;else l=a;Sm(l,c,d)|0;b[g>>0]=0;Zn(l+d|0,g);if((b[h>>0]|0)<0){f[a+4>>2]=d;break}else{b[h>>0]=d;break}}else{if(j)m=f[a+4>>2]|0;else m=i&255;Ng(a,k,d-k|0,m,0,m,d,c)}while(0);u=e;return a|0}function uh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=3060;b=a+48|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Ua[f[(f[c>>2]|0)+4>>2]&127](c);f[a>>2]=3548;c=f[a+20>>2]|0;if(c|0){b=a+24|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);mp(c)}c=a+8|0;d=f[c>>2]|0;if(!d){mp(a);return}b=a+12|0;e=f[b>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[b>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0)Ua[f[(f[i>>2]|0)+4>>2]&127](i);h=f[b>>2]|0}while((h|0)!=(d|0));g=f[c>>2]|0}mp(g);mp(a);return}function vh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0;d=u;u=u+80|0;e=d;g=d+56|0;i=d+40|0;j=e;k=c;c=j+40|0;do{f[j>>2]=f[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(c|0));fc(i,e,g);e=f[i>>2]|0;if(!e){k=i+4|0;if((b[k+11>>0]|0)<0)mp(f[k>>2]|0);k=h[g+7>>0]|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=k;u=d;return}else{f[a>>2]=e;e=i+4|0;zh(a+4|0,e);if((b[e+11>>0]|0)<0)mp(f[e>>2]|0);u=d;return}}function wh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0;d=f[a>>2]|0;if(!d){e=0;return e|0}g=f[c>>2]|0;if(!g){e=0;return e|0}h=f[g>>2]|0;sg(d,h,(f[g+4>>2]|0)-h|0,0)|0;b[a+24>>0]=b[c+24>>0]|0;f[a+28>>2]=f[c+28>>2];b[a+32>>0]=b[c+32>>0]|0;h=c+40|0;g=f[h+4>>2]|0;d=a+40|0;f[d>>2]=f[h>>2];f[d+4>>2]=g;g=c+48|0;d=f[g+4>>2]|0;h=a+48|0;f[h>>2]=f[g>>2];f[h+4>>2]=d;f[a+56>>2]=f[c+56>>2];d=c+8|0;c=a+8|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];e=1;return e|0}function xh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;f[a>>2]=3060;b=a+48|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Ua[f[(f[c>>2]|0)+4>>2]&127](c);f[a>>2]=3548;c=f[a+20>>2]|0;if(c|0){b=a+24|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);mp(c)}c=a+8|0;d=f[c>>2]|0;if(!d)return;b=a+12|0;a=f[b>>2]|0;if((a|0)==(d|0))e=d;else{g=a;do{a=g+-4|0;f[b>>2]=a;h=f[a>>2]|0;f[a>>2]=0;if(h|0)Ua[f[(f[h>>2]|0)+4>>2]&127](h);g=f[b>>2]|0}while((g|0)!=(d|0));e=f[c>>2]|0}mp(e);return}function yh(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;if(!a){g=1;return g|0}h=d+8|0;i=f[h+4>>2]|0;j=d+16|0;k=j;l=f[k>>2]|0;m=f[k+4>>2]|0;if(!((i|0)>(m|0)|((i|0)==(m|0)?(f[h>>2]|0)>>>0>l>>>0:0))){g=0;return g|0}h=b[(f[d>>2]|0)+l>>0]|0;i=Vl(l|0,m|0,1,0)|0;m=j;f[m>>2]=i;f[m+4>>2]=I;switch(h<<24>>24){case 0:{g=Fc(a,c,d,e)|0;return g|0}case 1:{g=hd(a,d,e)|0;return g|0}default:{g=0;return g|0}}return 0}function zh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;if((b[c+11>>0]|0)<0){g=f[c>>2]|0;h=f[c+4>>2]|0;if(h>>>0>4294967279)Do(a);if(h>>>0<11){b[a+11>>0]=h;i=a}else{j=h+16&-16;k=Yk(j)|0;f[a>>2]=k;f[a+8>>2]=j|-2147483648;f[a+4>>2]=h;i=k}Um(i,g,h)|0;b[e>>0]=0;Zn(i+h|0,e)}else{f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2]}u=d;return}function Ah(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=Bc(a,b)|0;if(!d){e=0;return e|0}b=d+20|0;a=f[b>>2]|0;g=d+24|0;d=f[g>>2]|0;if((a|0)==(d|0)){e=0;return e|0}Sh(c,d-a|0,0);a=Hj(c,0)|0;c=f[b>>2]|0;Ef(a|0,c|0,(f[g>>2]|0)-c|0)|0;e=1;return e|0}function Bh(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0;b[c+53>>0]=1;do if((f[c+4>>2]|0)==(e|0)){b[c+52>>0]=1;a=c+16|0;h=f[a>>2]|0;if(!h){f[a>>2]=d;f[c+24>>2]=g;f[c+36>>2]=1;if(!((g|0)==1?(f[c+48>>2]|0)==1:0))break;b[c+54>>0]=1;break}if((h|0)!=(d|0)){h=c+36|0;f[h>>2]=(f[h>>2]|0)+1;b[c+54>>0]=1;break}h=c+24|0;a=f[h>>2]|0;if((a|0)==2){f[h>>2]=g;i=g}else i=a;if((i|0)==1?(f[c+48>>2]|0)==1:0)b[c+54>>0]=1}while(0);return}function Ch(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;f[a>>2]=c;f[a+68>>2]=0;f[a+72>>2]=0;Xd(e,c);g=a+4|0;h=f[e>>2]|0;f[e>>2]=0;i=f[g>>2]|0;f[g>>2]=h;if(!i){f[e>>2]=0;j=h}else{Vg(i);mp(i);i=f[e>>2]|0;f[e>>2]=0;if(i|0){Vg(i);mp(i)}j=f[g>>2]|0}if(!j){k=0;u=d;return k|0}j=((f[c+100>>2]|0)-(f[c+96>>2]|0)|0)/12|0;b[e>>0]=0;If(a+56|0,j,e);k=1;u=d;return k|0}function Dh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=a+d|0;c=c&255;if((d|0)>=67){while(a&3){b[a>>0]=c;a=a+1|0}g=e&-4|0;h=g-64|0;i=c|c<<8|c<<16|c<<24;while((a|0)<=(h|0)){f[a>>2]=i;f[a+4>>2]=i;f[a+8>>2]=i;f[a+12>>2]=i;f[a+16>>2]=i;f[a+20>>2]=i;f[a+24>>2]=i;f[a+28>>2]=i;f[a+32>>2]=i;f[a+36>>2]=i;f[a+40>>2]=i;f[a+44>>2]=i;f[a+48>>2]=i;f[a+52>>2]=i;f[a+56>>2]=i;f[a+60>>2]=i;a=a+64|0}while((a|0)<(g|0)){f[a>>2]=i;a=a+4|0}}while((a|0)<(e|0)){b[a>>0]=c;a=a+1|0}return e-d|0}function Eh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if(!c){e=0;f[d>>2]=e;return}g=a+8|0;i=a+4|0;j=0-(b[a+12>>0]|0)&255;k=c;c=0;l=f[g>>2]|0;while(1){m=c<<1;if(l>>>0<4096?(n=f[i>>2]|0,(n|0)>0):0){o=f[a>>2]|0;p=n+-1|0;f[i>>2]=p;n=l<<8|(h[o+p>>0]|0);f[g>>2]=n;q=n}else q=l;n=q&255;p=X(q>>>8,j)|0;o=n>>>0<j>>>0;l=o?p+n|0:q-j-p|0;f[g>>2]=l;p=m|o&1;k=k+-1|0;if(!k){e=p;break}else c=p}f[d>>2]=e;return}function Fh(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0;do if(!(Gn(a,f[c+8>>2]|0,g)|0)){if(Gn(a,f[c>>2]|0,g)|0){if((f[c+16>>2]|0)!=(d|0)?(h=c+20|0,(f[h>>2]|0)!=(d|0)):0){f[c+32>>2]=e;f[h>>2]=d;h=c+40|0;f[h>>2]=(f[h>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0)b[c+54>>0]=1;f[c+44>>2]=4;break}if((e|0)==1)f[c+32>>2]=1}}else Sk(0,c,d,e);while(0);return}function Gh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1416;b=a+16|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;b=a+88|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=f[c+8>>2]|0;if(b|0){d=c+12|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;mp(b)}mp(c)}c=f[a+68>>2]|0;if(c|0){b=a+72|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);mp(c)}c=a+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){b=d+4|0;if((f[b>>2]|0)!=(c|0))f[b>>2]=c;mp(c)}mp(d)}mp(a);return}function Hh(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0;if((-17-c|0)>>>0<d>>>0)Do(a);if((b[a+11>>0]|0)<0)j=f[a>>2]|0;else j=a;if(c>>>0<2147483623){k=d+c|0;d=c<<1;l=k>>>0<d>>>0?d:k;m=l>>>0<11?11:l+16&-16}else m=-17;l=Yk(m)|0;if(g|0)Um(l,j,g)|0;k=e-h-g|0;if(k|0)Um(l+g+i|0,j+g+h|0,k)|0;if((c|0)!=10)mp(j);f[a>>2]=l;f[a+8>>2]=m|-2147483648;return}function Ih(a,b){a=a|0;b=b|0;if(!b)return;else{Ih(a,f[b>>2]|0);Ih(a,f[b+4>>2]|0);Oh(b+20|0,f[b+24>>2]|0);mp(b);return}}function Jh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=a+64|0;if((f[d>>2]|0)==0?(e=Yk(32)|0,ll(e),g=f[d>>2]|0,f[d>>2]=e,g|0):0){e=f[g>>2]|0;if(e|0){h=g+4|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;mp(e)}mp(g)}g=Zj(f[a+28>>2]|0)|0;e=X(g,b[a+24>>0]|0)|0;g=((e|0)<0)<<31>>31;h=f[d>>2]|0;i=al(e|0,g|0,c|0,0)|0;if(!(sg(h,0,i,I)|0)){j=0;return j|0}Ni(a,f[d>>2]|0,e,g,0,0);f[a+80>>2]=c;j=1;return j|0}function Kh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+32|0;g=e+20|0;h=e+16|0;i=e;j=b[a+24>>0]|0;f[i>>2]=f[306];f[i+4>>2]=f[307];f[i+8>>2]=f[308];f[i+12>>2]=f[309];f[h>>2]=c;f[g>>2]=f[h>>2];if(!(vb(a,g,j,i)|0)){k=0;u=e;return k|0}Ie(d,i,i+(j<<24>>24<<2)|0);k=1;u=e;return k|0}function Lh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+64|0;e=d;if(!(Gn(a,b,0)|0))if((b|0)!=0?(g=bg(b,1120,1104,0)|0,(g|0)!=0):0){b=e+4|0;h=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(h|0));f[e>>2]=g;f[e+8>>2]=a;f[e+12>>2]=-1;f[e+48>>2]=1;Xa[f[(f[g>>2]|0)+28>>2]&7](g,e,f[c>>2]|0,1);if((f[e+24>>2]|0)==1){f[c>>2]=f[e+16>>2];i=1}else i=0;j=i}else j=0;else j=1;u=d;return j|0}function Mh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=Bc(a,c)|0;if(!e){g=0;return g|0}c=f[e+20>>2]|0;if(((f[e+24>>2]|0)-c|0)!=4){g=0;return g|0}e=c;c=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[d>>0]=c;b[d+1>>0]=c>>8;b[d+2>>0]=c>>16;b[d+3>>0]=c>>24;g=1;return g|0}function Nh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=c+8|0;e=f[d+4>>2]|0;g=c+16|0;h=g;i=f[h>>2]|0;j=f[h+4>>2]|0;if(!((e|0)>(j|0)|((e|0)==(j|0)?(f[d>>2]|0)>>>0>i>>>0:0))){k=0;return k|0}d=b[(f[c>>2]|0)+i>>0]|0;e=Vl(i|0,j|0,1,0)|0;j=g;f[j>>2]=e;f[j+4>>2]=I;j=d&255;do if(j&128)if(Nh(a,c)|0){e=f[a>>2]<<7;f[a>>2]=e;l=e|d&127;break}else{k=0;return k|0}else l=j;while(0);f[a>>2]=l;k=1;return k|0}function Oh(a,c){a=a|0;c=c|0;var d=0;if(!c)return;Oh(a,f[c>>2]|0);Oh(a,f[c+4>>2]|0);a=c+16|0;d=c+28|0;if((b[d+11>>0]|0)<0)mp(f[d>>2]|0);if((b[a+11>>0]|0)<0)mp(f[a>>2]|0);mp(c);return}function Ph(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=c;i=f[c+64>>2]|0;c=((f[i+4>>2]|0)-(f[i>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;If(a+24|0,c,g);c=f[h>>2]|0;h=(f[c+56>>2]|0)-(f[c+52>>2]|0)>>2;b[g>>0]=0;If(a+36|0,h,g);g=a+8|0;f[g>>2]=f[d>>2];f[g+4>>2]=f[d+4>>2];f[g+8>>2]=f[d+8>>2];f[g+12>>2]=f[d+12>>2];u=e;return}function Qh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=3548;b=f[a+20>>2]|0;if(b|0){c=a+24|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=a+8|0;d=f[b>>2]|0;if(!d){mp(a);return}c=a+12|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[c>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0)Ua[f[(f[i>>2]|0)+4>>2]&127](i);h=f[c>>2]|0}while((h|0)!=(d|0));g=f[b>>2]|0}mp(g);mp(a);return}function Rh(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a;a:do if(!(c&3)){d=a;e=4}else{g=a;h=c;while(1){if(!(b[g>>0]|0)){i=h;break a}j=g+1|0;h=j;if(!(h&3)){d=j;e=4;break}else g=j}}while(0);if((e|0)==4){e=d;while(1){k=f[e>>2]|0;if(!((k&-2139062144^-2139062144)&k+-16843009))e=e+4|0;else break}if(!((k&255)<<24>>24))l=e;else{k=e;while(1){e=k+1|0;if(!(b[e>>0]|0)){l=e;break}else k=e}}i=l}return i-c|0}function Sh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j)k=f[a+4>>2]|0;else k=i&255;do if(k>>>0>=c>>>0)if(j){i=(f[a>>2]|0)+c|0;b[g>>0]=0;Zn(i,g);f[a+4>>2]=c;break}else{b[g>>0]=0;Zn(a+c|0,g);b[h>>0]=c;break}else sh(a,c-k|0,d)|0;while(0);u=e;return}function Th(a){a=a|0;var b=0,c=0,d=0;if(!a)return;b=a+88|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=f[c+8>>2]|0;if(b|0){d=c+12|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;mp(b)}mp(c)}c=f[a+68>>2]|0;if(c|0){b=a+72|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);mp(c)}c=a+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){b=d+4|0;if((f[b>>2]|0)!=(c|0))f[b>>2]=c;mp(c)}mp(d)}mp(a);return}function Uh(a,c,d,e,g,h,i,j,k,l){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0;f[a>>2]=d;if(d|0){m=d+16|0;n=f[m+4>>2]|0;o=a+8|0;f[o>>2]=f[m>>2];f[o+4>>2]=n;n=d+24|0;d=f[n+4>>2]|0;o=a+16|0;f[o>>2]=f[n>>2];f[o+4>>2]=d}b[a+24>>0]=e;f[a+28>>2]=g;b[a+32>>0]=h&1;h=a+40|0;f[h>>2]=i;f[h+4>>2]=j;j=a+48|0;f[j>>2]=k;f[j+4>>2]=l;f[a+56>>2]=c;return}function Vh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;if((f[c+76>>2]|0)>=0?(rp(c)|0)!=0:0){d=a&255;e=a&255;if((e|0)!=(b[c+75>>0]|0)?(g=c+20|0,h=f[g>>2]|0,h>>>0<(f[c+16>>2]|0)>>>0):0){f[g>>2]=h+1;b[h>>0]=d;i=e}else i=Wh(c,a)|0;qp(c);j=i}else k=3;do if((k|0)==3){i=a&255;e=a&255;if((e|0)!=(b[c+75>>0]|0)?(d=c+20|0,h=f[d>>2]|0,h>>>0<(f[c+16>>2]|0)>>>0):0){f[d>>2]=h+1;b[h>>0]=i;j=e;break}j=Wh(c,a)|0}while(0);return j|0}function Wh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;d=u;u=u+16|0;e=d;g=c&255;b[e>>0]=g;i=a+16|0;j=f[i>>2]|0;if(!j)if(!(Dj(a)|0)){k=f[i>>2]|0;l=4}else m=-1;else{k=j;l=4}do if((l|0)==4){j=a+20|0;i=f[j>>2]|0;if(i>>>0<k>>>0?(n=c&255,(n|0)!=(b[a+75>>0]|0)):0){f[j>>2]=i+1;b[i>>0]=g;m=n;break}if((Ra[f[a+36>>2]&31](a,e,1)|0)==1)m=h[e>>0]|0;else m=-1}while(0);u=d;return m|0}function Xh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;g=d+4|0;f[e>>2]=c;c=Yk(32)|0;f[g>>2]=c;f[g+8>>2]=-2147483616;f[g+4>>2]=24;h=c;i=11875;j=h+24|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[c+24>>0]=0;ei(Ac(a,e)|0,g,1);if((b[g+11>>0]|0)>=0){u=d;return}mp(f[g>>2]|0);u=d;return}function Yh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=Yk(88)|0;d=c+60|0;e=c;g=e+60|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f[d>>2]=c;d=c+64|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;d=Pe(c,b)|0;f[a>>2]=d?c:0;a=d?0:c;if(d)return;Vg(a);mp(a);return}function Zh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=c;i=((f[c+4>>2]|0)-(f[c>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;If(a+24|0,i,g);i=f[h>>2]|0;h=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;b[g>>0]=0;If(a+36|0,h,g);g=a+8|0;f[g>>2]=f[d>>2];f[g+4>>2]=f[d+4>>2];f[g+8>>2]=f[d+8>>2];f[g+12>>2]=f[d+12>>2];u=e;return}function _h(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;f[a>>2]=3548;b=f[a+20>>2]|0;if(b|0){c=a+24|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=a+8|0;d=f[b>>2]|0;if(!d)return;c=a+12|0;a=f[c>>2]|0;if((a|0)==(d|0))e=d;else{g=a;do{a=g+-4|0;f[c>>2]=a;h=f[a>>2]|0;f[a>>2]=0;if(h|0)Ua[f[(f[h>>2]|0)+4>>2]&127](h);g=f[c>>2]|0}while((g|0)!=(d|0));e=f[b>>2]|0}mp(e);return}function $h(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3120;b=a+84|0;c=a+4|0;d=c+80|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+88>>2]=-1;f[a+92>>2]=-1;b=a+152|0;c=a+96|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));n[b>>2]=$(1.0);b=a+212|0;c=a+156|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+216>>2]=0;f[a+220>>2]=0;f[a+224>>2]=0;Ck(a+232|0);return}function ai(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;if(c>>>0>0|(c|0)==0&a>>>0>4294967295){e=d;f=a;g=c;while(1){c=Wk(f|0,g|0,10,0)|0;e=e+-1|0;b[e>>0]=c&255|48;c=f;f=Mn(f|0,g|0,10,0)|0;if(!(g>>>0>9|(g|0)==9&c>>>0>4294967295))break;else g=I}h=f;i=e}else{h=a;i=d}if(!h)j=i;else{d=h;h=i;while(1){i=h+-1|0;b[i>>0]=(d>>>0)%10|0|48;if(d>>>0<10){j=i;break}else{d=(d>>>0)/10|0;h=i}}}return j|0}function bi(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=a;while(1){d=c+1|0;if(!(Go(b[c>>0]|0)|0))break;else c=d}a=b[c>>0]|0;switch(a<<24>>24|0){case 45:{e=1;f=5;break}case 43:{e=0;f=5;break}default:{g=0;h=c;i=a}}if((f|0)==5){g=e;h=d;i=b[d>>0]|0}if(!(Xo(i<<24>>24)|0))j=0;else{i=0;d=h;while(1){h=(i*10|0)+48-(b[d>>0]|0)|0;d=d+1|0;if(!(Xo(b[d>>0]|0)|0)){j=h;break}else i=h}}return (g|0?j:0-j|0)|0}function ci(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;f[a>>2]=0;c=a+4|0;f[c>>2]=0;f[a+8>>2]=0;d=b+4|0;e=(f[d>>2]|0)-(f[b>>2]|0)|0;g=(e|0)/20|0;if(!e)return;if(g>>>0>214748364)Do(a);h=Yk(e)|0;f[c>>2]=h;f[a>>2]=h;f[a+8>>2]=h+(g*20|0);g=f[b>>2]|0;b=(f[d>>2]|0)-g|0;if((b|0)<=0)return;Ef(h|0,g|0,b|0)|0;f[c>>2]=h+(((b>>>0)/20|0)*20|0);return}function di(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,i=0,j=0,k=0;b=f[a+32>>2]|0;c=b+8|0;d=f[c>>2]|0;e=f[c+4>>2]|0;c=b+16|0;g=c;i=f[g>>2]|0;j=Vl(i|0,f[g+4>>2]|0,4,0)|0;g=I;if((e|0)<(g|0)|(e|0)==(g|0)&d>>>0<j>>>0){k=0;return k|0}d=(f[b>>2]|0)+i|0;i=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;d=c;f[d>>2]=j;f[d+4>>2]=g;if((i|0)<0){k=0;return k|0}f[(f[a+4>>2]|0)+80>>2]=i;k=1;return k|0}function ei(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;tj(g,d&1);d=Mg(a,c)|0;c=d+11|0;if((b[c>>0]|0)<0){b[f[d>>2]>>0]=0;f[d+4>>2]=0}else{b[d>>0]=0;b[c>>0]=0}Bf(d,0);f[d>>2]=f[g>>2];f[d+4>>2]=f[g+4>>2];f[d+8>>2]=f[g+8>>2];u=e;return}function fi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2172;b=f[a+96>>2]|0;if(b|0)mp(b);b=f[a+84>>2]|0;if(b|0)mp(b);b=f[a+72>>2]|0;if(b|0)mp(b);b=f[a+60>>2]|0;if(b|0)mp(b);f[a>>2]=1584;b=f[a+32>>2]|0;if(!b){mp(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b);mp(a);return}function gi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=qf(a,c)|0;if((e|0)==(a+4|0)){g=-1;h=(g|0)==-1;i=(g|0)!=0;j=h?d:i;return j|0}a=e+28|0;if((b[a+11>>0]|0)<0)k=f[a>>2]|0;else k=a;g=bi(k)|0;h=(g|0)==-1;i=(g|0)!=0;j=h?d:i;return j|0}function hi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1808;b=f[a+96>>2]|0;if(b|0)mp(b);b=f[a+84>>2]|0;if(b|0)mp(b);b=f[a+72>>2]|0;if(b|0)mp(b);b=f[a+60>>2]|0;if(b|0)mp(b);f[a>>2]=1584;b=f[a+32>>2]|0;if(!b){mp(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b);mp(a);return}function ii(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0;d=0;while(1){if((h[14310+d>>0]|0)==(a|0)){e=2;break}g=d+1|0;if((g|0)==87){i=14398;j=87;e=5;break}else d=g}if((e|0)==2)if(!d)k=14398;else{i=14398;j=d;e=5}if((e|0)==5)while(1){e=0;d=i;do{a=d;d=d+1|0}while((b[a>>0]|0)!=0);j=j+-1|0;if(!j){k=d;break}else{i=d;e=5}}return Lo(k,f[c+20>>2]|0)|0}function ji(a,b){a=+a;b=b|0;var c=0,d=0,e=0,g=0.0,h=0.0,i=0,j=0.0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;e=Yl(c|0,d|0,52)|0;switch(e&2047){case 0:{if(a!=0.0){g=+ji(a*18446744073709551616.0,b);h=g;i=(f[b>>2]|0)+-64|0}else{h=a;i=0}f[b>>2]=i;j=h;break}case 2047:{j=a;break}default:{f[b>>2]=(e&2047)+-1022;f[s>>2]=c;f[s+4>>2]=d&-2146435073|1071644672;j=+p[s>>3]}}return +j}function ki(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,i=0,j=0,k=0;b=f[a+32>>2]|0;c=b+8|0;d=f[c>>2]|0;e=f[c+4>>2]|0;c=b+16|0;g=c;i=f[g>>2]|0;j=Vl(i|0,f[g+4>>2]|0,4,0)|0;g=I;if((e|0)<(g|0)|(e|0)==(g|0)&d>>>0<j>>>0){k=0;return k|0}d=(f[b>>2]|0)+i|0;i=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;d=c;f[d>>2]=j;f[d+4>>2]=g;f[(f[a+4>>2]|0)+80>>2]=i;k=1;return k|0}function li(a){a=a|0;var b=0,c=0;f[a>>2]=2172;b=f[a+96>>2]|0;if(b|0)mp(b);b=f[a+84>>2]|0;if(b|0)mp(b);b=f[a+72>>2]|0;if(b|0)mp(b);b=f[a+60>>2]|0;if(b|0)mp(b);f[a>>2]=1584;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);mp(b);return}function mi(a){a=a|0;var b=0,c=0;f[a>>2]=1808;b=f[a+96>>2]|0;if(b|0)mp(b);b=f[a+84>>2]|0;if(b|0)mp(b);b=f[a+72>>2]|0;if(b|0)mp(b);b=f[a+60>>2]|0;if(b|0)mp(b);f[a>>2]=1584;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);mp(b);return}function ni(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;f[a>>2]=0;c=a+4|0;f[c>>2]=0;f[a+8>>2]=0;d=b+4|0;e=(f[d>>2]|0)-(f[b>>2]|0)|0;g=e>>2;if(!g)return;if(g>>>0>1073741823)Do(a);h=Yk(e)|0;f[c>>2]=h;f[a>>2]=h;f[a+8>>2]=h+(g<<2);g=f[b>>2]|0;b=(f[d>>2]|0)-g|0;if((b|0)<=0)return;Ef(h|0,g|0,b|0)|0;f[c>>2]=h+(b>>>2<<2);return}function oi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;a=f[b+4>>2]|0;if(!a){d=0;return d|0}e=f[(f[(f[b+8>>2]|0)+(c<<2)>>2]|0)+60>>2]|0;c=f[a+40>>2]|0;b=f[a+44>>2]|0;if((c|0)==(b|0)){d=0;return d|0}else g=c;while(1){c=f[g>>2]|0;g=g+4|0;if((f[c+40>>2]|0)==(e|0)){d=c;h=5;break}if((g|0)==(b|0)){d=0;h=5;break}}if((h|0)==5)return d|0;return 0}function pi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=a+8|0;d=f[a>>2]|0;if((f[c>>2]|0)-d>>2>>>0>=b>>>0)return;e=a+4|0;if(b>>>0>1073741823){g=ra(8)|0;dn(g,13708);f[g>>2]=4852;va(g|0,1176,105)}g=(f[e>>2]|0)-d|0;h=Yk(b<<2)|0;if((g|0)>0)Ef(h|0,d|0,g|0)|0;f[a>>2]=h;f[e>>2]=h+(g>>2<<2);f[c>>2]=h+(b<<2);if(!d)return;mp(d);return}function qi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=Pa[f[(f[a>>2]|0)+24>>2]&127](a)|0;if((c|0)<=0){d=1;return d|0}e=a+36|0;g=a+48|0;a=0;while(1){h=f[(f[e>>2]|0)+(a<<2)>>2]|0;a=a+1|0;if(!(Ra[f[(f[h>>2]|0)+20>>2]&31](h,g,b)|0)){d=0;i=5;break}if((a|0)>=(c|0)){d=1;i=5;break}}if((i|0)==5)return d|0;return 0}function ri(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;switch(c<<24>>24){case 0:{c=Yk(20)|0;gm(c);d=c;break}case 1:{c=Yk(24)|0;Jm(c);d=c;break}case 2:{c=Yk(36)|0;ml(c);d=c;break}case 3:{c=Yk(28)|0;Am(c);d=c;break}default:d=0}f[a>>2]=d;return}function si(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=Pa[f[(f[a>>2]|0)+24>>2]&127](a)|0;if((c|0)<=0){d=1;return d|0}e=a+36|0;g=a+48|0;a=0;while(1){h=f[(f[e>>2]|0)+(a<<2)>>2]|0;a=a+1|0;if(!(Ra[f[(f[h>>2]|0)+16>>2]&31](h,g,b)|0)){d=0;i=5;break}if((a|0)>=(c|0)){d=1;i=5;break}}if((i|0)==5)return d|0;return 0}function ti(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;f[a>>2]=0;d=a+4|0;f[d>>2]=0;f[a+8>>2]=0;if(!b)return;if(b>>>0>357913941)Do(a);e=Yk(b*12|0)|0;f[d>>2]=e;f[a>>2]=e;f[a+8>>2]=e+(b*12|0);a=b;b=e;do{ni(b,c);b=(f[d>>2]|0)+12|0;f[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function ui(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=f[b>>2]|0;if(!c){d=0;return d|0}e=a+44|0;g=f[e>>2]|0;if(g>>>0<(f[a+48>>2]|0)>>>0){f[b>>2]=0;f[g>>2]=c;f[e>>2]=(f[e>>2]|0)+4;d=1;return d|0}else{sf(a+40|0,b);d=1;return d|0}return 0}function vi(a){a=a|0;var b=0;if(!(f[a+44>>2]|0)){b=0;return b|0}if(!(f[a+48>>2]|0)){b=0;return b|0}if(!(f[a+24>>2]|0)){b=0;return b|0}if(!(f[a+28>>2]|0)){b=0;return b|0}if(!(f[a+32>>2]|0)){b=0;return b|0}if(!(f[a+36>>2]|0)){b=0;return b|0}b=(f[a+72>>2]|0)!=-1;return b|0}function wi(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0;f[c>>2]=2;d=a+4|0;a=c+8|0;e=f[a>>2]|0;g=(f[c+12>>2]|0)-e|0;if(g>>>0<4294967292){Pi(a,g+4|0,0);i=f[a>>2]|0}else i=e;e=i+g|0;g=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[e>>0]=g;b[e+1>>0]=g>>8;b[e+2>>0]=g>>16;b[e+3>>0]=g>>24;return}function xi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2228;b=f[a+76>>2]|0;if(b|0)mp(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)kp(c);f[a>>2]=1584;c=f[a+32>>2]|0;if(!c){mp(a);return}b=a+36|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);mp(c);mp(a);return}function yi(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3172;b=a+8|0;f[b>>2]=3196;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);mp(c)}f[b>>2]=3216;b=f[a+44>>2]|0;if(b|0)mp(b);b=f[a+32>>2]|0;if(!b){mp(a);return}mp(b);mp(a);return}function zi(a){a=a|0;var b=0;if(!(f[a+64>>2]|0)){b=0;return b|0}if(!(f[a+68>>2]|0)){b=0;return b|0}if(!(f[a+44>>2]|0)){b=0;return b|0}if(!(f[a+48>>2]|0)){b=0;return b|0}if(!(f[a+52>>2]|0)){b=0;return b|0}if(!(f[a+56>>2]|0)){b=0;return b|0}b=(f[a+92>>2]|0)!=-1;return b|0}function Ai(a){a=a|0;var c=0;if(!a)return;c=a+28|0;if((b[c+11>>0]|0)<0)mp(f[c>>2]|0);Ih(a+12|0,f[a+16>>2]|0);Oh(a,f[a+4>>2]|0);mp(a);return}function Bi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1864;b=f[a+76>>2]|0;if(b|0)mp(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)kp(c);f[a>>2]=1584;c=f[a+32>>2]|0;if(!c){mp(a);return}b=a+36|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);mp(c);mp(a);return}function Ci(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3240;b=a+8|0;f[b>>2]=3264;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);mp(c)}f[b>>2]=3284;b=f[a+44>>2]|0;if(b|0)mp(b);b=f[a+32>>2]|0;if(!b){mp(a);return}mp(b);mp(a);return}function Di(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0;if(!a)return;c=f[a>>2]|0;if(c|0){d=a+4|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;if((b[e+11>>0]|0)<0){mp(f[e>>2]|0);i=f[d>>2]|0}else i=e;if((i|0)==(c|0))break;else h=i}g=f[a>>2]|0}mp(g)}mp(a);return}function Ei(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;ic(a,b);if((b|0)<=-1)return;c=a+88|0;d=f[c>>2]|0;e=f[a+84>>2]|0;if((d-e>>2|0)<=(b|0))return;a=e+(b<<2)|0;b=a+4|0;e=d-b|0;g=e>>2;if(!g)h=d;else{kk(a|0,b|0,e|0)|0;h=f[c>>2]|0}e=a+(g<<2)|0;if((h|0)==(e|0))return;f[c>>2]=h+(~((h+-4-e|0)>>>2)<<2);return}function Fi(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3172;b=a+8|0;f[b>>2]=3196;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);mp(c)}f[b>>2]=3216;b=f[a+44>>2]|0;if(b|0)mp(b);b=f[a+32>>2]|0;if(!b)return;mp(b);return}function Gi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0;a=c+16|0;g=f[a>>2]|0;do if(g){if((g|0)!=(d|0)){h=c+36|0;f[h>>2]=(f[h>>2]|0)+1;f[c+24>>2]=2;b[c+54>>0]=1;break}h=c+24|0;if((f[h>>2]|0)==2)f[h>>2]=e}else{f[a>>2]=d;f[c+24>>2]=e;f[c+36>>2]=1}while(0);return}function Hi(a){a=a|0;var b=0,c=0;f[a>>2]=2228;b=f[a+76>>2]|0;if(b|0)mp(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)kp(c);f[a>>2]=1584;c=f[a+32>>2]|0;if(!c)return;b=a+36|0;a=f[b>>2]|0;if((a|0)!=(c|0))f[b>>2]=a+(~((a+-4-c|0)>>>2)<<2);mp(c);return}function Ii(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3688;b=f[a+96>>2]|0;if(b|0){c=a+100|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);mp(b)}b=f[a+84>>2]|0;if(!b){of(a);mp(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b);of(a);mp(a);return}function Ji(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3240;b=a+8|0;f[b>>2]=3264;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);mp(c)}f[b>>2]=3284;b=f[a+44>>2]|0;if(b|0)mp(b);b=f[a+32>>2]|0;if(!b)return;mp(b);return}function Ki(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if(((h[(f[a+4>>2]|0)+36>>0]|0)<<8&65535)<512?!(Pa[f[(f[a>>2]|0)+52>>2]&127](a)|0):0){d=0;return d|0}d=xc(a,b,c)|0;return d|0}function Li(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;g=d>>31|((d|0)<0?-1:0)<<1;h=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;i=Xl(e^a|0,f^b|0,e|0,f|0)|0;b=I;a=g^e;e=h^f;return Xl((Gc(i,b,Xl(g^c|0,h^d|0,g|0,h|0)|0,I,0)|0)^a|0,I^e|0,a|0,e|0)|0}function Mi(a){a=a|0;var b=0,c=0;f[a>>2]=1864;b=f[a+76>>2]|0;if(b|0)mp(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)kp(c);f[a>>2]=1584;c=f[a+32>>2]|0;if(!c)return;b=a+36|0;a=f[b>>2]|0;if((a|0)!=(c|0))f[b>>2]=a+(~((a+-4-c|0)>>>2)<<2);mp(c);return}function Ni(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0;f[a>>2]=b;h=b+16|0;i=f[h+4>>2]|0;j=a+8|0;f[j>>2]=f[h>>2];f[j+4>>2]=i;i=b+24|0;b=f[i+4>>2]|0;j=a+16|0;f[j>>2]=f[i>>2];f[j+4>>2]=b;b=a+40|0;f[b>>2]=c;f[b+4>>2]=d;d=a+48|0;f[d>>2]=e;f[d+4>>2]=g;return}function Oi(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0;c=b[a+12>>0]|0;d=a+8|0;e=f[d>>2]|0;if(e>>>0<4096?(g=a+4|0,i=f[g>>2]|0,(i|0)>0):0){j=f[a>>2]|0;a=i+-1|0;f[g>>2]=a;g=e<<8|(h[j+a>>0]|0);f[d>>2]=g;k=g}else k=e;e=k&255;g=0-c&255;c=X(k>>>8,g)|0;a=e>>>0<g>>>0;f[d>>2]=a?c+e|0:k-g-c|0;return a|0}function Pi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e|0;h=e;e=d;if(g>>>0>=b>>>0){if(g>>>0>b>>>0?(d=h+b|0,(d|0)!=(e|0)):0)f[c>>2]=d}else Rg(a,b-g|0);g=a+24|0;a=g;b=Vl(f[a>>2]|0,f[a+4>>2]|0,1,0)|0;a=g;f[a>>2]=b;f[a+4>>2]=I;return}function Qi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;Ce(g,a,c,d);d=a+24|0;f[d>>2]=f[g>>2];c=g+4|0;ck(a+28|0,c)|0;if((b[c+11>>0]|0)>=0){u=e;return d|0}mp(f[c>>2]|0);u=e;return d|0}function Ri(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3688;b=f[a+96>>2]|0;if(b|0){c=a+100|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);mp(b)}b=f[a+84>>2]|0;if(!b){of(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);mp(b);of(a);return}function Si(a){a=a|0;var c=0,d=0,e=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;b[a+24>>0]=1;c=a+68|0;d=a+28|0;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));f[c>>2]=a;c=a+72|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;return}function Ti(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3196;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}f[a>>2]=3216;b=f[a+36>>2]|0;if(b|0)mp(b);b=f[a+24>>2]|0;if(!b){mp(a);return}mp(b);mp(a);return}function Ui(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;Ge(g,a,c,d);d=a+24|0;f[d>>2]=f[g>>2];c=g+4|0;ck(a+28|0,c)|0;if((b[c+11>>0]|0)>=0){u=e;return d|0}mp(f[c>>2]|0);u=e;return d|0}function Vi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2284;b=f[a+76>>2]|0;if(b|0)mp(b);f[a>>2]=1584;b=f[a+32>>2]|0;if(!b){mp(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b);mp(a);return}function Wi(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=u;u=u+256|0;g=f;if((c|0)>(d|0)&(e&73728|0)==0){e=c-d|0;Dh(g|0,b<<24>>24|0,(e>>>0<256?e:256)|0)|0;if(e>>>0>255){b=c-d|0;d=e;do{qn(a,g,256);d=d+-256|0}while(d>>>0>255);h=b&255}else h=e;qn(a,g,h)}u=f;return}function Xi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3264;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}f[a>>2]=3284;b=f[a+36>>2]|0;if(b|0)mp(b);b=f[a+24>>2]|0;if(!b){mp(a);return}mp(b);mp(a);return}function Yi(a){a=a|0;var b=0,c=0,d=0,e=0,g=0;b=f[a+8>>2]|0;c=f[a+12>>2]|0;if((b|0)==(c|0)){d=1;return d|0}e=a+32|0;a=b;while(1){b=f[a>>2]|0;a=a+4|0;if(!(Qa[f[(f[b>>2]|0)+16>>2]&127](b,f[e>>2]|0)|0)){d=0;g=5;break}if((a|0)==(c|0)){d=1;g=5;break}}if((g|0)==5)return d|0;return 0}function Zi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=f[a+8>>2]|0;if((b[e+24>>0]|0)<1){g=0;return g|0}if(!(Jh(e,(f[c+4>>2]|0)-(f[c>>2]|0)>>2)|0)){g=0;return g|0}g=Ra[f[(f[a>>2]|0)+32>>2]&31](a,c,d)|0;return g|0}function _i(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1920;b=f[a+76>>2]|0;if(b|0)mp(b);f[a>>2]=1584;b=f[a+32>>2]|0;if(!b){mp(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b);mp(a);return}function $i(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0;if(Gn(a,f[b+8>>2]|0,g)|0)Bh(0,b,c,d,e);else{h=f[a+8>>2]|0;Za[f[(f[h>>2]|0)+20>>2]&3](h,b,c,d,e,g)}return}function aj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3196;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}f[a>>2]=3216;b=f[a+36>>2]|0;if(b|0)mp(b);b=f[a+24>>2]|0;if(!b)return;mp(b);return}function bj(a,b){a=a|0;b=b|0;var c=0;c=Yk(40)|0;f[c>>2]=-1;ll(c+8|0);Va[f[(f[a>>2]|0)+16>>2]&7](a,c);a=b+88|0;b=f[a>>2]|0;f[a>>2]=c;if(!b)return 1;c=f[b+8>>2]|0;if(c|0){a=b+12|0;if((f[a>>2]|0)!=(c|0))f[a>>2]=c;mp(c)}mp(b);return 1}function cj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=f[a+12>>2]|0;d=f[a+8>>2]|0;a=d;if((c|0)==(d|0)){e=0;return e|0}g=c-d>>2;d=0;while(1){c=f[a+(d<<2)>>2]|0;if((f[c+60>>2]|0)==(b|0)){e=c;h=5;break}d=d+1|0;if(d>>>0>=g>>>0){e=0;h=5;break}}if((h|0)==5)return e|0;return 0}function dj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=f[a+12>>2]|0;d=f[a+8>>2]|0;a=d;if((c|0)==(d|0)){e=-1;return e|0}g=c-d>>2;d=0;while(1){if((f[(f[a+(d<<2)>>2]|0)+60>>2]|0)==(b|0)){e=d;h=5;break}d=d+1|0;if(d>>>0>=g>>>0){e=-1;h=5;break}}if((h|0)==5)return e|0;return 0}function ej(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3264;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}f[a>>2]=3284;b=f[a+36>>2]|0;if(b|0)mp(b);b=f[a+24>>2]|0;if(!b)return;mp(b);return}function fj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;a:do if(!d)e=0;else{f=a;g=d;h=c;while(1){i=b[f>>0]|0;j=b[h>>0]|0;if(i<<24>>24!=j<<24>>24)break;g=g+-1|0;if(!g){e=0;break a}else{f=f+1|0;h=h+1|0}}e=(i&255)-(j&255)|0}while(0);return e|0}function gj(a){a=a|0;var b=0,c=0;f[a>>2]=2284;b=f[a+76>>2]|0;if(b|0)mp(b);f[a>>2]=1584;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);mp(b);return}function hj(a){a=a|0;var b=0,c=0;f[a>>2]=2932;b=a+28|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)kp(c);f[a>>2]=1524;c=a+20|0;b=f[c>>2]|0;f[c>>2]=0;if(!b){Gh(a);mp(a);return}Ua[f[(f[b>>2]|0)+4>>2]&127](b);Gh(a);mp(a);return}function ij(a){a=a|0;var c=0,d=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;c=0;while(1){if((c|0)==3)break;f[a+(c<<2)>>2]=0;c=c+1|0}if((b[a+11>>0]|0)<0)d=(f[a+8>>2]&2147483647)+-1|0;else d=10;Sh(a,d,0);return}function jj(a){a=a|0;var b=0,c=0;f[a>>2]=1920;b=f[a+76>>2]|0;if(b|0)mp(b);f[a>>2]=1584;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);mp(b);return}function kj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1304;b=f[a+16>>2]|0;if(b|0){c=a+20|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}b=f[a+4>>2]|0;if(!b)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(b|0))f[d>>2]=a+(~((a+-4-b|0)>>>2)<<2);mp(b);return}function lj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=f[a>>2]|0;c=a+4|0;d=f[c>>2]|0;e=b;g=d+(~((d+-4-e|0)>>>2)<<2)|0;if((d|0)==(b|0))h=b;else{f[c>>2]=g;h=g}f[a+16>>2]=0;f[a+12>>2]=h;if(!b)return;if((h|0)!=(b|0))f[c>>2]=h+(~((h+-4-e|0)>>>2)<<2);mp(b);return}function mj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2340;f[a>>2]=1584;b=f[a+32>>2]|0;if(!b){mp(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b);mp(a);return}function nj(a){a=a|0;var b=0,c=0;f[a>>2]=2932;b=a+28|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)kp(c);f[a>>2]=1524;c=a+20|0;b=f[c>>2]|0;f[c>>2]=0;if(!b){Gh(a);return}Ua[f[(f[b>>2]|0)+4>>2]&127](b);Gh(a);return}function oj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if(Gn(a,f[b+8>>2]|0,0)|0)Gi(0,b,c,d);else{e=f[a+8>>2]|0;Xa[f[(f[e>>2]|0)+28>>2]&7](e,b,c,d)}return}function pj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;e=X(c,b)|0;g=(b|0)==0?0:c;if((f[d+76>>2]|0)>-1){c=(rp(d)|0)==0;h=Ag(a,e,d)|0;if(c)i=h;else{qp(d);i=h}}else i=Ag(a,e,d)|0;if((i|0)==(e|0))j=g;else j=(i>>>0)/(b>>>0)|0;return j|0}function qj(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)<0){c=0;return c|0}d=f[a+4>>2]|0;if(((f[d+12>>2]|0)-(f[d+8>>2]|0)>>2|0)<=(b|0)){c=0;return c|0}d=f[(f[a+8>>2]|0)+(f[(f[a+20>>2]|0)+(b<<2)>>2]<<2)>>2]|0;c=Qa[f[(f[d>>2]|0)+32>>2]&127](d,b)|0;return c|0}function rj(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0;d=b[a>>0]|0;e=b[c>>0]|0;if(d<<24>>24==0?1:d<<24>>24!=e<<24>>24){f=e;g=d}else{d=c;c=a;do{c=c+1|0;d=d+1|0;a=b[c>>0]|0;e=b[d>>0]|0}while(!(a<<24>>24==0?1:a<<24>>24!=e<<24>>24));f=e;g=a}return (g&255)-(f&255)|0}function sj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1976;f[a>>2]=1584;b=f[a+32>>2]|0;if(!b){mp(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b);mp(a);return}function tj(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;ij(d);Xg(a,d,b);Om(d);u=c;return}function uj(a,b){a=a|0;b=b|0;var c=0,d=0;c=f[a+4>>2]|0;if(c|0?((h[c+36>>0]|0)<<8&65535)<512:0){d=1;return d|0}d=Qa[f[(f[a>>2]|0)+48>>2]&127](a,(f[b+4>>2]|0)-(f[b>>2]|0)>>2)|0;return d|0}function vj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;d=u;u=u+32|0;e=d;g=d+20|0;f[e>>2]=f[a+60>>2];f[e+4>>2]=0;f[e+8>>2]=b;f[e+12>>2]=g;f[e+16>>2]=c;if((mm(za(140,e|0)|0)|0)<0){f[g>>2]=-1;h=-1}else h=f[g>>2]|0;u=d;return h|0}function wj(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)==-1|(b|0)>4){c=0;return c|0}d=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-d|0)<=0){c=0;return c|0}b=f[d>>2]|0;if((b|0)==-1){c=0;return c|0}c=f[(f[a+8>>2]|0)+(b<<2)>>2]|0;return c|0}function xj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){d=0;return d|0}e=f[c+(b<<2)>>2]|0;if((e|0)<0){d=0;return d|0}d=ig(f[(f[a+36>>2]|0)+(e<<2)>>2]|0)|0;return d|0}function yj(a,b){a=a|0;b=b|0;var c=0;Gk(a);f[a>>2]=1464;c=a+36|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;c=f[b>>2]|0;f[b>>2]=0;f[a+60>>2]=c;return}function zj(a){a=a|0;var b=0,c=0;f[a>>2]=2340;f[a>>2]=1584;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);mp(b);return}function Aj(a){a=a|0;var b=0,c=0;f[a>>2]=1976;f[a>>2]=1584;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);mp(b);return}function Bj(a,c){a=a|0;c=c|0;var d=0,e=0;d=a;e=c;c=d+64|0;do{f[d>>2]=f[e>>2];d=d+4|0;e=e+4|0}while((d|0)<(c|0));e=a+64|0;f[a+88>>2]=0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;b[e+20>>0]=0;return}function Cj(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;if((a|0)==0&(c|0)==0)f=d;else{g=d;d=c;c=a;while(1){a=g+-1|0;b[a>>0]=h[14292+(c&15)>>0]|0|e;c=Yl(c|0,d|0,4)|0;d=I;if((c|0)==0&(d|0)==0){f=a;break}else g=a}}return f|0}function Dj(a){a=a|0;var c=0,d=0,e=0;c=a+74|0;d=b[c>>0]|0;b[c>>0]=d+255|d;d=f[a>>2]|0;if(!(d&8)){f[a+8>>2]=0;f[a+4>>2]=0;c=f[a+44>>2]|0;f[a+28>>2]=c;f[a+20>>2]=c;f[a+16>>2]=c+(f[a+48>>2]|0);e=0}else{f[a>>2]=d|32;e=-1}return e|0}function Ej(a){a=a|0;if(!(f[a+60>>2]|0))return 0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+52>>2]|0))return 0;else return (f[a+56>>2]|0)!=0|0;return 0}function Fj(a,b){a=a|0;b=b|0;var c=0,d=0;c=f[b+88>>2]|0;if(!c){d=0;return d|0}if((f[c>>2]|0)!=2){d=0;return d|0}b=f[c+8>>2]|0;f[a+4>>2]=h[b>>0]|h[b+1>>0]<<8|h[b+2>>0]<<16|h[b+3>>0]<<24;d=1;return d|0}function Gj(a){a=a|0;var b=0;if(!(f[a+44>>2]|0)){b=0;return b|0}if(!(f[a+48>>2]|0)){b=0;return b|0}if(!(f[a+52>>2]|0)){b=0;return b|0}b=(f[a+56>>2]|0)!=0;return b|0}function Hj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0;d=b[a+11>>0]|0;e=d<<24>>24<0;if(e)g=f[a+4>>2]|0;else g=d&255;if(g>>>0<=c>>>0)Do(a);if(e)h=f[a>>2]|0;else h=a;return h+c|0}function Ij(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+32|0;g=e;f[a+36>>2]=15;if((f[a>>2]&64|0)==0?(f[g>>2]=f[a+60>>2],f[g+4>>2]=21523,f[g+8>>2]=e+16,Ba(54,g|0)|0):0)b[a+75>>0]=-1;g=nf(a,c,d)|0;u=e;return g|0}function Jj(a,b,c){a=a|0;b=b|0;c=c|0;if((b|0)!=0&(c|0)!=0){mc(a,b,c);return}else{wc(a,0,0);return}}function Kj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=$(e);f[a+4>>2]=b;Ie(a+8|0,c,c+(d<<2)|0);n[a+20>>2]=e;return}function Lj(a,b){a=a|0;b=b|0;var c=0;if(!(Qa[f[(f[a>>2]|0)+36>>2]&127](a,b)|0)){c=0;return c|0}if(!(Qa[f[(f[a>>2]|0)+40>>2]&127](a,b)|0)){c=0;return c|0}c=Pa[f[(f[a>>2]|0)+44>>2]&127](a)|0;return c|0}function Mj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;d=f[c>>2]|0;c=a;e=b-a>>2;while(1){if(!e)break;a=(e|0)/2|0;b=c+(a<<2)|0;g=(f[b>>2]|0)>>>0<d>>>0;c=g?b+4|0:c;e=g?e+-1-a|0:a}return c|0}function Nj(a){a=a|0;var c=0;f[a>>2]=0;c=a+8|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;b[a+24>>0]=1;f[a+28>>2]=9;c=a+40|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[a+56>>2]=-1;f[a+60>>2]=0;return}function Oj(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+44>>2]=c;d=1;return d|0}function Pj(a,c){a=a|0;c=c|0;var d=0,e=0;a=u;u=u+32|0;d=a;vh(d,c);c=f[d+16>>2]|0;e=d+4|0;if((b[e+11>>0]|0)>=0){u=a;return c|0}mp(f[e>>2]|0);u=a;return c|0}function Qj(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;if(!(Xo(b[f[a>>2]>>0]|0)|0))c=0;else{d=0;while(1){e=f[a>>2]|0;g=(d*10|0)+-48+(b[e>>0]|0)|0;h=e+1|0;f[a>>2]=h;if(!(Xo(b[h>>0]|0)|0)){c=g;break}else d=g}}return c|0}function Rj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;if(!(Jl(a,c,d)|0)){e=0;return e|0}d=f[a+8>>2]|0;if((b[d+24>>0]|0)!=3){e=0;return e|0}e=(f[d+28>>2]|0)==9;return e|0}function Sj(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+64>>2]=c;d=1;return d|0}function Tj(a){a=a|0;var b=0,c=0;b=f[r>>2]|0;c=b+a|0;if((a|0)>0&(c|0)<(b|0)|(c|0)<0){ea()|0;ya(12);return -1}f[r>>2]=c;if((c|0)>(da()|0)?(ca()|0)==0:0){f[r>>2]=b;ya(12);return -1}return b|0}function Uj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0;if((a|0)==0&(c|0)==0)e=d;else{f=d;d=c;c=a;while(1){a=f+-1|0;b[a>>0]=c&7|48;c=Yl(c|0,d|0,3)|0;d=I;if((c|0)==0&(d|0)==0){e=a;break}else f=a}}return e|0}function Vj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1584;b=f[a+32>>2]|0;if(!b){mp(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b);mp(a);return}function Wj(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;if(Gn(a,f[b+8>>2]|0,g)|0)Bh(0,b,c,d,e);return}function Xj(a,c){a=a|0;c=c|0;var d=0;if(((c|0)!=0?(f[c+56>>2]|0)==0:0)?(b[c+24>>0]|0)==3:0){f[a+60>>2]=c;d=1}else d=0;return d|0}function Yj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if(!(Jl(a,b,c)|0)){d=0;return d|0}d=(f[(f[(f[(f[b+4>>2]|0)+8>>2]|0)+(c<<2)>>2]|0)+28>>2]|0)==9;return d|0}function Zj(a){a=a|0;var b=0;switch(a|0){case 11:case 2:case 1:{b=1;break}case 4:case 3:{b=2;break}case 6:case 5:{b=4;break}case 8:case 7:{b=8;break}case 9:{b=4;break}case 10:{b=8;break}default:b=-1}return b|0}function _j(a){a=a|0;var c=0,d=0,e=0;b[a+36>>0]=0;c=Vl(f[a+32>>2]|0,0,7,0)|0;d=Yl(c|0,I|0,3)|0;c=a+16|0;a=c;e=Vl(d|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;a=c;f[a>>2]=e;f[a+4>>2]=I;return}function $j(a){a=a|0;var b=0,c=0,d=0;b=a+60|0;c=a;d=c+60|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=a;b=a+64|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;return}function ak(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=(f[a+96>>2]|0)+(b*12|0)|0;Me(c,d,d+12|0);return 1}function bk(){var a=0,b=0;a=Yk(40)|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;n[a+16>>2]=$(1.0);b=a+20|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;n[a+36>>2]=$(1.0);return a|0}function ck(a,c){a=a|0;c=c|0;var d=0,e=0;if((a|0)!=(c|0)){d=b[c+11>>0]|0;e=d<<24>>24<0;th(a,e?f[c>>2]|0:c,e?f[c+4>>2]|0:d&255)|0}return a|0}function dk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=a&65535;d=b&65535;e=X(d,c)|0;f=a>>>16;a=(e>>>16)+(X(d,f)|0)|0;d=b>>>16;b=X(d,c)|0;return (I=(a>>>16)+(X(d,f)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|e&65535|0)|0}function ek(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=Rh(b)|0;d=Yk(c+13|0)|0;f[d>>2]=c;f[d+4>>2]=c;f[d+8>>2]=0;e=go(d)|0;Ef(e|0,b|0,c+1|0)|0;f[a>>2]=e;return}function fk(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)==-1|(b|0)>4){c=-1;return c|0}d=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-d|0)<=0){c=-1;return c|0}c=f[d>>2]|0;return c|0}function gk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f[b+44>>2]=e;zc(a,b,c,d,e);return}function hk(a){a=a|0;var b=0,c=0;f[a>>2]=1584;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);mp(b);return}function ik(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(Gn(a,f[b+8>>2]|0,0)|0)Gi(0,b,c,d);return}function jk(a){a=a|0;var b=0;f[a>>2]=3548;b=a+4|0;f[a+40>>2]=0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;f[b+24>>2]=0;f[b+28>>2]=0;d[b+32>>1]=0;return}function kk(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;if((c|0)<(a|0)&(a|0)<(c+d|0)){e=a;c=c+d|0;a=a+d|0;while((d|0)>0){a=a-1|0;c=c-1|0;d=d-1|0;b[a>>0]=b[c>>0]|0}a=e}else Ef(a,c,d)|0;return a|0}function lk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1276;b=f[a+8>>2]|0;if(!b){mp(a);return}c=a+12|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b);mp(a);return}function mk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=u;u=u+16|0;e=d;f[e>>2]=f[c>>2];g=Ra[f[(f[a>>2]|0)+16>>2]&31](a,b,e)|0;if(g)f[c>>2]=f[e>>2];u=d;return g&1|0}function nk(a,b){a=a|0;b=b|0;var c=0;if(b>>>0>=2){c=0;return c|0}f[a+28>>2]=b;c=1;return c|0}function ok(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((b|0)>0)d=0;else return;do{e=f[a+(d<<2)>>2]|0;f[c+(d<<2)>>2]=e<<31>>31^e>>>1;d=d+1|0}while((d|0)!=(b|0));return}function pk(){var a=0,b=0;a=$k()|0;if((a|0?(b=f[a>>2]|0,b|0):0)?(a=b+48|0,(f[a>>2]&-256|0)==1126902528?(f[a+4>>2]|0)==1129074247:0):0)Xm(f[b+12>>2]|0);Xm(ro()|0)}function qk(a){a=a|0;var c=0;c=b[w+(a&255)>>0]|0;if((c|0)<8)return c|0;c=b[w+(a>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=b[w+(a>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return (b[w+(a>>>24)>>0]|0)+24|0}function rk(a){a=a|0;var b=0,c=0,d=0;if(!a)return;b=f[a>>2]|0;if(b|0){c=a+4|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);mp(b)}mp(a);return}function sk(a){a=a|0;var b=0,c=0,d=0;if(!a)return;b=f[a>>2]|0;if(b|0){c=a+4|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-2-b|0)>>>1)<<1);mp(b)}mp(a);return}function tk(a,c){a=a|0;c=c|0;var d=0;b[c+84>>0]=1;a=f[c+68>>2]|0;d=c+72|0;c=f[d>>2]|0;if((c|0)==(a|0))return 1;f[d>>2]=c+(~((c+-4-a|0)>>>2)<<2);return 1}function uk(a){a=a|0;var b=0,c=0;if(Ro(a)|0?(b=mo(f[a>>2]|0)|0,a=b+8|0,c=f[a>>2]|0,f[a>>2]=c+-1,(c+-1|0)<0):0)mp(b);return}function vk(a){a=a|0;var b=0;f[a>>2]=3216;b=f[a+36>>2]|0;if(b|0)mp(b);b=f[a+24>>2]|0;if(!b){mp(a);return}mp(b);mp(a);return}function wk(a){a=a|0;var c=0;f[a>>2]=0;c=a+8|0;d[a+38>>1]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;f[c+24>>2]=0;b[c+28>>0]=0;return}function xk(a){a=a|0;var b=0,c=0;f[a>>2]=1524;b=a+20|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Ua[f[(f[c>>2]|0)+4>>2]&127](c);Gh(a);mp(a);return}function yk(a){a=a|0;var b=0,c=0;f[a>>2]=1276;b=f[a+8>>2]|0;if(!b)return;c=a+12|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);mp(b);return}function zk(a){a=a|0;var b=0;f[a>>2]=3284;b=f[a+36>>2]|0;if(b|0)mp(b);b=f[a+24>>2]|0;if(!b){mp(a);return}mp(b);mp(a);return}function Ak(a){a=a|0;f[a>>2]=3304;eh(a+8|0);mp(a);return}function Bk(a,b,c){a=a|0;b=b|0;c=c|0;Qb(a,b,c);return}function Ck(a){a=a|0;wk(a);wk(a+40|0);Zm(a+80|0);wk(a+96|0);f[a+136>>2]=0;f[a+140>>2]=0;f[a+144>>2]=0;return}function Dk(a){a=a|0;var b=0,c=0;f[a>>2]=1524;b=a+20|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Ua[f[(f[c>>2]|0)+4>>2]&127](c);Gh(a);return}function Ek(a,b,c){a=a|0;b=b|0;c=c|0;return fd(a,b,5,6,c)|0}function Fk(a,b,c){a=a|0;b=b|0;c=c|0;return dd(a,b,3,4,c)|0}function Gk(a){a=a|0;var b=0;f[a>>2]=1304;b=a+4|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;f[b+24>>2]=0;f[b+28>>2]=0;return}function Hk(a,b,c){a=a|0;b=b|0;c=c|0;return id(a,b,1,2,c)|0}function Ik(a,b,c){a=a|0;b=b|0;c=c|0;return ed(a,b,3,4,c)|0}function Jk(a,b,c){a=a|0;b=b|0;c=c|0;return gd(a,b,5,6,c)|0}function Kk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=a+20|0;e=f[d>>2]|0;g=(f[a+16>>2]|0)-e|0;a=g>>>0>c>>>0?c:g;Ef(e|0,b|0,a|0)|0;f[d>>2]=(f[d>>2]|0)+a;return c|0}function Lk(a,b,c){a=a|0;b=b|0;c=c|0;return jd(a,b,1,2,c)|0}function Mk(a){a=a|0;var b=0;f[a>>2]=3216;b=f[a+36>>2]|0;if(b|0)mp(b);b=f[a+24>>2]|0;if(!b)return;mp(b);return}function Nk(a){a=a|0;f[a>>2]=3304;eh(a+8|0);return}function Ok(){var a=0,b=0;a=Yk(24)|0;f[a>>2]=1276;f[a+4>>2]=-1;b=a+8|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return a|0}function Pk(a){a=a|0;var c=0;Nj(a);c=a+64|0;f[a+88>>2]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;b[c+20>>0]=0;return}function Qk(a){a=a|0;var b=0,c=0;if(!a)return;b=f[a+8>>2]|0;if(b|0){c=a+12|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;mp(b)}mp(a);return}function Rk(a){a=a|0;var b=0;f[a>>2]=3284;b=f[a+36>>2]|0;if(b|0)mp(b);b=f[a+24>>2]|0;if(!b)return;mp(b);return}function Sk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((f[b+4>>2]|0)==(c|0)?(c=b+28|0,(f[c>>2]|0)!=1):0)f[c>>2]=d;return}function Tk(a,b,c,e){a=a|0;b=b|0;c=c|0;e=e|0;f[a>>2]=b;b=a+8|0;f[b>>2]=c;f[b+4>>2]=0;d[a+38>>1]=e;e=a+16|0;f[e>>2]=0;f[e+4>>2]=0;return}function Uk(a){a=a|0;var b=0,c=0;if(!a)return;b=f[a>>2]|0;if(b|0){c=a+4|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;mp(b)}mp(a);return}function Vk(a){a=a|0;var b=0;Nn(a);f[a+16>>2]=0;f[a+20>>2]=0;f[a+12>>2]=a+16;b=a+24|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return}function Wk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e|0;Gc(a,b,c,d,g)|0;u=e;return (I=f[g+4>>2]|0,f[g>>2]|0)|0}function Xk(a){a=a|0;var b=0;am(a);f[a>>2]=3688;b=a+84|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;return}function Yk(a){a=a|0;var b=0,c=0;b=(a|0)==0?1:a;while(1){a=_a(b)|0;if(a|0){c=a;break}a=oo()|0;if(!a){c=0;break}Ta[a&3]()}return c|0}function Zk(a,b,c){a=a|0;b=b|0;c=c|0;f[a+4>>2]=b;f[a+8>>2]=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(c<<2)>>2];f[a+12>>2]=c;return 1}function _k(a){a=a|0;var b=0,c=0,d=0;b=u;u=u+16|0;c=b;d=op(f[a+60>>2]|0)|0;f[c>>2]=d;d=mm(Ca(6,c|0)|0)|0;u=b;return d|0}function $k(){var a=0,b=0;a=u;u=u+16|0;if(!(Ja(17340,3)|0)){b=Ha(f[4336]|0)|0;u=a;return b|0}else xl(16480,a);return 0}function al(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=dk(e,a)|0;f=I;return (I=(X(b,a)|0)+(X(d,e)|0)+f|f&0,c|0|0)|0}function bl(a){a=a|0;eh(a);mp(a);return}function cl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ek(b,c,d)|0}function dl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Fk(b,c,d)|0}function el(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return be(b,c,d)|0}function fl(a){a=a|0;var b=0;b=u;u=u+16|0;Zb(a);if(!(Ka(f[4336]|0,0)|0)){u=b;return}else xl(16579,b)}function gl(a){a=a|0;var b=0;Gk(a);f[a>>2]=1360;b=a+36|0;a=b+36|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function hl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Hk(b,c,d)|0}function il(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ik(b,c,d)|0}function jl(a,b,c){a=a|0;b=$(b);c=c|0;var d=0,e=Na;if((c|0)<1){d=0;return d|0}e=$(b/$(c|0));n[a>>2]=e;d=1;return d|0}function kl(a){a=a|0;f[a>>2]=2596;mp(a);return}function ll(a){a=a|0;var b=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;b=a+16|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return}function ml(a){a=a|0;Jm(a);f[a>>2]=2932;f[a+24>>2]=-1;f[a+28>>2]=0;n[a+32>>2]=$(0.0);return}function nl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Lk(b,c,d)|0}function ol(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Jk(b,c,d)|0}function pl(a,b,c){a=a|0;b=b|0;c=c|0;f[a>>2]=b;b=a+8|0;f[b>>2]=c;f[b+4>>2]=0;b=a+16|0;f[b>>2]=0;f[b+4>>2]=0;return}function ql(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return (((f[a+12>>2]|0)+-1|0)==(d|0)?0:d+1|0)|0}function rl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;f[g>>2]=d;d=gh(a,b,c,g)|0;u=e;return d|0}function sl(a){a=a|0;f[a>>2]=2680;mp(a);return}function tl(a){a=a|0;f[a>>2]=2764;mp(a);return}function ul(a){a=a|0;f[a>>2]=2596;return}function vl(a,b,c){a=a|0;b=b|0;c=c|0;return 1}function wl(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return Sa[a&31](b|0,c|0,d|0,e|0,f|0,g|0)|0}function xl(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;f[d>>2]=b;b=f[933]|0;Zf(b,a,d)|0;Vh(10,b)|0;Da()}function yl(a){a=a|0;f[a>>2]=2848;mp(a);return}function zl(a){a=a|0;f[a>>2]=2680;return}function Al(a){a=a|0;f[a>>2]=2764;return}function Bl(a,b){a=a|0;b=b|0;var c=0;c=f[a+48>>2]|0;return Qa[f[(f[c>>2]|0)+16>>2]&127](c,b)|0}function Cl(a,b,c){a=a|0;b=b|0;c=c|0;return fk(b,c)|0}function Dl(a,b){a=a|0;b=b|0;var c=0;c=f[a+48>>2]|0;return Qa[f[(f[c>>2]|0)+12>>2]&127](c,b)|0}function El(a){a=a|0;vd(a);mp(a);return}function Fl(a,b){a=a|0;b=b|0;var c=0;c=f[a+48>>2]|0;return Qa[f[(f[c>>2]|0)+20>>2]&127](c,b)|0}function Gl(a){a=a|0;var c=0,d=0;c=a+4|0;if((b[c+11>>0]|0)<0){d=f[c>>2]|0;return d|0}else{d=c;return d|0}return 0}function Hl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return _e(b,c,d)|0}function Il(){var a=0;a=u;u=u+16|0;if(!(Ia(17344,108)|0)){u=a;return}else xl(16529,a)}function Jl(a,b,c){a=a|0;b=b|0;c=c|0;return Zk(a,b,c)|0}function Kl(a){a=a|0;Jd(a);mp(a);return}function Ll(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;Za[a&3](b|0,c|0,d|0,e|0,f|0,g|0)}function Ml(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;f[d>>2]=b;b=Zf(f[965]|0,a,d)|0;u=c;return b|0}function Nl(a){a=a|0;if(!(f[a+44>>2]|0))return 0;else return Pa[f[(f[a>>2]|0)+48>>2]&127](a)|0;return 0}function Ol(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Kh(b,c,d)|0}function Pl(a,b,c){a=a|0;b=b|0;c=c|0;if(b|0)Dh(a|0,(Mo(c)|0)&255|0,b|0)|0;return a|0}function Ql(a){a=a|0;return 4}function Rl(a){a=a|0;f[a>>2]=2848;return}function Sl(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b<<c|(a&(1<<c)-1<<32-c)>>>32-c;return a<<c}I=a<<c-32;return 0}function Tl(a){a=a|0;var c=0;if(!a)return;c=a+4|0;if((b[c+11>>0]|0)<0)mp(f[c>>2]|0);mp(a);return}function Ul(){}function Vl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+c>>>0;return (I=b+d+(e>>>0<a>>>0|0)>>>0,e|0)|0}function Wl(a,b){a=a|0;b=b|0;var c=0;if(!b)c=0;else c=ag(f[b>>2]|0,f[b+4>>2]|0,a)|0;return (c|0?c:a)|0}function Xl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=b-d>>>0;e=b-d-(c>>>0>a>>>0|0)>>>0;return (I=e,a-c>>>0|0)|0}function Yl(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b>>>c;return a>>>c|(b&(1<<c)-1)<<32-c}I=0;return b>>>c-32|0}function Zl(a,b,c){a=a|0;b=b|0;c=c|0;return Qi(a,b,c)|0}function _l(a){a=a|0;Ad(a);mp(a);return}function $l(a){a=a|0;return 5}function am(a){a=a|0;var b=0;f[a>>2]=3716;b=a+4|0;a=b+80|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function bm(a){a=a|0;return 6}function cm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ak(b,c,d)|0}function dm(a,b,c){a=a|0;b=b|0;c=c|0;return Cl(a,b,c)|0}function em(a){a=a|0;var b=0;b=f[a+48>>2]|0;return Pa[f[(f[b>>2]|0)+28>>2]&127](b)|0}function fm(a,b,c){a=a|0;b=b|0;c=c|0;return Te(b,c)|0}function gm(a){a=a|0;f[a>>2]=1416;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=-1;f[a+16>>2]=0;return}function hm(a){a=a|0;var b=0;b=f[a+48>>2]|0;return Pa[f[(f[b>>2]|0)+24>>2]&127](b)|0}function im(a,b){a=a|0;b=b|0;Xh(a,b);return}function jm(a){a=a|0;var b=0;b=f[a+48>>2]|0;return Pa[f[(f[b>>2]|0)+36>>2]&127](b)|0}function km(a,b,c){a=a|0;b=b|0;c=c|0;f[a+28>>2]=b;f[a+32>>2]=c;return 1}function lm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Ya[a&3](b|0,c|0,d|0,e|0,f|0)}function mm(a){a=a|0;var b=0,c=0;if(a>>>0>4294963200){b=tp()|0;f[b>>2]=0-a;c=-1}else c=a;return c|0}function nm(a,b,c){a=a|0;b=b|0;c=c|0;return Ui(a,b,c)|0}function om(a,b,c){a=a|0;b=b|0;c=c|0;return Wg(a,b,c)|0}function pm(a,b,c){a=a|0;b=b|0;c=c|0;return kh(a,b,c)|0}function qm(a,b,c){a=a|0;b=b|0;c=c|0;return zg(a,b,c)|0}function rm(a,b,c){a=a|0;b=b|0;c=c|0;return +(+fh(a,b,c))}function sm(a,b){a=a|0;b=b|0;return Qa[f[(f[a>>2]|0)+12>>2]&127](a,b)|0}function tm(a,b){a=a|0;b=b|0;return Qa[f[(f[a>>2]|0)+56>>2]&127](a,b)|0}function um(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;return}function vm(a,b,c){a=a|0;b=b|0;c=c|0;return oi(a,b,c)|0}function wm(a,b){a=a|0;b=b|0;f[a+4>>2]=b;return 1}function xm(a,b,c){a=a|0;b=b|0;c=c|0;return Qm(b,c)|0}function ym(a,b,c){a=a|0;b=b|0;c=c|0;return lh(a,b,c)|0}function zm(a,b,c){a=a|0;b=b|0;c=c|0;return hh(a,b,c)|0}function Am(a){a=a|0;Jm(a);f[a>>2]=2424;f[a+24>>2]=-1;return}function Bm(a,b){a=a|0;b=b|0;f[a+8>>2]=b;f[a+12>>2]=-1;return 1}function Cm(a,b,c){a=a|0;b=b|0;c=c|0;return Lf(a,b,c)|0}function Dm(a,b,c){a=a|0;b=b|0;c=c|0;return gg(b,c)|0}function Em(a){a=+a;var b=0;p[s>>3]=a;b=f[s>>2]|0;I=f[s+4>>2]|0;return b|0}function Fm(a){a=a|0;f[a+12>>2]=0;f[a+16>>2]=0;f[a>>2]=0;n[a+4>>2]=$(0.0);return}function Gm(){var a=0;a=Yk(40)|0;f[a>>2]=-1;ll(a+8|0);return a|0}function Hm(){var a=0;a=Yk(8)|0;f[a>>2]=1248;f[a+4>>2]=-1;return a|0}function Im(a,b,c){a=a|0;b=b|0;c=c|0;return Qg(a,b,c)|0}function Jm(a){a=a|0;gm(a);f[a>>2]=1524;f[a+20>>2]=0;return}function Km(a,b){a=a|0;b=b|0;im(a,b);return}function Lm(a){a=a|0;var b=0;if(!a)b=0;else b=(bg(a,1120,1208,0)|0)!=0&1;return b|0}function Mm(a,b){a=a|0;b=b|0;return $(n[(f[a+8>>2]|0)+(b<<2)>>2])}function Nm(a,b){a=a|0;b=b|0;return Pj(a,b)|0}function Om(a){a=a|0;if((b[a+11>>0]|0)<0)mp(f[a>>2]|0);return}function Pm(a){a=a|0;if(!a)return;Ua[f[(f[a>>2]|0)+4>>2]&127](a);return}function Qm(a,b){a=a|0;b=b|0;return cj(a,b)|0}function Rm(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Xa[a&7](b|0,c|0,d|0,e|0)}function Sm(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)kk(a|0,b|0,c|0)|0;return a|0}function Tm(a,b,c){a=a|0;b=b|0;c=c|0;return en(b,c)|0}function Um(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)Ef(a|0,b|0,c|0)|0;return a|0}function Vm(a,b){a=a|0;b=b|0;return -1}function Wm(a){a=a|0;return 3}function Xm(a){a=a|0;var b=0;b=u;u=u+16|0;Ta[a&3]();xl(16632,b)}function Ym(a,b){a=a|0;b=b|0;return Un(a,b)|0}function Zm(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;b[a+12>>0]=0;return}function _m(a){a=a|0;qg(a);mp(a);return}function $m(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;return}function an(a){a=a|0;on(a);f[a>>2]=3060;f[a+48>>2]=0;return}function bn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ra[a&31](b|0,c|0,d|0)|0}function cn(a,b,c){a=a|0;b=b|0;c=c|0;pl(a,b,c);return}function dn(a,b){a=a|0;b=b|0;f[a>>2]=4832;ek(a+4|0,b);return}function en(a,b){a=a|0;b=b|0;return f[(f[a+8>>2]|0)+(b<<2)>>2]|0}function fn(a,b){a=a|0;b=b|0;var c=0;if(!a)c=0;else c=ch(a,b,0)|0;return c|0}function gn(a,b){a=a|0;b=b|0;return f[(f[a+4>>2]|0)+(b<<2)>>2]|0}function hn(){var a=0;a=Yk(64)|0;Nj(a);return a|0}function jn(a,b){a=a|0;b=b|0;return $(pn(a,b))}function kn(a){a=a|0;return f[a+8>>2]|0}function ln(a){a=a|0;if(!a)return;jh(a);mp(a);return}function mn(a,b){a=a|0;b=b|0;return ao(a,b)|0}function nn(a){a=a|0;return b[(f[a+8>>2]|0)+24>>0]|0}function on(a){a=a|0;jk(a);f[a>>2]=3e3;f[a+44>>2]=0;return}function pn(a,b){a=a|0;b=b|0;return $(n[(f[a>>2]|0)+(b<<2)>>2])}function qn(a,b,c){a=a|0;b=b|0;c=c|0;if(!(f[a>>2]&32))Ag(b,c,a)|0;return}function rn(a){a=a|0;return (f[a+8>>2]|0)-(f[a+4>>2]|0)>>2|0}function sn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Wa[a&15](b|0,c|0,d|0)}function tn(){var a=0;a=Yk(96)|0;Pk(a);return a|0}function un(a){a=a|0;var b=0;b=u;u=u+a|0;u=u+15&-16;return b|0}function vn(a){a=a|0;var b=0;b=(gp()|0)+188|0;return ii(a,f[b>>2]|0)|0}function wn(a){a=a|0;return ((f[a+100>>2]|0)-(f[a+96>>2]|0)|0)/12|0|0}function xn(){var a=0;a=Yk(16)|0;$m(a);return a|0}function yn(){var a=0;a=Yk(40)|0;wk(a);return a|0}function zn(a,b){a=a|0;b=b|0;return 1}function An(a,b){a=a|0;b=b|0;return Jn(a,b)|0}function Bn(a,b){a=a|0;b=b|0;return Kn(a,b)|0}function Cn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(3);return 0}function Dn(a,b){a=a|0;b=b|0;return _n(a,b)|0}function En(){var a=0;a=Yk(12)|0;Sn(a);return a|0}function Fn(a){a=a|0;Gh(a);mp(a);return}function Gn(a,b,c){a=a|0;b=b|0;c=c|0;return (a|0)==(b|0)|0}function Hn(a,b){a=a|0;b=b|0;var c=0;c=Xn(a|0)|0;return ((b|0)==0?a:c)|0}function In(a){a=a|0;return (f[a+12>>2]|0)-(f[a+8>>2]|0)>>2|0}function Jn(a,b){a=a|0;b=b|0;return f[(f[a>>2]|0)+(b<<2)>>2]|0}function Kn(a,b){a=a|0;b=b|0;return d[(f[a>>2]|0)+(b<<1)>>1]|0}function Ln(a,b){a=a|0;b=b|0;f[a+4>>2]=b;return}function Mn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Gc(a,b,c,d,0)|0}function Nn(a){a=a|0;f[a+4>>2]=0;f[a+8>>2]=0;f[a>>2]=a+4;return}function On(){var a=0;a=Yk(84)|0;am(a);return a|0}function Pn(a){a=a|0;Ig(a);mp(a);return}function Qn(a){a=a|0;return (f[a+4>>2]|0)-(f[a>>2]|0)>>2|0}function Rn(a){a=a|0;return (f[a+4>>2]|0)-(f[a>>2]|0)>>1|0}function Sn(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;return}function Tn(a){a=a|0;f[a>>2]=4832;uk(a+4|0);return}function Un(a,b){a=a|0;b=b|0;return f[b+12>>2]|0}function Vn(a,b,c){a=a|0;b=b|0;c=c|0;return Qa[a&127](b|0,c|0)|0}function Wn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(10)}function Xn(a){a=a|0;return (a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function Yn(a){a=a|0;on(a);f[a>>2]=3464;return}function Zn(a,c){a=a|0;c=c|0;b[a>>0]=b[c>>0]|0;return}function _n(a,c){a=a|0;c=c|0;return b[(f[a>>2]|0)+c>>0]|0}function $n(a){a=a|0;return (f[a+4>>2]|0)-(f[a>>2]|0)|0}function ao(a,b){a=a|0;b=b|0;return f[b+4>>2]|0}function bo(a){a=a|0;return $(n[a+20>>2])}function co(a){a=a|0;return f[a+4>>2]|0}function eo(a){a=a|0;if(!a)return;mp(a);return}function fo(a,b){a=a|0;b=b|0;if(!x){x=a;y=b}}function go(a){a=a|0;return a+12|0}function ho(a){a=a|0;return f[a+88>>2]|0}function io(a,b,c){a=a|0;b=b|0;c=c|0;Va[a&7](b|0,c|0)}function jo(){var a=0;a=Yk(40)|0;Vk(a);return a|0}function ko(){var a=0;a=Yk(108)|0;Xk(a);return a|0}function lo(a){a=a|0;return (b[a+32>>0]|0)!=0|0}function mo(a){a=a|0;return a+-12|0}function no(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;aa(9)}function oo(){var a=0;a=f[4337]|0;f[4337]=a+0;return a|0}function po(a){a=a|0;return Po(a+4|0)|0}function qo(a){a=a|0;return f[a+56>>2]|0}function ro(){var a=0;a=f[1185]|0;f[1185]=a+0;return a|0}function so(a){a=a|0;of(a);mp(a);return}function to(a){a=a|0;qp(a);mp(a);return}function uo(a){a=a|0;return b[a+24>>0]|0}function vo(a,b){a=a|0;b=b|0;return 0}function wo(a){a=a|0;return f[a+40>>2]|0}function xo(a){a=a|0;return f[a+48>>2]|0}function yo(a,b){a=a|0;b=b|0;return Pa[a&127](b|0)|0}function zo(a){a=a|0;return f[a+60>>2]|0}function Ao(a){a=a|0;return f[a+28>>2]|0}function Bo(a){a=a|0;sa(a|0)|0;pk()}function Co(a){a=a|0;Tn(a);mp(a);return}function Do(a){a=a|0;Da()}function Eo(a){a=a|0;n[a>>2]=$(1.0);return}function Fo(a,b){a=a|0;b=b|0;u=a;v=b}function Go(a){a=a|0;return ((a|0)==32|(a+-9|0)>>>0<5)&1|0}function Ho(a){a=a|0;return (f[a>>2]|0)==0|0}function Io(a){a=a|0;return f[a+80>>2]|0}function Jo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;aa(8)}function Ko(a,b){a=a|0;b=b|0;Ua[a&127](b|0)}function Lo(a,b){a=a|0;b=b|0;return Wl(a,b)|0}function Mo(a){a=a|0;return a&255|0}function No(a){a=a|0;f[a>>2]=0;return}function Oo(a,b,c){a=a|0;b=b|0;c=c|0;aa(2);return 0}function Po(a){a=a|0;return f[a>>2]|0}function Qo(a){a=a|0;return 2}function Ro(a){a=a|0;return 1}function So(a,b){a=+a;b=b|0;return +(+ji(a,b))}function To(){return 3}function Uo(a,b,c){a=a|0;b=b|0;c=c|0;aa(7)}function Vo(){return -4}function Wo(){return 4}function Xo(a){a=a|0;return (a+-48|0)>>>0<10|0}function Yo(){return -3}function Zo(){return 1}function _o(){return 2}function $o(){return -5}function ap(a,b){a=a|0;b=b|0;aa(1);return 0}function bp(a){a=a|0;Ga()}function cp(a){a=a|0;Ta[a&3]()}function dp(){return -2}function ep(){ua()}function fp(){return -1}function gp(){return wp()|0}function hp(a,b){a=a|0;b=b|0;aa(6)}function ip(){return 0}function jp(a){a=a|0;return Yk(a)|0}function kp(a){a=a|0;mp(a);return}function lp(a){a=a|0;u=a}function mp(a){a=a|0;Zb(a);return}function np(a){a=a|0;I=a}function op(a){a=a|0;return a|0}function pp(a){a=a|0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y___0:Pm,_emscripten_bind_AttributeOctahedronTransform_quantization_bits_0:co,_emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0:Ok,_emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1:sm,_emscripten_bind_AttributeQuantizationTransform___destroy___0:Pm,_emscripten_bind_AttributeQuantizationTransform_min_value_1:Mm,_emscripten_bind_AttributeQuantizationTransform_quantization_bits_0:co,_emscripten_bind_AttributeQuantizationTransform_range_0:bo,_emscripten_bind_AttributeTransformData_AttributeTransformData_0:Gm,_emscripten_bind_AttributeTransformData___destroy___0:Qk,_emscripten_bind_AttributeTransformData_transform_type_0:Po,_emscripten_bind_DecoderBuffer_DecoderBuffer_0:yn,_emscripten_bind_DecoderBuffer_Init_2:cn,_emscripten_bind_DecoderBuffer___destroy___0:eo,_emscripten_bind_Decoder_DecodeBufferToMesh_2:nm,_emscripten_bind_Decoder_DecodeBufferToPointCloud_2:Zl,_emscripten_bind_Decoder_Decoder_0:jo,_emscripten_bind_Decoder_GetAttributeByUniqueId_2:xm,_emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3:el,_emscripten_bind_Decoder_GetAttributeFloat_3:Ol,_emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3:Hl,_emscripten_bind_Decoder_GetAttributeIdByName_2:Dm,_emscripten_bind_Decoder_GetAttributeId_2:dm,_emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3:il,_emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3:ol,_emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3:nl,_emscripten_bind_Decoder_GetAttributeIntForAllPoints_3:ol,_emscripten_bind_Decoder_GetAttributeMetadata_2:vm,_emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3:dl,_emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3:cl,_emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3:hl,_emscripten_bind_Decoder_GetAttribute_2:Tm,_emscripten_bind_Decoder_GetEncodedGeometryType_1:Nm,_emscripten_bind_Decoder_GetFaceFromMesh_3:cm,_emscripten_bind_Decoder_GetMetadata_1:mn,_emscripten_bind_Decoder_GetTriangleStripsFromMesh_2:fm,_emscripten_bind_Decoder_SkipAttributeTransform_1:Km,_emscripten_bind_Decoder___destroy___0:Ai,_emscripten_bind_DracoFloat32Array_DracoFloat32Array_0:En,_emscripten_bind_DracoFloat32Array_GetValue_1:jn,_emscripten_bind_DracoFloat32Array___destroy___0:rk,_emscripten_bind_DracoFloat32Array_size_0:Qn,_emscripten_bind_DracoInt16Array_DracoInt16Array_0:En,_emscripten_bind_DracoInt16Array_GetValue_1:Bn,_emscripten_bind_DracoInt16Array___destroy___0:sk,_emscripten_bind_DracoInt16Array_size_0:Rn,_emscripten_bind_DracoInt32Array_DracoInt32Array_0:En,_emscripten_bind_DracoInt32Array_GetValue_1:An,_emscripten_bind_DracoInt32Array___destroy___0:rk,_emscripten_bind_DracoInt32Array_size_0:Qn,_emscripten_bind_DracoInt8Array_DracoInt8Array_0:En,_emscripten_bind_DracoInt8Array_GetValue_1:Dn,_emscripten_bind_DracoInt8Array___destroy___0:Uk,_emscripten_bind_DracoInt8Array_size_0:$n,_emscripten_bind_DracoUInt16Array_DracoUInt16Array_0:En,_emscripten_bind_DracoUInt16Array_GetValue_1:Bn,_emscripten_bind_DracoUInt16Array___destroy___0:sk,_emscripten_bind_DracoUInt16Array_size_0:Rn,_emscripten_bind_DracoUInt32Array_DracoUInt32Array_0:En,_emscripten_bind_DracoUInt32Array_GetValue_1:An,_emscripten_bind_DracoUInt32Array___destroy___0:rk,_emscripten_bind_DracoUInt32Array_size_0:Qn,_emscripten_bind_DracoUInt8Array_DracoUInt8Array_0:En,_emscripten_bind_DracoUInt8Array_GetValue_1:Dn,_emscripten_bind_DracoUInt8Array___destroy___0:Uk,_emscripten_bind_DracoUInt8Array_size_0:$n,_emscripten_bind_GeometryAttribute_GeometryAttribute_0:hn,_emscripten_bind_GeometryAttribute___destroy___0:eo,_emscripten_bind_Mesh_Mesh_0:ko,_emscripten_bind_Mesh___destroy___0:Pm,_emscripten_bind_Mesh_num_attributes_0:In,_emscripten_bind_Mesh_num_faces_0:wn,_emscripten_bind_Mesh_num_points_0:Io,_emscripten_bind_MetadataQuerier_GetDoubleEntry_2:rm,_emscripten_bind_MetadataQuerier_GetEntryName_2:Cm,_emscripten_bind_MetadataQuerier_GetIntEntry_2:zm,_emscripten_bind_MetadataQuerier_GetStringEntry_2:qm,_emscripten_bind_MetadataQuerier_HasDoubleEntry_2:pm,_emscripten_bind_MetadataQuerier_HasEntry_2:Im,_emscripten_bind_MetadataQuerier_HasIntEntry_2:ym,_emscripten_bind_MetadataQuerier_HasStringEntry_2:om,_emscripten_bind_MetadataQuerier_MetadataQuerier_0:xn,_emscripten_bind_MetadataQuerier_NumEntries_1:Ym,_emscripten_bind_MetadataQuerier___destroy___0:Di,_emscripten_bind_Metadata_Metadata_0:bk,_emscripten_bind_Metadata___destroy___0:ln,_emscripten_bind_PointAttribute_GetAttributeTransformData_0:ho,_emscripten_bind_PointAttribute_PointAttribute_0:tn,_emscripten_bind_PointAttribute___destroy___0:Th,_emscripten_bind_PointAttribute_attribute_type_0:qo,_emscripten_bind_PointAttribute_byte_offset_0:xo,_emscripten_bind_PointAttribute_byte_stride_0:wo,_emscripten_bind_PointAttribute_data_type_0:Ao,_emscripten_bind_PointAttribute_normalized_0:lo,_emscripten_bind_PointAttribute_num_components_0:uo,_emscripten_bind_PointAttribute_size_0:Io,_emscripten_bind_PointAttribute_unique_id_0:zo,_emscripten_bind_PointCloud_PointCloud_0:On,_emscripten_bind_PointCloud___destroy___0:Pm,_emscripten_bind_PointCloud_num_attributes_0:In,_emscripten_bind_PointCloud_num_points_0:Io,_emscripten_bind_Status___destroy___0:Tl,_emscripten_bind_Status_code_0:Po,_emscripten_bind_Status_error_msg_0:Gl,_emscripten_bind_Status_ok_0:Ho,_emscripten_bind_VoidPtr___destroy___0:eo,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM:fp,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM:ip,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM:_o,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM:Zo,_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE:fp,_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD:ip,_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH:Zo,_emscripten_enum_draco_GeometryAttribute_Type_COLOR:_o,_emscripten_enum_draco_GeometryAttribute_Type_GENERIC:Wo,_emscripten_enum_draco_GeometryAttribute_Type_INVALID:fp,_emscripten_enum_draco_GeometryAttribute_Type_NORMAL:Zo,_emscripten_enum_draco_GeometryAttribute_Type_POSITION:ip,_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD:To,_emscripten_enum_draco_StatusCode_ERROR:fp,_emscripten_enum_draco_StatusCode_INVALID_PARAMETER:Yo,_emscripten_enum_draco_StatusCode_IO_ERROR:dp,_emscripten_enum_draco_StatusCode_OK:ip,_emscripten_enum_draco_StatusCode_UNKNOWN_VERSION:$o,_emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION:Vo,_emscripten_replace_memory:Oa,_free:Zb,_i64Add:Vl,_i64Subtract:Xl,_llvm_bswap_i32:Xn,_malloc:_a,_memcpy:Ef,_memmove:kk,_memset:Dh,_sbrk:Tj,dynCall_ii:yo,dynCall_iii:Vn,dynCall_iiii:bn,dynCall_iiiiiii:wl,dynCall_v:cp,dynCall_vi:Ko,dynCall_vii:io,dynCall_viii:sn,dynCall_viiii:Rm,dynCall_viiiii:lm,dynCall_viiiiii:Ll,establishStackSpace:Fo,getTempRet0:sp,runPostSets:Ul,setTempRet0:np,setThrew:fo,stackAlloc:un,stackRestore:lp,stackSave:up}})
+
+
+// EMSCRIPTEN_END_ASM
+(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var ___cxa_can_catch=Module["___cxa_can_catch"]=asm["___cxa_can_catch"];var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=asm["___cxa_is_pointer_type"];var ___divdi3=Module["___divdi3"]=asm["___divdi3"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var ___udivdi3=Module["___udivdi3"]=asm["___udivdi3"];var ___uremdi3=Module["___uremdi3"]=asm["___uremdi3"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=Module["_emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0"]=asm["_emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0"];var _emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=Module["_emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1"]=asm["_emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1"];var _emscripten_bind_AttributeOctahedronTransform___destroy___0=Module["_emscripten_bind_AttributeOctahedronTransform___destroy___0"]=asm["_emscripten_bind_AttributeOctahedronTransform___destroy___0"];var _emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=Module["_emscripten_bind_AttributeOctahedronTransform_quantization_bits_0"]=asm["_emscripten_bind_AttributeOctahedronTransform_quantization_bits_0"];var _emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=Module["_emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0"]=asm["_emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0"];var _emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=Module["_emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1"]=asm["_emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1"];var _emscripten_bind_AttributeQuantizationTransform___destroy___0=Module["_emscripten_bind_AttributeQuantizationTransform___destroy___0"]=asm["_emscripten_bind_AttributeQuantizationTransform___destroy___0"];var _emscripten_bind_AttributeQuantizationTransform_min_value_1=Module["_emscripten_bind_AttributeQuantizationTransform_min_value_1"]=asm["_emscripten_bind_AttributeQuantizationTransform_min_value_1"];var _emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=Module["_emscripten_bind_AttributeQuantizationTransform_quantization_bits_0"]=asm["_emscripten_bind_AttributeQuantizationTransform_quantization_bits_0"];var _emscripten_bind_AttributeQuantizationTransform_range_0=Module["_emscripten_bind_AttributeQuantizationTransform_range_0"]=asm["_emscripten_bind_AttributeQuantizationTransform_range_0"];var _emscripten_bind_AttributeTransformData_AttributeTransformData_0=Module["_emscripten_bind_AttributeTransformData_AttributeTransformData_0"]=asm["_emscripten_bind_AttributeTransformData_AttributeTransformData_0"];var _emscripten_bind_AttributeTransformData___destroy___0=Module["_emscripten_bind_AttributeTransformData___destroy___0"]=asm["_emscripten_bind_AttributeTransformData___destroy___0"];var _emscripten_bind_AttributeTransformData_transform_type_0=Module["_emscripten_bind_AttributeTransformData_transform_type_0"]=asm["_emscripten_bind_AttributeTransformData_transform_type_0"];var _emscripten_bind_DecoderBuffer_DecoderBuffer_0=Module["_emscripten_bind_DecoderBuffer_DecoderBuffer_0"]=asm["_emscripten_bind_DecoderBuffer_DecoderBuffer_0"];var _emscripten_bind_DecoderBuffer_Init_2=Module["_emscripten_bind_DecoderBuffer_Init_2"]=asm["_emscripten_bind_DecoderBuffer_Init_2"];var _emscripten_bind_DecoderBuffer___destroy___0=Module["_emscripten_bind_DecoderBuffer___destroy___0"]=asm["_emscripten_bind_DecoderBuffer___destroy___0"];var _emscripten_bind_Decoder_DecodeBufferToMesh_2=Module["_emscripten_bind_Decoder_DecodeBufferToMesh_2"]=asm["_emscripten_bind_Decoder_DecodeBufferToMesh_2"];var _emscripten_bind_Decoder_DecodeBufferToPointCloud_2=Module["_emscripten_bind_Decoder_DecodeBufferToPointCloud_2"]=asm["_emscripten_bind_Decoder_DecodeBufferToPointCloud_2"];var _emscripten_bind_Decoder_Decoder_0=Module["_emscripten_bind_Decoder_Decoder_0"]=asm["_emscripten_bind_Decoder_Decoder_0"];var _emscripten_bind_Decoder_GetAttributeByUniqueId_2=Module["_emscripten_bind_Decoder_GetAttributeByUniqueId_2"]=asm["_emscripten_bind_Decoder_GetAttributeByUniqueId_2"];var _emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeFloat_3=Module["_emscripten_bind_Decoder_GetAttributeFloat_3"]=asm["_emscripten_bind_Decoder_GetAttributeFloat_3"];var _emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=Module["_emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3"]=asm["_emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3"];var _emscripten_bind_Decoder_GetAttributeIdByName_2=Module["_emscripten_bind_Decoder_GetAttributeIdByName_2"]=asm["_emscripten_bind_Decoder_GetAttributeIdByName_2"];var _emscripten_bind_Decoder_GetAttributeId_2=Module["_emscripten_bind_Decoder_GetAttributeId_2"]=asm["_emscripten_bind_Decoder_GetAttributeId_2"];var _emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeIntForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeIntForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeMetadata_2=Module["_emscripten_bind_Decoder_GetAttributeMetadata_2"]=asm["_emscripten_bind_Decoder_GetAttributeMetadata_2"];var _emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttribute_2=Module["_emscripten_bind_Decoder_GetAttribute_2"]=asm["_emscripten_bind_Decoder_GetAttribute_2"];var _emscripten_bind_Decoder_GetEncodedGeometryType_1=Module["_emscripten_bind_Decoder_GetEncodedGeometryType_1"]=asm["_emscripten_bind_Decoder_GetEncodedGeometryType_1"];var _emscripten_bind_Decoder_GetFaceFromMesh_3=Module["_emscripten_bind_Decoder_GetFaceFromMesh_3"]=asm["_emscripten_bind_Decoder_GetFaceFromMesh_3"];var _emscripten_bind_Decoder_GetMetadata_1=Module["_emscripten_bind_Decoder_GetMetadata_1"]=asm["_emscripten_bind_Decoder_GetMetadata_1"];var _emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=Module["_emscripten_bind_Decoder_GetTriangleStripsFromMesh_2"]=asm["_emscripten_bind_Decoder_GetTriangleStripsFromMesh_2"];var _emscripten_bind_Decoder_SkipAttributeTransform_1=Module["_emscripten_bind_Decoder_SkipAttributeTransform_1"]=asm["_emscripten_bind_Decoder_SkipAttributeTransform_1"];var _emscripten_bind_Decoder___destroy___0=Module["_emscripten_bind_Decoder___destroy___0"]=asm["_emscripten_bind_Decoder___destroy___0"];var _emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=Module["_emscripten_bind_DracoFloat32Array_DracoFloat32Array_0"]=asm["_emscripten_bind_DracoFloat32Array_DracoFloat32Array_0"];var _emscripten_bind_DracoFloat32Array_GetValue_1=Module["_emscripten_bind_DracoFloat32Array_GetValue_1"]=asm["_emscripten_bind_DracoFloat32Array_GetValue_1"];var _emscripten_bind_DracoFloat32Array___destroy___0=Module["_emscripten_bind_DracoFloat32Array___destroy___0"]=asm["_emscripten_bind_DracoFloat32Array___destroy___0"];var _emscripten_bind_DracoFloat32Array_size_0=Module["_emscripten_bind_DracoFloat32Array_size_0"]=asm["_emscripten_bind_DracoFloat32Array_size_0"];var _emscripten_bind_DracoInt16Array_DracoInt16Array_0=Module["_emscripten_bind_DracoInt16Array_DracoInt16Array_0"]=asm["_emscripten_bind_DracoInt16Array_DracoInt16Array_0"];var _emscripten_bind_DracoInt16Array_GetValue_1=Module["_emscripten_bind_DracoInt16Array_GetValue_1"]=asm["_emscripten_bind_DracoInt16Array_GetValue_1"];var _emscripten_bind_DracoInt16Array___destroy___0=Module["_emscripten_bind_DracoInt16Array___destroy___0"]=asm["_emscripten_bind_DracoInt16Array___destroy___0"];var _emscripten_bind_DracoInt16Array_size_0=Module["_emscripten_bind_DracoInt16Array_size_0"]=asm["_emscripten_bind_DracoInt16Array_size_0"];var _emscripten_bind_DracoInt32Array_DracoInt32Array_0=Module["_emscripten_bind_DracoInt32Array_DracoInt32Array_0"]=asm["_emscripten_bind_DracoInt32Array_DracoInt32Array_0"];var _emscripten_bind_DracoInt32Array_GetValue_1=Module["_emscripten_bind_DracoInt32Array_GetValue_1"]=asm["_emscripten_bind_DracoInt32Array_GetValue_1"];var _emscripten_bind_DracoInt32Array___destroy___0=Module["_emscripten_bind_DracoInt32Array___destroy___0"]=asm["_emscripten_bind_DracoInt32Array___destroy___0"];var _emscripten_bind_DracoInt32Array_size_0=Module["_emscripten_bind_DracoInt32Array_size_0"]=asm["_emscripten_bind_DracoInt32Array_size_0"];var _emscripten_bind_DracoInt8Array_DracoInt8Array_0=Module["_emscripten_bind_DracoInt8Array_DracoInt8Array_0"]=asm["_emscripten_bind_DracoInt8Array_DracoInt8Array_0"];var _emscripten_bind_DracoInt8Array_GetValue_1=Module["_emscripten_bind_DracoInt8Array_GetValue_1"]=asm["_emscripten_bind_DracoInt8Array_GetValue_1"];var _emscripten_bind_DracoInt8Array___destroy___0=Module["_emscripten_bind_DracoInt8Array___destroy___0"]=asm["_emscripten_bind_DracoInt8Array___destroy___0"];var _emscripten_bind_DracoInt8Array_size_0=Module["_emscripten_bind_DracoInt8Array_size_0"]=asm["_emscripten_bind_DracoInt8Array_size_0"];var _emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=Module["_emscripten_bind_DracoUInt16Array_DracoUInt16Array_0"]=asm["_emscripten_bind_DracoUInt16Array_DracoUInt16Array_0"];var _emscripten_bind_DracoUInt16Array_GetValue_1=Module["_emscripten_bind_DracoUInt16Array_GetValue_1"]=asm["_emscripten_bind_DracoUInt16Array_GetValue_1"];var _emscripten_bind_DracoUInt16Array___destroy___0=Module["_emscripten_bind_DracoUInt16Array___destroy___0"]=asm["_emscripten_bind_DracoUInt16Array___destroy___0"];var _emscripten_bind_DracoUInt16Array_size_0=Module["_emscripten_bind_DracoUInt16Array_size_0"]=asm["_emscripten_bind_DracoUInt16Array_size_0"];var _emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=Module["_emscripten_bind_DracoUInt32Array_DracoUInt32Array_0"]=asm["_emscripten_bind_DracoUInt32Array_DracoUInt32Array_0"];var _emscripten_bind_DracoUInt32Array_GetValue_1=Module["_emscripten_bind_DracoUInt32Array_GetValue_1"]=asm["_emscripten_bind_DracoUInt32Array_GetValue_1"];var _emscripten_bind_DracoUInt32Array___destroy___0=Module["_emscripten_bind_DracoUInt32Array___destroy___0"]=asm["_emscripten_bind_DracoUInt32Array___destroy___0"];var _emscripten_bind_DracoUInt32Array_size_0=Module["_emscripten_bind_DracoUInt32Array_size_0"]=asm["_emscripten_bind_DracoUInt32Array_size_0"];var _emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=Module["_emscripten_bind_DracoUInt8Array_DracoUInt8Array_0"]=asm["_emscripten_bind_DracoUInt8Array_DracoUInt8Array_0"];var _emscripten_bind_DracoUInt8Array_GetValue_1=Module["_emscripten_bind_DracoUInt8Array_GetValue_1"]=asm["_emscripten_bind_DracoUInt8Array_GetValue_1"];var _emscripten_bind_DracoUInt8Array___destroy___0=Module["_emscripten_bind_DracoUInt8Array___destroy___0"]=asm["_emscripten_bind_DracoUInt8Array___destroy___0"];var _emscripten_bind_DracoUInt8Array_size_0=Module["_emscripten_bind_DracoUInt8Array_size_0"]=asm["_emscripten_bind_DracoUInt8Array_size_0"];var _emscripten_bind_GeometryAttribute_GeometryAttribute_0=Module["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"]=asm["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"];var _emscripten_bind_GeometryAttribute___destroy___0=Module["_emscripten_bind_GeometryAttribute___destroy___0"]=asm["_emscripten_bind_GeometryAttribute___destroy___0"];var _emscripten_bind_Mesh_Mesh_0=Module["_emscripten_bind_Mesh_Mesh_0"]=asm["_emscripten_bind_Mesh_Mesh_0"];var _emscripten_bind_Mesh___destroy___0=Module["_emscripten_bind_Mesh___destroy___0"]=asm["_emscripten_bind_Mesh___destroy___0"];var _emscripten_bind_Mesh_num_attributes_0=Module["_emscripten_bind_Mesh_num_attributes_0"]=asm["_emscripten_bind_Mesh_num_attributes_0"];var _emscripten_bind_Mesh_num_faces_0=Module["_emscripten_bind_Mesh_num_faces_0"]=asm["_emscripten_bind_Mesh_num_faces_0"];var _emscripten_bind_Mesh_num_points_0=Module["_emscripten_bind_Mesh_num_points_0"]=asm["_emscripten_bind_Mesh_num_points_0"];var _emscripten_bind_MetadataQuerier_GetDoubleEntry_2=Module["_emscripten_bind_MetadataQuerier_GetDoubleEntry_2"]=asm["_emscripten_bind_MetadataQuerier_GetDoubleEntry_2"];var _emscripten_bind_MetadataQuerier_GetEntryName_2=Module["_emscripten_bind_MetadataQuerier_GetEntryName_2"]=asm["_emscripten_bind_MetadataQuerier_GetEntryName_2"];var _emscripten_bind_MetadataQuerier_GetIntEntry_2=Module["_emscripten_bind_MetadataQuerier_GetIntEntry_2"]=asm["_emscripten_bind_MetadataQuerier_GetIntEntry_2"];var _emscripten_bind_MetadataQuerier_GetStringEntry_2=Module["_emscripten_bind_MetadataQuerier_GetStringEntry_2"]=asm["_emscripten_bind_MetadataQuerier_GetStringEntry_2"];var _emscripten_bind_MetadataQuerier_HasDoubleEntry_2=Module["_emscripten_bind_MetadataQuerier_HasDoubleEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasDoubleEntry_2"];var _emscripten_bind_MetadataQuerier_HasEntry_2=Module["_emscripten_bind_MetadataQuerier_HasEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasEntry_2"];var _emscripten_bind_MetadataQuerier_HasIntEntry_2=Module["_emscripten_bind_MetadataQuerier_HasIntEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasIntEntry_2"];var _emscripten_bind_MetadataQuerier_HasStringEntry_2=Module["_emscripten_bind_MetadataQuerier_HasStringEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasStringEntry_2"];var _emscripten_bind_MetadataQuerier_MetadataQuerier_0=Module["_emscripten_bind_MetadataQuerier_MetadataQuerier_0"]=asm["_emscripten_bind_MetadataQuerier_MetadataQuerier_0"];var _emscripten_bind_MetadataQuerier_NumEntries_1=Module["_emscripten_bind_MetadataQuerier_NumEntries_1"]=asm["_emscripten_bind_MetadataQuerier_NumEntries_1"];var _emscripten_bind_MetadataQuerier___destroy___0=Module["_emscripten_bind_MetadataQuerier___destroy___0"]=asm["_emscripten_bind_MetadataQuerier___destroy___0"];var _emscripten_bind_Metadata_Metadata_0=Module["_emscripten_bind_Metadata_Metadata_0"]=asm["_emscripten_bind_Metadata_Metadata_0"];var _emscripten_bind_Metadata___destroy___0=Module["_emscripten_bind_Metadata___destroy___0"]=asm["_emscripten_bind_Metadata___destroy___0"];var _emscripten_bind_PointAttribute_GetAttributeTransformData_0=Module["_emscripten_bind_PointAttribute_GetAttributeTransformData_0"]=asm["_emscripten_bind_PointAttribute_GetAttributeTransformData_0"];var _emscripten_bind_PointAttribute_PointAttribute_0=Module["_emscripten_bind_PointAttribute_PointAttribute_0"]=asm["_emscripten_bind_PointAttribute_PointAttribute_0"];var _emscripten_bind_PointAttribute___destroy___0=Module["_emscripten_bind_PointAttribute___destroy___0"]=asm["_emscripten_bind_PointAttribute___destroy___0"];var _emscripten_bind_PointAttribute_attribute_type_0=Module["_emscripten_bind_PointAttribute_attribute_type_0"]=asm["_emscripten_bind_PointAttribute_attribute_type_0"];var _emscripten_bind_PointAttribute_byte_offset_0=Module["_emscripten_bind_PointAttribute_byte_offset_0"]=asm["_emscripten_bind_PointAttribute_byte_offset_0"];var _emscripten_bind_PointAttribute_byte_stride_0=Module["_emscripten_bind_PointAttribute_byte_stride_0"]=asm["_emscripten_bind_PointAttribute_byte_stride_0"];var _emscripten_bind_PointAttribute_data_type_0=Module["_emscripten_bind_PointAttribute_data_type_0"]=asm["_emscripten_bind_PointAttribute_data_type_0"];var _emscripten_bind_PointAttribute_normalized_0=Module["_emscripten_bind_PointAttribute_normalized_0"]=asm["_emscripten_bind_PointAttribute_normalized_0"];var _emscripten_bind_PointAttribute_num_components_0=Module["_emscripten_bind_PointAttribute_num_components_0"]=asm["_emscripten_bind_PointAttribute_num_components_0"];var _emscripten_bind_PointAttribute_size_0=Module["_emscripten_bind_PointAttribute_size_0"]=asm["_emscripten_bind_PointAttribute_size_0"];var _emscripten_bind_PointAttribute_unique_id_0=Module["_emscripten_bind_PointAttribute_unique_id_0"]=asm["_emscripten_bind_PointAttribute_unique_id_0"];var _emscripten_bind_PointCloud_PointCloud_0=Module["_emscripten_bind_PointCloud_PointCloud_0"]=asm["_emscripten_bind_PointCloud_PointCloud_0"];var _emscripten_bind_PointCloud___destroy___0=Module["_emscripten_bind_PointCloud___destroy___0"]=asm["_emscripten_bind_PointCloud___destroy___0"];var _emscripten_bind_PointCloud_num_attributes_0=Module["_emscripten_bind_PointCloud_num_attributes_0"]=asm["_emscripten_bind_PointCloud_num_attributes_0"];var _emscripten_bind_PointCloud_num_points_0=Module["_emscripten_bind_PointCloud_num_points_0"]=asm["_emscripten_bind_PointCloud_num_points_0"];var _emscripten_bind_Status___destroy___0=Module["_emscripten_bind_Status___destroy___0"]=asm["_emscripten_bind_Status___destroy___0"];var _emscripten_bind_Status_code_0=Module["_emscripten_bind_Status_code_0"]=asm["_emscripten_bind_Status_code_0"];var _emscripten_bind_Status_error_msg_0=Module["_emscripten_bind_Status_error_msg_0"]=asm["_emscripten_bind_Status_error_msg_0"];var _emscripten_bind_Status_ok_0=Module["_emscripten_bind_Status_ok_0"]=asm["_emscripten_bind_Status_ok_0"];var _emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=asm["_emscripten_bind_VoidPtr___destroy___0"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM"];var _emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=Module["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"]=asm["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"];var _emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=Module["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"]=asm["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"];var _emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=Module["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"]=asm["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"];var _emscripten_enum_draco_GeometryAttribute_Type_COLOR=Module["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"];var _emscripten_enum_draco_GeometryAttribute_Type_GENERIC=Module["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"];var _emscripten_enum_draco_GeometryAttribute_Type_INVALID=Module["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"];var _emscripten_enum_draco_GeometryAttribute_Type_NORMAL=Module["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"];var _emscripten_enum_draco_GeometryAttribute_Type_POSITION=Module["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"];var _emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=Module["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"];var _emscripten_enum_draco_StatusCode_ERROR=Module["_emscripten_enum_draco_StatusCode_ERROR"]=asm["_emscripten_enum_draco_StatusCode_ERROR"];var _emscripten_enum_draco_StatusCode_INVALID_PARAMETER=Module["_emscripten_enum_draco_StatusCode_INVALID_PARAMETER"]=asm["_emscripten_enum_draco_StatusCode_INVALID_PARAMETER"];var _emscripten_enum_draco_StatusCode_IO_ERROR=Module["_emscripten_enum_draco_StatusCode_IO_ERROR"]=asm["_emscripten_enum_draco_StatusCode_IO_ERROR"];var _emscripten_enum_draco_StatusCode_OK=Module["_emscripten_enum_draco_StatusCode_OK"]=asm["_emscripten_enum_draco_StatusCode_OK"];var _emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=Module["_emscripten_enum_draco_StatusCode_UNKNOWN_VERSION"]=asm["_emscripten_enum_draco_StatusCode_UNKNOWN_VERSION"];var _emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=Module["_emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION"]=asm["_emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION"];var _emscripten_replace_memory=Module["_emscripten_replace_memory"]=asm["_emscripten_replace_memory"];var _free=Module["_free"]=asm["_free"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var _malloc=Module["_malloc"]=asm["_malloc"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _memmove=Module["_memmove"]=asm["_memmove"];var _memset=Module["_memset"]=asm["_memset"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var getTempRet0=Module["getTempRet0"]=asm["getTempRet0"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var setTempRet0=Module["setTempRet0"]=asm["setTempRet0"];var setThrew=Module["setThrew"]=asm["setThrew"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var stackSave=Module["stackSave"]=asm["stackSave"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];Module["asm"]=asm;if(memoryInitializer){if(!isDataURI(memoryInitializer)){if(typeof Module["locateFile"]==="function"){memoryInitializer=Module["locateFile"](memoryInitializer)}else if(Module["memoryInitializerPrefixURL"]){memoryInitializer=Module["memoryInitializerPrefixURL"]+memoryInitializer}}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,GLOBAL_BASE)}else{addRunDependency("memory initializer");var applyMemoryInitializer=(function(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,GLOBAL_BASE);if(Module["memoryInitializerRequest"])delete Module["memoryInitializerRequest"].response;removeRunDependency("memory initializer")});function doBrowserLoad(){Module["readAsync"](memoryInitializer,applyMemoryInitializer,(function(){throw"could not load memory initializer "+memoryInitializer}))}var memoryInitializerBytes=tryParseAsDataURI(memoryInitializer);if(memoryInitializerBytes){applyMemoryInitializer(memoryInitializerBytes.buffer)}else if(Module["memoryInitializerRequest"]){function useRequest(){var request=Module["memoryInitializerRequest"];var response=request.response;if(request.status!==200&&request.status!==0){var data=tryParseAsDataURI(Module["memoryInitializerRequestURL"]);if(data){response=data.buffer}else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+request.status+", retrying "+memoryInitializer);doBrowserLoad();return}}applyMemoryInitializer(response)}if(Module["memoryInitializerRequest"].response){setTimeout(useRequest,0)}else{Module["memoryInitializerRequest"].addEventListener("load",useRequest)}}else{doBrowserLoad()}}}Module["then"]=(function(func){if(Module["calledRun"]){func(Module)}else{var old=Module["onRuntimeInitialized"];Module["onRuntimeInitialized"]=(function(){if(old)old();func(Module)})}return Module});function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};function run(args){args=args||Module["arguments"];if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]&&status===0){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["exit"](status)}Module["quit"](status,new ExitStatus(status))}Module["exit"]=exit;function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}Module["noExitRuntime"]=true;run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return(__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw"Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr]}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:(function(){if(ensureCache.needed){for(var i=0;i<ensureCache.temps.length;i++){Module["_free"](ensureCache.temps[i])}ensureCache.temps.length=0;Module["_free"](ensureCache.buffer);ensureCache.buffer=0;ensureCache.size+=ensureCache.needed;ensureCache.needed=0}if(!ensureCache.buffer){ensureCache.size+=128;ensureCache.buffer=Module["_malloc"](ensureCache.size);assert(ensureCache.buffer)}ensureCache.pos=0}),alloc:(function(array,view){assert(ensureCache.buffer);var bytes=view.BYTES_PER_ELEMENT;var len=array.length*bytes;len=len+7&-8;var ret;if(ensureCache.pos+len>=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret)}else{ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len}return ret}),copy:(function(array,view,offset){var offsetShifted=offset;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offsetShifted>>=1;break;case 4:offsetShifted>>=2;break;case 8:offsetShifted>>=3;break}for(var i=0;i<array.length;i++){view[offsetShifted+i]=array[i]}})};function ensureString(value){if(typeof value==="string"){var intArray=intArrayFromString(value);var offset=ensureCache.alloc(intArray,HEAP8);ensureCache.copy(intArray,HEAP8,offset);return offset}return value}function ensureInt8(value){if(typeof value==="object"){var offset=ensureCache.alloc(value,HEAP8);ensureCache.copy(value,HEAP8,offset);return offset}return value}function Status(){throw"cannot construct a Status, no constructor in IDL"}Status.prototype=Object.create(WrapperObject.prototype);Status.prototype.constructor=Status;Status.prototype.__class__=Status;Status.__cache__={};Module["Status"]=Status;Status.prototype["code"]=Status.prototype.code=(function(){var self=this.ptr;return _emscripten_bind_Status_code_0(self)});Status.prototype["ok"]=Status.prototype.ok=(function(){var self=this.ptr;return!!_emscripten_bind_Status_ok_0(self)});Status.prototype["error_msg"]=Status.prototype.error_msg=(function(){var self=this.ptr;return Pointer_stringify(_emscripten_bind_Status_error_msg_0(self))});Status.prototype["__destroy__"]=Status.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_Status___destroy___0(self)});function DracoUInt16Array(){this.ptr=_emscripten_bind_DracoUInt16Array_DracoUInt16Array_0();getCache(DracoUInt16Array)[this.ptr]=this}DracoUInt16Array.prototype=Object.create(WrapperObject.prototype);DracoUInt16Array.prototype.constructor=DracoUInt16Array;DracoUInt16Array.prototype.__class__=DracoUInt16Array;DracoUInt16Array.__cache__={};Module["DracoUInt16Array"]=DracoUInt16Array;DracoUInt16Array.prototype["GetValue"]=DracoUInt16Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoUInt16Array_GetValue_1(self,arg0)});DracoUInt16Array.prototype["size"]=DracoUInt16Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoUInt16Array_size_0(self)});DracoUInt16Array.prototype["__destroy__"]=DracoUInt16Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoUInt16Array___destroy___0(self)});function PointCloud(){this.ptr=_emscripten_bind_PointCloud_PointCloud_0();getCache(PointCloud)[this.ptr]=this}PointCloud.prototype=Object.create(WrapperObject.prototype);PointCloud.prototype.constructor=PointCloud;PointCloud.prototype.__class__=PointCloud;PointCloud.__cache__={};Module["PointCloud"]=PointCloud;PointCloud.prototype["num_attributes"]=PointCloud.prototype.num_attributes=(function(){var self=this.ptr;return _emscripten_bind_PointCloud_num_attributes_0(self)});PointCloud.prototype["num_points"]=PointCloud.prototype.num_points=(function(){var self=this.ptr;return _emscripten_bind_PointCloud_num_points_0(self)});PointCloud.prototype["__destroy__"]=PointCloud.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_PointCloud___destroy___0(self)});function DracoUInt8Array(){this.ptr=_emscripten_bind_DracoUInt8Array_DracoUInt8Array_0();getCache(DracoUInt8Array)[this.ptr]=this}DracoUInt8Array.prototype=Object.create(WrapperObject.prototype);DracoUInt8Array.prototype.constructor=DracoUInt8Array;DracoUInt8Array.prototype.__class__=DracoUInt8Array;DracoUInt8Array.__cache__={};Module["DracoUInt8Array"]=DracoUInt8Array;DracoUInt8Array.prototype["GetValue"]=DracoUInt8Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoUInt8Array_GetValue_1(self,arg0)});DracoUInt8Array.prototype["size"]=DracoUInt8Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoUInt8Array_size_0(self)});DracoUInt8Array.prototype["__destroy__"]=DracoUInt8Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoUInt8Array___destroy___0(self)});function DracoUInt32Array(){this.ptr=_emscripten_bind_DracoUInt32Array_DracoUInt32Array_0();getCache(DracoUInt32Array)[this.ptr]=this}DracoUInt32Array.prototype=Object.create(WrapperObject.prototype);DracoUInt32Array.prototype.constructor=DracoUInt32Array;DracoUInt32Array.prototype.__class__=DracoUInt32Array;DracoUInt32Array.__cache__={};Module["DracoUInt32Array"]=DracoUInt32Array;DracoUInt32Array.prototype["GetValue"]=DracoUInt32Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoUInt32Array_GetValue_1(self,arg0)});DracoUInt32Array.prototype["size"]=DracoUInt32Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoUInt32Array_size_0(self)});DracoUInt32Array.prototype["__destroy__"]=DracoUInt32Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoUInt32Array___destroy___0(self)});function AttributeOctahedronTransform(){this.ptr=_emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0();getCache(AttributeOctahedronTransform)[this.ptr]=this}AttributeOctahedronTransform.prototype=Object.create(WrapperObject.prototype);AttributeOctahedronTransform.prototype.constructor=AttributeOctahedronTransform;AttributeOctahedronTransform.prototype.__class__=AttributeOctahedronTransform;AttributeOctahedronTransform.__cache__={};Module["AttributeOctahedronTransform"]=AttributeOctahedronTransform;AttributeOctahedronTransform.prototype["InitFromAttribute"]=AttributeOctahedronTransform.prototype.InitFromAttribute=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return!!_emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1(self,arg0)});AttributeOctahedronTransform.prototype["quantization_bits"]=AttributeOctahedronTransform.prototype.quantization_bits=(function(){var self=this.ptr;return _emscripten_bind_AttributeOctahedronTransform_quantization_bits_0(self)});AttributeOctahedronTransform.prototype["__destroy__"]=AttributeOctahedronTransform.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_AttributeOctahedronTransform___destroy___0(self)});function PointAttribute(){this.ptr=_emscripten_bind_PointAttribute_PointAttribute_0();getCache(PointAttribute)[this.ptr]=this}PointAttribute.prototype=Object.create(WrapperObject.prototype);PointAttribute.prototype.constructor=PointAttribute;PointAttribute.prototype.__class__=PointAttribute;PointAttribute.__cache__={};Module["PointAttribute"]=PointAttribute;PointAttribute.prototype["size"]=PointAttribute.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_size_0(self)});PointAttribute.prototype["GetAttributeTransformData"]=PointAttribute.prototype.GetAttributeTransformData=(function(){var self=this.ptr;return wrapPointer(_emscripten_bind_PointAttribute_GetAttributeTransformData_0(self),AttributeTransformData)});PointAttribute.prototype["attribute_type"]=PointAttribute.prototype.attribute_type=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_attribute_type_0(self)});PointAttribute.prototype["data_type"]=PointAttribute.prototype.data_type=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_data_type_0(self)});PointAttribute.prototype["num_components"]=PointAttribute.prototype.num_components=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_num_components_0(self)});PointAttribute.prototype["normalized"]=PointAttribute.prototype.normalized=(function(){var self=this.ptr;return!!_emscripten_bind_PointAttribute_normalized_0(self)});PointAttribute.prototype["byte_stride"]=PointAttribute.prototype.byte_stride=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_byte_stride_0(self)});PointAttribute.prototype["byte_offset"]=PointAttribute.prototype.byte_offset=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_byte_offset_0(self)});PointAttribute.prototype["unique_id"]=PointAttribute.prototype.unique_id=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_unique_id_0(self)});PointAttribute.prototype["__destroy__"]=PointAttribute.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_PointAttribute___destroy___0(self)});function AttributeTransformData(){this.ptr=_emscripten_bind_AttributeTransformData_AttributeTransformData_0();getCache(AttributeTransformData)[this.ptr]=this}AttributeTransformData.prototype=Object.create(WrapperObject.prototype);AttributeTransformData.prototype.constructor=AttributeTransformData;AttributeTransformData.prototype.__class__=AttributeTransformData;AttributeTransformData.__cache__={};Module["AttributeTransformData"]=AttributeTransformData;AttributeTransformData.prototype["transform_type"]=AttributeTransformData.prototype.transform_type=(function(){var self=this.ptr;return _emscripten_bind_AttributeTransformData_transform_type_0(self)});AttributeTransformData.prototype["__destroy__"]=AttributeTransformData.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_AttributeTransformData___destroy___0(self)});function AttributeQuantizationTransform(){this.ptr=_emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0();getCache(AttributeQuantizationTransform)[this.ptr]=this}AttributeQuantizationTransform.prototype=Object.create(WrapperObject.prototype);AttributeQuantizationTransform.prototype.constructor=AttributeQuantizationTransform;AttributeQuantizationTransform.prototype.__class__=AttributeQuantizationTransform;AttributeQuantizationTransform.__cache__={};Module["AttributeQuantizationTransform"]=AttributeQuantizationTransform;AttributeQuantizationTransform.prototype["InitFromAttribute"]=AttributeQuantizationTransform.prototype.InitFromAttribute=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return!!_emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1(self,arg0)});AttributeQuantizationTransform.prototype["quantization_bits"]=AttributeQuantizationTransform.prototype.quantization_bits=(function(){var self=this.ptr;return _emscripten_bind_AttributeQuantizationTransform_quantization_bits_0(self)});AttributeQuantizationTransform.prototype["min_value"]=AttributeQuantizationTransform.prototype.min_value=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_AttributeQuantizationTransform_min_value_1(self,arg0)});AttributeQuantizationTransform.prototype["range"]=AttributeQuantizationTransform.prototype.range=(function(){var self=this.ptr;return _emscripten_bind_AttributeQuantizationTransform_range_0(self)});AttributeQuantizationTransform.prototype["__destroy__"]=AttributeQuantizationTransform.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_AttributeQuantizationTransform___destroy___0(self)});function DracoInt8Array(){this.ptr=_emscripten_bind_DracoInt8Array_DracoInt8Array_0();getCache(DracoInt8Array)[this.ptr]=this}DracoInt8Array.prototype=Object.create(WrapperObject.prototype);DracoInt8Array.prototype.constructor=DracoInt8Array;DracoInt8Array.prototype.__class__=DracoInt8Array;DracoInt8Array.__cache__={};Module["DracoInt8Array"]=DracoInt8Array;DracoInt8Array.prototype["GetValue"]=DracoInt8Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoInt8Array_GetValue_1(self,arg0)});DracoInt8Array.prototype["size"]=DracoInt8Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoInt8Array_size_0(self)});DracoInt8Array.prototype["__destroy__"]=DracoInt8Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoInt8Array___destroy___0(self)});function MetadataQuerier(){this.ptr=_emscripten_bind_MetadataQuerier_MetadataQuerier_0();getCache(MetadataQuerier)[this.ptr]=this}MetadataQuerier.prototype=Object.create(WrapperObject.prototype);MetadataQuerier.prototype.constructor=MetadataQuerier;MetadataQuerier.prototype.__class__=MetadataQuerier;MetadataQuerier.__cache__={};Module["MetadataQuerier"]=MetadataQuerier;MetadataQuerier.prototype["HasEntry"]=MetadataQuerier.prototype.HasEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return!!_emscripten_bind_MetadataQuerier_HasEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["HasIntEntry"]=MetadataQuerier.prototype.HasIntEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return!!_emscripten_bind_MetadataQuerier_HasIntEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["GetIntEntry"]=MetadataQuerier.prototype.GetIntEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return _emscripten_bind_MetadataQuerier_GetIntEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["HasDoubleEntry"]=MetadataQuerier.prototype.HasDoubleEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return!!_emscripten_bind_MetadataQuerier_HasDoubleEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["GetDoubleEntry"]=MetadataQuerier.prototype.GetDoubleEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return _emscripten_bind_MetadataQuerier_GetDoubleEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["HasStringEntry"]=MetadataQuerier.prototype.HasStringEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return!!_emscripten_bind_MetadataQuerier_HasStringEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["GetStringEntry"]=MetadataQuerier.prototype.GetStringEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return Pointer_stringify(_emscripten_bind_MetadataQuerier_GetStringEntry_2(self,arg0,arg1))});MetadataQuerier.prototype["NumEntries"]=MetadataQuerier.prototype.NumEntries=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_MetadataQuerier_NumEntries_1(self,arg0)});MetadataQuerier.prototype["GetEntryName"]=MetadataQuerier.prototype.GetEntryName=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return Pointer_stringify(_emscripten_bind_MetadataQuerier_GetEntryName_2(self,arg0,arg1))});MetadataQuerier.prototype["__destroy__"]=MetadataQuerier.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_MetadataQuerier___destroy___0(self)});function DracoInt16Array(){this.ptr=_emscripten_bind_DracoInt16Array_DracoInt16Array_0();getCache(DracoInt16Array)[this.ptr]=this}DracoInt16Array.prototype=Object.create(WrapperObject.prototype);DracoInt16Array.prototype.constructor=DracoInt16Array;DracoInt16Array.prototype.__class__=DracoInt16Array;DracoInt16Array.__cache__={};Module["DracoInt16Array"]=DracoInt16Array;DracoInt16Array.prototype["GetValue"]=DracoInt16Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoInt16Array_GetValue_1(self,arg0)});DracoInt16Array.prototype["size"]=DracoInt16Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoInt16Array_size_0(self)});DracoInt16Array.prototype["__destroy__"]=DracoInt16Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoInt16Array___destroy___0(self)});function DracoFloat32Array(){this.ptr=_emscripten_bind_DracoFloat32Array_DracoFloat32Array_0();getCache(DracoFloat32Array)[this.ptr]=this}DracoFloat32Array.prototype=Object.create(WrapperObject.prototype);DracoFloat32Array.prototype.constructor=DracoFloat32Array;DracoFloat32Array.prototype.__class__=DracoFloat32Array;DracoFloat32Array.__cache__={};Module["DracoFloat32Array"]=DracoFloat32Array;DracoFloat32Array.prototype["GetValue"]=DracoFloat32Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoFloat32Array_GetValue_1(self,arg0)});DracoFloat32Array.prototype["size"]=DracoFloat32Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoFloat32Array_size_0(self)});DracoFloat32Array.prototype["__destroy__"]=DracoFloat32Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoFloat32Array___destroy___0(self)});function GeometryAttribute(){this.ptr=_emscripten_bind_GeometryAttribute_GeometryAttribute_0();getCache(GeometryAttribute)[this.ptr]=this}GeometryAttribute.prototype=Object.create(WrapperObject.prototype);GeometryAttribute.prototype.constructor=GeometryAttribute;GeometryAttribute.prototype.__class__=GeometryAttribute;GeometryAttribute.__cache__={};Module["GeometryAttribute"]=GeometryAttribute;GeometryAttribute.prototype["__destroy__"]=GeometryAttribute.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_GeometryAttribute___destroy___0(self)});function DecoderBuffer(){this.ptr=_emscripten_bind_DecoderBuffer_DecoderBuffer_0();getCache(DecoderBuffer)[this.ptr]=this}DecoderBuffer.prototype=Object.create(WrapperObject.prototype);DecoderBuffer.prototype.constructor=DecoderBuffer;DecoderBuffer.prototype.__class__=DecoderBuffer;DecoderBuffer.__cache__={};Module["DecoderBuffer"]=DecoderBuffer;DecoderBuffer.prototype["Init"]=DecoderBuffer.prototype.Init=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(typeof arg0=="object"){arg0=ensureInt8(arg0)}if(arg1&&typeof arg1==="object")arg1=arg1.ptr;_emscripten_bind_DecoderBuffer_Init_2(self,arg0,arg1)});DecoderBuffer.prototype["__destroy__"]=DecoderBuffer.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DecoderBuffer___destroy___0(self)});function Decoder(){this.ptr=_emscripten_bind_Decoder_Decoder_0();getCache(Decoder)[this.ptr]=this}Decoder.prototype=Object.create(WrapperObject.prototype);Decoder.prototype.constructor=Decoder;Decoder.prototype.__class__=Decoder;Decoder.__cache__={};Module["Decoder"]=Decoder;Decoder.prototype["GetEncodedGeometryType"]=Decoder.prototype.GetEncodedGeometryType=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_Decoder_GetEncodedGeometryType_1(self,arg0)});Decoder.prototype["DecodeBufferToPointCloud"]=Decoder.prototype.DecodeBufferToPointCloud=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return wrapPointer(_emscripten_bind_Decoder_DecodeBufferToPointCloud_2(self,arg0,arg1),Status)});Decoder.prototype["DecodeBufferToMesh"]=Decoder.prototype.DecodeBufferToMesh=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return wrapPointer(_emscripten_bind_Decoder_DecodeBufferToMesh_2(self,arg0,arg1),Status)});Decoder.prototype["GetAttributeId"]=Decoder.prototype.GetAttributeId=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return _emscripten_bind_Decoder_GetAttributeId_2(self,arg0,arg1)});Decoder.prototype["GetAttributeIdByName"]=Decoder.prototype.GetAttributeIdByName=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return _emscripten_bind_Decoder_GetAttributeIdByName_2(self,arg0,arg1)});Decoder.prototype["GetAttributeIdByMetadataEntry"]=Decoder.prototype.GetAttributeIdByMetadataEntry=(function(arg0,arg1,arg2){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);if(arg2&&typeof arg2==="object")arg2=arg2.ptr;else arg2=ensureString(arg2);return _emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttribute"]=Decoder.prototype.GetAttribute=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return wrapPointer(_emscripten_bind_Decoder_GetAttribute_2(self,arg0,arg1),PointAttribute)});Decoder.prototype["GetAttributeByUniqueId"]=Decoder.prototype.GetAttributeByUniqueId=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return wrapPointer(_emscripten_bind_Decoder_GetAttributeByUniqueId_2(self,arg0,arg1),PointAttribute)});Decoder.prototype["GetMetadata"]=Decoder.prototype.GetMetadata=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return wrapPointer(_emscripten_bind_Decoder_GetMetadata_1(self,arg0),Metadata)});Decoder.prototype["GetAttributeMetadata"]=Decoder.prototype.GetAttributeMetadata=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return wrapPointer(_emscripten_bind_Decoder_GetAttributeMetadata_2(self,arg0,arg1),Metadata)});Decoder.prototype["GetFaceFromMesh"]=Decoder.prototype.GetFaceFromMesh=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetFaceFromMesh_3(self,arg0,arg1,arg2)});Decoder.prototype["GetTriangleStripsFromMesh"]=Decoder.prototype.GetTriangleStripsFromMesh=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return _emscripten_bind_Decoder_GetTriangleStripsFromMesh_2(self,arg0,arg1)});Decoder.prototype["GetAttributeFloat"]=Decoder.prototype.GetAttributeFloat=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeFloat_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeFloatForAllPoints"]=Decoder.prototype.GetAttributeFloatForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeIntForAllPoints"]=Decoder.prototype.GetAttributeIntForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeIntForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeInt8ForAllPoints"]=Decoder.prototype.GetAttributeInt8ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeUInt8ForAllPoints"]=Decoder.prototype.GetAttributeUInt8ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeInt16ForAllPoints"]=Decoder.prototype.GetAttributeInt16ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeUInt16ForAllPoints"]=Decoder.prototype.GetAttributeUInt16ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeInt32ForAllPoints"]=Decoder.prototype.GetAttributeInt32ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeUInt32ForAllPoints"]=Decoder.prototype.GetAttributeUInt32ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["SkipAttributeTransform"]=Decoder.prototype.SkipAttributeTransform=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_Decoder_SkipAttributeTransform_1(self,arg0)});Decoder.prototype["__destroy__"]=Decoder.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_Decoder___destroy___0(self)});function Mesh(){this.ptr=_emscripten_bind_Mesh_Mesh_0();getCache(Mesh)[this.ptr]=this}Mesh.prototype=Object.create(WrapperObject.prototype);Mesh.prototype.constructor=Mesh;Mesh.prototype.__class__=Mesh;Mesh.__cache__={};Module["Mesh"]=Mesh;Mesh.prototype["num_faces"]=Mesh.prototype.num_faces=(function(){var self=this.ptr;return _emscripten_bind_Mesh_num_faces_0(self)});Mesh.prototype["num_attributes"]=Mesh.prototype.num_attributes=(function(){var self=this.ptr;return _emscripten_bind_Mesh_num_attributes_0(self)});Mesh.prototype["num_points"]=Mesh.prototype.num_points=(function(){var self=this.ptr;return _emscripten_bind_Mesh_num_points_0(self)});Mesh.prototype["__destroy__"]=Mesh.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_Mesh___destroy___0(self)});function VoidPtr(){throw"cannot construct a VoidPtr, no constructor in IDL"}VoidPtr.prototype=Object.create(WrapperObject.prototype);VoidPtr.prototype.constructor=VoidPtr;VoidPtr.prototype.__class__=VoidPtr;VoidPtr.__cache__={};Module["VoidPtr"]=VoidPtr;VoidPtr.prototype["__destroy__"]=VoidPtr.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_VoidPtr___destroy___0(self)});function DracoInt32Array(){this.ptr=_emscripten_bind_DracoInt32Array_DracoInt32Array_0();getCache(DracoInt32Array)[this.ptr]=this}DracoInt32Array.prototype=Object.create(WrapperObject.prototype);DracoInt32Array.prototype.constructor=DracoInt32Array;DracoInt32Array.prototype.__class__=DracoInt32Array;DracoInt32Array.__cache__={};Module["DracoInt32Array"]=DracoInt32Array;DracoInt32Array.prototype["GetValue"]=DracoInt32Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoInt32Array_GetValue_1(self,arg0)});DracoInt32Array.prototype["size"]=DracoInt32Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoInt32Array_size_0(self)});DracoInt32Array.prototype["__destroy__"]=DracoInt32Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoInt32Array___destroy___0(self)});function Metadata(){this.ptr=_emscripten_bind_Metadata_Metadata_0();getCache(Metadata)[this.ptr]=this}Metadata.prototype=Object.create(WrapperObject.prototype);Metadata.prototype.constructor=Metadata;Metadata.prototype.__class__=Metadata;Metadata.__cache__={};Module["Metadata"]=Metadata;Metadata.prototype["__destroy__"]=Metadata.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_Metadata___destroy___0(self)});((function(){function setupEnums(){Module["OK"]=_emscripten_enum_draco_StatusCode_OK();Module["ERROR"]=_emscripten_enum_draco_StatusCode_ERROR();Module["IO_ERROR"]=_emscripten_enum_draco_StatusCode_IO_ERROR();Module["INVALID_PARAMETER"]=_emscripten_enum_draco_StatusCode_INVALID_PARAMETER();Module["UNSUPPORTED_VERSION"]=_emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION();Module["UNKNOWN_VERSION"]=_emscripten_enum_draco_StatusCode_UNKNOWN_VERSION();Module["INVALID_GEOMETRY_TYPE"]=_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE();Module["POINT_CLOUD"]=_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD();Module["TRIANGULAR_MESH"]=_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH();Module["ATTRIBUTE_INVALID_TRANSFORM"]=_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM();Module["ATTRIBUTE_NO_TRANSFORM"]=_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM();Module["ATTRIBUTE_QUANTIZATION_TRANSFORM"]=_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM();Module["ATTRIBUTE_OCTAHEDRON_TRANSFORM"]=_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM();Module["INVALID"]=_emscripten_enum_draco_GeometryAttribute_Type_INVALID();Module["POSITION"]=_emscripten_enum_draco_GeometryAttribute_Type_POSITION();Module["NORMAL"]=_emscripten_enum_draco_GeometryAttribute_Type_NORMAL();Module["COLOR"]=_emscripten_enum_draco_GeometryAttribute_Type_COLOR();Module["TEX_COORD"]=_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD();Module["GENERIC"]=_emscripten_enum_draco_GeometryAttribute_Type_GENERIC()}if(Module["calledRun"])setupEnums();else addOnPreMain(setupEnums)}))();if(typeof Module["onModuleParsed"]==="function"){Module["onModuleParsed"]()}
+
+
+
+
+
+
+ return DracoDecoderModule;
+};
+if (typeof exports === 'object' && typeof module === 'object')
+ module.exports = DracoDecoderModule;
+else if (typeof define === 'function' && define['amd'])
+ define([], function() { return DracoDecoderModule; });
+else if (typeof exports === 'object')
+ exports["DracoDecoderModule"] = DracoDecoderModule;
diff --git a/site/public/assets/js/vendor/draco/draco_decoder.wasm b/site/public/assets/js/vendor/draco/draco_decoder.wasm
new file mode 100644
index 00000000..bae259e0
--- /dev/null
+++ b/site/public/assets/js/vendor/draco/draco_decoder.wasm
Binary files differ
diff --git a/site/public/assets/js/vendor/draco/draco_decoder_gltf.js b/site/public/assets/js/vendor/draco/draco_decoder_gltf.js
new file mode 100644
index 00000000..3a943b62
--- /dev/null
+++ b/site/public/assets/js/vendor/draco/draco_decoder_gltf.js
@@ -0,0 +1,31 @@
+var DracoDecoderModule = function(DracoDecoderModule) {
+ DracoDecoderModule = DracoDecoderModule || {};
+
+var Module=typeof DracoDecoderModule!=="undefined"?DracoDecoderModule:{};var isRuntimeInitialized=false;var isModuleParsed=false;Module["onRuntimeInitialized"]=(function(){isRuntimeInitialized=true;if(isModuleParsed){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}});Module["onModuleParsed"]=(function(){isModuleParsed=true;if(isRuntimeInitialized){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}});function isVersionSupported(versionString){if(typeof versionString!=="string")return false;const version=versionString.split(".");if(version.length<2||version.length>3)return false;if(version[0]==1&&version[1]>=0&&version[1]<=3)return true;if(version[0]!=0||version[1]>10)return false;return true}Module["isVersionSupported"]=isVersionSupported;var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=(function(status,toThrow){throw toThrow});Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){var nodeFS;var nodePath;Module["read"]=function shell_read(filename,binary){var ret;ret=tryParseAsDataURI(filename);if(!ret){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);ret=nodeFS["readFileSync"](filename)}return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}Module["arguments"]=process["argv"].slice(2);process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));process["on"]("unhandledRejection",(function(reason,p){process["exit"](1)}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){Module["read"]=function shell_read(f){var data=tryParseAsDataURI(f);if(data){return intArrayToString(data)}return read(f)}}Module["readBinary"]=function readBinary(f){var data;data=tryParseAsDataURI(f);if(data){return data}if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=(function(status,toThrow){quit(status)})}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=(function(title){document.title=title})}Module["print"]=typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null;Module["printErr"]=typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||Module["print"];Module.print=Module["print"];Module.printErr=Module["printErr"];for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var STACK_ALIGN=16;function staticAlloc(size){assert(!staticSealed);var ret=STATICTOP;STATICTOP=STATICTOP+size+15&-16;return ret}function dynamicAlloc(size){assert(DYNAMICTOP_PTR);var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;if(end>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){HEAP32[DYNAMICTOP_PTR>>2]=ret;return 0}}return ret}function alignMemory(size,factor){if(!factor)factor=STACK_ALIGN;var ret=size=Math.ceil(size/factor)*factor;return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;Module.printErr(text)}}var jsCallStartIndex=1;var functionPointers=new Array(0);var funcWrappers={};function dynCall(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}var GLOBAL_BASE=8;var ABORT=0;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}var JSfuncs={"stackSave":(function(){stackSave()}),"stackRestore":(function(){stackRestore()}),"arrayToC":(function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};function ccall(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);if(returnType==="string")ret=Pointer_stringify(ret);if(returnType==="boolean")ret=Boolean(ret);if(stack!==0){stackRestore(stack)}return ret}function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var ALLOC_STATIC=2;var ALLOC_NONE=4;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:staticAlloc,stackAlloc,staticAlloc,dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var stop;ptr=ret;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr<stop;ptr+=4){HEAP32[ptr>>2]=0}stop=ret+size;while(ptr<stop){HEAP8[ptr++>>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i<size){var curr=slab[i];type=singleType||types[i];if(type===0){i++;continue}if(type=="i64")type="i32";setValue(ret+i,curr,type);if(previousType!==type){typeSize=getNativeTypeSize(type);previousType=type}i+=typeSize}return ret}function Pointer_stringify(ptr,length){if(length===0||!ptr)return"";var hasUtf=0;var t;var i=0;while(1){t=HEAPU8[ptr+i>>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return UTF8ToString(ptr)}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx){var endPtr=idx;while(u8Array[endPtr])++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}}function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function demangle(func){return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}var WASM_PAGE_SIZE=65536;var ASMJS_PAGE_SIZE=16777216;var MIN_TOTAL_MEMORY=16777216;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBuffer(buf){Module["buffer"]=buffer=buf}function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed;var STACK_BASE,STACKTOP,STACK_MAX;var DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0;staticSealed=false;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}if(!Module["reallocBuffer"])Module["reallocBuffer"]=(function(size){var ret;try{if(ArrayBuffer.transfer){ret=ArrayBuffer.transfer(buffer,size)}else{var oldHEAP8=HEAP8;ret=new ArrayBuffer(size);var temp=new Int8Array(ret);temp.set(oldHEAP8)}}catch(e){return false}var success=_emscripten_replace_memory(ret);if(!success)return false;return ret});function enlargeMemory(){var PAGE_MULTIPLE=Module["usingWasm"]?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE;var LIMIT=2147483648-PAGE_MULTIPLE;if(HEAP32[DYNAMICTOP_PTR>>2]>LIMIT){return false}var OLD_TOTAL_MEMORY=TOTAL_MEMORY;TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);while(TOTAL_MEMORY<HEAP32[DYNAMICTOP_PTR>>2]){if(TOTAL_MEMORY<=536870912){TOTAL_MEMORY=alignUp(2*TOTAL_MEMORY,PAGE_MULTIPLE)}else{TOTAL_MEMORY=Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,PAGE_MULTIPLE),LIMIT)}}var replacement=Module["reallocBuffer"](TOTAL_MEMORY);if(!replacement||replacement.byteLength!=TOTAL_MEMORY){TOTAL_MEMORY=OLD_TOTAL_MEMORY;return false}updateGlobalBuffer(replacement);updateGlobalBufferViews();return true}var byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);byteLength(new ArrayBuffer(4))}catch(e){byteLength=(function(buffer){return buffer.byteLength})}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(TOTAL_MEMORY<TOTAL_STACK)Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")");if(Module["buffer"]){buffer=Module["buffer"]}else{{buffer=new ArrayBuffer(TOTAL_MEMORY)}Module["buffer"]=buffer}updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}HEAP32[0]=1668509029;HEAP16[1]=25459;if(HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPreMain(cb){__ATMAIN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_round=Math.round;var Math_min=Math.min;var Math_max=Math.max;var Math_clz32=Math.clz32;var Math_trunc=Math.trunc;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}STATIC_BASE=GLOBAL_BASE;STATICTOP=STATIC_BASE+13792;__ATINIT__.push();memoryInitializer="data:application/octet-stream;base64,qA4AAPAOAAAYAAAAAAAAAIAOAAAXDwAAqA4AADQPAAAYAAAAAAAAAKgOAABdDwAAQAAAAAAAAACADgAAeQ8AAIAOAACeDwAAqA4AAMMPAAAwAAAAAAAAAKgOAADkGQAASAAAAAAAAACoDgAA8w8AAIAAAAAAAAAAqA4AAEwQAACQAAAAAAAAAKgOAACgEAAAoAAAAAAAAACoDgAA1BAAALAAAAAAAAAAgA4AAP8QAACoDgAAIxEAAMgAAAAAAAAAgA4AAMERAACoDgAAXxIAAOAAAAAAAAAAqA4AAPcSAACAAAAAAAAAAKgOAACAEwAA4AAAAAAAAACoDgAAGhQAAOAAAAAAAAAAqA4AAMAUAADgAAAAAAAAAKgOAABWFQAAMAEAAAAAAACADgAAARYAAKgOAAC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ACYAAAAnAAAAKQAAACoAAAAoAAAACgAAAAAAAAAIAgAAJQAAACYAAAArAAAAJgAAACwAAAAtAAAAKQAAACoAAAApAAAAKgAAACsAAAALAAAAAAAAAPABAAAnAAAAKAAAACwAAAAuAAAABAAAAAAAAADQAQAAKQAAACoAAAAvAAAAJgAAADAAAAAxAAAALQAAAC4AAAApAAAAKgAAAC8AAAAMAAAAAAAAALgBAAArAAAALAAAADAAAAAyAAAABQAAAAAAAAAoAgAALQAAAC4AAAAMAAAACAAAAAMAAAANAAAAEAAAAAoAAAAHAAAADgAAAAEAAAAHAAAAMQAAADMAAAAyAAAAAAAAADgCAAAvAAAAMAAAADQAAAA1AAAAAQAAADYAAAA3AAAAOAAAADkAAAA6AAAAMwAAADQAAAABAAAAAAAAAEgCAAAxAAAAMgAAADQAAAA7AAAANQAAADYAAAA3AAAAOAAAADwAAAA9AAAANgAAADcAAAA+AAAAAAAAAFgCAAAzAAAANAAAADgAAAA5AAAAOgAAADsAAAA/AAAAQAAAAEEAAABCAAAA/////wAAAACAAgAANQAAADYAAAA8AAAAQwAAAAAAAABwAgAANwAAADgAAAAGAAAAAAAAAGgCAAA5AAAAOgAAAAYAAAD/////AAAAALACAAA7AAAAPAAAAD0AAABEAAAAAAAAAKACAAA9AAAAPgAAAAcAAAAAAAAAmAIAAD8AAABAAAAABwAAAAAAAADQAgAAQQAAAEIAAAA+AAAARQAAAAAAAADAAgAAQwAAAEQAAAAHAAAAAAAAAOgCAABFAAAARgAAAD8AAABAAAAAQQAAAEIAAABGAAAARwAAAEgAAABJAAAAAAAAAAEAAAADAAAABQAAAAcAAAAAAAAA+AIAAC8AAABHAAAANAAAADUAAABDAAAANgAAADcAAAA4AAAAOQAAADoAAAAzAAAANAAAAEoAAAAAAAAACAMAAEgAAABJAAAARAAAAEsAAAAAAAAAGAMAAC8AAABKAAAATAAAADUAAAABAAAATQAAADcAAAA4AAAAOQAAAP//////////AAAAACADAABLAAAATAAAAAgAAAADAAAA/////wAAAAAwA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TOP;STATICTOP+=16;function ___cxa_allocate_exception(size){return _malloc(size)}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:(function(adjusted){if(!adjusted||EXCEPTIONS.infos[adjusted])return adjusted;for(var ptr in EXCEPTIONS.infos){var info=EXCEPTIONS.infos[ptr];if(info.adjusted===adjusted){return ptr}}return adjusted}),addRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount++}),decRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];assert(info.refcount>0);info.refcount--;if(info.refcount===0&&!info.rethrown){if(info.destructor){Module["dynCall_vi"](info.destructor,ptr)}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}}),clearRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0})};function ___cxa_begin_catch(ptr){var info=EXCEPTIONS.infos[ptr];if(info&&!info.caught){info.caught=true;__ZSt18uncaught_exceptionv.uncaught_exception--}if(info)info.rethrown=false;EXCEPTIONS.caught.push(ptr);EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(ptr));return ptr}function ___cxa_pure_virtual(){ABORT=true;throw"Pure virtual function called!"}function ___resumeException(ptr){if(!EXCEPTIONS.last){EXCEPTIONS.last=ptr}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var thrown=EXCEPTIONS.last;if(!thrown){return(setTempRet0(0),0)|0}var info=EXCEPTIONS.infos[thrown];var throwntype=info.type;if(!throwntype){return(setTempRet0(0),thrown)|0}var typeArray=Array.prototype.slice.call(arguments);var pointer=Module["___cxa_is_pointer_type"](throwntype);if(!___cxa_find_matching_catch.buffer)___cxa_find_matching_catch.buffer=_malloc(4);HEAP32[___cxa_find_matching_catch.buffer>>2]=thrown;thrown=___cxa_find_matching_catch.buffer;for(var i=0;i<typeArray.length;i++){if(typeArray[i]&&Module["___cxa_can_catch"](typeArray[i],throwntype,thrown)){thrown=HEAP32[thrown>>2];info.adjusted=thrown;return(setTempRet0(typeArray[i]),thrown)|0}}thrown=HEAP32[thrown>>2];return(setTempRet0(throwntype),thrown)|0}function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:ptr,type:type,destructor:destructor,refcount:0,caught:false,rethrown:false};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC);function ___gxx_personality_v0(){}var SYSCALLS={varargs:0,get:(function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret}),getStr:(function(){var ret=Pointer_stringify(SYSCALLS.get());return ret}),get64:(function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low}),getZero:(function(){assert(SYSCALLS.get()===0)})};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function flush_NO_FILESYSTEM(){var fflush=Module["_fflush"];if(fflush)fflush(0);var printChar=___syscall146.printChar;if(!printChar)return;var buffers=___syscall146.buffers;if(buffers[1].length)printChar(1,10);if(buffers[2].length)printChar(2,10)}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;if(!___syscall146.buffers){___syscall146.buffers=[null,[],[]];___syscall146.printChar=(function(stream,curr){var buffer=___syscall146.buffers[stream];assert(buffer);if(curr===0||curr===10){(stream===1?Module["print"]:Module["printErr"])(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}})}for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j<len;j++){___syscall146.printChar(stream,HEAPU8[ptr+j])}ret+=len}return ret}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _abort(){Module["abort"]()}function _llvm_trap(){abort("trap!")}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}var PTHREAD_SPECIFIC={};function _pthread_getspecific(key){return PTHREAD_SPECIFIC[key]||0}var PTHREAD_SPECIFIC_NEXT_KEY=1;var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _pthread_key_create(key,destructor){if(key==0){return ERRNO_CODES.EINVAL}HEAP32[key>>2]=PTHREAD_SPECIFIC_NEXT_KEY;PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0;PTHREAD_SPECIFIC_NEXT_KEY++;return 0}function _pthread_once(ptr,func){if(!_pthread_once.seen)_pthread_once.seen={};if(ptr in _pthread_once.seen)return;Module["dynCall_v"](func);_pthread_once.seen[ptr]=1}function _pthread_setspecific(key,value){if(!(key in PTHREAD_SPECIFIC)){return ERRNO_CODES.EINVAL}PTHREAD_SPECIFIC[key]=value;return 0}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}DYNAMICTOP_PTR=staticAlloc(4);STACK_BASE=STACKTOP=alignMemory(STATICTOP);STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;staticSealed=true;var ASSERTIONS=false;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}function intArrayToString(array){var ret=[];for(var i=0;i<array.length;i++){var chr=array[i];if(chr>255){if(ASSERTIONS){assert(false,"Character code "+chr+" ("+String.fromCharCode(chr)+") at offset "+i+" not in 0x00-0xFF.")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var decodeBase64=typeof atob==="function"?atob:(function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i<input.length);return output});function intArrayFromBase64(s){if(typeof ENVIRONMENT_IS_NODE==="boolean"&&ENVIRONMENT_IS_NODE){var buf;try{buf=Buffer.from(s,"base64")}catch(_){buf=new Buffer(s,"base64")}return new Uint8Array(buf.buffer,buf.byteOffset,buf.byteLength)}try{var decoded=decodeBase64(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i<decoded.length;++i){bytes[i]=decoded.charCodeAt(i)}return bytes}catch(_){throw new Error("Converting base64 string to bytes failed.")}}function tryParseAsDataURI(filename){if(!isDataURI(filename)){return}return intArrayFromBase64(filename.slice(dataURIPrefix.length))}function invoke_ii(index,a1){try{return Module["dynCall_ii"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iii(index,a1,a2){try{return Module["dynCall_iii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiii(index,a1,a2,a3){try{return Module["dynCall_iiii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){try{return Module["dynCall_iiiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_v(index){try{Module["dynCall_v"](index)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vi(index,a1){try{Module["dynCall_vi"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vii(index,a1,a2){try{Module["dynCall_vii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viii(index,a1,a2,a3){try{Module["dynCall_viii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiii(index,a1,a2,a3,a4){try{Module["dynCall_viiii"](index,a1,a2,a3,a4)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){try{Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){try{Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}Module.asmGlobalArg={"Math":Math,"Int8Array":Int8Array,"Int16Array":Int16Array,"Int32Array":Int32Array,"Uint8Array":Uint8Array,"Uint16Array":Uint16Array,"Uint32Array":Uint32Array,"Float32Array":Float32Array,"Float64Array":Float64Array,"NaN":NaN,"Infinity":Infinity,"byteLength":byteLength};Module.asmLibraryArg={"abort":abort,"assert":assert,"enlargeMemory":enlargeMemory,"getTotalMemory":getTotalMemory,"abortOnCannotGrowMemory":abortOnCannotGrowMemory,"invoke_ii":invoke_ii,"invoke_iii":invoke_iii,"invoke_iiii":invoke_iiii,"invoke_iiiiiii":invoke_iiiiiii,"invoke_v":invoke_v,"invoke_vi":invoke_vi,"invoke_vii":invoke_vii,"invoke_viii":invoke_viii,"invoke_viiii":invoke_viiii,"invoke_viiiii":invoke_viiiii,"invoke_viiiiii":invoke_viiiiii,"__ZSt18uncaught_exceptionv":__ZSt18uncaught_exceptionv,"___cxa_allocate_exception":___cxa_allocate_exception,"___cxa_begin_catch":___cxa_begin_catch,"___cxa_find_matching_catch":___cxa_find_matching_catch,"___cxa_pure_virtual":___cxa_pure_virtual,"___cxa_throw":___cxa_throw,"___gxx_personality_v0":___gxx_personality_v0,"___resumeException":___resumeException,"___setErrNo":___setErrNo,"___syscall140":___syscall140,"___syscall146":___syscall146,"___syscall6":___syscall6,"_abort":_abort,"_emscripten_memcpy_big":_emscripten_memcpy_big,"_llvm_trap":_llvm_trap,"_pthread_getspecific":_pthread_getspecific,"_pthread_key_create":_pthread_key_create,"_pthread_once":_pthread_once,"_pthread_setspecific":_pthread_setspecific,"flush_NO_FILESYSTEM":flush_NO_FILESYSTEM,"DYNAMICTOP_PTR":DYNAMICTOP_PTR,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX,"cttz_i8":cttz_i8};// EMSCRIPTEN_START_ASM
+var asm=(/** @suppress {uselessCode} */ function(global,env,buffer) {
+"almost asm";var a=global.Int8Array;var b=new a(buffer);var c=global.Int16Array;var d=new c(buffer);var e=global.Int32Array;var f=new e(buffer);var g=global.Uint8Array;var h=new g(buffer);var i=global.Uint16Array;var j=new i(buffer);var k=global.Uint32Array;var l=new k(buffer);var m=global.Float32Array;var n=new m(buffer);var o=global.Float64Array;var p=new o(buffer);var q=global.byteLength;var r=env.DYNAMICTOP_PTR|0;var s=env.tempDoublePtr|0;var t=env.ABORT|0;var u=env.STACKTOP|0;var v=env.STACK_MAX|0;var w=env.cttz_i8|0;var x=0;var y=0;var z=0;var A=0;var B=global.NaN,C=global.Infinity;var D=0,E=0,F=0,G=0,H=0.0;var I=0;var J=global.Math.floor;var K=global.Math.abs;var L=global.Math.sqrt;var M=global.Math.pow;var N=global.Math.cos;var O=global.Math.sin;var P=global.Math.tan;var Q=global.Math.acos;var R=global.Math.asin;var S=global.Math.atan;var T=global.Math.atan2;var U=global.Math.exp;var V=global.Math.log;var W=global.Math.ceil;var X=global.Math.imul;var Y=global.Math.min;var Z=global.Math.max;var _=global.Math.clz32;var $=global.Math.fround;var aa=env.abort;var ba=env.assert;var ca=env.enlargeMemory;var da=env.getTotalMemory;var ea=env.abortOnCannotGrowMemory;var fa=env.invoke_ii;var ga=env.invoke_iii;var ha=env.invoke_iiii;var ia=env.invoke_iiiiiii;var ja=env.invoke_v;var ka=env.invoke_vi;var la=env.invoke_vii;var ma=env.invoke_viii;var na=env.invoke_viiii;var oa=env.invoke_viiiii;var pa=env.invoke_viiiiii;var qa=env.__ZSt18uncaught_exceptionv;var ra=env.___cxa_allocate_exception;var sa=env.___cxa_begin_catch;var ta=env.___cxa_find_matching_catch;var ua=env.___cxa_pure_virtual;var va=env.___cxa_throw;var wa=env.___gxx_personality_v0;var xa=env.___resumeException;var ya=env.___setErrNo;var za=env.___syscall140;var Aa=env.___syscall146;var Ba=env.___syscall6;var Ca=env._abort;var Da=env._emscripten_memcpy_big;var Ea=env._llvm_trap;var Fa=env._pthread_getspecific;var Ga=env._pthread_key_create;var Ha=env._pthread_once;var Ia=env._pthread_setspecific;var Ja=env.flush_NO_FILESYSTEM;var Ka=$(0);const La=$(0);function Ma(newBuffer){if(q(newBuffer)&16777215||q(newBuffer)<=16777215||q(newBuffer)>2147483648)return false;b=new a(newBuffer);d=new c(newBuffer);f=new e(newBuffer);h=new g(newBuffer);j=new i(newBuffer);l=new k(newBuffer);n=new m(newBuffer);p=new o(newBuffer);buffer=newBuffer;return true}
+// EMSCRIPTEN_START_FUNCS
+function Ib(a,b,c,d,e,g){a=a|0;b=b|0;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=f[h>>2]|0;if(F){F=0-D|0;C=0-(f[m>>2]|0)|0;a=0-(f[o>>2]|0)|0;f[h>>2]=F;f[m>>2]=C;f[o>>2]=a;L=F;M=C}else{L=D;M=f[m>>2]|0}do if((L|0)<=-1){if((M|0)<0){D=f[o>>2]|0;N=(D|0)>-1?D:0-D|0;O=D}else{D=f[o>>2]|0;N=(f[s>>2]|0)-((D|0)>-1?D:0-D|0)|0;O=D}if((O|0)<0){P=(M|0)>-1?M:0-M|0;Q=N;break}else{P=(f[s>>2]|0)-((M|0)>-1?M:0-M|0)|0;Q=N;break}}else{D=f[p>>2]|0;P=(f[o>>2]|0)+D|0;Q=D+M|0}while(0);D=(Q|0)==0;C=(P|0)==0;F=f[s>>2]|0;do if(P|Q){a=(F|0)==(P|0);if(!(D&a)){E=(F|0)==(Q|0);if(!(C&E)){if(D?(l=f[p>>2]|0,(l|0)<(P|0)):0){R=0;S=(l<<1)-P|0;break}if(E?(E=f[p>>2]|0,(E|0)>(P|0)):0){R=Q;S=(E<<1)-P|0;break}if(a?(a=f[p>>2]|0,(a|0)>(Q|0)):0){R=(a<<1)-Q|0;S=P;break}if(C){a=f[p>>2]|0;R=(a|0)<(Q|0)?(a<<1)-Q|0:Q;S=0}else{R=Q;S=P}}else{R=Q;S=Q}}else{R=P;S=P}}else{R=F;S=F}while(0);f[i>>2]=R;f[r>>2]=S;F=A<<1;C=b+(F<<2)|0;D=c+(F<<2)|0;if((f[t>>2]|0)>0){F=0;a=R;while(1){E=f[v>>2]|0;if((a|0)>(E|0)){l=f[w>>2]|0;f[l+(F<<2)>>2]=E;T=l}else{l=f[x>>2]|0;E=f[w>>2]|0;f[E+(F<<2)>>2]=(a|0)<(l|0)?l:a;T=E}E=F+1|0;U=f[t>>2]|0;if((E|0)>=(U|0))break;F=E;a=f[i+(E<<2)>>2]|0}if((U|0)>0){a=0;do{F=(f[C+(a<<2)>>2]|0)+(f[T+(a<<2)>>2]|0)|0;E=D+(a<<2)|0;f[E>>2]=F;if((F|0)<=(f[v>>2]|0)){if((F|0)<(f[x>>2]|0)){V=(f[y>>2]|0)+F|0;W=44}}else{V=F-(f[y>>2]|0)|0;W=44}if((W|0)==44){W=0;f[E>>2]=V}a=a+1|0}while((a|0)<(f[t>>2]|0))}}A=A+1|0;if((A|0)>=(n|0)){W=3;break}a=f[g>>2]|0;B=f[a>>2]|0;if((f[a+4>>2]|0)-B>>2>>>0<=A>>>0){z=a;W=4;break}}if((W|0)==3){u=e;return 1}else if((W|0)==4)xm(z);return 0}function Jb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0;e=u;u=u+32|0;d=e+28|0;h=e+16|0;i=e+8|0;j=e;k=a+60|0;f[a+68>>2]=g;g=a+56|0;l=f[g>>2]|0;m=(f[l+4>>2]|0)-(f[l>>2]|0)|0;n=m>>2;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;if((m|0)<=0){u=e;return 1}m=h+4|0;o=h+8|0;p=a+104|0;q=a+108|0;r=i+4|0;s=a+100|0;t=a+8|0;v=a+16|0;w=a+32|0;x=a+12|0;y=a+20|0;a=f[l>>2]|0;if((f[l+4>>2]|0)==(a|0)){z=l;xm(z)}else{A=0;B=a}while(1){f[j>>2]=f[B+(A<<2)>>2];f[d>>2]=f[j>>2];wb(k,d,h);a=f[h>>2]|0;l=(a|0)>-1?a:0-a|0;C=f[m>>2]|0;D=(C|0)>-1?C:0-C|0;E=Uj(D|0,((D|0)<0)<<31>>31|0,l|0,((l|0)<0)<<31>>31|0)|0;l=f[o>>2]|0;D=(l|0)>-1;F=D?l:0-l|0;l=Uj(E|0,I|0,F|0,((F|0)<0)<<31>>31|0)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+(F<<2)|0;if((f[t>>2]|0)>0){F=0;a=R;while(1){E=f[v>>2]|0;if((a|0)>(E|0)){l=f[w>>2]|0;f[l+(F<<2)>>2]=E;T=l}else{l=f[x>>2]|0;E=f[w>>2]|0;f[E+(F<<2)>>2]=(a|0)<(l|0)?l:a;T=E}E=F+1|0;U=f[t>>2]|0;if((E|0)>=(U|0))break;F=E;a=f[i+(E<<2)>>2]|0}if((U|0)>0){a=0;do{F=(f[C+(a<<2)>>2]|0)+(f[T+(a<<2)>>2]|0)|0;E=D+(a<<2)|0;f[E>>2]=F;if((F|0)<=(f[v>>2]|0)){if((F|0)<(f[x>>2]|0)){V=(f[y>>2]|0)+F|0;W=44}}else{V=F-(f[y>>2]|0)|0;W=44}if((W|0)==44){W=0;f[E>>2]=V}a=a+1|0}while((a|0)<(f[t>>2]|0))}}A=A+1|0;if((A|0)>=(n|0)){W=3;break}a=f[g>>2]|0;B=f[a>>2]|0;if((f[a+4>>2]|0)-B>>2>>>0<=A>>>0){z=a;W=4;break}}if((W|0)==3){u=e;return 1}else if((W|0)==4)xm(z);return 0}function Kb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;e=u;u=u+16|0;g=e+8|0;h=e+4|0;i=e;j=a+64|0;k=f[j>>2]|0;if((f[k+28>>2]|0)==(f[k+24>>2]|0)){u=e;return}l=c+96|0;c=a+52|0;m=d+84|0;n=d+68|0;d=a+56|0;o=a+60|0;p=a+12|0;q=a+28|0;r=a+40|0;s=a+44|0;t=a+48|0;v=0;w=0;x=k;while(1){k=f[(f[x+24>>2]|0)+(w<<2)>>2]|0;if((k|0)==-1){y=v;z=x}else{A=v+1|0;B=f[(f[l>>2]|0)+(((k|0)/3|0)*12|0)+(((k|0)%3|0)<<2)>>2]|0;if(!(b[m>>0]|0))C=f[(f[n>>2]|0)+(B<<2)>>2]|0;else C=B;f[g>>2]=C;B=f[d>>2]|0;if(B>>>0<(f[o>>2]|0)>>>0){f[B>>2]=C;f[d>>2]=B+4}else wf(c,g);f[g>>2]=k;f[h>>2]=0;a:do if(!(f[(f[p>>2]|0)+(w>>>5<<2)>>2]&1<<(w&31)))D=k;else{B=k+1|0;E=((B>>>0)%3|0|0)==0?k+-2|0:B;if(((E|0)!=-1?(f[(f[a>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)==0:0)?(B=f[(f[(f[j>>2]|0)+12>>2]|0)+(E<<2)>>2]|0,E=B+1|0,(B|0)!=-1):0){F=((E>>>0)%3|0|0)==0?B+-2|0:E;f[h>>2]=F;if((F|0)==-1){D=k;break}else G=F;while(1){f[g>>2]=G;F=G+1|0;E=((F>>>0)%3|0|0)==0?G+-2|0:F;if((E|0)==-1)break;if(f[(f[a>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)break;F=f[(f[(f[j>>2]|0)+12>>2]|0)+(E<<2)>>2]|0;E=F+1|0;if((F|0)==-1)break;B=((E>>>0)%3|0|0)==0?F+-2|0:E;f[h>>2]=B;if((B|0)==-1){D=G;break a}else G=B}f[h>>2]=-1;D=G;break}f[h>>2]=-1;D=k}while(0);f[(f[q>>2]|0)+(D<<2)>>2]=v;k=f[s>>2]|0;if((k|0)==(f[t>>2]|0))wf(r,g);else{f[k>>2]=f[g>>2];f[s>>2]=k+4}k=f[j>>2]|0;B=f[g>>2]|0;b:do if(((B|0)!=-1?(E=(((B>>>0)%3|0|0)==0?2:-1)+B|0,(E|0)!=-1):0)?(F=f[(f[k+12>>2]|0)+(E<<2)>>2]|0,(F|0)!=-1):0){E=F+(((F>>>0)%3|0|0)==0?2:-1)|0;f[h>>2]=E;if((E|0)!=-1&(E|0)!=(B|0)){F=A;H=v;I=E;while(1){E=I+1|0;J=((E>>>0)%3|0|0)==0?I+-2|0:E;do if(f[(f[a>>2]|0)+(J>>>5<<2)>>2]&1<<(J&31)){E=F+1|0;K=f[(f[l>>2]|0)+(((I|0)/3|0)*12|0)+(((I|0)%3|0)<<2)>>2]|0;if(!(b[m>>0]|0))L=f[(f[n>>2]|0)+(K<<2)>>2]|0;else L=K;f[i>>2]=L;K=f[d>>2]|0;if(K>>>0<(f[o>>2]|0)>>>0){f[K>>2]=L;f[d>>2]=K+4}else wf(c,i);K=f[s>>2]|0;if((K|0)==(f[t>>2]|0)){wf(r,h);M=E;N=F;break}else{f[K>>2]=f[h>>2];f[s>>2]=K+4;M=E;N=F;break}}else{M=F;N=H}while(0);f[(f[q>>2]|0)+(f[h>>2]<<2)>>2]=N;O=f[j>>2]|0;J=f[h>>2]|0;if((J|0)==-1)break;E=(((J>>>0)%3|0|0)==0?2:-1)+J|0;if((E|0)==-1)break;J=f[(f[O+12>>2]|0)+(E<<2)>>2]|0;if((J|0)==-1)break;I=J+(((J>>>0)%3|0|0)==0?2:-1)|0;f[h>>2]=I;if(!((I|0)!=-1?(I|0)!=(f[g>>2]|0):0)){P=M;Q=O;break b}else{F=M;H=N}}f[h>>2]=-1;P=M;Q=O}else{P=A;Q=k}}else R=28;while(0);if((R|0)==28){R=0;f[h>>2]=-1;P=A;Q=k}y=P;z=Q}w=w+1|0;if(w>>>0>=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2>>>0)break;else{v=y;x=z}}u=e;return}function Lb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;e=u;u=u+48|0;d=e+32|0;h=e+24|0;i=e+16|0;j=e;k=e+12|0;l=a+8|0;m=f[l>>2]|0;if((m+-2|0)>>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C}else{C=f[q>>2]|0;M=(f[t>>2]|0)-((C|0)>-1?C:0-C|0)|0;N=C}if((N|0)<0){O=(L|0)>-1?L:0-L|0;P=M;break}else{O=(f[t>>2]|0)-((L|0)>-1?L:0-L|0)|0;P=M;break}}else{C=f[r>>2]|0;O=(f[q>>2]|0)+C|0;P=C+L|0}while(0);C=(P|0)==0;B=(O|0)==0;E=f[t>>2]|0;do if(O|P){x=(E|0)==(O|0);if(!(C&x)){D=(E|0)==(P|0);if(!(B&D)){if(C?(n=f[r>>2]|0,(n|0)<(O|0)):0){Q=0;R=(n<<1)-O|0;break}if(D?(D=f[r>>2]|0,(D|0)>(O|0)):0){Q=P;R=(D<<1)-O|0;break}if(x?(x=f[r>>2]|0,(x|0)>(P|0)):0){Q=(x<<1)-P|0;R=O;break}if(B){x=f[r>>2]|0;Q=(x|0)<(P|0)?(x<<1)-P|0:P;R=0}else{Q=P;R=O}}else{Q=P;R=P}}else{Q=O;R=O}}else{Q=E;R=E}while(0);E=z<<1;B=b+(E<<2)|0;C=c+(E<<2)|0;E=f[B>>2]|0;x=f[B+4>>2]|0;f[h>>2]=Q;f[a>>2]=R;f[i>>2]=E;f[v>>2]=x;dc(d,l,h,i);f[C>>2]=f[d>>2];f[C+4>>2]=f[w>>2];z=z+1|0;if((z|0)>=(p|0)){S=5;break}C=f[g>>2]|0;A=f[C>>2]|0;if((f[C+4>>2]|0)-A>>2>>>0<=z>>>0){y=C;S=6;break}}if((S|0)==5){u=e;return 1}else if((S|0)==6)xm(y);return 0}function Mb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;e=u;u=u+48|0;d=e+32|0;h=e+24|0;i=e+16|0;j=e;k=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)<0){C=f[q>>2]|0;M=(C|0)>-1?C:0-C|0;N=C}else{C=f[q>>2]|0;M=(f[t>>2]|0)-((C|0)>-1?C:0-C|0)|0;N=C}if((N|0)<0){O=(L|0)>-1?L:0-L|0;P=M;break}else{O=(f[t>>2]|0)-((L|0)>-1?L:0-L|0)|0;P=M;break}}else{C=f[r>>2]|0;O=(f[q>>2]|0)+C|0;P=C+L|0}while(0);C=(P|0)==0;B=(O|0)==0;E=f[t>>2]|0;do if(O|P){x=(E|0)==(O|0);if(!(C&x)){D=(E|0)==(P|0);if(!(B&D)){if(C?(n=f[r>>2]|0,(n|0)<(O|0)):0){Q=0;R=(n<<1)-O|0;break}if(D?(D=f[r>>2]|0,(D|0)>(O|0)):0){Q=P;R=(D<<1)-O|0;break}if(x?(x=f[r>>2]|0,(x|0)>(P|0)):0){Q=(x<<1)-P|0;R=O;break}if(B){x=f[r>>2]|0;Q=(x|0)<(P|0)?(x<<1)-P|0:P;R=0}else{Q=P;R=O}}else{Q=P;R=P}}else{Q=O;R=O}}else{Q=E;R=E}while(0);E=z<<1;B=b+(E<<2)|0;C=c+(E<<2)|0;E=f[B>>2]|0;x=f[B+4>>2]|0;f[h>>2]=Q;f[a>>2]=R;f[i>>2]=E;f[v>>2]=x;dc(d,l,h,i);f[C>>2]=f[d>>2];f[C+4>>2]=f[w>>2];z=z+1|0;if((z|0)>=(p|0)){S=5;break}C=f[g>>2]|0;A=f[C>>2]|0;if((f[C+4>>2]|0)-A>>2>>>0<=z>>>0){y=C;S=6;break}}if((S|0)==5){u=e;return 1}else if((S|0)==6)xm(y);return 0}function Nb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;d=u;u=u+16|0;e=d+12|0;g=d;h=d+8|0;i=d+4|0;j=a+8+(b*12|0)|0;k=f[j>>2]|0;l=a+8+(b*12|0)+4|0;m=f[l>>2]|0;if((m|0)!=(k|0))f[l>>2]=m+(~((m+-4-k|0)>>>2)<<2);k=f[c>>2]|0;m=a+4|0;f[g>>2]=(k|0)==-1?-1:(k>>>0)/3|0;n=a+56|0;o=a+8+(b*12|0)+8|0;p=0;q=f[g>>2]|0;r=k;while(1){s=(f[n>>2]|0)+(q>>>5<<2)|0;t=1<<(q&31);v=f[s>>2]|0;if(t&v|0)break;f[s>>2]=v|t;t=f[l>>2]|0;if((t|0)==(f[o>>2]|0))wf(j,g);else{f[t>>2]=f[g>>2];f[l>>2]=t+4}t=p+1|0;if((p|0)>0){v=(r|0)==-1;do if(!(t&1))if(!v)if(!((r>>>0)%3|0)){w=r+2|0;break}else{w=r+-1|0;break}else w=-1;else{s=r+1|0;if(v)w=-1;else w=((s>>>0)%3|0|0)==0?r+-2|0:s}while(0);f[c>>2]=w;x=w}else x=r;f[i>>2]=x;f[e>>2]=f[i>>2];v=Md(a,e)|0;f[c>>2]=v;if((v|0)==-1)break;s=(v>>>0)/3|0;f[g>>2]=s;p=t;q=s;r=v}r=(k|0)==-1;do if(!r)if(!((k>>>0)%3|0)){y=k+2|0;break}else{y=k+-1|0;break}else y=-1;while(0);f[h>>2]=y;f[e>>2]=f[h>>2];do if((Md(a,e)|0)==-1)z=k;else{h=k+1|0;if(!r){y=((h>>>0)%3|0|0)==0?k+-2|0:h;f[c>>2]=y;h=f[m>>2]|0;q=y+1|0;if(((y|0)!=-1?(p=((q>>>0)%3|0|0)==0?y+-2|0:q,(p|0)!=-1):0)?(q=f[(f[h+12>>2]|0)+(p<<2)>>2]|0,p=q+1|0,(q|0)!=-1):0){h=((p>>>0)%3|0|0)==0?q+-2|0:p;f[c>>2]=h;if((h|0)==-1){z=k;break}else{A=h;B=0;C=k}while(1){h=(A>>>0)/3|0;f[g>>2]=h;p=(f[n>>2]|0)+(h>>>5<<2)|0;q=1<<(h&31);h=f[p>>2]|0;if(q&h|0){D=B;E=C;break}f[p>>2]=h|q;q=f[l>>2]|0;if((q|0)==(f[o>>2]|0))wf(j,g);else{f[q>>2]=f[g>>2];f[l>>2]=q+4}q=B+1|0;if((B|0)>0){h=(A|0)==-1;do if(!(q&1))if(!h)if(!((A>>>0)%3|0)){F=A+2|0;G=A;break}else{F=A+-1|0;G=A;break}else{F=-1;G=A}else{p=A+1|0;if(h){F=-1;G=C}else{F=((p>>>0)%3|0|0)==0?A+-2|0:p;G=C}}while(0);f[c>>2]=F;H=G;I=F}else{H=C;I=A}f[i>>2]=I;f[e>>2]=f[i>>2];A=Md(a,e)|0;f[c>>2]=A;if((A|0)==-1){D=q;E=H;break}else{B=q;C=H}}if(!(D&1)){z=E;break}t=f[l>>2]|0;h=f[t+-4>>2]|0;p=(f[n>>2]|0)+(h>>>5<<2)|0;f[p>>2]=f[p>>2]&~(1<<(h&31));f[l>>2]=t+-4;z=E;break}else J=k}else{f[c>>2]=-1;J=-1}f[c>>2]=-1;z=J}while(0);f[a+44+(b<<2)>>2]=z;z=f[l>>2]|0;l=f[j>>2]|0;j=l;if((z|0)==(l|0)){u=d;return}b=f[n>>2]|0;n=z-l>>2;l=0;do{z=f[j+(l<<2)>>2]|0;a=b+(z>>>5<<2)|0;f[a>>2]=f[a>>2]&~(1<<(z&31));l=l+1|0}while(l>>>0<n>>>0);u=d;return}function Ob(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;c=u;u=u+16|0;b=c+8|0;d=c+4|0;e=c;g=a+64|0;h=f[g>>2]|0;if((f[h+28>>2]|0)==(f[h+24>>2]|0)){u=c;return}i=a+52|0;j=a+56|0;k=a+60|0;l=a+12|0;m=a+28|0;n=a+40|0;o=a+44|0;p=a+48|0;q=0;r=0;s=h;while(1){h=f[(f[s+24>>2]|0)+(r<<2)>>2]|0;if((h|0)==-1){t=q;v=s}else{w=q+1|0;f[b>>2]=q;x=f[j>>2]|0;if((x|0)==(f[k>>2]|0))wf(i,b);else{f[x>>2]=q;f[j>>2]=x+4}f[d>>2]=h;f[e>>2]=0;a:do if(!(f[(f[l>>2]|0)+(r>>>5<<2)>>2]&1<<(r&31)))y=h;else{x=h+1|0;z=((x>>>0)%3|0|0)==0?h+-2|0:x;if(((z|0)!=-1?(f[(f[a>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)==0:0)?(x=f[(f[(f[g>>2]|0)+12>>2]|0)+(z<<2)>>2]|0,z=x+1|0,(x|0)!=-1):0){A=((z>>>0)%3|0|0)==0?x+-2|0:z;f[e>>2]=A;if((A|0)==-1){y=h;break}else B=A;while(1){f[d>>2]=B;A=B+1|0;z=((A>>>0)%3|0|0)==0?B+-2|0:A;if((z|0)==-1)break;if(f[(f[a>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)break;A=f[(f[(f[g>>2]|0)+12>>2]|0)+(z<<2)>>2]|0;z=A+1|0;if((A|0)==-1)break;x=((z>>>0)%3|0|0)==0?A+-2|0:z;f[e>>2]=x;if((x|0)==-1){y=B;break a}else B=x}f[e>>2]=-1;y=B;break}f[e>>2]=-1;y=h}while(0);f[(f[m>>2]|0)+(y<<2)>>2]=f[b>>2];h=f[o>>2]|0;if((h|0)==(f[p>>2]|0))wf(n,d);else{f[h>>2]=f[d>>2];f[o>>2]=h+4}h=f[g>>2]|0;x=f[d>>2]|0;b:do if(((x|0)!=-1?(z=(((x>>>0)%3|0|0)==0?2:-1)+x|0,(z|0)!=-1):0)?(A=f[(f[h+12>>2]|0)+(z<<2)>>2]|0,(A|0)!=-1):0){z=A+(((A>>>0)%3|0|0)==0?2:-1)|0;f[e>>2]=z;if((z|0)!=-1&(z|0)!=(x|0)){A=w;C=z;while(1){z=C+1|0;D=((z>>>0)%3|0|0)==0?C+-2|0:z;do if(f[(f[a>>2]|0)+(D>>>5<<2)>>2]&1<<(D&31)){z=A+1|0;f[b>>2]=A;E=f[j>>2]|0;if((E|0)==(f[k>>2]|0))wf(i,b);else{f[E>>2]=A;f[j>>2]=E+4}E=f[o>>2]|0;if((E|0)==(f[p>>2]|0)){wf(n,e);F=z;break}else{f[E>>2]=f[e>>2];f[o>>2]=E+4;F=z;break}}else F=A;while(0);f[(f[m>>2]|0)+(f[e>>2]<<2)>>2]=f[b>>2];G=f[g>>2]|0;D=f[e>>2]|0;if((D|0)==-1)break;z=(((D>>>0)%3|0|0)==0?2:-1)+D|0;if((z|0)==-1)break;D=f[(f[G+12>>2]|0)+(z<<2)>>2]|0;if((D|0)==-1)break;C=D+(((D>>>0)%3|0|0)==0?2:-1)|0;f[e>>2]=C;if(!((C|0)!=-1?(C|0)!=(f[d>>2]|0):0)){H=F;I=G;break b}else A=F}f[e>>2]=-1;H=F;I=G}else{H=w;I=h}}else J=26;while(0);if((J|0)==26){J=0;f[e>>2]=-1;H=w;I=h}t=H;v=I}r=r+1|0;if(r>>>0>=(f[v+28>>2]|0)-(f[v+24>>2]|0)>>2>>>0)break;else{q=t;s=v}}u=c;return}function Pb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;c=u;u=u+32|0;d=c+16|0;e=c;bg(d,b)|0;g=f[d>>2]|0;if(g){i=a+60|0;Ec(i,g,0);Wk(e);if(rd(e,b)|0){if(f[d>>2]|0){g=0;do{j=Wg(e)|0;k=(f[i>>2]|0)+(g>>>5<<2)|0;l=1<<(g&31);if(j)m=f[k>>2]|l;else m=f[k>>2]&~l;f[k>>2]=m;g=g+1|0}while(g>>>0<(f[d>>2]|0)>>>0)}n=10}}else n=10;do if((n|0)==10){bg(d,b)|0;g=f[d>>2]|0;if(g|0){m=a+72|0;Ec(m,g,0);Wk(e);if(!(rd(e,b)|0))break;if(f[d>>2]|0){g=0;do{i=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)<<31>>31|0)|0;w=I;if(!(w>>>0<0|(w|0)==0&j>>>0<2147483647)){s=0;u=c;return s|0}w=j+1|0;f[a+20>>2]=w;j=(w|0)/2|0;k=a+24|0;f[k>>2]=j;f[a+28>>2]=0-j;if(w&1|0){s=1;u=c;return s|0}f[k>>2]=j+-1;s=1;u=c;return s|0}while(0);s=0;u=c;return s|0}function Qb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;d=u;u=u+80|0;e=d+76|0;g=d;h=d+72|0;i=d+64|0;j=d+68|0;if(!(bg(e,c)|0)){k=0;u=d;return k|0}l=f[e>>2]|0;if(!l){k=0;u=d;return k|0}m=a+4|0;n=a+8|0;o=f[n>>2]|0;p=f[m>>2]|0;q=o-p>>2;r=p;p=o;if(l>>>0>q>>>0){ef(m,l-q|0);if(!(f[e>>2]|0)){k=1;u=d;return k|0}}else if(l>>>0<q>>>0?(q=r+(l<<2)|0,(q|0)!=(p|0)):0)f[n>>2]=p+(~((p+-4-q|0)>>>2)<<2);q=f[a+32>>2]|0;p=c+8|0;n=c+16|0;l=g+60|0;r=q+8|0;o=a+16|0;s=a+20|0;a=0;while(1){t=p;v=f[t>>2]|0;w=f[t+4>>2]|0;t=n;x=f[t>>2]|0;y=f[t+4>>2]|0;if(!((w|0)>(y|0)|(w|0)==(y|0)&v>>>0>x>>>0)){k=0;z=40;break}t=f[c>>2]|0;A=b[t+x>>0]|0;B=Uj(x|0,y|0,1,0)|0;C=I;D=n;f[D>>2]=B;f[D+4>>2]=C;if(!((w|0)>(C|0)|(w|0)==(C|0)&v>>>0>B>>>0)){k=0;z=40;break}C=b[t+B>>0]|0;B=Uj(x|0,y|0,2,0)|0;D=I;E=n;f[E>>2]=B;f[E+4>>2]=D;if(!((w|0)>(D|0)|(w|0)==(D|0)&v>>>0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}}if((z|0)==40){u=d;return k|0}return 0}function Rb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;e=Na[f[(f[a>>2]|0)+44>>2]&127](a)|0;if((e|0)<1){g=0;return g|0}h=(f[c+4>>2]|0)-(f[c>>2]|0)>>2;i=X(h,e)|0;Wd(a,h,e);h=a+16|0;j=f[h>>2]|0;if(!(f[j+80>>2]|0)){g=0;return g|0}k=(f[f[j>>2]>>2]|0)+(f[j+48>>2]|0)|0;if(!k){g=0;return g|0}j=d+8|0;l=j;m=f[l>>2]|0;n=f[l+4>>2]|0;l=d+16|0;o=l;p=f[o>>2]|0;q=f[o+4>>2]|0;if(!((n|0)>(q|0)|(n|0)==(q|0)&m>>>0>p>>>0)){g=0;return g|0}o=f[d>>2]|0;r=b[o+p>>0]|0;s=Uj(p|0,q|0,1,0)|0;t=I;u=l;f[u>>2]=s;f[u+4>>2]=t;a:do if(!(r<<24>>24)){if(!((n|0)>(t|0)|(n|0)==(t|0)&m>>>0>s>>>0)){g=0;return g|0}u=b[o+s>>0]|0;v=Uj(p|0,q|0,2,0)|0;w=l;f[w>>2]=v;f[w+4>>2]=I;w=u&255;v=(di(5)|0)==(w|0);x=f[(f[h>>2]|0)+64>>2]|0;y=(f[x+4>>2]|0)-(f[x>>2]|0)|0;if(v){v=i<<2;if(y>>>0<v>>>0){g=0;return g|0}x=j;z=f[x>>2]|0;A=f[x+4>>2]|0;x=l;B=f[x>>2]|0;C=Uj(B|0,f[x+4>>2]|0,v|0,0)|0;x=I;if((A|0)<(x|0)|(A|0)==(x|0)&z>>>0<C>>>0){g=0;return g|0}else{be(k|0,(f[d>>2]|0)+B|0,v|0)|0;B=l;C=Uj(f[B>>2]|0,f[B+4>>2]|0,v|0,0)|0;v=l;f[v>>2]=C;f[v+4>>2]=I;D=19;break}}if(y>>>0<(X(i,w)|0)>>>0){g=0;return g|0}y=j;v=f[y>>2]|0;C=f[y+4>>2]|0;y=l;B=f[y>>2]|0;z=f[y+4>>2]|0;y=Wj(v|0,C|0,B|0,z|0)|0;x=I;A=u&255;u=hj(A|0,0,i|0,0)|0;E=I;if((x|0)<(E|0)|(x|0)==(E|0)&y>>>0<u>>>0){g=0;return g|0}if(!i)D=20;else{u=0;y=B;B=z;z=C;C=v;while(1){v=Uj(y|0,B|0,A|0,0)|0;E=I;if((z|0)<(E|0)|(z|0)==(E|0)&C>>>0<v>>>0){F=y;G=B}else{be(k+(u<<2)|0,(f[d>>2]|0)+y|0,w|0)|0;v=l;E=Uj(f[v>>2]|0,f[v+4>>2]|0,A|0,0)|0;v=I;x=l;f[x>>2]=E;f[x+4>>2]=v;F=E;G=v}v=u+1|0;if((v|0)==(i|0)){D=19;break a}E=j;u=v;y=F;B=G;z=f[E+4>>2]|0;C=f[E>>2]|0}}}else if(Pf(i,e,d,k)|0)D=19;else{g=0;return g|0}while(0);do if((D|0)==19)if(!i)D=20;else{G=a+20|0;F=f[G>>2]|0;if(F|0?Na[f[(f[F>>2]|0)+32>>2]&127](F)|0:0){H=G;J=1;break}ui(k,i,k);H=G;J=1}while(0);if((D|0)==20){H=a+20|0;J=0}a=f[H>>2]|0;if(a|0){if(!(Oa[f[(f[a>>2]|0)+40>>2]&127](a,d)|0)){g=0;return g|0}if(J?(J=f[H>>2]|0,!(Qa[f[(f[J>>2]|0)+44>>2]&15](J,k,k,i,e,f[c>>2]|0)|0)):0){g=0;return g|0}}g=1;return g|0}function Sb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)gn(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;al(e,10109);f[e>>2]=3812;va(e|0,904,84)}e=dj(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)gn(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0<c>>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){o=d;while(1){e=f[o+4>>2]|0;if(!i)if(e>>>0<c>>>0)p=e;else p=(e>>>0)%(c>>>0)|0;else p=e&h;if((p|0)==(k|0))break;q=(f[a>>2]|0)+(p<<2)|0;if(!(f[q>>2]|0))break b;e=f[o>>2]|0;c:do if(!e)r=o;else{s=o+8|0;t=b[s+11>>0]|0;u=t<<24>>24<0;v=t&255;t=u?f[o+12>>2]|0:v;w=(t|0)==0;if(u){u=o;x=e;while(1){y=x+8|0;z=b[y+11>>0]|0;A=z<<24>>24<0;if((t|0)!=((A?f[x+12>>2]|0:z&255)|0)){r=u;break c}if(!w?oh(f[s>>2]|0,A?f[y>>2]|0:y,t)|0:0){r=u;break c}y=f[x>>2]|0;if(!y){r=x;break c}else{A=x;x=y;u=A}}}if(w){u=o;x=e;while(1){A=b[x+8+11>>0]|0;if((A<<24>>24<0?f[x+12>>2]|0:A&255)|0){r=u;break c}A=f[x>>2]|0;if(!A){r=x;break c}else{y=x;x=A;u=y}}}u=o;x=e;while(1){w=x+8|0;y=b[w+11>>0]|0;A=y<<24>>24<0;if((t|0)!=((A?f[x+12>>2]|0:y&255)|0)){r=u;break c}y=A?f[w>>2]|0:w;if((b[y>>0]|0)==(f[s>>2]&255)<<24>>24){B=s;C=v;D=y}else{r=u;break c}while(1){C=C+-1|0;B=B+1|0;if(!C)break;D=D+1|0;if((b[B>>0]|0)!=(b[D>>0]|0)){r=u;break c}}y=f[x>>2]|0;if(!y){r=x;break}else{w=x;x=y;u=w}}}while(0);f[j>>2]=f[r>>2];f[r>>2]=f[f[(f[a>>2]|0)+(p<<2)>>2]>>2];f[f[(f[a>>2]|0)+(p<<2)>>2]>>2]=o;e=f[g>>2]|0;if(!e){E=43;break a}else o=e}d=f[o>>2]|0;if(!d){E=43;break a}else{g=o;j=o}}f[q>>2]=j;m=f[o>>2]|0;if(!m){E=43;break}else{k=p;l=o;n=o}}if((E|0)==43)return}function Tb(a,c,e,g,h){a=a|0;c=c|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;i=u;u=u+32|0;j=i+12|0;k=i;f[c+40>>2]=e;e=c+32|0;f[e>>2]=g;f[c+4>>2]=h;Gb(a,g,j);if(f[a>>2]|0){u=i;return}g=a+4|0;h=g+11|0;if((b[h>>0]|0)<0)gn(f[g>>2]|0);l=b[j+7>>0]|0;if((Na[f[(f[c>>2]|0)+8>>2]&127](c)|0)!=(l&255|0)){m=dj(64)|0;f[k>>2]=m;f[k+8>>2]=-2147483584;f[k+4>>2]=50;n=m;o=9897;p=n+50|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[m+50>>0]=0;f[a>>2]=-1;Qf(g,k);if((b[k+11>>0]|0)<0)gn(f[k>>2]|0);u=i;return}m=b[j+5>>0]|0;b[c+36>>0]=m;q=b[j+6>>0]|0;b[c+37>>0]=q;if((m+-1&255)>1){r=dj(32)|0;f[k>>2]=r;f[k+8>>2]=-2147483616;f[k+4>>2]=22;n=r;o=9948;p=n+22|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[r+22>>0]=0;f[a>>2]=-5;Qf(g,k);if((b[k+11>>0]|0)<0)gn(f[k>>2]|0);u=i;return}r=q&255;if(m<<24>>24==2&(l<<24>>24==0?3:2)>>>0<r>>>0){l=dj(32)|0;f[k>>2]=l;f[k+8>>2]=-2147483616;f[k+4>>2]=22;n=l;o=9971;p=n+22|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[l+22>>0]=0;f[a>>2]=-5;Qf(g,k);if((b[k+11>>0]|0)<0)gn(f[k>>2]|0);u=i;return}l=((m&255)<<8|r)&65535;d[(f[e>>2]|0)+38>>1]=l;if((l&65535)>258?(d[j+10>>1]|0)<0:0){Wc(a,c);if(f[a>>2]|0){u=i;return}if((b[h>>0]|0)<0)gn(f[g>>2]|0)}if(!(Na[f[(f[c>>2]|0)+12>>2]&127](c)|0)){h=dj(48)|0;f[k>>2]=h;f[k+8>>2]=-2147483600;f[k+4>>2]=33;n=h;o=9994;p=n+33|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[h+33>>0]=0;f[a>>2]=-1;Qf(g,k);if((b[k+11>>0]|0)<0)gn(f[k>>2]|0);u=i;return}if(!(Na[f[(f[c>>2]|0)+20>>2]&127](c)|0)){h=dj(32)|0;f[k>>2]=h;f[k+8>>2]=-2147483616;f[k+4>>2]=31;n=h;o=10028;p=n+31|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[h+31>>0]=0;f[a>>2]=-1;Qf(g,k);if((b[k+11>>0]|0)<0)gn(f[k>>2]|0);u=i;return}if(Na[f[(f[c>>2]|0)+24>>2]&127](c)|0){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=i;return}c=dj(48)|0;f[k>>2]=c;f[k+8>>2]=-2147483600;f[k+4>>2]=34;n=c;o=10060;p=n+34|0;do{b[n>>0]=b[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));b[c+34>>0]=0;f[a>>2]=-1;Qf(g,k);if((b[k+11>>0]|0)<0)gn(f[k>>2]|0);u=i;return}function Ub(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c=u;u=u+48|0;d=c+32|0;e=c+28|0;g=c+16|0;h=c;i=a+16|0;j=f[i>>2]|0;if(j|0){k=f[b>>2]|0;l=i;m=j;a:while(1){j=m;while(1){if((f[j+16>>2]|0)>=(k|0))break;n=f[j+4>>2]|0;if(!n){o=l;break a}else j=n}m=f[j>>2]|0;if(!m){o=j;break}else l=j}if((o|0)!=(i|0)?(k|0)>=(f[o+16>>2]|0):0){p=o;q=p+20|0;u=c;return q|0}}Jl(g);f[h>>2]=f[b>>2];b=h+4|0;f[h+8>>2]=0;o=h+12|0;f[o>>2]=0;k=h+8|0;f[b>>2]=k;l=f[g>>2]|0;m=g+4|0;if((l|0)!=(m|0)){n=k;r=l;while(1){l=r+16|0;f[e>>2]=n;f[d>>2]=f[e>>2];fe(b,d,l,l)|0;l=f[r+4>>2]|0;if(!l){s=r+8|0;t=f[s>>2]|0;if((f[t>>2]|0)==(r|0))v=t;else{t=s;do{s=f[t>>2]|0;t=s+8|0;w=f[t>>2]|0}while((f[w>>2]|0)!=(s|0));v=w}}else{t=l;while(1){j=f[t>>2]|0;if(!j)break;else t=j}v=t}if((v|0)==(m|0))break;else r=v}}v=a+12|0;r=f[i>>2]|0;do if(r){d=f[h>>2]|0;e=a+16|0;n=r;while(1){l=f[n+16>>2]|0;if((d|0)<(l|0)){j=f[n>>2]|0;if(!j){x=23;break}else{y=n;z=j}}else{if((l|0)>=(d|0)){x=27;break}A=n+4|0;l=f[A>>2]|0;if(!l){x=26;break}else{y=A;z=l}}e=y;n=z}if((x|0)==23){B=n;C=n;break}else if((x|0)==26){B=n;C=A;break}else if((x|0)==27){B=n;C=e;break}}else{B=i;C=i}while(0);i=f[C>>2]|0;if(!i){x=dj(32)|0;f[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|0);break}case 2:{if((m|0)<3)break b;n=m+-3|0;f[i+44>>2]=n;k=p+m+-3|0;s=n;t=(h[k+1>>0]|0)<<8|(h[k>>0]|0)|(h[k+2>>0]|0)<<16&4128768;break}case 3:{k=m+-4|0;f[i+44>>2]=k;n=p+m+-4|0;s=k;t=(h[n+2>>0]|0)<<16|(h[n+3>>0]|0)<<24&1056964608|(h[n+1>>0]|0)<<8|(h[n>>0]|0);break}default:{}}n=i+48|0;k=t+4194304|0;f[n>>2]=k;o=k>>>0>1073741823;if(o|j){l=o^1;break a}o=i+44|0;r=i+16|0;q=i+28|0;v=0;w=s;x=k;while(1){c:do if(x>>>0<4194304){k=w;y=x;while(1){if((k|0)<=0){z=k;A=y;break c}B=k+-1|0;f[o>>2]=B;C=y<<8|(h[p+B>>0]|0);f[n>>2]=C;if(C>>>0<4194304){k=B;y=C}else{z=B;A=C;break}}}else{z=w;A=x}while(0);y=A&1048575;k=f[(f[r>>2]|0)+(y<<2)>>2]|0;C=f[q>>2]|0;x=(X(f[C+(k<<3)>>2]|0,A>>>20)|0)+y-(f[C+(k<<3)+4>>2]|0)|0;f[n>>2]=x;f[d+(v<<2)>>2]=k;v=v+1|0;if((v|0)==(a|0)){l=1;break a}else w=z}}while(0);l=0;break}l=0}else l=0;while(0);z=f[i+28>>2]|0;if(z|0){a=i+32|0;d=f[a>>2]|0;if((d|0)!=(z|0))f[a>>2]=d+(~((d+-8-z|0)>>>3)<<3);gn(z)}z=f[i+16>>2]|0;if(z|0){d=i+20|0;a=f[d>>2]|0;if((a|0)!=(z|0))f[d>>2]=a+(~((a+-4-z|0)>>>2)<<2);gn(z)}z=f[i>>2]|0;if(!z){u=e;return l|0}a=i+4|0;i=f[a>>2]|0;if((i|0)!=(z|0))f[a>>2]=i+(~((i+-4-z|0)>>>2)<<2);gn(z);u=e;return l|0}function Wb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;e=u;u=u+64|0;g=e;i=e+8|0;j=i;k=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));a:do if(Pc(i,c)|0){j=(a|0)==0;if(!j?(f[i+12>>2]|0)==0:0){l=0;break}if(Ef(g,c)|0?(k=g,m=f[k>>2]|0,n=f[k+4>>2]|0,k=c+8|0,o=c+16|0,p=o,q=f[p>>2]|0,r=f[p+4>>2]|0,p=Wj(f[k>>2]|0,f[k+4>>2]|0,q|0,r|0)|0,k=I,!(n>>>0>k>>>0|(n|0)==(k|0)&m>>>0>p>>>0)):0){p=(f[c>>2]|0)+q|0;k=Uj(q|0,r|0,m|0,n|0)|0;n=o;f[n>>2]=k;f[n+4>>2]=I;b:do if((m|0)>=1){f[i+40>>2]=p;n=m+-1|0;k=p+n|0;switch((h[k>>0]|0)>>>6&3){case 0:{f[i+44>>2]=n;s=n;t=b[k>>0]&63;break}case 1:{if((m|0)<2)break b;k=m+-2|0;f[i+44>>2]=k;n=p+m+-2|0;s=k;t=(h[n+1>>0]|0)<<8&16128|(h[n>>0]|0);break}case 2:{if((m|0)<3)break b;n=m+-3|0;f[i+44>>2]=n;k=p+m+-3|0;s=n;t=(h[k+1>>0]|0)<<8|(h[k>>0]|0)|(h[k+2>>0]|0)<<16&4128768;break}case 3:{k=m+-4|0;f[i+44>>2]=k;n=p+m+-4|0;s=k;t=(h[n+2>>0]|0)<<16|(h[n+3>>0]|0)<<24&1056964608|(h[n+1>>0]|0)<<8|(h[n>>0]|0);break}default:{}}n=i+48|0;k=t+2097152|0;f[n>>2]=k;o=k>>>0>536870911;if(o|j){l=o^1;break a}o=i+44|0;r=i+16|0;q=i+28|0;v=0;w=s;x=k;while(1){c:do if(x>>>0<2097152){k=w;y=x;while(1){if((k|0)<=0){z=k;A=y;break c}B=k+-1|0;f[o>>2]=B;C=y<<8|(h[p+B>>0]|0);f[n>>2]=C;if(C>>>0<2097152){k=B;y=C}else{z=B;A=C;break}}}else{z=w;A=x}while(0);y=A&524287;k=f[(f[r>>2]|0)+(y<<2)>>2]|0;C=f[q>>2]|0;x=(X(f[C+(k<<3)>>2]|0,A>>>19)|0)+y-(f[C+(k<<3)+4>>2]|0)|0;f[n>>2]=x;f[d+(v<<2)>>2]=k;v=v+1|0;if((v|0)==(a|0)){l=1;break a}else w=z}}while(0);l=0;break}l=0}else l=0;while(0);z=f[i+28>>2]|0;if(z|0){a=i+32|0;d=f[a>>2]|0;if((d|0)!=(z|0))f[a>>2]=d+(~((d+-8-z|0)>>>3)<<3);gn(z)}z=f[i+16>>2]|0;if(z|0){d=i+20|0;a=f[d>>2]|0;if((a|0)!=(z|0))f[d>>2]=a+(~((a+-4-z|0)>>>2)<<2);gn(z)}z=f[i>>2]|0;if(!z){u=e;return l|0}a=i+4|0;i=f[a>>2]|0;if((i|0)!=(z|0))f[a>>2]=i+(~((i+-4-z|0)>>>2)<<2);gn(z);u=e;return l|0}function Xb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;e=u;u=u+64|0;g=e;i=e+8|0;j=i;k=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));a:do if(Qc(i,c)|0){j=(a|0)==0;if(!j?(f[i+12>>2]|0)==0:0){l=0;break}if(Ef(g,c)|0?(k=g,m=f[k>>2]|0,n=f[k+4>>2]|0,k=c+8|0,o=c+16|0,p=o,q=f[p>>2]|0,r=f[p+4>>2]|0,p=Wj(f[k>>2]|0,f[k+4>>2]|0,q|0,r|0)|0,k=I,!(n>>>0>k>>>0|(n|0)==(k|0)&m>>>0>p>>>0)):0){p=(f[c>>2]|0)+q|0;k=Uj(q|0,r|0,m|0,n|0)|0;n=o;f[n>>2]=k;f[n+4>>2]=I;b:do if((m|0)>=1){f[i+40>>2]=p;n=m+-1|0;k=p+n|0;switch((h[k>>0]|0)>>>6&3){case 0:{f[i+44>>2]=n;s=n;t=b[k>>0]&63;break}case 1:{if((m|0)<2)break b;k=m+-2|0;f[i+44>>2]=k;n=p+m+-2|0;s=k;t=(h[n+1>>0]|0)<<8&16128|(h[n>>0]|0);break}case 2:{if((m|0)<3)break b;n=m+-3|0;f[i+44>>2]=n;k=p+m+-3|0;s=n;t=(h[k+1>>0]|0)<<8|(h[k>>0]|0)|(h[k+2>>0]|0)<<16&4128768;break}case 3:{k=m+-4|0;f[i+44>>2]=k;n=p+m+-4|0;s=k;t=(h[n+2>>0]|0)<<16|(h[n+3>>0]|0)<<24&1056964608|(h[n+1>>0]|0)<<8|(h[n>>0]|0);break}default:{}}n=i+48|0;k=t+1048576|0;f[n>>2]=k;o=k>>>0>268435455;if(o|j){l=o^1;break a}o=i+44|0;r=i+16|0;q=i+28|0;v=0;w=s;x=k;while(1){c:do if(x>>>0<1048576){k=w;y=x;while(1){if((k|0)<=0){z=k;A=y;break c}B=k+-1|0;f[o>>2]=B;C=y<<8|(h[p+B>>0]|0);f[n>>2]=C;if(C>>>0<1048576){k=B;y=C}else{z=B;A=C;break}}}else{z=w;A=x}while(0);y=A&262143;k=f[(f[r>>2]|0)+(y<<2)>>2]|0;C=f[q>>2]|0;x=(X(f[C+(k<<3)>>2]|0,A>>>18)|0)+y-(f[C+(k<<3)+4>>2]|0)|0;f[n>>2]=x;f[d+(v<<2)>>2]=k;v=v+1|0;if((v|0)==(a|0)){l=1;break a}else w=z}}while(0);l=0;break}l=0}else l=0;while(0);z=f[i+28>>2]|0;if(z|0){a=i+32|0;d=f[a>>2]|0;if((d|0)!=(z|0))f[a>>2]=d+(~((d+-8-z|0)>>>3)<<3);gn(z)}z=f[i+16>>2]|0;if(z|0){d=i+20|0;a=f[d>>2]|0;if((a|0)!=(z|0))f[d>>2]=a+(~((a+-4-z|0)>>>2)<<2);gn(z)}z=f[i>>2]|0;if(!z){u=e;return l|0}a=i+4|0;i=f[a>>2]|0;if((i|0)!=(z|0))f[a>>2]=i+(~((i+-4-z|0)>>>2)<<2);gn(z);u=e;return l|0}function Yb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;e=u;u=u+64|0;g=e;i=e+8|0;j=i;k=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));a:do if(Rc(i,c)|0){j=(a|0)==0;if(!j?(f[i+12>>2]|0)==0:0){l=0;break}if(Ef(g,c)|0?(k=g,m=f[k>>2]|0,n=f[k+4>>2]|0,k=c+8|0,o=c+16|0,p=o,q=f[p>>2]|0,r=f[p+4>>2]|0,p=Wj(f[k>>2]|0,f[k+4>>2]|0,q|0,r|0)|0,k=I,!(n>>>0>k>>>0|(n|0)==(k|0)&m>>>0>p>>>0)):0){p=(f[c>>2]|0)+q|0;k=Uj(q|0,r|0,m|0,n|0)|0;n=o;f[n>>2]=k;f[n+4>>2]=I;b:do if((m|0)>=1){f[i+40>>2]=p;n=m+-1|0;k=p+n|0;switch((h[k>>0]|0)>>>6&3){case 0:{f[i+44>>2]=n;s=n;t=b[k>>0]&63;break}case 1:{if((m|0)<2)break b;k=m+-2|0;f[i+44>>2]=k;n=p+m+-2|0;s=k;t=(h[n+1>>0]|0)<<8&16128|(h[n>>0]|0);break}case 2:{if((m|0)<3)break b;n=m+-3|0;f[i+44>>2]=n;k=p+m+-3|0;s=n;t=(h[k+1>>0]|0)<<8|(h[k>>0]|0)|(h[k+2>>0]|0)<<16&4128768;break}case 3:{k=m+-4|0;f[i+44>>2]=k;n=p+m+-4|0;s=k;t=(h[n+2>>0]|0)<<16|(h[n+3>>0]|0)<<24&1056964608|(h[n+1>>0]|0)<<8|(h[n>>0]|0);break}default:{}}n=i+48|0;k=t+262144|0;f[n>>2]=k;o=k>>>0>67108863;if(o|j){l=o^1;break a}o=i+44|0;r=i+16|0;q=i+28|0;v=0;w=s;x=k;while(1){c:do if(x>>>0<262144){k=w;y=x;while(1){if((k|0)<=0){z=k;A=y;break c}B=k+-1|0;f[o>>2]=B;C=y<<8|(h[p+B>>0]|0);f[n>>2]=C;if(C>>>0<262144){k=B;y=C}else{z=B;A=C;break}}}else{z=w;A=x}while(0);y=A&65535;k=f[(f[r>>2]|0)+(y<<2)>>2]|0;C=f[q>>2]|0;x=(X(f[C+(k<<3)>>2]|0,A>>>16)|0)+y-(f[C+(k<<3)+4>>2]|0)|0;f[n>>2]=x;f[d+(v<<2)>>2]=k;v=v+1|0;if((v|0)==(a|0)){l=1;break a}else w=z}}while(0);l=0;break}l=0}else l=0;while(0);z=f[i+28>>2]|0;if(z|0){a=i+32|0;d=f[a>>2]|0;if((d|0)!=(z|0))f[a>>2]=d+(~((d+-8-z|0)>>>3)<<3);gn(z)}z=f[i+16>>2]|0;if(z|0){d=i+20|0;a=f[d>>2]|0;if((a|0)!=(z|0))f[d>>2]=a+(~((a+-4-z|0)>>>2)<<2);gn(z)}z=f[i>>2]|0;if(!z){u=e;return l|0}a=i+4|0;i=f[a>>2]|0;if((i|0)!=(z|0))f[a>>2]=i+(~((i+-4-z|0)>>>2)<<2);gn(z);u=e;return l|0}function Zb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;e=u;u=u+64|0;g=e;i=e+8|0;j=i;k=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));a:do if(Sc(i,c)|0){j=(a|0)==0;if(!j?(f[i+12>>2]|0)==0:0){l=0;break}if(Ef(g,c)|0?(k=g,m=f[k>>2]|0,n=f[k+4>>2]|0,k=c+8|0,o=c+16|0,p=o,q=f[p>>2]|0,r=f[p+4>>2]|0,p=Wj(f[k>>2]|0,f[k+4>>2]|0,q|0,r|0)|0,k=I,!(n>>>0>k>>>0|(n|0)==(k|0)&m>>>0>p>>>0)):0){p=(f[c>>2]|0)+q|0;k=Uj(q|0,r|0,m|0,n|0)|0;n=o;f[n>>2]=k;f[n+4>>2]=I;b:do if((m|0)>=1){f[i+40>>2]=p;n=m+-1|0;k=p+n|0;switch((h[k>>0]|0)>>>6&3){case 0:{f[i+44>>2]=n;s=n;t=b[k>>0]&63;break}case 1:{if((m|0)<2)break b;k=m+-2|0;f[i+44>>2]=k;n=p+m+-2|0;s=k;t=(h[n+1>>0]|0)<<8&16128|(h[n>>0]|0);break}case 2:{if((m|0)<3)break b;n=m+-3|0;f[i+44>>2]=n;k=p+m+-3|0;s=n;t=(h[k+1>>0]|0)<<8|(h[k>>0]|0)|(h[k+2>>0]|0)<<16&4128768;break}case 3:{k=m+-4|0;f[i+44>>2]=k;n=p+m+-4|0;s=k;t=(h[n+2>>0]|0)<<16|(h[n+3>>0]|0)<<24&1056964608|(h[n+1>>0]|0)<<8|(h[n>>0]|0);break}default:{}}n=i+48|0;k=t+131072|0;f[n>>2]=k;o=k>>>0>33554431;if(o|j){l=o^1;break a}o=i+44|0;r=i+16|0;q=i+28|0;v=0;w=s;x=k;while(1){c:do if(x>>>0<131072){k=w;y=x;while(1){if((k|0)<=0){z=k;A=y;break c}B=k+-1|0;f[o>>2]=B;C=y<<8|(h[p+B>>0]|0);f[n>>2]=C;if(C>>>0<131072){k=B;y=C}else{z=B;A=C;break}}}else{z=w;A=x}while(0);y=A&32767;k=f[(f[r>>2]|0)+(y<<2)>>2]|0;C=f[q>>2]|0;x=(X(f[C+(k<<3)>>2]|0,A>>>15)|0)+y-(f[C+(k<<3)+4>>2]|0)|0;f[n>>2]=x;f[d+(v<<2)>>2]=k;v=v+1|0;if((v|0)==(a|0)){l=1;break a}else w=z}}while(0);l=0;break}l=0}else l=0;while(0);z=f[i+28>>2]|0;if(z|0){a=i+32|0;d=f[a>>2]|0;if((d|0)!=(z|0))f[a>>2]=d+(~((d+-8-z|0)>>>3)<<3);gn(z)}z=f[i+16>>2]|0;if(z|0){d=i+20|0;a=f[d>>2]|0;if((a|0)!=(z|0))f[d>>2]=a+(~((a+-4-z|0)>>>2)<<2);gn(z)}z=f[i>>2]|0;if(!z){u=e;return l|0}a=i+4|0;i=f[a>>2]|0;if((i|0)!=(z|0))f[a>>2]=i+(~((i+-4-z|0)>>>2)<<2);gn(z);u=e;return l|0}function _b(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;c=i;e=i;while(1){j=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;c=(X(j>>>24^j,1540483477)|0)^(X(c,1540483477)|0);e=e+-4|0;if(e>>>0<=3)break;else d=d+4|0}d=i+-4|0;e=d&-4;k=d-e|0;l=g+(e+4)|0;m=c}else{k=i;l=g;m=i}switch(k|0){case 3:{n=h[l+2>>0]<<16^m;o=6;break}case 2:{n=m;o=6;break}case 1:{p=m;o=7;break}default:q=m}if((o|0)==6){p=h[l+1>>0]<<8^n;o=7}if((o|0)==7)q=X(p^h[l>>0],1540483477)|0;l=X(q>>>13^q,1540483477)|0;q=l>>>15^l;l=f[a+4>>2]|0;if(!l){r=0;return r|0}p=l+-1|0;n=(p&l|0)==0;if(!n)if(q>>>0<l>>>0)s=q;else s=(q>>>0)%(l>>>0)|0;else s=q&p;m=f[(f[a>>2]|0)+(s<<2)>>2]|0;if(!m){r=0;return r|0}a=f[m>>2]|0;if(!a){r=0;return r|0}m=(i|0)==0;if(n){n=a;a:while(1){k=f[n+4>>2]|0;c=(q|0)==(k|0);if(!(c|(k&p|0)==(s|0))){r=0;o=40;break}do if(c?(k=n+8|0,e=b[k+11>>0]|0,d=e<<24>>24<0,j=e&255,((d?f[n+12>>2]|0:j)|0)==(i|0)):0){e=f[k>>2]|0;t=d?e:k;if(d){if(m){r=n;o=40;break a}if(!(oh(t,g,i)|0)){r=n;o=40;break a}else break}if(m){r=n;o=40;break a}if((b[g>>0]|0)==(e&255)<<24>>24){e=k;k=j;j=g;do{k=k+-1|0;e=e+1|0;if(!k){r=n;o=40;break a}j=j+1|0}while((b[e>>0]|0)==(b[j>>0]|0))}}while(0);n=f[n>>2]|0;if(!n){r=0;o=40;break}}if((o|0)==40)return r|0}else u=a;b:while(1){a=f[u+4>>2]|0;do if((q|0)==(a|0)){n=u+8|0;p=b[n+11>>0]|0;c=p<<24>>24<0;j=p&255;if(((c?f[u+12>>2]|0:j)|0)==(i|0)){p=f[n>>2]|0;e=c?p:n;if(c){if(m){r=u;o=40;break b}if(!(oh(e,g,i)|0)){r=u;o=40;break b}else break}if(m){r=u;o=40;break b}if((b[g>>0]|0)==(p&255)<<24>>24){p=n;n=j;j=g;do{n=n+-1|0;p=p+1|0;if(!n){r=u;o=40;break b}j=j+1|0}while((b[p>>0]|0)==(b[j>>0]|0))}}}else{if(a>>>0<l>>>0)v=a;else v=(a>>>0)%(l>>>0)|0;if((v|0)!=(s|0)){r=0;o=40;break b}}while(0);u=f[u>>2]|0;if(!u){r=0;o=40;break}}if((o|0)==40)return r|0;return 0}function $b(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;e=u;u=u+64|0;g=e;i=e+8|0;j=i;k=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));a:do if(Tc(i,c)|0){j=(a|0)==0;if(!j?(f[i+12>>2]|0)==0:0){l=0;break}if(Ef(g,c)|0?(k=g,m=f[k>>2]|0,n=f[k+4>>2]|0,k=c+8|0,o=c+16|0,p=o,q=f[p>>2]|0,r=f[p+4>>2]|0,p=Wj(f[k>>2]|0,f[k+4>>2]|0,q|0,r|0)|0,k=I,!(n>>>0>k>>>0|(n|0)==(k|0)&m>>>0>p>>>0)):0){p=(f[c>>2]|0)+q|0;k=Uj(q|0,r|0,m|0,n|0)|0;n=o;f[n>>2]=k;f[n+4>>2]=I;b:do if((m|0)>=1){f[i+40>>2]=p;n=m+-1|0;k=p+n|0;switch((h[k>>0]|0)>>>6&3){case 0:{f[i+44>>2]=n;s=n;t=b[k>>0]&63;break}case 1:{if((m|0)<2)break b;k=m+-2|0;f[i+44>>2]=k;n=p+m+-2|0;s=k;t=(h[n+1>>0]|0)<<8&16128|(h[n>>0]|0);break}case 2:{if((m|0)<3)break b;n=m+-3|0;f[i+44>>2]=n;k=p+m+-3|0;s=n;t=(h[k+1>>0]|0)<<8|(h[k>>0]|0)|(h[k+2>>0]|0)<<16&4128768;break}case 3:{k=m+-4|0;f[i+44>>2]=k;n=p+m+-4|0;s=k;t=(h[n+2>>0]|0)<<16|(h[n+3>>0]|0)<<24&1056964608|(h[n+1>>0]|0)<<8|(h[n>>0]|0);break}default:{}}n=i+48|0;k=t+32768|0;f[n>>2]=k;o=k>>>0>8388607;if(o|j){l=o^1;break a}o=i+44|0;r=i+16|0;q=i+28|0;v=0;w=s;x=k;while(1){c:do if(x>>>0<32768){k=w;y=x;while(1){if((k|0)<=0){z=k;A=y;break c}B=k+-1|0;f[o>>2]=B;C=y<<8|(h[p+B>>0]|0);f[n>>2]=C;if(C>>>0<32768){k=B;y=C}else{z=B;A=C;break}}}else{z=w;A=x}while(0);y=A&8191;k=f[(f[r>>2]|0)+(y<<2)>>2]|0;C=f[q>>2]|0;x=(X(f[C+(k<<3)>>2]|0,A>>>13)|0)+y-(f[C+(k<<3)+4>>2]|0)|0;f[n>>2]=x;f[d+(v<<2)>>2]=k;v=v+1|0;if((v|0)==(a|0)){l=1;break a}else w=z}}while(0);l=0;break}l=0}else l=0;while(0);z=f[i+28>>2]|0;if(z|0){a=i+32|0;d=f[a>>2]|0;if((d|0)!=(z|0))f[a>>2]=d+(~((d+-8-z|0)>>>3)<<3);gn(z)}z=f[i+16>>2]|0;if(z|0){d=i+20|0;a=f[d>>2]|0;if((a|0)!=(z|0))f[d>>2]=a+(~((a+-4-z|0)>>>2)<<2);gn(z)}z=f[i>>2]|0;if(!z){u=e;return l|0}a=i+4|0;i=f[a>>2]|0;if((i|0)!=(z|0))f[a>>2]=i+(~((i+-4-z|0)>>>2)<<2);gn(z);u=e;return l|0}function ac(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;e=u;u=u+64|0;g=e;i=e+8|0;j=i;k=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));a:do if(Uc(i,c)|0){j=(a|0)==0;if(!j?(f[i+12>>2]|0)==0:0){l=0;break}if(Ef(g,c)|0?(k=g,m=f[k>>2]|0,n=f[k+4>>2]|0,k=c+8|0,o=c+16|0,p=o,q=f[p>>2]|0,r=f[p+4>>2]|0,p=Wj(f[k>>2]|0,f[k+4>>2]|0,q|0,r|0)|0,k=I,!(n>>>0>k>>>0|(n|0)==(k|0)&m>>>0>p>>>0)):0){p=(f[c>>2]|0)+q|0;k=Uj(q|0,r|0,m|0,n|0)|0;n=o;f[n>>2]=k;f[n+4>>2]=I;b:do if((m|0)>=1){f[i+40>>2]=p;n=m+-1|0;k=p+n|0;switch((h[k>>0]|0)>>>6&3){case 0:{f[i+44>>2]=n;s=n;t=b[k>>0]&63;break}case 1:{if((m|0)<2)break b;k=m+-2|0;f[i+44>>2]=k;n=p+m+-2|0;s=k;t=(h[n+1>>0]|0)<<8&16128|(h[n>>0]|0);break}case 2:{if((m|0)<3)break b;n=m+-3|0;f[i+44>>2]=n;k=p+m+-3|0;s=n;t=(h[k+1>>0]|0)<<8|(h[k>>0]|0)|(h[k+2>>0]|0)<<16&4128768;break}case 3:{k=m+-4|0;f[i+44>>2]=k;n=p+m+-4|0;s=k;t=(h[n+2>>0]|0)<<16|(h[n+3>>0]|0)<<24&1056964608|(h[n+1>>0]|0)<<8|(h[n>>0]|0);break}default:{}}n=i+48|0;k=t+16384|0;f[n>>2]=k;o=k>>>0>4194303;if(o|j){l=o^1;break a}o=i+44|0;r=i+16|0;q=i+28|0;v=0;w=s;x=k;while(1){c:do if(x>>>0<16384){k=w;y=x;while(1){if((k|0)<=0){z=k;A=y;break c}B=k+-1|0;f[o>>2]=B;C=y<<8|(h[p+B>>0]|0);f[n>>2]=C;if(C>>>0<16384){k=B;y=C}else{z=B;A=C;break}}}else{z=w;A=x}while(0);y=A&4095;k=f[(f[r>>2]|0)+(y<<2)>>2]|0;C=f[q>>2]|0;x=(X(f[C+(k<<3)>>2]|0,A>>>12)|0)+y-(f[C+(k<<3)+4>>2]|0)|0;f[n>>2]=x;f[d+(v<<2)>>2]=k;v=v+1|0;if((v|0)==(a|0)){l=1;break a}else w=z}}while(0);l=0;break}l=0}else l=0;while(0);z=f[i+28>>2]|0;if(z|0){a=i+32|0;d=f[a>>2]|0;if((d|0)!=(z|0))f[a>>2]=d+(~((d+-8-z|0)>>>3)<<3);gn(z)}z=f[i+16>>2]|0;if(z|0){d=i+20|0;a=f[d>>2]|0;if((a|0)!=(z|0))f[d>>2]=a+(~((a+-4-z|0)>>>2)<<2);gn(z)}z=f[i>>2]|0;if(!z){u=e;return l|0}a=i+4|0;i=f[a>>2]|0;if((i|0)!=(z|0))f[a>>2]=i+(~((i+-4-z|0)>>>2)<<2);gn(z);u=e;return l|0}function bc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;c=i;e=i;while(1){j=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;c=(X(j>>>24^j,1540483477)|0)^(X(c,1540483477)|0);e=e+-4|0;if(e>>>0<=3)break;else d=d+4|0}d=i+-4|0;e=d&-4;k=d-e|0;l=g+(e+4)|0;m=c}else{k=i;l=g;m=i}switch(k|0){case 3:{n=h[l+2>>0]<<16^m;o=6;break}case 2:{n=m;o=6;break}case 1:{p=m;o=7;break}default:q=m}if((o|0)==6){p=h[l+1>>0]<<8^n;o=7}if((o|0)==7)q=X(p^h[l>>0],1540483477)|0;l=X(q>>>13^q,1540483477)|0;q=l>>>15^l;l=f[a+4>>2]|0;if(!l){r=0;return r|0}p=l+-1|0;n=(p&l|0)==0;if(!n)if(q>>>0<l>>>0)s=q;else s=(q>>>0)%(l>>>0)|0;else s=q&p;m=f[(f[a>>2]|0)+(s<<2)>>2]|0;if(!m){r=0;return r|0}a=f[m>>2]|0;if(!a){r=0;return r|0}m=(i|0)==0;if(n){n=a;a:while(1){k=f[n+4>>2]|0;c=(k|0)==(q|0);if(!(c|(k&p|0)==(s|0))){r=0;o=40;break}do if(c?(k=n+8|0,e=b[k+11>>0]|0,d=e<<24>>24<0,j=e&255,((d?f[n+12>>2]|0:j)|0)==(i|0)):0){e=f[k>>2]|0;t=d?e:k;if(d){if(m){r=n;o=40;break a}if(!(oh(t,g,i)|0)){r=n;o=40;break a}else break}if(m){r=n;o=40;break a}if((b[g>>0]|0)==(e&255)<<24>>24){e=k;k=j;j=g;do{k=k+-1|0;e=e+1|0;if(!k){r=n;o=40;break a}j=j+1|0}while((b[e>>0]|0)==(b[j>>0]|0))}}while(0);n=f[n>>2]|0;if(!n){r=0;o=40;break}}if((o|0)==40)return r|0}else u=a;b:while(1){a=f[u+4>>2]|0;do if((a|0)==(q|0)){n=u+8|0;p=b[n+11>>0]|0;c=p<<24>>24<0;j=p&255;if(((c?f[u+12>>2]|0:j)|0)==(i|0)){p=f[n>>2]|0;e=c?p:n;if(c){if(m){r=u;o=40;break b}if(!(oh(e,g,i)|0)){r=u;o=40;break b}else break}if(m){r=u;o=40;break b}if((b[g>>0]|0)==(p&255)<<24>>24){p=n;n=j;j=g;do{n=n+-1|0;p=p+1|0;if(!n){r=u;o=40;break b}j=j+1|0}while((b[p>>0]|0)==(b[j>>0]|0))}}}else{if(a>>>0<l>>>0)v=a;else v=(a>>>0)%(l>>>0)|0;if((v|0)!=(s|0)){r=0;o=40;break b}}while(0);u=f[u>>2]|0;if(!u){r=0;o=40;break}}if((o|0)==40)return r|0;return 0}function cc(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;h=a+4|0;i=f[c>>2]|0;c=i;do if((i|0)!=(h|0)){j=i+16|0;k=b[j+11>>0]|0;l=k<<24>>24<0;m=l?f[i+20>>2]|0:k&255;k=b[g+11>>0]|0;n=k<<24>>24<0;o=n?f[g+4>>2]|0:k&255;k=m>>>0<o>>>0;p=k?m:o;if((p|0)!=0?(q=oh(n?f[g>>2]|0:g,l?f[j>>2]|0:j,p)|0,(q|0)!=0):0){if((q|0)<0)break}else r=4;if((r|0)==4?o>>>0<m>>>0:0)break;q=o>>>0<m>>>0?o:m;if((q|0)!=0?(m=oh(l?f[j>>2]|0:j,n?f[g>>2]|0:g,q)|0,(m|0)!=0):0){if((m|0)>=0)r=37}else r=21;if((r|0)==21?!k:0)r=37;if((r|0)==37){f[d>>2]=c;f[e>>2]=c;s=e;return s|0}k=f[i+4>>2]|0;m=(k|0)==0;if(m){q=i+8|0;j=f[q>>2]|0;if((f[j>>2]|0)==(i|0))t=j;else{j=q;do{q=f[j>>2]|0;j=q+8|0;l=f[j>>2]|0}while((f[l>>2]|0)!=(q|0));t=l}}else{j=k;while(1){l=f[j>>2]|0;if(!l)break;else j=l}t=j}do if((t|0)!=(h|0)){k=t+16|0;l=b[k+11>>0]|0;q=l<<24>>24<0;p=q?f[t+20>>2]|0:l&255;l=p>>>0<o>>>0?p:o;if((l|0)!=0?(u=oh(n?f[g>>2]|0:g,q?f[k>>2]|0:k,l)|0,(u|0)!=0):0){if((u|0)<0)break}else r=31;if((r|0)==31?o>>>0<p>>>0:0)break;s=Bd(a,d,g)|0;return s|0}while(0);if(m){f[d>>2]=c;s=i+4|0;return s|0}else{f[d>>2]=t;s=t;return s|0}}while(0);t=f[i>>2]|0;do if((f[a>>2]|0)==(i|0))v=c;else{if(!t){h=i;while(1){e=f[h+8>>2]|0;if((f[e>>2]|0)==(h|0))h=e;else{w=e;break}}}else{h=t;while(1){m=f[h+4>>2]|0;if(!m){w=h;break}else h=m}}h=w;m=w+16|0;e=b[g+11>>0]|0;o=e<<24>>24<0;n=o?f[g+4>>2]|0:e&255;e=b[m+11>>0]|0;j=e<<24>>24<0;p=j?f[w+20>>2]|0:e&255;e=n>>>0<p>>>0?n:p;if((e|0)!=0?(u=oh(j?f[m>>2]|0:m,o?f[g>>2]|0:g,e)|0,(u|0)!=0):0){if((u|0)<0){v=h;break}}else r=13;if((r|0)==13?p>>>0<n>>>0:0){v=h;break}s=Bd(a,d,g)|0;return s|0}while(0);if(!t){f[d>>2]=i;s=i;return s|0}else{f[d>>2]=v;s=v+4|0;return s|0}return 0}function dc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;e=b+12|0;g=f[e>>2]|0;h=(f[c>>2]|0)-g|0;i=c+4|0;j=(f[i>>2]|0)-g|0;k=c;f[k>>2]=h;f[k+4>>2]=j;k=(h|0)>-1;l=(j|0)>-1;m=f[e>>2]|0;n=((l?j:0-j|0)+(k?h:0-h|0)|0)<=(m|0);if(n){o=h;p=j}else{if(k)if(!l)if((h|0)<1){q=-1;r=-1}else s=6;else{q=1;r=1}else if((j|0)<1){q=-1;r=-1}else s=6;if((s|0)==6){q=(h|0)>0?1:-1;r=(j|0)>0?1:-1}l=X(m,q)|0;k=X(m,r)|0;m=(h<<1)-l|0;f[c>>2]=m;h=(j<<1)-k|0;f[i>>2]=h;if((X(q,r)|0)>-1){r=0-h|0;f[c>>2]=r;t=0-m|0;u=r}else{f[c>>2]=h;t=m;u=h}h=(u+l|0)/2|0;f[c>>2]=h;l=(t+k|0)/2|0;f[i>>2]=l;o=h;p=l}if(!o)v=(p|0)==0;else v=(o|0)<0&(p|0)<1;if(!o)w=(p|0)==0?0:(p|0)>0?3:1;else w=(o|0)>0?(p>>31)+2|0:(p|0)<1?0:3;if(v){x=1;y=o;z=p}else{switch(w|0){case 1:{A=p;B=0-o|0;break}case 2:{A=0-o|0;B=0-p|0;break}case 3:{A=0-p|0;B=o;break}default:{A=o;B=p}}p=c;f[p>>2]=A;f[p+4>>2]=B;x=0;y=A;z=B}B=(f[d>>2]|0)+y|0;f[a>>2]=B;y=(f[d+4>>2]|0)+z|0;z=a+4|0;f[z>>2]=y;d=f[e>>2]|0;if((d|0)>=(B|0))if((B|0)<(0-d|0))C=(f[b+4>>2]|0)+B|0;else C=B;else C=B-(f[b+4>>2]|0)|0;f[a>>2]=C;if((d|0)>=(y|0))if((y|0)<(0-d|0))D=(f[b+4>>2]|0)+y|0;else D=y;else D=y-(f[b+4>>2]|0)|0;f[z>>2]=D;if(x){E=C;F=D}else{switch((4-w|0)%4|0|0){case 1:{G=D;H=0-C|0;break}case 2:{G=0-C|0;H=0-D|0;break}case 3:{G=0-D|0;H=C;break}default:{G=C;H=D}}D=a;f[D>>2]=G;f[D+4>>2]=H;E=G;F=H}if(n){I=E;J=F;K=I+g|0;L=J+g|0;M=a;N=M;f[N>>2]=K;O=M+4|0;P=O;f[P>>2]=L;return}if((E|0)>-1)if((F|0)<=-1)if((E|0)<1){Q=-1;R=-1}else s=42;else{Q=1;R=1}else if((F|0)<1){Q=-1;R=-1}else s=42;if((s|0)==42){Q=(E|0)>0?1:-1;R=(F|0)>0?1:-1}s=X(d,Q)|0;n=X(d,R)|0;d=(E<<1)-s|0;f[a>>2]=d;E=(F<<1)-n|0;f[z>>2]=E;if((X(Q,R)|0)>-1){R=0-E|0;f[a>>2]=R;S=0-d|0;T=R}else{f[a>>2]=E;S=d;T=E}E=(T+s|0)/2|0;f[a>>2]=E;s=(S+n|0)/2|0;f[z>>2]=s;I=E;J=s;K=I+g|0;L=J+g|0;M=a;N=M;f[N>>2]=K;O=M+4|0;P=O;f[P>>2]=L;return}function ec(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;g=u;u=u+64|0;i=g;j=i;k=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));a:do if(Uc(i,d)|0?wd(i,d)|0:0){j=(a|0)==0;if(!j){if(!(f[i+12>>2]|0)){l=0;break}bh(d,0,0)|0;if(!j){j=i+48|0;k=i+44|0;m=i+40|0;n=i+16|0;o=i+28|0;p=(c|0)>0;q=d+36|0;r=d+32|0;s=d+24|0;t=d+28|0;v=0;w=0;x=f[j>>2]|0;while(1){b:do if(x>>>0<16384){y=f[k>>2]|0;z=x;while(1){if((y|0)<=0){A=z;break b}B=f[m>>2]|0;y=y+-1|0;f[k>>2]=y;C=z<<8|h[B+y>>0];f[j>>2]=C;if(C>>>0>=16384){A=C;break}else z=C}}else A=x;while(0);z=A&4095;y=f[(f[n>>2]|0)+(z<<2)>>2]|0;C=f[o>>2]|0;x=(X(f[C+(y<<3)>>2]|0,A>>>12)|0)+z-(f[C+(y<<3)+4>>2]|0)|0;f[j>>2]=x;c:do if(p){if((y|0)>0){D=0;E=w}else{C=(b[q>>0]|0)==0;z=0;B=w;while(1){if(C){l=0;break a}F=B+1|0;f[e+(B<<2)>>2]=0;z=z+1|0;if((z|0)>=(c|0)){G=F;break c}else B=F}}while(1){if(!(b[q>>0]|0)){l=0;break a}B=f[s>>2]|0;z=f[t>>2]|0;C=0;F=0;H=f[r>>2]|0;while(1){I=B+(H>>>3)|0;if(I>>>0<z>>>0){J=(h[I>>0]|0)>>>(H&7)&1;I=H+1|0;f[r>>2]=I;K=J;L=I}else{K=0;L=H}C=K<<F|C;F=F+1|0;if((F|0)==(y|0))break;else H=L}H=E+1|0;f[e+(E<<2)>>2]=C;D=D+1|0;if((D|0)>=(c|0)){G=H;break}else E=H}}else G=w;while(0);v=v+c|0;if(v>>>0>=a>>>0)break;else w=G}}}else bh(d,0,0)|0;ei(d);l=1}else l=0;while(0);d=f[i+28>>2]|0;if(d|0){G=i+32|0;a=f[G>>2]|0;if((a|0)!=(d|0))f[G>>2]=a+(~((a+-8-d|0)>>>3)<<3);gn(d)}d=f[i+16>>2]|0;if(d|0){a=i+20|0;G=f[a>>2]|0;if((G|0)!=(d|0))f[a>>2]=G+(~((G+-4-d|0)>>>2)<<2);gn(d)}d=f[i>>2]|0;if(!d){u=g;return l|0}G=i+4|0;i=f[G>>2]|0;if((i|0)!=(d|0))f[G>>2]=i+(~((i+-4-d|0)>>>2)<<2);gn(d);u=g;return l|0}function fc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=a;h=b;i=h;j=c;k=d;l=k;if(!i){m=(e|0)!=0;if(!l){if(m){f[e>>2]=(g>>>0)%(j>>>0);f[e+4>>2]=0}n=0;o=(g>>>0)/(j>>>0)>>>0;return (I=n,o)|0}else{if(!m){n=0;o=0;return (I=n,o)|0}f[e>>2]=a|0;f[e+4>>2]=b&0;n=0;o=0;return (I=n,o)|0}}m=(l|0)==0;do if(j){if(!m){p=(_(l|0)|0)-(_(i|0)|0)|0;if(p>>>0<=31){q=p+1|0;r=31-p|0;s=p-31>>31;t=q;u=g>>>(q>>>0)&s|i<<r;v=i>>>(q>>>0)&s;w=0;x=g<<r;break}if(!e){n=0;o=0;return (I=n,o)|0}f[e>>2]=a|0;f[e+4>>2]=h|b&0;n=0;o=0;return (I=n,o)|0}r=j-1|0;if(r&j|0){s=(_(j|0)|0)+33-(_(i|0)|0)|0;q=64-s|0;p=32-s|0;y=p>>31;z=s-32|0;A=z>>31;t=s;u=p-1>>31&i>>>(z>>>0)|(i<<p|g>>>(s>>>0))&A;v=A&i>>>(s>>>0);w=g<<q&y;x=(i<<q|g>>>(z>>>0))&y|g<<p&s-33>>31;break}if(e|0){f[e>>2]=r&g;f[e+4>>2]=0}if((j|0)==1){n=h|b&0;o=a|0|0;return (I=n,o)|0}else{r=wi(j|0)|0;n=i>>>(r>>>0)|0;o=i<<32-r|g>>>(r>>>0)|0;return (I=n,o)|0}}else{if(m){if(e|0){f[e>>2]=(i>>>0)%(j>>>0);f[e+4>>2]=0}n=0;o=(i>>>0)/(j>>>0)>>>0;return (I=n,o)|0}if(!g){if(e|0){f[e>>2]=0;f[e+4>>2]=(i>>>0)%(l>>>0)}n=0;o=(i>>>0)/(l>>>0)>>>0;return (I=n,o)|0}r=l-1|0;if(!(r&l)){if(e|0){f[e>>2]=a|0;f[e+4>>2]=r&i|b&0}n=0;o=i>>>((wi(l|0)|0)>>>0);return (I=n,o)|0}r=(_(l|0)|0)-(_(i|0)|0)|0;if(r>>>0<=30){s=r+1|0;p=31-r|0;t=s;u=i<<p|g>>>(s>>>0);v=i>>>(s>>>0);w=0;x=g<<p;break}if(!e){n=0;o=0;return (I=n,o)|0}f[e>>2]=a|0;f[e+4>>2]=h|b&0;n=0;o=0;return (I=n,o)|0}while(0);if(!t){B=x;C=w;D=v;E=u;F=0;G=0}else{b=c|0|0;c=k|d&0;d=Uj(b|0,c|0,-1,-1)|0;k=I;h=x;x=w;w=v;v=u;u=t;t=0;do{a=h;h=x>>>31|h<<1;x=t|x<<1;g=v<<1|a>>>31|0;a=v>>>31|w<<1|0;Wj(d|0,k|0,g|0,a|0)|0;i=I;l=i>>31|((i|0)<0?-1:0)<<1;t=l&1;v=Wj(g|0,a|0,l&b|0,(((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1)&c|0)|0;w=I;u=u-1|0}while((u|0)!=0);B=h;C=x;D=w;E=v;F=0;G=t}t=C;C=0;if(e|0){f[e>>2]=E;f[e+4>>2]=D}n=(t|0)>>>31|(B|C)<<1|(C<<1|t>>>31)&0|F;o=(t<<1|0>>>31)&-2|G;return (I=n,o)|0}function gc(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0;switch(c|0){case 1:{c=dj(60)|0;f[c>>2]=1256;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];Bg(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1620;i=c;f[a>>2]=i;return}case 4:{c=dj(112)|0;f[c>>2]=1256;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];Bg(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1676;h=c+60|0;b=h+52|0;do{f[h>>2]=0;h=h+4|0}while((h|0)<(b|0));i=c;f[a>>2]=i;return}case 5:{c=dj(104)|0;f[c>>2]=1256;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];Bg(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1732;f[c+60>>2]=0;f[c+64>>2]=0;f[c+76>>2]=0;f[c+80>>2]=0;f[c+84>>2]=0;h=c+88|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=dj(124)|0;f[c>>2]=1256;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Bg(c+32|0,e+24|0);e=c+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=1788;f[c+64>>2]=0;f[c+68>>2]=0;e=c+72|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+60>>2]=1844;f[c+88>>2]=1;g=c+92|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;Wk(c+108|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function hc(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0;switch(c|0){case 1:{c=dj(60)|0;f[c>>2]=1256;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];Bg(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1368;i=c;f[a>>2]=i;return}case 4:{c=dj(112)|0;f[c>>2]=1256;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];Bg(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1424;h=c+60|0;b=h+52|0;do{f[h>>2]=0;h=h+4|0}while((h|0)<(b|0));i=c;f[a>>2]=i;return}case 5:{c=dj(104)|0;f[c>>2]=1256;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];Bg(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1480;f[c+60>>2]=0;f[c+64>>2]=0;f[c+76>>2]=0;f[c+80>>2]=0;f[c+84>>2]=0;h=c+88|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=dj(124)|0;f[c>>2]=1256;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Bg(c+32|0,e+24|0);e=c+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=1536;f[c+64>>2]=0;f[c+68>>2]=0;e=c+72|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+60>>2]=1592;f[c+88>>2]=1;g=c+92|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;Wk(c+108|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function ic(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;c=u;u=u+16|0;d=c;if(!(rd(a+80|0,a)|0)){e=0;u=c;return e|0}if(!(qf(a)|0)){e=0;u=c;return e|0}g=b;h=a;i=g+40|0;do{f[g>>2]=f[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));h=a+176|0;f[h>>2]=2;g=a+180|0;f[g>>2]=7;i=f[a+152>>2]|0;if((i|0)<0){e=0;u=c;return e|0}j=a+156|0;f[d>>2]=0;k=a+160|0;l=f[k>>2]|0;m=f[j>>2]|0;n=l-m>>2;o=m;m=l;if(i>>>0<=n>>>0)if(i>>>0<n>>>0?(l=o+(i<<2)|0,(l|0)!=(m|0)):0){f[k>>2]=m+(~((m+-4-l|0)>>>2)<<2);p=2;q=7}else{p=2;q=7}else{we(j,i-n|0,d);p=f[h>>2]|0;q=f[g>>2]|0}g=q-p+1|0;p=a+184|0;q=a+188|0;h=f[q>>2]|0;n=f[p>>2]|0;i=(h-n|0)/12|0;j=n;n=h;if(g>>>0<=i>>>0)if(g>>>0<i>>>0?(l=j+(g*12|0)|0,(l|0)!=(n|0)):0){j=n;while(1){n=j+-12|0;f[q>>2]=n;m=f[n>>2]|0;if(!m)r=n;else{n=j+-8|0;k=f[n>>2]|0;if((k|0)!=(m|0))f[n>>2]=k+(~((k+-4-m|0)>>>2)<<2);gn(m);r=f[q>>2]|0}if((r|0)==(l|0))break;else j=r}s=r}else s=h;else{kd(p,g-i|0);s=f[q>>2]|0}i=a+196|0;g=f[p>>2]|0;h=(s-g|0)/12|0;r=a+200|0;a=f[r>>2]|0;j=f[i>>2]|0;l=a-j>>2;m=j;j=a;if(h>>>0<=l>>>0)if(h>>>0<l>>>0?(a=m+(h<<2)|0,(a|0)!=(j|0)):0){f[r>>2]=j+(~((j+-4-a|0)>>>2)<<2);t=s;v=g}else{t=s;v=g}else{ef(i,h-l|0);t=f[q>>2]|0;v=f[p>>2]|0}if((t|0)==(v|0)){e=1;u=c;return e|0}v=0;do{bg(d,b)|0;t=f[d>>2]|0;if(t|0){l=f[p>>2]|0;h=l+(v*12|0)|0;g=l+(v*12|0)+4|0;s=f[g>>2]|0;a=f[h>>2]|0;j=s-a>>2;r=a;a=s;if(t>>>0<=j>>>0)if(t>>>0<j>>>0?(s=r+(t<<2)|0,(s|0)!=(a|0)):0){f[g>>2]=a+(~((a+-4-s|0)>>>2)<<2);w=l;x=t}else{w=l;x=t}else{ef(h,t-j|0);w=f[p>>2]|0;x=f[d>>2]|0}Pf(x,1,b,f[w+(v*12|0)>>2]|0)|0;f[(f[i>>2]|0)+(v<<2)>>2]=f[d>>2]}v=v+1|0}while(v>>>0<(((f[q>>2]|0)-(f[p>>2]|0)|0)/12|0)>>>0);e=1;u=c;return e|0}function jc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)gn(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;al(d,10109);f[d>>2]=3812;va(d|0,904,84)}d=dj(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)gn(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0<b>>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){b:do if(h){e=k;c=l;i=m;while(1){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0))break;o=(f[a>>2]|0)+(n<<2)|0;if(!(f[o>>2]|0)){p=d;q=i;r=n;s=o;break b}o=d+8|0;t=d;while(1){u=f[t>>2]|0;if(!u)break;if((f[o>>2]|0)==(f[u+8>>2]|0))t=u;else break}f[i>>2]=u;f[t>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;o=f[e>>2]|0;if(!o){v=37;break a}else d=o}c=f[d>>2]|0;if(!c){v=37;break a}else{e=d;i=d}}}else{i=k;e=l;c=m;while(1){o=e;while(1){w=f[o+4>>2]|0;if(w>>>0<b>>>0)x=w;else x=(w>>>0)%(b>>>0)|0;if((x|0)==(j|0))break;w=(f[a>>2]|0)+(x<<2)|0;if(!(f[w>>2]|0)){p=o;q=c;r=x;s=w;break b}w=o+8|0;y=o;while(1){z=f[y>>2]|0;if(!z)break;if((f[w>>2]|0)==(f[z+8>>2]|0))y=z;else break}f[c>>2]=z;f[y>>2]=f[f[(f[a>>2]|0)+(x<<2)>>2]>>2];f[f[(f[a>>2]|0)+(x<<2)>>2]>>2]=o;w=f[i>>2]|0;if(!w){v=37;break a}else o=w}e=f[o>>2]|0;if(!e){v=37;break a}else{i=o;c=o}}}while(0);f[s>>2]=q;l=f[p>>2]|0;if(!l){v=37;break}else{j=r;k=p;m=p}}if((v|0)==37)return}function kc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;d=u;u=u+32|0;e=d+24|0;g=d+20|0;h=d+8|0;i=d+4|0;j=d;f[e>>2]=0;bg(e,f[a>>2]|0)|0;a:do if(f[e>>2]|0){k=0;while(1){k=k+1|0;if(!(pc(a,c)|0)){l=0;break}if(k>>>0>=(f[e>>2]|0)>>>0)break a}u=d;return l|0}while(0);f[g>>2]=0;bg(g,f[a>>2]|0)|0;b:do if(!(f[g>>2]|0))m=1;else{e=h+11|0;k=0;while(1){f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;o=f[a>>2]|0;p=o+8|0;q=f[p+4>>2]|0;r=o+16|0;s=r;t=f[s>>2]|0;v=f[s+4>>2]|0;do if((q|0)>(v|0)|((q|0)==(v|0)?(f[p>>2]|0)>>>0>t>>>0:0)){s=b[(f[o>>2]|0)+t>>0]|0;w=Uj(t|0,v|0,1,0)|0;x=r;f[x>>2]=w;f[x+4>>2]=I;x=s&255;gg(h,x,0);if(s<<24>>24){w=f[a>>2]|0;y=Nh(h,0)|0;z=w+8|0;A=f[z>>2]|0;B=f[z+4>>2]|0;z=w+16|0;C=z;D=f[C>>2]|0;E=s&255;s=Uj(D|0,f[C+4>>2]|0,E|0,0)|0;C=I;if((B|0)<(C|0)|(B|0)==(C|0)&A>>>0<s>>>0){F=1;break}be(y|0,(f[w>>2]|0)+D|0,x|0)|0;x=z;D=Uj(f[x>>2]|0,f[x+4>>2]|0,E|0,0)|0;E=z;f[E>>2]=D;f[E+4>>2]=I}E=dj(40)|0;f[E>>2]=0;f[E+4>>2]=0;f[E+8>>2]=0;f[E+12>>2]=0;n[E+16>>2]=$(1.0);D=E+20|0;f[D>>2]=0;f[D+4>>2]=0;f[D+8>>2]=0;f[D+12>>2]=0;n[E+36>>2]=$(1.0);f[i>>2]=E;if(kc(a,E)|0){E=f[i>>2]|0;f[i>>2]=0;f[j>>2]=E;Nd(c,h,j)|0;rf(j);G=0}else G=1;rf(i);F=G}else F=1;while(0);if((b[e>>0]|0)<0)gn(f[h>>2]|0);k=k+1|0;if(F|0){m=0;break b}if(k>>>0>=(f[g>>2]|0)>>>0){m=1;break}}}while(0);l=m;u=d;return l|0}function lc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;g=a+8|0;f[g>>2]=e;h=a+32|0;i=a+36|0;j=f[i>>2]|0;k=f[h>>2]|0;l=j-k>>2;m=k;k=j;if(l>>>0>=e>>>0)if(l>>>0>e>>>0?(j=m+(e<<2)|0,(j|0)!=(k|0)):0){f[i>>2]=k+(~((k+-4-j|0)>>>2)<<2);n=e}else n=e;else{ef(h,e-l|0);n=f[g>>2]|0}l=e>>>0>1073741823?-1:e<<2;h=dn(l)|0;Uf(h|0,0,l|0)|0;if((n|0)>0){l=a+16|0;j=a+32|0;k=a+12|0;i=0;do{m=f[h+(i<<2)>>2]|0;o=f[l>>2]|0;if((m|0)>(o|0)){p=f[j>>2]|0;f[p+(i<<2)>>2]=o;q=p}else{p=f[k>>2]|0;o=f[j>>2]|0;f[o+(i<<2)>>2]=(m|0)<(p|0)?p:m;q=o}i=i+1|0;r=f[g>>2]|0}while((i|0)<(r|0));if((r|0)>0){i=a+20|0;j=0;do{o=(f[b+(j<<2)>>2]|0)+(f[q+(j<<2)>>2]|0)|0;m=c+(j<<2)|0;f[m>>2]=o;if((o|0)<=(f[l>>2]|0)){if((o|0)<(f[k>>2]|0)){s=(f[i>>2]|0)+o|0;t=18}}else{s=o-(f[i>>2]|0)|0;t=18}if((t|0)==18){t=0;f[m>>2]=s}j=j+1|0;m=f[g>>2]|0}while((j|0)<(m|0));u=m}else u=r}else u=n;if((e|0)>=(d|0)){en(h);return 1}n=0-e|0;r=a+16|0;j=a+32|0;s=a+12|0;i=a+20|0;a=e;k=u;while(1){u=c+(a<<2)|0;l=u+(n<<2)|0;q=b+(a<<2)|0;if((k|0)>0){m=0;do{o=f[l+(m<<2)>>2]|0;p=f[r>>2]|0;if((o|0)>(p|0)){v=f[j>>2]|0;f[v+(m<<2)>>2]=p;w=v}else{v=f[s>>2]|0;p=f[j>>2]|0;f[p+(m<<2)>>2]=(o|0)<(v|0)?v:o;w=p}m=m+1|0;x=f[g>>2]|0}while((m|0)<(x|0));if((x|0)>0){m=0;do{l=(f[q+(m<<2)>>2]|0)+(f[w+(m<<2)>>2]|0)|0;p=u+(m<<2)|0;f[p>>2]=l;if((l|0)<=(f[r>>2]|0)){if((l|0)<(f[s>>2]|0)){y=(f[i>>2]|0)+l|0;t=33}}else{y=l-(f[i>>2]|0)|0;t=33}if((t|0)==33){t=0;f[p>>2]=y}m=m+1|0;p=f[g>>2]|0}while((m|0)<(p|0));z=p}else z=x}else z=k;a=a+e|0;if((a|0)>=(d|0))break;else k=z}en(h);return 1}function mc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;d=u;u=u+16|0;e=d;g=a+68|0;f[g>>2]=(f[g>>2]|0)+1;g=(f[a+8+(b*12|0)+4>>2]|0)-(f[a+8+(b*12|0)>>2]|0)|0;h=g>>2;if((g|0)<=0){u=d;return}g=a+4|0;i=a+56|0;j=a+72|0;k=f[c>>2]|0;c=k+4|0;l=k+8|0;m=a+76|0;n=0;o=f[a+44+(b<<2)>>2]|0;while(1){b=(o|0)==-1;p=b?-1:(o>>>0)/3|0;q=(f[i>>2]|0)+(p>>>5<<2)|0;f[q>>2]=f[q>>2]|1<<(p&31);f[j>>2]=(f[j>>2]|0)+1;do if(n){if(b)r=-1;else r=f[(f[(f[a>>2]|0)+96>>2]|0)+(((o|0)/3|0)*12|0)+(((o|0)%3|0)<<2)>>2]|0;f[m>>2]=r;f[e>>2]=r;p=f[c>>2]|0;if(p>>>0<(f[l>>2]|0)>>>0){f[p>>2]=r;f[c>>2]=p+4}else wf(k,e);if(!(n&1)){p=o+1|0;if(b){s=-1;break}t=((p>>>0)%3|0|0)==0?o+-2|0:p;v=35;break}if(!b)if(!((o>>>0)%3|0)){t=o+2|0;v=35;break}else{t=o+-1|0;v=35;break}else s=-1}else{if(b)w=-1;else w=f[(f[(f[a>>2]|0)+96>>2]|0)+(((o|0)/3|0)*12|0)+(((o|0)%3|0)<<2)>>2]|0;f[e>>2]=w;p=f[c>>2]|0;if(p>>>0<(f[l>>2]|0)>>>0){f[p>>2]=w;f[c>>2]=p+4}else wf(k,e);p=o+1|0;if(!b?(q=((p>>>0)%3|0|0)==0?o+-2|0:p,(q|0)!=-1):0)x=f[(f[(f[a>>2]|0)+96>>2]|0)+(((q|0)/3|0)*12|0)+(((q|0)%3|0)<<2)>>2]|0;else x=-1;f[e>>2]=x;q=f[c>>2]|0;if(q>>>0<(f[l>>2]|0)>>>0){f[q>>2]=x;f[c>>2]=q+4}else wf(k,e);if(!b?(q=(((o>>>0)%3|0|0)==0?2:-1)+o|0,(q|0)!=-1):0)y=f[(f[(f[a>>2]|0)+96>>2]|0)+(((q|0)/3|0)*12|0)+(((q|0)%3|0)<<2)>>2]|0;else y=-1;f[m>>2]=y;f[e>>2]=y;q=f[c>>2]|0;if(q>>>0<(f[l>>2]|0)>>>0){f[q>>2]=y;f[c>>2]=q+4}else wf(k,e);t=o;v=35}while(0);if((v|0)==35){v=0;if((t|0)==-1)s=-1;else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){f[E>>2]=F;f[c>>2]=E+4}else wf(w,e);E=(f[y>>2]|0)+2|0;f[y>>2]=E;if(E&1|0){f[e>>2]=F;E=f[c>>2]|0;if(E>>>0<(f[x>>2]|0)>>>0){f[E>>2]=F;f[c>>2]=E+4}else wf(w,e);f[y>>2]=(f[y>>2]|0)+1}}f[h>>2]=z;f[e>>2]=f[h>>2];mc(a,b,e);G=f[j>>2]|0;H=f[k>>2]|0}else{G=B;H=l}A=A+1|0;if(A>>>0>=((H-G|0)/12|0)>>>0){i=1;break}else{B=G;l=H}}u=d;return i|0}function oc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;c=a+148|0;d=f[b>>2]|0;b=(d|0)==-1;e=d+1|0;do if(!b){g=((e>>>0)%3|0|0)==0?d+-2|0:e;if(!((d>>>0)%3|0)){h=d+2|0;i=g;break}else{h=d+-1|0;i=g;break}}else{h=-1;i=-1}while(0);switch(f[a+168>>2]|0){case 1:case 0:{if((i|0)==-1)j=-1;else j=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;e=f[a+156>>2]|0;g=e+(j<<2)|0;f[g>>2]=(f[g>>2]|0)+1;if((h|0)==-1){k=1;l=-1;m=e;n=28}else{k=1;l=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;m=e;n=28}break}case 5:{if(b)o=-1;else o=f[(f[f[c>>2]>>2]|0)+(d<<2)>>2]|0;e=f[a+156>>2]|0;g=e+(o<<2)|0;f[g>>2]=(f[g>>2]|0)+1;if((i|0)==-1)p=-1;else p=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;g=e+(p<<2)|0;f[g>>2]=(f[g>>2]|0)+1;if((h|0)==-1){k=2;l=-1;m=e;n=28}else{k=2;l=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;m=e;n=28}break}case 3:{if(b)q=-1;else q=f[(f[f[c>>2]>>2]|0)+(d<<2)>>2]|0;e=f[a+156>>2]|0;g=e+(q<<2)|0;f[g>>2]=(f[g>>2]|0)+1;if((i|0)==-1)r=-1;else r=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;g=e+(r<<2)|0;f[g>>2]=(f[g>>2]|0)+2;if((h|0)==-1){k=1;l=-1;m=e;n=28}else{k=1;l=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;m=e;n=28}break}case 7:{if(b)s=-1;else s=f[(f[f[c>>2]>>2]|0)+(d<<2)>>2]|0;d=f[a+156>>2]|0;b=d+(s<<2)|0;f[b>>2]=(f[b>>2]|0)+2;if((i|0)==-1)t=-1;else t=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;b=d+(t<<2)|0;f[b>>2]=(f[b>>2]|0)+2;if((h|0)==-1){k=2;l=-1;m=d;n=28}else{k=2;l=f[(f[f[c>>2]>>2]|0)+(h<<2)>>2]|0;m=d;n=28}break}default:{}}if((n|0)==28){n=m+(l<<2)|0;f[n>>2]=(f[n>>2]|0)+k}if((i|0)==-1)u=-1;else u=f[(f[f[c>>2]>>2]|0)+(i<<2)>>2]|0;i=f[(f[a+156>>2]|0)+(u<<2)>>2]|0;u=f[a+176>>2]|0;if((i|0)<(u|0)){v=u;w=v-u|0;x=a+172|0;f[x>>2]=w;return}c=f[a+180>>2]|0;v=(i|0)>(c|0)?c:i;w=v-u|0;x=a+172|0;f[x>>2]=w;return}function pc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;d=u;u=u+32|0;e=d+16|0;g=d+12|0;h=d;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;i=f[a>>2]|0;j=i+8|0;k=f[j+4>>2]|0;l=i+16|0;m=l;n=f[m>>2]|0;o=f[m+4>>2]|0;do if((k|0)>(o|0)|((k|0)==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|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=La,t=La,u=La,v=0,w=0,x=0,y=0,z=0;c=f[b>>2]|0;b=a+4|0;d=f[b>>2]|0;e=(d|0)==0;a:do if(!e){g=d+-1|0;h=(g&d|0)==0;if(!h)if(c>>>0<d>>>0)i=c;else i=(c>>>0)%(d>>>0)|0;else i=g&c;j=f[(f[a>>2]|0)+(i<<2)>>2]|0;if(!j)k=i;else{if(h){h=j;while(1){l=f[h>>2]|0;if(!l){k=i;break a}m=f[l+4>>2]|0;if(!((m|0)==(c|0)|(m&g|0)==(i|0))){k=i;break a}if((f[l+8>>2]|0)==(c|0)){o=l;break}else h=l}p=o+12|0;return p|0}else q=j;while(1){h=f[q>>2]|0;if(!h){k=i;break a}g=f[h+4>>2]|0;if((g|0)!=(c|0)){if(g>>>0<d>>>0)r=g;else r=(g>>>0)%(d>>>0)|0;if((r|0)!=(i|0)){k=i;break a}}if((f[h+8>>2]|0)==(c|0)){o=h;break}else q=h}p=o+12|0;return p|0}}else k=0;while(0);q=dj(16)|0;f[q+8>>2]=c;f[q+12>>2]=0;f[q+4>>2]=c;f[q>>2]=0;i=a+12|0;s=$(((f[i>>2]|0)+1|0)>>>0);t=$(d>>>0);u=$(n[a+16>>2]);do if(e|$(u*t)<s){r=d<<1|(d>>>0<3|(d+-1&d|0)!=0)&1;j=~~$(W($(s/u)))>>>0;Re(a,r>>>0<j>>>0?j:r);r=f[b>>2]|0;j=r+-1|0;if(!(j&r)){v=r;w=j&c;break}if(c>>>0<r>>>0){v=r;w=c}else{v=r;w=(c>>>0)%(r>>>0)|0}}else{v=d;w=k}while(0);k=(f[a>>2]|0)+(w<<2)|0;w=f[k>>2]|0;if(!w){d=a+8|0;f[q>>2]=f[d>>2];f[d>>2]=q;f[k>>2]=d;d=f[q>>2]|0;if(d|0){k=f[d+4>>2]|0;d=v+-1|0;if(d&v)if(k>>>0<v>>>0)x=k;else x=(k>>>0)%(v>>>0)|0;else x=k&d;y=(f[a>>2]|0)+(x<<2)|0;z=30}}else{f[q>>2]=f[w>>2];y=w;z=30}if((z|0)==30)f[y>>2]=q;f[i>>2]=(f[i>>2]|0)+1;o=q;p=o+12|0;return p|0}function rc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=a+8|0;e=f[d>>2]|0;switch(f[e+28>>2]|0){case 2:{g=b[e+24>>0]|0;h=g<<24>>24;i=dn((h|0)>-1?h:-1)|0;j=f[a+16>>2]|0;if(!(f[j+80>>2]|0))k=0;else k=(f[f[j>>2]>>2]|0)+(f[j+48>>2]|0)|0;a:do if(c|0){if(g<<24>>24>0){l=0;m=0}else{be(f[f[e+64>>2]>>2]|0,i|0,h|0)|0;if((c|0)==1)break;else{n=0;o=1}while(1){n=n+h|0;be((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+n|0,i|0,h|0)|0;o=o+1|0;if((o|0)==(c|0))break a}}while(1){j=0;p=m;while(1){b[i+j>>0]=f[k+(p<<2)>>2];j=j+1|0;if((j|0)==(h|0))break;else p=p+1|0}be((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+m|0,i|0,h|0)|0;l=l+1|0;if((l|0)==(c|0))break;else m=m+h|0}}while(0);en(i);q=1;return q|0}case 1:{i=b[e+24>>0]|0;h=i<<24>>24;m=dn((h|0)>-1?h:-1)|0;l=f[a+16>>2]|0;if(!(f[l+80>>2]|0))r=0;else r=(f[f[l>>2]>>2]|0)+(f[l+48>>2]|0)|0;b:do if(c|0){if(i<<24>>24>0){s=0;t=0}else{be(f[f[e+64>>2]>>2]|0,m|0,h|0)|0;if((c|0)==1)break;else{u=0;v=1}while(1){u=u+h|0;be((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+u|0,m|0,h|0)|0;v=v+1|0;if((v|0)==(c|0))break b}}while(1){l=0;k=t;while(1){b[m+l>>0]=f[r+(k<<2)>>2];l=l+1|0;if((l|0)==(h|0))break;else k=k+1|0}be((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+t|0,m|0,h|0)|0;s=s+1|0;if((s|0)==(c|0))break;else t=t+h|0}}while(0);en(m);q=1;return q|0}case 4:{Ge(a,c);q=1;return q|0}case 3:{Ge(a,c);q=1;return q|0}case 6:{He(a,c);q=1;return q|0}case 5:{He(a,c);q=1;return q|0}default:{q=0;return q|0}}return 0}function sc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;f[a>>2]=f[c>>2];d=c+4|0;f[a+4>>2]=f[d>>2];e=c+8|0;f[a+8>>2]=f[e>>2];g=c+12|0;f[a+12>>2]=f[g>>2];f[d>>2]=0;f[e>>2]=0;f[g>>2]=0;g=c+16|0;f[a+16>>2]=f[g>>2];e=c+20|0;f[a+20>>2]=f[e>>2];d=c+24|0;f[a+24>>2]=f[d>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;b[a+28>>0]=b[c+28>>0]|0;d=a+32|0;e=c+32|0;f[d>>2]=0;g=a+36|0;f[g>>2]=0;f[a+40>>2]=0;f[d>>2]=f[e>>2];d=c+36|0;f[g>>2]=f[d>>2];g=c+40|0;f[a+40>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;e=a+44|0;d=c+44|0;f[e>>2]=0;g=a+48|0;f[g>>2]=0;f[a+52>>2]=0;f[e>>2]=f[d>>2];e=c+48|0;f[g>>2]=f[e>>2];g=c+52|0;f[a+52>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+56|0;e=c+56|0;f[d>>2]=0;g=a+60|0;f[g>>2]=0;f[a+64>>2]=0;f[d>>2]=f[e>>2];d=c+60|0;f[g>>2]=f[d>>2];g=c+64|0;f[a+64>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;f[a+68>>2]=f[c+68>>2];f[a+72>>2]=f[c+72>>2];e=a+76|0;d=c+76|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-n>>2;p=n;n=m;if(o>>>0>=e>>>0){if(o>>>0>e>>>0?(m=p+(e<<2)|0,(m|0)!=(n|0)):0)f[l>>2]=n+(~((n+-4-m|0)>>>2)<<2)}else ef(k,e-o|0);o=a+56|0;k=f[o>>2]|0;m=f[k+4>>2]|0;n=f[k>>2]|0;l=m-n|0;p=l>>2;if((l|0)<=0){q=1;u=d;return q|0}l=a+16|0;r=a+32|0;s=a+12|0;t=a+20|0;if((m|0)==(n|0)){v=k;xm(v)}else{w=0;x=n}while(1){f[i>>2]=f[x+(w<<2)>>2];f[h>>2]=f[i>>2];if(!(vb(j,h,c,w)|0)){q=0;y=24;break}n=X(w,e)|0;k=b+(n<<2)|0;m=c+(n<<2)|0;if((f[g>>2]|0)>0){n=0;do{z=f[a+68+(n<<2)>>2]|0;A=f[l>>2]|0;if((z|0)>(A|0)){B=f[r>>2]|0;f[B+(n<<2)>>2]=A;C=B}else{B=f[s>>2]|0;A=f[r>>2]|0;f[A+(n<<2)>>2]=(z|0)<(B|0)?B:z;C=A}n=n+1|0;D=f[g>>2]|0}while((n|0)<(D|0));if((D|0)>0){n=0;do{A=(f[k+(n<<2)>>2]|0)+(f[C+(n<<2)>>2]|0)|0;z=m+(n<<2)|0;f[z>>2]=A;if((A|0)<=(f[l>>2]|0)){if((A|0)<(f[s>>2]|0)){E=(f[t>>2]|0)+A|0;y=20}}else{E=A-(f[t>>2]|0)|0;y=20}if((y|0)==20){y=0;f[z>>2]=E}n=n+1|0}while((n|0)<(f[g>>2]|0))}}w=w+1|0;if((w|0)>=(p|0)){q=1;y=24;break}n=f[o>>2]|0;x=f[n>>2]|0;if((f[n+4>>2]|0)-x>>2>>>0<=w>>>0){v=n;y=8;break}}if((y|0)==8)xm(v);else if((y|0)==24){u=d;return q|0}return 0}function uc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=u;u=u+16|0;h=d+4|0;i=d;j=a+60|0;f[a+64>>2]=g;g=a+8|0;f[g>>2]=e;k=a+32|0;l=a+36|0;m=f[l>>2]|0;n=f[k>>2]|0;o=m-n>>2;p=n;n=m;if(o>>>0>=e>>>0){if(o>>>0>e>>>0?(m=p+(e<<2)|0,(m|0)!=(n|0)):0)f[l>>2]=n+(~((n+-4-m|0)>>>2)<<2)}else ef(k,e-o|0);o=a+56|0;k=f[o>>2]|0;m=f[k+4>>2]|0;n=f[k>>2]|0;l=m-n|0;p=l>>2;if((l|0)<=0){q=1;u=d;return q|0}l=a+16|0;r=a+32|0;s=a+12|0;t=a+20|0;if((m|0)==(n|0)){v=k;xm(v)}else{w=0;x=n}while(1){f[i>>2]=f[x+(w<<2)>>2];f[h>>2]=f[i>>2];if(!(ub(j,h,c,w)|0)){q=0;y=24;break}n=X(w,e)|0;k=b+(n<<2)|0;m=c+(n<<2)|0;if((f[g>>2]|0)>0){n=0;do{z=f[a+68+(n<<2)>>2]|0;A=f[l>>2]|0;if((z|0)>(A|0)){B=f[r>>2]|0;f[B+(n<<2)>>2]=A;C=B}else{B=f[s>>2]|0;A=f[r>>2]|0;f[A+(n<<2)>>2]=(z|0)<(B|0)?B:z;C=A}n=n+1|0;D=f[g>>2]|0}while((n|0)<(D|0));if((D|0)>0){n=0;do{A=(f[k+(n<<2)>>2]|0)+(f[C+(n<<2)>>2]|0)|0;z=m+(n<<2)|0;f[z>>2]=A;if((A|0)<=(f[l>>2]|0)){if((A|0)<(f[s>>2]|0)){E=(f[t>>2]|0)+A|0;y=20}}else{E=A-(f[t>>2]|0)|0;y=20}if((y|0)==20){y=0;f[z>>2]=E}n=n+1|0}while((n|0)<(f[g>>2]|0))}}w=w+1|0;if((w|0)>=(p|0)){q=1;y=24;break}n=f[o>>2]|0;x=f[n>>2]|0;if((f[n+4>>2]|0)-x>>2>>>0<=w>>>0){v=n;y=8;break}}if((y|0)==8)xm(v);else if((y|0)==24){u=d;return q|0}return 0}function vc(a,c,e,g,h){a=a|0;c=c|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;i=u;u=u+32|0;j=i+16|0;k=i+12|0;l=i;m=c+24|0;n=b[m>>0]|0;o=n<<24>>24;p=f[a+80>>2]|0;a=X(p,o)|0;q=f[c+28>>2]|0;if((q|0)==(e|0)|(q|0)==(g|0)?b[c+84>>0]|0:0){g=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;od(h,g,g+(a<<1)|0);r=1;u=i;return r|0}f[l>>2]=0;g=l+4|0;f[g>>2]=0;f[l+8>>2]=0;do if(n<<24>>24)if(n<<24>>24<0)xm(l);else{q=o<<1;e=dj(q)|0;f[l>>2]=e;s=e+(o<<1)|0;f[l+8>>2]=s;Uf(e|0,0,q|0)|0;f[g>>2]=s;break}while(0);od(h,0,0+(a<<1)|0);a:do if(!p)t=1;else{a=c+84|0;s=c+68|0;if(n<<24>>24>0){v=0;w=0}else{q=0;while(1){if(!(b[a>>0]|0))x=f[(f[s>>2]|0)+(q<<2)>>2]|0;else x=q;e=f[l>>2]|0;f[k>>2]=x;y=b[m>>0]|0;f[j>>2]=f[k>>2];if(!(mb(c,j,y,e)|0)){t=0;break a}q=q+1|0;if(q>>>0>=p>>>0){t=1;break a}}}while(1){if(!(b[a>>0]|0))z=f[(f[s>>2]|0)+(w<<2)>>2]|0;else z=w;q=f[l>>2]|0;f[k>>2]=z;e=b[m>>0]|0;f[j>>2]=f[k>>2];if(!(mb(c,j,e,q)|0)){t=0;break a}q=f[l>>2]|0;e=f[h>>2]|0;y=0;A=v;while(1){d[e+(A<<1)>>1]=d[q+(y<<1)>>1]|0;y=y+1|0;if((y|0)==(o|0))break;else A=A+1|0}w=w+1|0;if(w>>>0>=p>>>0){t=1;break}else v=v+o|0}}while(0);o=f[l>>2]|0;if(o|0){l=f[g>>2]|0;if((l|0)!=(o|0))f[g>>2]=l+(~((l+-2-o|0)>>>1)<<1);gn(o)}r=t;u=i;return r|0}function wc(a,c,e,g,h){a=a|0;c=c|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;i=u;u=u+32|0;j=i+16|0;k=i+12|0;l=i;m=c+24|0;n=b[m>>0]|0;o=n<<24>>24;p=f[a+80>>2]|0;a=X(p,o)|0;q=f[c+28>>2]|0;if((q|0)==(e|0)|(q|0)==(g|0)?b[c+84>>0]|0:0){g=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;od(h,g,g+(a<<1)|0);r=1;u=i;return r|0}f[l>>2]=0;g=l+4|0;f[g>>2]=0;f[l+8>>2]=0;do if(n<<24>>24)if(n<<24>>24<0)xm(l);else{q=o<<1;e=dj(q)|0;f[l>>2]=e;s=e+(o<<1)|0;f[l+8>>2]=s;Uf(e|0,0,q|0)|0;f[g>>2]=s;break}while(0);od(h,0,0+(a<<1)|0);a:do if(!p)t=1;else{a=c+84|0;s=c+68|0;if(n<<24>>24>0){v=0;w=0}else{q=0;while(1){if(!(b[a>>0]|0))x=f[(f[s>>2]|0)+(q<<2)>>2]|0;else x=q;e=f[l>>2]|0;f[k>>2]=x;y=b[m>>0]|0;f[j>>2]=f[k>>2];if(!(nb(c,j,y,e)|0)){t=0;break a}q=q+1|0;if(q>>>0>=p>>>0){t=1;break a}}}while(1){if(!(b[a>>0]|0))z=f[(f[s>>2]|0)+(w<<2)>>2]|0;else z=w;q=f[l>>2]|0;f[k>>2]=z;e=b[m>>0]|0;f[j>>2]=f[k>>2];if(!(nb(c,j,e,q)|0)){t=0;break a}q=f[l>>2]|0;e=f[h>>2]|0;y=0;A=v;while(1){d[e+(A<<1)>>1]=d[q+(y<<1)>>1]|0;y=y+1|0;if((y|0)==(o|0))break;else A=A+1|0}w=w+1|0;if(w>>>0>=p>>>0){t=1;break}else v=v+o|0}}while(0);o=f[l>>2]|0;if(o|0){l=f[g>>2]|0;if((l|0)!=(o|0))f[g>>2]=l+(~((l+-2-o|0)>>>1)<<1);gn(o)}r=t;u=i;return r|0}function xc(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;h=u;u=u+32|0;i=h+16|0;j=h+12|0;k=h;l=c+24|0;m=b[l>>0]|0;n=m<<24>>24;o=f[a+80>>2]|0;a=X(o,n)|0;p=f[c+28>>2]|0;if((p|0)==(d|0)|(p|0)==(e|0)?b[c+84>>0]|0:0){e=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;pd(g,e,e+(a<<2)|0);q=1;u=h;return q|0}f[k>>2]=0;e=k+4|0;f[e>>2]=0;f[k+8>>2]=0;do if(m<<24>>24)if(m<<24>>24<0)xm(k);else{p=n<<2;d=dj(p)|0;f[k>>2]=d;r=d+(n<<2)|0;f[k+8>>2]=r;Uf(d|0,0,p|0)|0;f[e>>2]=r;break}while(0);pd(g,0,0+(a<<2)|0);a:do if(!o)s=1;else{a=c+84|0;r=c+68|0;if(m<<24>>24>0){t=0;v=0}else{p=0;while(1){if(!(b[a>>0]|0))w=f[(f[r>>2]|0)+(p<<2)>>2]|0;else w=p;d=f[k>>2]|0;f[j>>2]=w;x=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(ob(c,i,x,d)|0)){s=0;break a}p=p+1|0;if(p>>>0>=o>>>0){s=1;break a}}}while(1){if(!(b[a>>0]|0))y=f[(f[r>>2]|0)+(v<<2)>>2]|0;else y=v;p=f[k>>2]|0;f[j>>2]=y;d=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(ob(c,i,d,p)|0)){s=0;break a}p=f[k>>2]|0;d=f[g>>2]|0;x=0;z=t;while(1){f[d+(z<<2)>>2]=f[p+(x<<2)>>2];x=x+1|0;if((x|0)==(n|0))break;else z=z+1|0}v=v+1|0;if(v>>>0>=o>>>0){s=1;break}else t=t+n|0}}while(0);n=f[k>>2]|0;if(n|0){k=f[e>>2]|0;if((k|0)!=(n|0))f[e>>2]=k+(~((k+-4-n|0)>>>2)<<2);gn(n)}q=s;u=h;return q|0}function yc(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;h=u;u=u+32|0;i=h+16|0;j=h+12|0;k=h;l=c+24|0;m=b[l>>0]|0;n=m<<24>>24;o=f[a+80>>2]|0;a=X(o,n)|0;p=f[c+28>>2]|0;if((p|0)==(d|0)|(p|0)==(e|0)?b[c+84>>0]|0:0){e=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;pd(g,e,e+(a<<2)|0);q=1;u=h;return q|0}f[k>>2]=0;e=k+4|0;f[e>>2]=0;f[k+8>>2]=0;do if(m<<24>>24)if(m<<24>>24<0)xm(k);else{p=n<<2;d=dj(p)|0;f[k>>2]=d;r=d+(n<<2)|0;f[k+8>>2]=r;Uf(d|0,0,p|0)|0;f[e>>2]=r;break}while(0);pd(g,0,0+(a<<2)|0);a:do if(!o)s=1;else{a=c+84|0;r=c+68|0;if(m<<24>>24>0){t=0;v=0}else{p=0;while(1){if(!(b[a>>0]|0))w=f[(f[r>>2]|0)+(p<<2)>>2]|0;else w=p;d=f[k>>2]|0;f[j>>2]=w;x=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(pb(c,i,x,d)|0)){s=0;break a}p=p+1|0;if(p>>>0>=o>>>0){s=1;break a}}}while(1){if(!(b[a>>0]|0))y=f[(f[r>>2]|0)+(v<<2)>>2]|0;else y=v;p=f[k>>2]|0;f[j>>2]=y;d=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(pb(c,i,d,p)|0)){s=0;break a}p=f[k>>2]|0;d=f[g>>2]|0;x=0;z=t;while(1){f[d+(z<<2)>>2]=f[p+(x<<2)>>2];x=x+1|0;if((x|0)==(n|0))break;else z=z+1|0}v=v+1|0;if(v>>>0>=o>>>0){s=1;break}else t=t+n|0}}while(0);n=f[k>>2]|0;if(n|0){k=f[e>>2]|0;if((k|0)!=(n|0))f[e>>2]=k+(~((k+-4-n|0)>>>2)<<2);gn(n)}q=s;u=h;return q|0}function zc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0;e=c+8|0;g=f[e+4>>2]|0;h=c+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if(!((g|0)>(k|0)|((g|0)==(k|0)?(f[e>>2]|0)>>>0>j>>>0:0))){l=0;return l|0}e=b[(f[c>>2]|0)+j>>0]|0;g=Uj(j|0,k|0,1,0)|0;k=h;f[k>>2]=g;f[k+4>>2]=I;do switch(e<<24>>24){case 1:{l=ac(a,c,d)|0;return l|0}case 2:{l=ac(a,c,d)|0;return l|0}case 3:{l=ac(a,c,d)|0;return l|0}case 4:{l=ac(a,c,d)|0;return l|0}case 5:{l=ad(a,c,d)|0;return l|0}case 6:{l=ac(a,c,d)|0;return l|0}case 7:{l=ac(a,c,d)|0;return l|0}case 8:{l=ac(a,c,d)|0;return l|0}case 9:{l=$b(a,c,d)|0;return l|0}case 10:{l=Zb(a,c,d)|0;return l|0}case 11:{l=Yb(a,c,d)|0;return l|0}case 12:{l=Xb(a,c,d)|0;return l|0}case 13:{l=Wb(a,c,d)|0;return l|0}case 14:{l=Vb(a,c,d)|0;return l|0}case 15:{l=Vb(a,c,d)|0;return l|0}case 16:{l=Vb(a,c,d)|0;return l|0}case 17:{l=Vb(a,c,d)|0;return l|0}case 18:{l=Vb(a,c,d)|0;return l|0}default:{l=0;return l|0}}while(0);return 0}function Ac(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;h=u;u=u+32|0;i=h+16|0;j=h+12|0;k=h;l=c+24|0;m=b[l>>0]|0;n=m<<24>>24;o=f[a+80>>2]|0;a=X(o,n)|0;p=f[c+28>>2]|0;if((p|0)==(d|0)|(p|0)==(e|0)?b[c+84>>0]|0:0){e=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;Fd(g,e,e+a|0);q=1;u=h;return q|0}f[k>>2]=0;e=k+4|0;f[e>>2]=0;f[k+8>>2]=0;if(m<<24>>24){if(m<<24>>24<0)xm(k);p=dj(n)|0;f[e>>2]=p;f[k>>2]=p;f[k+8>>2]=p+n;d=n;r=p;do{b[r>>0]=0;r=(f[e>>2]|0)+1|0;f[e>>2]=r;d=d+-1|0}while((d|0)!=0)}Fd(g,0,0+a|0);a:do if(!o)s=1;else{a=c+84|0;d=c+68|0;if(m<<24>>24>0){t=0;v=0}else{r=0;while(1){if(!(b[a>>0]|0))w=f[(f[d>>2]|0)+(r<<2)>>2]|0;else w=r;p=f[k>>2]|0;f[j>>2]=w;x=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(rb(c,i,x,p)|0)){s=0;break a}r=r+1|0;if(r>>>0>=o>>>0){s=1;break a}}}while(1){if(!(b[a>>0]|0))y=f[(f[d>>2]|0)+(v<<2)>>2]|0;else y=v;r=f[k>>2]|0;f[j>>2]=y;p=b[l>>0]|0;f[i>>2]=f[j>>2];if(rb(c,i,p,r)|0){z=0;A=t}else{s=0;break a}while(1){b[(f[g>>2]|0)+A>>0]=b[(f[k>>2]|0)+z>>0]|0;z=z+1|0;if((z|0)==(n|0))break;else A=A+1|0}v=v+1|0;if(v>>>0>=o>>>0){s=1;break}else t=t+n|0}}while(0);n=f[k>>2]|0;if(n|0){if((f[e>>2]|0)!=(n|0))f[e>>2]=n;gn(n)}q=s;u=h;return q|0}function Bc(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;h=u;u=u+32|0;i=h+16|0;j=h+12|0;k=h;l=c+24|0;m=b[l>>0]|0;n=m<<24>>24;o=f[a+80>>2]|0;a=X(o,n)|0;p=f[c+28>>2]|0;if((p|0)==(d|0)|(p|0)==(e|0)?b[c+84>>0]|0:0){e=(f[f[c>>2]>>2]|0)+(f[c+48>>2]|0)|0;Fd(g,e,e+a|0);q=1;u=h;return q|0}f[k>>2]=0;e=k+4|0;f[e>>2]=0;f[k+8>>2]=0;if(m<<24>>24){if(m<<24>>24<0)xm(k);p=dj(n)|0;f[e>>2]=p;f[k>>2]=p;f[k+8>>2]=p+n;d=n;r=p;do{b[r>>0]=0;r=(f[e>>2]|0)+1|0;f[e>>2]=r;d=d+-1|0}while((d|0)!=0)}Fd(g,0,0+a|0);a:do if(!o)s=1;else{a=c+84|0;d=c+68|0;if(m<<24>>24>0){t=0;v=0}else{r=0;while(1){if(!(b[a>>0]|0))w=f[(f[d>>2]|0)+(r<<2)>>2]|0;else w=r;p=f[k>>2]|0;f[j>>2]=w;x=b[l>>0]|0;f[i>>2]=f[j>>2];if(!(sb(c,i,x,p)|0)){s=0;break a}r=r+1|0;if(r>>>0>=o>>>0){s=1;break a}}}while(1){if(!(b[a>>0]|0))y=f[(f[d>>2]|0)+(v<<2)>>2]|0;else y=v;r=f[k>>2]|0;f[j>>2]=y;p=b[l>>0]|0;f[i>>2]=f[j>>2];if(sb(c,i,p,r)|0){z=0;A=t}else{s=0;break a}while(1){b[(f[g>>2]|0)+A>>0]=b[(f[k>>2]|0)+z>>0]|0;z=z+1|0;if((z|0)==(n|0))break;else A=A+1|0}v=v+1|0;if(v>>>0>=o>>>0){s=1;break}else t=t+n|0}}while(0);n=f[k>>2]|0;if(n|0){if((f[e>>2]|0)!=(n|0))f[e>>2]=n;gn(n)}q=s;u=h;return q|0}function Cc(a,b,c,d){a=a|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f[l>>2]=m;return}p=f[y>>2]&-1>>>(32-x|0);y=(w|0)<(x|0)?w:x;n=f[d>>2]|0;i=f[n>>2]&~(-1<<f[o>>2]&-1>>>(w-y|0));f[n>>2]=i;f[n>>2]=i|p<<f[o>>2];i=(f[o>>2]|0)+y|0;w=n+(i>>>5<<2)|0;f[d>>2]=w;f[o>>2]=i&31;i=x-y|0;if((i|0)<=0){j=o;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}f[w>>2]=f[w>>2]&~(-1>>>(32-i|0))|p>>>y;f[o>>2]=i;j=o;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}function Dc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;d=u;u=u+32|0;e=d+16|0;g=d+4|0;i=d;if(!(bg(e,c)|0)){j=-1;u=d;return j|0}k=f[e>>2]|0;if(k|0){l=f[a+8>>2]|0;if(k>>>0>(((f[l+4>>2]|0)-(f[l>>2]|0)>>2>>>0)/3|0)>>>0){j=-1;u=d;return j|0}l=g+4|0;k=a+40|0;m=a+44|0;n=a+36|0;o=0;p=0;do{bg(i,c)|0;f[l>>2]=(f[i>>2]|0)+p;bg(i,c)|0;q=f[i>>2]|0;p=f[l>>2]|0;if(p>>>0<q>>>0){r=22;break}f[g>>2]=p-q;q=f[k>>2]|0;if((q|0)==(f[m>>2]|0))bf(n,g);else{f[q>>2]=f[g>>2];f[q+4>>2]=f[g+4>>2];f[q+8>>2]=f[g+8>>2];f[k>>2]=(f[k>>2]|0)+12}o=o+1|0}while(o>>>0<(f[e>>2]|0)>>>0);if((r|0)==22){j=-1;u=d;return j|0}bh(c,0,0)|0;r=f[e>>2]|0;if(r|0){e=a+4|0;o=c+36|0;k=c+32|0;g=c+24|0;n=c+28|0;m=a+36|0;a=0;p=0;while(1){l=f[e>>2]|0;i=(b[o>>0]|0)==0;if(((h[l+36>>0]<<8|h[l+37>>0])&65535)<514)if(!i){l=f[k>>2]|0;q=f[g>>2]|0;s=f[n>>2]|0;t=q+(l>>>3)|0;if(t>>>0<s>>>0){v=(h[t>>0]|0)>>>(l&7)&1;t=l+1|0;f[k>>2]=t;w=v;x=t}else{w=0;x=l}if((q+(x>>>3)|0)>>>0<s>>>0){f[k>>2]=x+1;y=w}else y=w}else y=p;else if(!i){i=f[k>>2]|0;s=(f[g>>2]|0)+(i>>>3)|0;if(s>>>0<(f[n>>2]|0)>>>0){q=(h[s>>0]|0)>>>(i&7)&1;f[k>>2]=i+1;y=q}else y=0}else y=p;q=(f[m>>2]|0)+(a*12|0)+8|0;b[q>>0]=b[q>>0]&-2|y&1;a=a+1|0;if(a>>>0>=r>>>0)break;else p=y}}ei(c)}j=f[c+16>>2]|0;u=d;return j|0}function Ec(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=u;u=u+32|0;e=d+8|0;g=d;h=a+4|0;i=f[h>>2]|0;if(i>>>0>=b>>>0){f[h>>2]=b;u=d;return}j=a+8|0;k=f[j>>2]|0;l=k<<5;m=b-i|0;if(l>>>0<m>>>0|i>>>0>(l-m|0)>>>0){f[e>>2]=0;n=e+4|0;f[n>>2]=0;o=e+8|0;f[o>>2]=0;if((b|0)<0)xm(a);p=k<<6;k=b+31&-32;$e(e,l>>>0<1073741823?(p>>>0<k>>>0?k:p):2147483647);p=f[h>>2]|0;f[n>>2]=p+m;k=f[a>>2]|0;l=k;q=f[e>>2]|0;r=(l+(p>>>5<<2)-k<<3)+(p&31)|0;if((r|0)>0){p=r>>>5;qi(q|0,k|0,p<<2|0)|0;k=r&31;r=q+(p<<2)|0;s=r;if(!k){t=0;v=s}else{w=-1>>>(32-k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a:do if(!d){e=0;while(1){if(!(Oa[f[(f[a>>2]|0)+16>>2]&127](a,e)|0)){l=0;break}e=e+1|0;if((e|0)>=(k|0))break a}return l|0}while(0);e=a+8|0;h=f[e>>2]|0;j=f[a+12>>2]|0;b:do if((h|0)!=(j|0)){g=a+4|0;i=h;while(1){m=f[i>>2]|0;i=i+4|0;if(!(Pa[f[(f[m>>2]|0)+8>>2]&31](m,a,f[g>>2]|0)|0)){l=0;break}if((i|0)==(j|0))break b}return l|0}while(0);if(!d){j=0;do{h=f[(f[e>>2]|0)+(j<<2)>>2]|0;j=j+1|0;if(!(Oa[f[(f[h>>2]|0)+12>>2]&127](h,f[c>>2]|0)|0)){l=0;n=26;break}}while((j|0)<(k|0));if((n|0)==26)return l|0;if(!d){d=a+20|0;n=a+24|0;j=0;do{c=f[(f[e>>2]|0)+(j<<2)>>2]|0;h=Na[f[(f[c>>2]|0)+24>>2]&127](c)|0;if((h|0)>0){c=0;do{i=f[(f[e>>2]|0)+(j<<2)>>2]|0;g=Oa[f[(f[i>>2]|0)+20>>2]&127](i,c)|0;i=f[n>>2]|0;m=f[d>>2]|0;o=i-m>>2;p=m;do if(g>>>0>=o>>>0){m=g+1|0;q=i;if(m>>>0>o>>>0){ef(d,m-o|0);r=f[d>>2]|0;break}if(m>>>0<o>>>0?(s=p+(m<<2)|0,(s|0)!=(q|0)):0){f[n>>2]=q+(~((q+-4-s|0)>>>2)<<2);r=p}else r=p}else r=p;while(0);f[r+(g<<2)>>2]=j;c=c+1|0}while((c|0)!=(h|0))}j=j+1|0}while((j|0)!=(k|0))}}if(!(Na[f[(f[a>>2]|0)+28>>2]&127](a)|0)){l=0;return l|0}l=Na[f[(f[a>>2]|0)+32>>2]&127](a)|0;return l|0}function Gc(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;c=u;u=u+16|0;d=c;e=Na[f[(f[a>>2]|0)+24>>2]&127](a)|0;if((e|0)<=0){g=1;u=c;return g|0}h=a+36|0;i=a+48|0;j=d+8|0;k=d+4|0;l=d+11|0;m=0;while(1){n=(Na[f[(f[a>>2]|0)+28>>2]&127](a)|0)+40|0;if((f[n>>2]|0)!=0?(n=f[(f[h>>2]|0)+(m<<2)>>2]|0,o=f[n+8>>2]|0,p=Fe(n)|0,(p|0)!=0):0){n=(Na[f[(f[a>>2]|0)+28>>2]&127](a)|0)+40|0;q=f[n>>2]|0;n=f[o+56>>2]|0;o=dj(32)|0;f[d>>2]=o;f[j>>2]=-2147483616;f[k>>2]=24;r=o;s=8516;t=r+24|0;do{b[r>>0]=b[s>>0]|0;r=r+1|0;s=s+1|0}while((r|0)<(t|0));b[o+24>>0]=0;s=q+16|0;r=f[s>>2]|0;if(r){t=s;v=r;a:while(1){r=v;while(1){if((f[r+16>>2]|0)>=(n|0))break;w=f[r+4>>2]|0;if(!w){x=t;break a}else r=w}v=f[r>>2]|0;if(!v){x=r;break}else t=r}if(((x|0)!=(s|0)?(n|0)>=(f[x+16>>2]|0):0)?(t=x+20|0,(Ce(t,d)|0)!=0):0)y=ug(t,d,0)|0;else z=14}else z=14;if((z|0)==14){z=0;y=ug(q,d,0)|0}if((b[l>>0]|0)<0)gn(f[d>>2]|0);if(y)_c(f[(f[(f[h>>2]|0)+(m<<2)>>2]|0)+8>>2]|0,p);else z=19}else z=19;if((z|0)==19?(z=0,t=f[(f[h>>2]|0)+(m<<2)>>2]|0,!(Oa[f[(f[t>>2]|0)+24>>2]&127](t,i)|0)):0){g=0;z=21;break}m=m+1|0;if((m|0)>=(e|0)){g=1;z=21;break}}if((z|0)==21){u=c;return g|0}return 0}function Hc(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=2344;b=a+368|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=c+-4|0;d=f[b>>2]|0;if(d|0){e=c+(d<<4)|0;do e=e+-16|0;while((e|0)!=(c|0))}en(b)}ff(a+216|0);b=f[a+196>>2]|0;if(b|0){c=a+200|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);gn(b)}b=f[a+184>>2]|0;if(b|0){e=a+188|0;c=f[e>>2]|0;if((c|0)!=(b|0))f[e>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+172>>2]|0;if(b|0){c=a+176|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);gn(b)}b=f[a+160>>2]|0;if(b|0){e=a+164|0;c=f[e>>2]|0;if((c|0)!=(b|0))f[e>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+144>>2]|0;if(b|0){c=b;do{b=c;c=f[c>>2]|0;gn(b)}while((c|0)!=0)}c=a+136|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)gn(b);b=f[a+120>>2]|0;if(b|0)gn(b);b=f[a+108>>2]|0;if(b|0)gn(b);b=f[a+96>>2]|0;if(b|0)gn(b);b=f[a+72>>2]|0;if(b|0){c=a+76|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);gn(b)}b=f[a+60>>2]|0;if(b|0)gn(b);b=f[a+48>>2]|0;if(b|0){e=a+52|0;c=f[e>>2]|0;if((c|0)!=(b|0))f[e>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+36>>2]|0;if(b|0){c=a+40|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~(((e+-12-b|0)>>>0)/12|0)*12|0);gn(b)}b=f[a+24>>2]|0;if(b|0){e=a+28|0;c=f[e>>2]|0;if((c|0)!=(b|0))f[e>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+12>>2]|0;if(b|0){c=a+16|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);gn(b)}b=a+8|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;mf(a);gn(a);return}function Ic(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+32|0;e=d;g=a+8|0;h=f[g>>2]|0;i=a+4|0;j=f[i>>2]|0;if(((h-j|0)/144|0)>>>0>=c>>>0){k=c;l=j;do{f[l>>2]=-1;_g(l+4|0);b[l+100>>0]=1;m=l+104|0;n=m+40|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(n|0));l=(f[i>>2]|0)+144|0;f[i>>2]=l;k=k+-1|0}while((k|0)!=0);u=d;return}k=f[a>>2]|0;l=(j-k|0)/144|0;j=l+c|0;if(j>>>0>29826161)xm(a);o=(h-k|0)/144|0;k=o<<1;h=o>>>0<14913080?(k>>>0<j>>>0?j:k):29826161;f[e+12>>2]=0;f[e+16>>2]=a+8;do if(h)if(h>>>0>29826161){k=ra(8)|0;al(k,10109);f[k>>2]=3812;va(k|0,904,84)}else{p=dj(h*144|0)|0;break}else p=0;while(0);f[e>>2]=p;k=p+(l*144|0)|0;l=e+8|0;f[l>>2]=k;j=e+4|0;f[j>>2]=k;o=e+12|0;f[o>>2]=p+(h*144|0);h=c;c=k;do{f[c>>2]=-1;_g(c+4|0);b[c+100>>0]=1;m=c+104|0;n=m+40|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(n|0));c=(f[l>>2]|0)+144|0;f[l>>2]=c;h=h+-1|0}while((h|0)!=0);h=c;c=f[a>>2]|0;m=f[i>>2]|0;if((m|0)==(c|0)){q=j;r=f[j>>2]|0;s=c;t=m}else{n=m;m=f[j>>2]|0;do{m=m+-144|0;n=n+-144|0;sc(m,n)}while((n|0)!=(c|0));f[j>>2]=m;q=j;r=m;s=f[a>>2]|0;t=f[i>>2]|0}f[a>>2]=r;f[q>>2]=s;f[i>>2]=h;f[l>>2]=t;t=f[g>>2]|0;f[g>>2]=f[o>>2];f[o>>2]=t;f[e>>2]=s;lf(e);u=d;return}function Jc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=(c|0)==(a|0);b[c+12>>0]=d&1;if(d)return;else e=c;while(1){g=e+8|0;h=f[g>>2]|0;c=h+12|0;if(b[c>>0]|0){i=23;break}j=h+8|0;k=f[j>>2]|0;d=f[k>>2]|0;if((d|0)==(h|0)){l=f[k+4>>2]|0;if(!l){i=7;break}m=l+12|0;if(!(b[m>>0]|0))n=m;else{i=7;break}}else{if(!d){i=16;break}m=d+12|0;if(!(b[m>>0]|0))n=m;else{i=16;break}}b[c>>0]=1;c=(k|0)==(a|0);b[k+12>>0]=c&1;b[n>>0]=1;if(c){i=23;break}else e=k}if((i|0)==7){if((f[h>>2]|0)==(e|0)){o=h;p=k}else{n=h+4|0;a=f[n>>2]|0;c=f[a>>2]|0;f[n>>2]=c;if(!c)q=k;else{f[c+8>>2]=h;q=f[j>>2]|0}f[a+8>>2]=q;q=f[j>>2]|0;f[((f[q>>2]|0)==(h|0)?q:q+4|0)>>2]=a;f[a>>2]=h;f[j>>2]=a;o=a;p=f[a+8>>2]|0}b[o+12>>0]=1;b[p+12>>0]=0;o=f[p>>2]|0;a=o+4|0;q=f[a>>2]|0;f[p>>2]=q;if(q|0)f[q+8>>2]=p;q=p+8|0;f[o+8>>2]=f[q>>2];c=f[q>>2]|0;f[((f[c>>2]|0)==(p|0)?c:c+4|0)>>2]=o;f[a>>2]=p;f[q>>2]=o;return}else if((i|0)==16){if((f[h>>2]|0)==(e|0)){o=e+4|0;q=f[o>>2]|0;f[h>>2]=q;if(!q)r=k;else{f[q+8>>2]=h;r=f[j>>2]|0}f[g>>2]=r;r=f[j>>2]|0;f[((f[r>>2]|0)==(h|0)?r:r+4|0)>>2]=e;f[o>>2]=h;f[j>>2]=e;s=e;t=f[e+8>>2]|0}else{s=h;t=k}b[s+12>>0]=1;b[t+12>>0]=0;s=t+4|0;k=f[s>>2]|0;h=f[k>>2]|0;f[s>>2]=h;if(h|0)f[h+8>>2]=t;h=t+8|0;f[k+8>>2]=f[h>>2];s=f[h>>2]|0;f[((f[s>>2]|0)==(t|0)?s:s+4|0)>>2]=k;f[k>>2]=t;f[h>>2]=k;return}else if((i|0)==23)return}function Kc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;e=u;u=u+16|0;g=e;h=f[a+40>>2]|0;i=f[a+44>>2]|0;if((h|0)==(i|0)){j=0;k=2;l=(k|0)==2;m=l?0:j;u=e;return m|0}a=g+11|0;n=g+4|0;o=d+11|0;p=d+4|0;q=0;r=h;a:while(1){f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=Rf(f[r>>2]|0,c,g)|0;s=b[a>>0]|0;b:do if(h){t=s<<24>>24<0;v=s&255;w=t?f[n>>2]|0:v;x=b[o>>0]|0;y=x<<24>>24<0;if((w|0)==((y?f[p>>2]|0:x&255)|0)){x=f[g>>2]|0;z=t?x:g;A=y?f[d>>2]|0:d;y=(w|0)==0;c:do if(t){if(!y?oh(z,A,w)|0:0){B=0;C=q;D=14;break b}}else if(!y){if((b[A>>0]|0)==(x&255)<<24>>24){E=g;F=v;G=A}else{H=0;I=q;D=13;break b}while(1){F=F+-1|0;E=E+1|0;if(!F)break c;G=G+1|0;if((b[E>>0]|0)!=(b[G>>0]|0)){H=0;I=q;D=13;break b}}}while(0);H=1;I=f[r>>2]|0;D=13}else{H=0;I=q;D=13}}else{H=3;I=q;D=13}while(0);if((D|0)==13){D=0;if(s<<24>>24<0){B=H;C=I;D=14}else{J=H;K=I}}if((D|0)==14){D=0;gn(f[g>>2]|0);J=B;K=C}switch(J&3){case 3:case 0:break;default:{j=K;k=J;D=17;break a}}r=r+4|0;if((r|0)==(i|0)){j=K;k=2;D=17;break}else q=K}if((D|0)==17){l=(k|0)==2;m=l?0:j;u=e;return m|0}return 0}function Lc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=u;u=u+16|0;d=c;e=b+8|0;g=e;i=f[g>>2]|0;j=f[g+4>>2]|0;g=b+16|0;k=g;l=f[k>>2]|0;m=Uj(l|0,f[k+4>>2]|0,4,0)|0;k=I;if((j|0)<(k|0)|(j|0)==(k|0)&i>>>0<m>>>0){n=0;u=c;return n|0}i=(f[b>>2]|0)+l|0;l=h[i>>0]|h[i+1>>0]<<8|h[i+2>>0]<<16|h[i+3>>0]<<24;i=g;f[i>>2]=m;f[i+4>>2]=k;if((l|0)<0){n=0;u=c;return n|0}Ec(a+76|0,l,0);Wk(d);if(rd(d,b)|0){if((l|0)>0){k=a+76|0;i=1;m=0;do{i=i^((Wg(d)|0)^1);j=(f[k>>2]|0)+(m>>>5<<2)|0;o=1<<(m&31);if(i)p=f[j>>2]|o;else p=f[j>>2]&~o;f[j>>2]=p;m=m+1|0}while((m|0)<(l|0))}l=e;e=f[l>>2]|0;m=f[l+4>>2]|0;l=g;p=f[l>>2]|0;i=f[l+4>>2]|0;l=Uj(p|0,i|0,4,0)|0;k=I;if(((!((m|0)<(k|0)|(m|0)==(k|0)&e>>>0<l>>>0)?(d=f[b>>2]|0,b=d+p|0,j=h[b>>0]|h[b+1>>0]<<8|h[b+2>>0]<<16|h[b+3>>0]<<24,b=g,f[b>>2]=l,f[b+4>>2]=k,k=Uj(p|0,i|0,8,0)|0,i=I,!((m|0)<(i|0)|(m|0)==(i|0)&e>>>0<k>>>0)):0)?(e=d+l|0,l=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24,e=g,f[e>>2]=k,f[e+4>>2]=i,(j|0)<=(l|0)):0)?(f[a+12>>2]=j,f[a+16>>2]=l,i=Wj(l|0,((l|0)<0)<<31>>31|0,j|0,((j|0)<0)<<31>>31|0)|0,j=I,j>>>0<0|(j|0)==0&i>>>0<2147483647):0){j=i+1|0;f[a+20>>2]=j;i=(j|0)/2|0;l=a+24|0;f[l>>2]=i;f[a+28>>2]=0-i;if(!(j&1)){f[l>>2]=i+-1;q=1}else q=1}else q=0}else q=0;n=q;u=c;return n|0}function Mc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;g=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;if(!((c+-1|0)>>>0<6&(Na[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1)){h=0;f[a>>2]=h;return}i=Na[f[(f[b>>2]|0)+36>>2]&127](b)|0;j=Oa[f[(f[b>>2]|0)+44>>2]&127](b,d)|0;if((i|0)==0|(j|0)==0){h=0;f[a>>2]=h;return}k=Oa[f[(f[b>>2]|0)+40>>2]&127](b,d)|0;d=f[b+44>>2]|0;b=j+12|0;l=(c|0)==6;if(!k){if(l){c=dj(104)|0;f[c+4>>2]=g;m=c+8|0;f[m>>2]=f[e>>2];f[m+4>>2]=f[e+4>>2];f[m+8>>2]=f[e+8>>2];f[m+12>>2]=f[e+12>>2];f[c+24>>2]=d;f[c+28>>2]=i;f[c+32>>2]=b;f[c+36>>2]=j;f[c>>2]=2072;f[c+44>>2]=0;f[c+48>>2]=0;f[c+52>>2]=d;f[c+56>>2]=i;f[c+60>>2]=b;f[c+64>>2]=j;f[c+40>>2]=2128;f[c+68>>2]=1;i=c+72|0;f[i>>2]=-1;f[i+4>>2]=-1;f[i+8>>2]=-1;f[i+12>>2]=-1;Wk(c+88|0);h=c;f[a>>2]=h;return}}else if(l){l=dj(104)|0;f[l+4>>2]=g;g=l+8|0;f[g>>2]=f[e>>2];f[g+4>>2]=f[e+4>>2];f[g+8>>2]=f[e+8>>2];f[g+12>>2]=f[e+12>>2];f[l+24>>2]=d;f[l+28>>2]=k;f[l+32>>2]=b;f[l+36>>2]=j;f[l>>2]=1988;f[l+44>>2]=0;f[l+48>>2]=0;f[l+52>>2]=d;f[l+56>>2]=k;f[l+60>>2]=b;f[l+64>>2]=j;f[l+40>>2]=2044;f[l+68>>2]=1;j=l+72|0;f[j>>2]=-1;f[j+4>>2]=-1;f[j+8>>2]=-1;f[j+12>>2]=-1;Wk(l+88|0);h=l;f[a>>2]=h;return}f[a>>2]=0;f[a>>2]=0;h=0;f[a>>2]=h;return}function Nc(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2572;Ie(a+232|0);ff(a+216|0);b=f[a+196>>2]|0;if(b|0){c=a+200|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+184>>2]|0;if(b|0){d=a+188|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+172>>2]|0;if(b|0){c=a+176|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+160>>2]|0;if(b|0){d=a+164|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+144>>2]|0;if(b|0){c=b;do{b=c;c=f[c>>2]|0;gn(b)}while((c|0)!=0)}c=a+136|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)gn(b);b=f[a+120>>2]|0;if(b|0)gn(b);b=f[a+108>>2]|0;if(b|0)gn(b);b=f[a+96>>2]|0;if(b|0)gn(b);b=f[a+72>>2]|0;if(b|0){c=a+76|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+60>>2]|0;if(b|0)gn(b);b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+36>>2]|0;if(b|0){c=a+40|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);gn(b)}b=f[a+24>>2]|0;if(b|0){d=a+28|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+12>>2]|0;if(b|0){c=a+16|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=a+8|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;mf(a);gn(a);return}function Oc(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;if(!(d[c+38>>1]|0)){e=0;return e|0}g=a+12|0;if(!(bg(g,c)|0)){e=0;return e|0}h=f[g>>2]|0;i=a+4|0;j=f[i>>2]|0;k=f[a>>2]|0;l=j-k>>2;m=k;k=j;if(h>>>0<=l>>>0)if(h>>>0<l>>>0?(j=m+(h<<2)|0,(j|0)!=(k|0)):0){f[i>>2]=k+(~((k+-4-j|0)>>>2)<<2);n=h}else n=h;else{ef(a,h-l|0);n=f[g>>2]|0}if(!n){e=1;return e|0}l=c+8|0;h=c+16|0;j=0;k=n;a:while(1){n=l;i=f[n>>2]|0;m=f[n+4>>2]|0;n=h;o=f[n>>2]|0;p=f[n+4>>2]|0;if(!((m|0)>(p|0)|(m|0)==(p|0)&i>>>0>o>>>0)){e=0;q=19;break}n=f[c>>2]|0;r=b[n+o>>0]|0;s=Uj(o|0,p|0,1,0)|0;p=I;o=h;f[o>>2]=s;f[o+4>>2]=p;o=r&255;t=o&3;u=o>>>2;switch(r&3){case 3:{r=u+j|0;if(r>>>0>=k>>>0){e=0;q=19;break a}Uf((f[a>>2]|0)+(j<<2)|0,0,(o&252)+4|0)|0;v=r;break}case 0:{w=u;q=16;break}default:{r=u;u=0;o=p;p=s;while(1){if(!((m|0)>(o|0)|(m|0)==(o|0)&i>>>0>p>>>0)){e=0;q=19;break a}s=b[n+p>>0]|0;p=Uj(p|0,o|0,1,0)|0;o=I;x=h;f[x>>2]=p;f[x+4>>2]=o;x=(s&255)<<(u<<3|6)|r;u=u+1|0;if((u|0)>=(t|0)){w=x;q=16;break}else r=x}}}if((q|0)==16){q=0;f[(f[a>>2]|0)+(j<<2)>>2]=w;v=j}j=v+1|0;k=f[g>>2]|0;if(j>>>0>=k>>>0){q=18;break}}if((q|0)==18){e=ke(a+16|0,f[a>>2]|0,k)|0;return e|0}else if((q|0)==19)return e|0;return 0}function Pc(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;if(!(d[c+38>>1]|0)){e=0;return e|0}g=a+12|0;if(!(bg(g,c)|0)){e=0;return e|0}h=f[g>>2]|0;i=a+4|0;j=f[i>>2]|0;k=f[a>>2]|0;l=j-k>>2;m=k;k=j;if(h>>>0<=l>>>0)if(h>>>0<l>>>0?(j=m+(h<<2)|0,(j|0)!=(k|0)):0){f[i>>2]=k+(~((k+-4-j|0)>>>2)<<2);n=h}else n=h;else{ef(a,h-l|0);n=f[g>>2]|0}if(!n){e=1;return e|0}l=c+8|0;h=c+16|0;j=0;k=n;a:while(1){n=l;i=f[n>>2]|0;m=f[n+4>>2]|0;n=h;o=f[n>>2]|0;p=f[n+4>>2]|0;if(!((m|0)>(p|0)|(m|0)==(p|0)&i>>>0>o>>>0)){e=0;q=19;break}n=f[c>>2]|0;r=b[n+o>>0]|0;s=Uj(o|0,p|0,1,0)|0;p=I;o=h;f[o>>2]=s;f[o+4>>2]=p;o=r&255;t=o&3;u=o>>>2;switch(r&3){case 3:{r=u+j|0;if(r>>>0>=k>>>0){e=0;q=19;break a}Uf((f[a>>2]|0)+(j<<2)|0,0,(o&252)+4|0)|0;v=r;break}case 0:{w=u;q=16;break}default:{r=u;u=0;o=p;p=s;while(1){if(!((m|0)>(o|0)|(m|0)==(o|0)&i>>>0>p>>>0)){e=0;q=19;break a}s=b[n+p>>0]|0;p=Uj(p|0,o|0,1,0)|0;o=I;x=h;f[x>>2]=p;f[x+4>>2]=o;x=(s&255)<<(u<<3|6)|r;u=u+1|0;if((u|0)>=(t|0)){w=x;q=16;break}else r=x}}}if((q|0)==16){q=0;f[(f[a>>2]|0)+(j<<2)>>2]=w;v=j}j=v+1|0;k=f[g>>2]|0;if(j>>>0>=k>>>0){q=18;break}}if((q|0)==18){e=me(a+16|0,f[a>>2]|0,k)|0;return e|0}else if((q|0)==19)return e|0;return 0}function Qc(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;if(!(d[c+38>>1]|0)){e=0;return e|0}g=a+12|0;if(!(bg(g,c)|0)){e=0;return e|0}h=f[g>>2]|0;i=a+4|0;j=f[i>>2]|0;k=f[a>>2]|0;l=j-k>>2;m=k;k=j;if(h>>>0<=l>>>0)if(h>>>0<l>>>0?(j=m+(h<<2)|0,(j|0)!=(k|0)):0){f[i>>2]=k+(~((k+-4-j|0)>>>2)<<2);n=h}else n=h;else{ef(a,h-l|0);n=f[g>>2]|0}if(!n){e=1;return e|0}l=c+8|0;h=c+16|0;j=0;k=n;a:while(1){n=l;i=f[n>>2]|0;m=f[n+4>>2]|0;n=h;o=f[n>>2]|0;p=f[n+4>>2]|0;if(!((m|0)>(p|0)|(m|0)==(p|0)&i>>>0>o>>>0)){e=0;q=19;break}n=f[c>>2]|0;r=b[n+o>>0]|0;s=Uj(o|0,p|0,1,0)|0;p=I;o=h;f[o>>2]=s;f[o+4>>2]=p;o=r&255;t=o&3;u=o>>>2;switch(r&3){case 3:{r=u+j|0;if(r>>>0>=k>>>0){e=0;q=19;break a}Uf((f[a>>2]|0)+(j<<2)|0,0,(o&252)+4|0)|0;v=r;break}case 0:{w=u;q=16;break}default:{r=u;u=0;o=p;p=s;while(1){if(!((m|0)>(o|0)|(m|0)==(o|0)&i>>>0>p>>>0)){e=0;q=19;break a}s=b[n+p>>0]|0;p=Uj(p|0,o|0,1,0)|0;o=I;x=h;f[x>>2]=p;f[x+4>>2]=o;x=(s&255)<<(u<<3|6)|r;u=u+1|0;if((u|0)>=(t|0)){w=x;q=16;break}else r=x}}}if((q|0)==16){q=0;f[(f[a>>2]|0)+(j<<2)>>2]=w;v=j}j=v+1|0;k=f[g>>2]|0;if(j>>>0>=k>>>0){q=18;break}}if((q|0)==18){e=ne(a+16|0,f[a>>2]|0,k)|0;return e|0}else if((q|0)==19)return e|0;return 0}function Rc(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;if(!(d[c+38>>1]|0)){e=0;return e|0}g=a+12|0;if(!(bg(g,c)|0)){e=0;return e|0}h=f[g>>2]|0;i=a+4|0;j=f[i>>2]|0;k=f[a>>2]|0;l=j-k>>2;m=k;k=j;if(h>>>0<=l>>>0)if(h>>>0<l>>>0?(j=m+(h<<2)|0,(j|0)!=(k|0)):0){f[i>>2]=k+(~((k+-4-j|0)>>>2)<<2);n=h}else n=h;else{ef(a,h-l|0);n=f[g>>2]|0}if(!n){e=1;return e|0}l=c+8|0;h=c+16|0;j=0;k=n;a:while(1){n=l;i=f[n>>2]|0;m=f[n+4>>2]|0;n=h;o=f[n>>2]|0;p=f[n+4>>2]|0;if(!((m|0)>(p|0)|(m|0)==(p|0)&i>>>0>o>>>0)){e=0;q=19;break}n=f[c>>2]|0;r=b[n+o>>0]|0;s=Uj(o|0,p|0,1,0)|0;p=I;o=h;f[o>>2]=s;f[o+4>>2]=p;o=r&255;t=o&3;u=o>>>2;switch(r&3){case 3:{r=u+j|0;if(r>>>0>=k>>>0){e=0;q=19;break a}Uf((f[a>>2]|0)+(j<<2)|0,0,(o&252)+4|0)|0;v=r;break}case 0:{w=u;q=16;break}default:{r=u;u=0;o=p;p=s;while(1){if(!((m|0)>(o|0)|(m|0)==(o|0)&i>>>0>p>>>0)){e=0;q=19;break a}s=b[n+p>>0]|0;p=Uj(p|0,o|0,1,0)|0;o=I;x=h;f[x>>2]=p;f[x+4>>2]=o;x=(s&255)<<(u<<3|6)|r;u=u+1|0;if((u|0)>=(t|0)){w=x;q=16;break}else r=x}}}if((q|0)==16){q=0;f[(f[a>>2]|0)+(j<<2)>>2]=w;v=j}j=v+1|0;k=f[g>>2]|0;if(j>>>0>=k>>>0){q=18;break}}if((q|0)==18){e=pe(a+16|0,f[a>>2]|0,k)|0;return e|0}else if((q|0)==19)return e|0;return 0}function Sc(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;if(!(d[c+38>>1]|0)){e=0;return e|0}g=a+12|0;if(!(bg(g,c)|0)){e=0;return e|0}h=f[g>>2]|0;i=a+4|0;j=f[i>>2]|0;k=f[a>>2]|0;l=j-k>>2;m=k;k=j;if(h>>>0<=l>>>0)if(h>>>0<l>>>0?(j=m+(h<<2)|0,(j|0)!=(k|0)):0){f[i>>2]=k+(~((k+-4-j|0)>>>2)<<2);n=h}else n=h;else{ef(a,h-l|0);n=f[g>>2]|0}if(!n){e=1;return e|0}l=c+8|0;h=c+16|0;j=0;k=n;a:while(1){n=l;i=f[n>>2]|0;m=f[n+4>>2]|0;n=h;o=f[n>>2]|0;p=f[n+4>>2]|0;if(!((m|0)>(p|0)|(m|0)==(p|0)&i>>>0>o>>>0)){e=0;q=19;break}n=f[c>>2]|0;r=b[n+o>>0]|0;s=Uj(o|0,p|0,1,0)|0;p=I;o=h;f[o>>2]=s;f[o+4>>2]=p;o=r&255;t=o&3;u=o>>>2;switch(r&3){case 3:{r=u+j|0;if(r>>>0>=k>>>0){e=0;q=19;break a}Uf((f[a>>2]|0)+(j<<2)|0,0,(o&252)+4|0)|0;v=r;break}case 0:{w=u;q=16;break}default:{r=u;u=0;o=p;p=s;while(1){if(!((m|0)>(o|0)|(m|0)==(o|0)&i>>>0>p>>>0)){e=0;q=19;break a}s=b[n+p>>0]|0;p=Uj(p|0,o|0,1,0)|0;o=I;x=h;f[x>>2]=p;f[x+4>>2]=o;x=(s&255)<<(u<<3|6)|r;u=u+1|0;if((u|0)>=(t|0)){w=x;q=16;break}else r=x}}}if((q|0)==16){q=0;f[(f[a>>2]|0)+(j<<2)>>2]=w;v=j}j=v+1|0;k=f[g>>2]|0;if(j>>>0>=k>>>0){q=18;break}}if((q|0)==18){e=qe(a+16|0,f[a>>2]|0,k)|0;return e|0}else if((q|0)==19)return e|0;return 0}function Tc(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;if(!(d[c+38>>1]|0)){e=0;return e|0}g=a+12|0;if(!(bg(g,c)|0)){e=0;return e|0}h=f[g>>2]|0;i=a+4|0;j=f[i>>2]|0;k=f[a>>2]|0;l=j-k>>2;m=k;k=j;if(h>>>0<=l>>>0)if(h>>>0<l>>>0?(j=m+(h<<2)|0,(j|0)!=(k|0)):0){f[i>>2]=k+(~((k+-4-j|0)>>>2)<<2);n=h}else n=h;else{ef(a,h-l|0);n=f[g>>2]|0}if(!n){e=1;return e|0}l=c+8|0;h=c+16|0;j=0;k=n;a:while(1){n=l;i=f[n>>2]|0;m=f[n+4>>2]|0;n=h;o=f[n>>2]|0;p=f[n+4>>2]|0;if(!((m|0)>(p|0)|(m|0)==(p|0)&i>>>0>o>>>0)){e=0;q=19;break}n=f[c>>2]|0;r=b[n+o>>0]|0;s=Uj(o|0,p|0,1,0)|0;p=I;o=h;f[o>>2]=s;f[o+4>>2]=p;o=r&255;t=o&3;u=o>>>2;switch(r&3){case 3:{r=u+j|0;if(r>>>0>=k>>>0){e=0;q=19;break a}Uf((f[a>>2]|0)+(j<<2)|0,0,(o&252)+4|0)|0;v=r;break}case 0:{w=u;q=16;break}default:{r=u;u=0;o=p;p=s;while(1){if(!((m|0)>(o|0)|(m|0)==(o|0)&i>>>0>p>>>0)){e=0;q=19;break a}s=b[n+p>>0]|0;p=Uj(p|0,o|0,1,0)|0;o=I;x=h;f[x>>2]=p;f[x+4>>2]=o;x=(s&255)<<(u<<3|6)|r;u=u+1|0;if((u|0)>=(t|0)){w=x;q=16;break}else r=x}}}if((q|0)==16){q=0;f[(f[a>>2]|0)+(j<<2)>>2]=w;v=j}j=v+1|0;k=f[g>>2]|0;if(j>>>0>=k>>>0){q=18;break}}if((q|0)==18){e=se(a+16|0,f[a>>2]|0,k)|0;return e|0}else if((q|0)==19)return e|0;return 0}function Uc(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;if(!(d[c+38>>1]|0)){e=0;return e|0}g=a+12|0;if(!(bg(g,c)|0)){e=0;return e|0}h=f[g>>2]|0;i=a+4|0;j=f[i>>2]|0;k=f[a>>2]|0;l=j-k>>2;m=k;k=j;if(h>>>0<=l>>>0)if(h>>>0<l>>>0?(j=m+(h<<2)|0,(j|0)!=(k|0)):0){f[i>>2]=k+(~((k+-4-j|0)>>>2)<<2);n=h}else n=h;else{ef(a,h-l|0);n=f[g>>2]|0}if(!n){e=1;return e|0}l=c+8|0;h=c+16|0;j=0;k=n;a:while(1){n=l;i=f[n>>2]|0;m=f[n+4>>2]|0;n=h;o=f[n>>2]|0;p=f[n+4>>2]|0;if(!((m|0)>(p|0)|(m|0)==(p|0)&i>>>0>o>>>0)){e=0;q=19;break}n=f[c>>2]|0;r=b[n+o>>0]|0;s=Uj(o|0,p|0,1,0)|0;p=I;o=h;f[o>>2]=s;f[o+4>>2]=p;o=r&255;t=o&3;u=o>>>2;switch(r&3){case 3:{r=u+j|0;if(r>>>0>=k>>>0){e=0;q=19;break a}Uf((f[a>>2]|0)+(j<<2)|0,0,(o&252)+4|0)|0;v=r;break}case 0:{w=u;q=16;break}default:{r=u;u=0;o=p;p=s;while(1){if(!((m|0)>(o|0)|(m|0)==(o|0)&i>>>0>p>>>0)){e=0;q=19;break a}s=b[n+p>>0]|0;p=Uj(p|0,o|0,1,0)|0;o=I;x=h;f[x>>2]=p;f[x+4>>2]=o;x=(s&255)<<(u<<3|6)|r;u=u+1|0;if((u|0)>=(t|0)){w=x;q=16;break}else r=x}}}if((q|0)==16){q=0;f[(f[a>>2]|0)+(j<<2)>>2]=w;v=j}j=v+1|0;k=f[g>>2]|0;if(j>>>0>=k>>>0){q=18;break}}if((q|0)==18){e=te(a+16|0,f[a>>2]|0,k)|0;return e|0}else if((q|0)==19)return e|0;return 0}function Vc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d;if(!(Qb(a,c)|0)){g=0;u=d;return g|0}h=Na[f[(f[a>>2]|0)+24>>2]&127](a)|0;i=a+36|0;j=a+40|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0){if(h>>>0<m>>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){n=l;do{l=n+-4|0;f[j>>2]=l;o=f[l>>2]|0;f[l>>2]=0;if(o|0)Sa[f[(f[o>>2]|0)+4>>2]&127](o);n=f[j>>2]|0}while((n|0)!=(k|0))}}else Hd(i,h-m|0);m=c+8|0;if((h|0)<=0){g=1;u=d;return g|0}k=c+16|0;n=0;while(1){j=m;o=f[j+4>>2]|0;l=k;p=f[l>>2]|0;q=f[l+4>>2]|0;if(!((o|0)>(q|0)|((o|0)==(q|0)?(f[j>>2]|0)>>>0>p>>>0:0))){g=0;r=19;break}j=b[(f[c>>2]|0)+p>>0]|0;o=Uj(p|0,q|0,1,0)|0;q=k;f[q>>2]=o;f[q+4>>2]=I;Ua[f[(f[a>>2]|0)+48>>2]&15](e,a,j);j=(f[i>>2]|0)+(n<<2)|0;q=f[e>>2]|0;f[e>>2]=0;o=f[j>>2]|0;f[j>>2]=q;if(o|0)Sa[f[(f[o>>2]|0)+4>>2]&127](o);o=f[e>>2]|0;f[e>>2]=0;if(o|0)Sa[f[(f[o>>2]|0)+4>>2]&127](o);o=f[(f[i>>2]|0)+(n<<2)>>2]|0;if(!o){g=0;r=19;break}q=f[(f[o>>2]|0)+8>>2]|0;j=Na[f[(f[a>>2]|0)+28>>2]&127](a)|0;p=Oa[f[(f[a>>2]|0)+20>>2]&127](a,n)|0;n=n+1|0;if(!(Pa[q&31](o,j,p)|0)){g=0;r=19;break}if((n|0)>=(h|0)){g=1;r=19;break}}if((r|0)==19){u=d;return g|0}return 0}function Wc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0;d=u;u=u+16|0;e=d+12|0;g=d;h=dj(52)|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;n[h+16>>2]=$(1.0);i=h+20|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[h+36>>2]=$(1.0);f[h+40>>2]=0;f[h+44>>2]=0;f[h+48>>2]=0;Hm(e);if($d(e,f[c+32>>2]|0,h)|0){e=(f[c+4>>2]|0)+4|0;c=f[e>>2]|0;f[e>>2]=h;if(c|0){e=c+40|0;i=f[e>>2]|0;if(i|0){j=c+44|0;k=f[j>>2]|0;if((k|0)==(i|0))l=i;else{m=k;do{k=m+-4|0;f[j>>2]=k;o=f[k>>2]|0;f[k>>2]=0;if(o|0){Bf(o);gn(o)}m=f[j>>2]|0}while((m|0)!=(i|0));l=f[e>>2]|0}gn(l)}Bf(c);gn(c)}f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=d;return}else{f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;c=dj(32)|0;f[g>>2]=c;f[g+8>>2]=-2147483616;f[g+4>>2]=26;l=c;e=9870;i=l+26|0;do{b[l>>0]=b[e>>0]|0;l=l+1|0;e=e+1|0}while((l|0)<(i|0));b[c+26>>0]=0;f[a>>2]=-1;Qf(a+4|0,g);if((b[g+11>>0]|0)<0)gn(f[g>>2]|0);g=h+40|0;a=f[g>>2]|0;if(a|0){c=h+44|0;e=f[c>>2]|0;if((e|0)==(a|0))p=a;else{l=e;do{e=l+-4|0;f[c>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0){Bf(i);gn(i)}l=f[c>>2]|0}while((l|0)!=(a|0));p=f[g>>2]|0}gn(p)}Bf(h);gn(h);u=d;return}}function Xc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0.0;a:do if(b>>>0<=20)do switch(b|0){case 9:{d=(f[c>>2]|0)+(4-1)&~(4-1);e=f[d>>2]|0;f[c>>2]=d+4;f[a>>2]=e;break a;break}case 10:{e=(f[c>>2]|0)+(4-1)&~(4-1);d=f[e>>2]|0;f[c>>2]=e+4;e=a;f[e>>2]=d;f[e+4>>2]=((d|0)<0)<<31>>31;break a;break}case 11:{d=(f[c>>2]|0)+(4-1)&~(4-1);e=f[d>>2]|0;f[c>>2]=d+4;d=a;f[d>>2]=e;f[d+4>>2]=0;break a;break}case 12:{d=(f[c>>2]|0)+(8-1)&~(8-1);e=d;g=f[e>>2]|0;h=f[e+4>>2]|0;f[c>>2]=d+8;d=a;f[d>>2]=g;f[d+4>>2]=h;break a;break}case 13:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=(d&65535)<<16>>16;d=a;f[d>>2]=h;f[d+4>>2]=((h|0)<0)<<31>>31;break a;break}case 14:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=a;f[h>>2]=d&65535;f[h+4>>2]=0;break a;break}case 15:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=(d&255)<<24>>24;d=a;f[d>>2]=h;f[d+4>>2]=((h|0)<0)<<31>>31;break a;break}case 16:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=a;f[h>>2]=d&255;f[h+4>>2]=0;break a;break}case 17:{h=(f[c>>2]|0)+(8-1)&~(8-1);i=+p[h>>3];f[c>>2]=h+8;p[a>>3]=i;break a;break}case 18:{h=(f[c>>2]|0)+(8-1)&~(8-1);i=+p[h>>3];f[c>>2]=h+8;p[a>>3]=i;break a;break}default:break a}while(0);while(0);return}function Yc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+32|0;e=d+12|0;g=d;h=Ch(c,0)|0;if(!h){f[a>>2]=0;u=d;return}i=f[c+100>>2]|0;j=f[c+96>>2]|0;c=i-j|0;k=(c|0)/12|0;f[e>>2]=0;l=e+4|0;f[l>>2]=0;f[e+8>>2]=0;m=j;do if(c)if(k>>>0>357913941)xm(e);else{n=dj(c)|0;f[e>>2]=n;f[e+8>>2]=n+(k*12|0);Uf(n|0,0,c|0)|0;f[l>>2]=n+c;o=n;break}else o=0;while(0);f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;a:do if((i|0)!=(j|0)){c=g+4|0;n=g+8|0;if(b[h+84>>0]|0){p=0;while(1){q=m+(p*12|0)|0;f[g>>2]=f[q>>2];f[g+4>>2]=f[q+4>>2];f[g+8>>2]=f[q+8>>2];f[o+(p*12|0)>>2]=f[g>>2];f[o+(p*12|0)+4>>2]=f[c>>2];f[o+(p*12|0)+8>>2]=f[n>>2];p=p+1|0;if(p>>>0>=k>>>0)break a}}p=f[h+68>>2]|0;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]|0;if(o|0){l=f[m>>2]|0;if((l|0)!=(o|0))f[m>>2]=l+(~((l+-4-o|0)>>>2)<<2);gn(o)}f[h>>2]=2508;o=f[h+36>>2]|0;if(o|0)gn(o);o=f[h+24>>2]|0;if(!o){u=e;return}gn(o);u=e;return}function _c(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;if(!(f[a+64>>2]|0)){d=dj(32)|0;rj(d);e=a+64|0;g=f[e>>2]|0;f[e>>2]=d;if(!g)h=d;else{d=f[g>>2]|0;if(d|0){i=g+4|0;if((f[i>>2]|0)!=(d|0))f[i>>2]=d;gn(d)}gn(g);h=f[e>>2]|0}Vg(a,h,0,0,0,0);j=a}else j=a;if(!(Nf(j,c)|0))return;b[a+84>>0]=b[c+84>>0]|0;f[a+80>>2]=f[c+80>>2];if((a|0)!=(c|0))vd(a+68|0,f[c+68>>2]|0,f[c+72>>2]|0);j=f[c+88>>2]|0;if(!j){c=a+88|0;h=f[c>>2]|0;f[c>>2]=0;if(!h)return;c=f[h+8>>2]|0;if(c|0){e=h+12|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;gn(c)}gn(h);return}h=dj(40)|0;f[h>>2]=f[j>>2];c=h+8|0;e=j+8|0;f[c>>2]=0;g=h+12|0;f[g>>2]=0;d=h+16|0;f[d>>2]=0;i=j+12|0;k=(f[i>>2]|0)-(f[e>>2]|0)|0;if(k|0){if((k|0)<0)xm(c);l=dj(k)|0;f[g>>2]=l;f[c>>2]=l;f[d>>2]=l+k;k=f[e>>2]|0;e=(f[i>>2]|0)-k|0;if((e|0)>0){be(l|0,k|0,e|0)|0;f[g>>2]=l+e}}e=h+24|0;l=j+24|0;f[e>>2]=f[l>>2];f[e+4>>2]=f[l+4>>2];f[e+8>>2]=f[l+8>>2];f[e+12>>2]=f[l+12>>2];l=a+88|0;a=f[l>>2]|0;f[l>>2]=h;if(!a)return;h=f[a+8>>2]|0;if(h|0){l=a+12|0;if((f[l>>2]|0)!=(h|0))f[l>>2]=h;gn(h)}gn(a);return}function $c(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;e=u;u=u+32|0;g=e+20|0;h=e+16|0;i=e;j=c+24|0;k=b[j>>0]|0;l=k<<24>>24;m=f[a+80>>2]|0;a=X(m,l)|0;f[i>>2]=f[238];f[i+4>>2]=f[239];f[i+8>>2]=f[240];f[i+12>>2]=f[241];n=d+4|0;o=f[n>>2]|0;p=f[d>>2]|0;q=o-p>>2;r=p;p=o;if(a>>>0<=q>>>0){if(a>>>0<q>>>0?(o=r+(a<<2)|0,(o|0)!=(p|0)):0)f[n>>2]=p+(~((p+-4-o|0)>>>2)<<2)}else ef(d,a-q|0);if(!m){s=1;u=e;return s|0}q=c+84|0;a=c+68|0;if(k<<24>>24<=0){k=0;while(1){if(!(b[q>>0]|0))t=f[(f[a>>2]|0)+(k<<2)>>2]|0;else t=k;f[h>>2]=t;o=b[j>>0]|0;f[g>>2]=f[h>>2];if(!(bb(c,g,o,i)|0)){s=0;v=18;break}k=k+1|0;if(k>>>0>=m>>>0){s=1;v=18;break}}if((v|0)==18){u=e;return s|0}}else{w=0;x=0}while(1){if(!(b[q>>0]|0))y=f[(f[a>>2]|0)+(x<<2)>>2]|0;else y=x;f[h>>2]=y;k=b[j>>0]|0;f[g>>2]=f[h>>2];if(!(bb(c,g,k,i)|0)){s=0;v=18;break}k=f[d>>2]|0;t=0;o=w;while(1){f[k+(o<<2)>>2]=f[i+(t<<2)>>2];t=t+1|0;if((t|0)==(l|0))break;else o=o+1|0}x=x+1|0;if(x>>>0>=m>>>0){s=1;v=18;break}else w=w+l|0}if((v|0)==18){u=e;return s|0}return 0}function ad(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+64|0;e=d;g=e;i=g+52|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(i|0));do if(Uc(e,b)|0){g=(a|0)==0;if(!g?(f[e+12>>2]|0)==0:0){j=0;break}i=wd(e,b)|0;if(g|i^1)j=i;else{i=e+48|0;g=e+44|0;k=e+40|0;l=e+16|0;m=e+28|0;n=0;o=f[i>>2]|0;while(1){a:do if(o>>>0<16384){p=f[g>>2]|0;q=o;while(1){if((p|0)<=0){r=q;break a}s=f[k>>2]|0;p=p+-1|0;f[g>>2]=p;t=q<<8|(h[s+p>>0]|0);f[i>>2]=t;if(t>>>0>=16384){r=t;break}else q=t}}else r=o;while(0);q=r&4095;p=f[(f[l>>2]|0)+(q<<2)>>2]|0;t=f[m>>2]|0;o=(X(f[t+(p<<3)>>2]|0,r>>>12)|0)+q-(f[t+(p<<3)+4>>2]|0)|0;f[i>>2]=o;f[c+(n<<2)>>2]=p;n=n+1|0;if((n|0)==(a|0)){j=1;break}}}}else j=0;while(0);a=f[e+28>>2]|0;if(a|0){c=e+32|0;r=f[c>>2]|0;if((r|0)!=(a|0))f[c>>2]=r+(~((r+-8-a|0)>>>3)<<3);gn(a)}a=f[e+16>>2]|0;if(a|0){r=e+20|0;c=f[r>>2]|0;if((c|0)!=(a|0))f[r>>2]=c+(~((c+-4-a|0)>>>2)<<2);gn(a)}a=f[e>>2]|0;if(!a){u=d;return j|0}c=e+4|0;e=f[c>>2]|0;if((e|0)!=(a|0))f[c>>2]=e+(~((e+-4-a|0)>>>2)<<2);gn(a);u=d;return j|0}function bd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=f[c>>2]|0;c=f[d>>2]|0;e=f[a+4>>2]|0;g=f[d+4>>2]|0;h=e+-1|0;i=(h&e|0)==0;if(!i)if(g>>>0<e>>>0)j=g;else j=(g>>>0)%(e>>>0)|0;else j=h&g;g=(f[a>>2]|0)+(j<<2)|0;k=f[g>>2]|0;while(1){l=f[k>>2]|0;if((l|0)==(d|0))break;else k=l}if((k|0)!=(a+8|0)){l=f[k+4>>2]|0;if(!i)if(l>>>0<e>>>0)m=l;else m=(l>>>0)%(e>>>0)|0;else m=l&h;if((m|0)==(j|0)){n=c;o=21}else o=13}else o=13;do if((o|0)==13){if(c|0){m=f[c+4>>2]|0;if(!i)if(m>>>0<e>>>0)p=m;else p=(m>>>0)%(e>>>0)|0;else p=m&h;if((p|0)==(j|0)){q=c;r=c;o=22;break}}f[g>>2]=0;n=f[d>>2]|0;o=21}while(0);if((o|0)==21){g=n;if(!n)s=g;else{q=n;r=g;o=22}}if((o|0)==22){o=f[q+4>>2]|0;if(!i)if(o>>>0<e>>>0)t=o;else t=(o>>>0)%(e>>>0)|0;else t=o&h;if((t|0)==(j|0))s=r;else{f[(f[a>>2]|0)+(t<<2)>>2]=k;s=f[d>>2]|0}}f[k>>2]=s;f[d>>2]=0;s=a+12|0;f[s>>2]=(f[s>>2]|0)+-1;if(!d)return c|0;s=d+8|0;a=f[d+20>>2]|0;if(a|0){k=d+24|0;if((f[k>>2]|0)!=(a|0))f[k>>2]=a;gn(a)}if((b[s+11>>0]|0)<0)gn(f[s>>2]|0);gn(d);return c|0}function cd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=f[a+12>>2]|0;e=a+108|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0<m>>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{we(i,h-m|0,2452);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+112|0;a=c+68|0;c=f[o+96>>2]|0;o=0;while(1){h=o*3|0;if((h|0)==-1){q=0;r=12;break}i=f[d>>2]|0;g=f[i+(h<<2)>>2]|0;if((g|0)==-1){q=0;r=12;break}k=f[(f[m>>2]|0)+12>>2]|0;l=f[k+(g<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}g=f[a>>2]|0;f[g+(f[c+(o*12|0)>>2]<<2)>>2]=l;l=h+1|0;if((l|0)==-1){q=0;r=12;break}j=f[i+(l<<2)>>2]|0;if((j|0)==-1){q=0;r=12;break}l=f[k+(j<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+4>>2]<<2)>>2]=l;l=h+2|0;if((l|0)==-1){q=0;r=12;break}h=f[i+(l<<2)>>2]|0;if((h|0)==-1){q=0;r=12;break}l=f[k+(h<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+8>>2]<<2)>>2]=l;o=o+1|0;if(o>>>0>=e>>>0){q=1;r=12;break}}if((r|0)==12)return q|0;return 0}function dd(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;Dg(f[a+4>>2]|0,(f[h+28>>2]|0)-(f[h+24>>2]|0)>>2);h=a+96|0;i=f[g>>2]|0;j=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;f[c>>2]=0;i=a+100|0;k=f[i>>2]|0;l=f[h>>2]|0;m=k-l>>2;n=l;l=k;if(j>>>0<=m>>>0){if(j>>>0<m>>>0?(k=n+(j<<2)|0,(k|0)!=(l|0)):0)f[i>>2]=l+(~((l+-4-k|0)>>>2)<<2)}else we(h,j-m|0,c);m=a+116|0;a=f[m>>2]|0;if(!a){j=f[g>>2]|0;g=(f[j+4>>2]|0)-(f[j>>2]|0)>>2;j=(g>>>0)/3|0;if(g>>>0<=2){o=1;u=b;return o|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(lb(e,c)|0)){o=0;p=15;break}if((g|0)>=(j|0)){o=1;p=15;break}}if((p|0)==15){u=b;return o|0}}else{j=f[a>>2]|0;if((f[a+4>>2]|0)==(j|0)){o=1;u=b;return o|0}a=0;g=j;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(lb(e,c)|0)){o=0;p=15;break}j=f[m>>2]|0;g=f[j>>2]|0;if(a>>>0>=(f[j+4>>2]|0)-g>>2>>>0){o=1;p=15;break}}if((p|0)==15){u=b;return o|0}}return 0}function ed(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=f[a+12>>2]|0;e=a+68|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0<m>>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{we(i,h-m|0,2452);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+72|0;a=c+68|0;c=f[o+96>>2]|0;o=0;while(1){h=o*3|0;if((h|0)==-1){q=0;r=12;break}i=f[d>>2]|0;g=f[i+(h<<2)>>2]|0;if((g|0)==-1){q=0;r=12;break}k=f[(f[m>>2]|0)+12>>2]|0;l=f[k+(g<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}g=f[a>>2]|0;f[g+(f[c+(o*12|0)>>2]<<2)>>2]=l;l=h+1|0;if((l|0)==-1){q=0;r=12;break}j=f[i+(l<<2)>>2]|0;if((j|0)==-1){q=0;r=12;break}l=f[k+(j<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+4>>2]<<2)>>2]=l;l=h+2|0;if((l|0)==-1){q=0;r=12;break}h=f[i+(l<<2)>>2]|0;if((h|0)==-1){q=0;r=12;break}l=f[k+(h<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+8>>2]<<2)>>2]=l;o=o+1|0;if(o>>>0>=e>>>0){q=1;r=12;break}}if((r|0)==12)return q|0;return 0}function fd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=u;u=u+32|0;d=c+12|0;e=c;g=b*3|0;f[d>>2]=0;h=d+4|0;f[h>>2]=0;f[d+8>>2]=0;do if(g)if(g>>>0>1073741823)xm(d);else{i=b*12|0;j=dj(i)|0;f[d>>2]=j;k=j+(g<<2)|0;f[d+8>>2]=k;Uf(j|0,0,i|0)|0;f[h>>2]=k;l=j;break}else l=0;while(0);if(Pf(g,1,f[a+32>>2]|0,l)|0)if(!b)m=1;else{l=a+44|0;a=e+4|0;g=e+8|0;j=0;k=0;i=0;while(1){f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;n=f[d>>2]|0;o=f[n+(k<<2)>>2]|0;p=o>>>1;q=((o&1|0)==0?p:0-p|0)+i|0;f[e>>2]=q;p=f[n+(k+1<<2)>>2]|0;o=p>>>1;r=((p&1|0)==0?o:0-o|0)+q|0;f[a>>2]=r;q=f[n+(k+2<<2)>>2]|0;n=q>>>1;i=((q&1|0)==0?n:0-n|0)+r|0;f[g>>2]=i;r=f[l>>2]|0;n=r+100|0;q=f[n>>2]|0;if((q|0)==(f[r+104>>2]|0))bf(r+96|0,e);else{f[q>>2]=f[e>>2];f[q+4>>2]=f[e+4>>2];f[q+8>>2]=f[e+8>>2];f[n>>2]=(f[n>>2]|0)+12}j=j+1|0;if(j>>>0>=b>>>0){m=1;break}else k=k+3|0}}else m=0;k=f[d>>2]|0;if(!k){u=c;return m|0}d=f[h>>2]|0;if((d|0)!=(k|0))f[h>>2]=d+(~((d+-4-k|0)>>>2)<<2);gn(k);u=c;return m|0}function gd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=a+4|0;d=b+4|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];f[c+16>>2]=f[d+16>>2];d=a+24|0;c=b+24|0;if((a|0)==(b|0))return a|0;e=b+28|0;g=f[e>>2]|0;if(!g)h=0;else{i=a+32|0;do if(g>>>0>f[i>>2]<<5>>>0){j=f[d>>2]|0;if(!j)k=g;else{gn(j);f[d>>2]=0;f[i>>2]=0;f[a+28>>2]=0;k=f[e>>2]|0}if((k|0)<0)xm(d);else{j=((k+-1|0)>>>5)+1|0;l=dj(j<<2)|0;f[d>>2]=l;f[a+28>>2]=0;f[i>>2]=j;m=f[e>>2]|0;n=l;break}}else{m=g;n=f[d>>2]|0}while(0);qi(n|0,f[c>>2]|0,((m+-1|0)>>>5<<2)+4|0)|0;h=f[e>>2]|0}f[a+28>>2]=h;h=a+36|0;e=b+36|0;m=b+40|0;b=f[m>>2]|0;if(!b)o=0;else{c=a+44|0;do if(b>>>0>f[c>>2]<<5>>>0){n=f[h>>2]|0;if(!n)p=b;else{gn(n);f[h>>2]=0;f[c>>2]=0;f[a+40>>2]=0;p=f[m>>2]|0}if((p|0)<0)xm(h);else{n=((p+-1|0)>>>5)+1|0;d=dj(n<<2)|0;f[h>>2]=d;f[a+40>>2]=0;f[c>>2]=n;q=f[m>>2]|0;r=d;break}}else{q=b;r=f[h>>2]|0}while(0);qi(r|0,f[e>>2]|0,((q+-1|0)>>>5<<2)+4|0)|0;o=f[m>>2]|0}f[a+40>>2]=o;return a|0}function hd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;c=u;u=u+32|0;d=c;e=a+8|0;g=f[e>>2]|0;h=a+4|0;i=f[h>>2]|0;j=i;if(g-i>>2>>>0>=b>>>0){Uf(i|0,0,b<<2|0)|0;f[h>>2]=i+(b<<2);u=c;return}k=f[a>>2]|0;l=i-k>>2;m=l+b|0;n=k;if(m>>>0>1073741823)xm(a);o=g-k|0;p=o>>1;q=o>>2>>>0<536870911?(p>>>0<m>>>0?m:p):1073741823;f[d+12>>2]=0;f[d+16>>2]=a+8;do if(q)if(q>>>0>1073741823){p=ra(8)|0;al(p,10109);f[p>>2]=3812;va(p|0,904,84)}else{r=dj(q<<2)|0;break}else r=0;while(0);f[d>>2]=r;p=r+(l<<2)|0;l=d+8|0;m=d+4|0;f[m>>2]=p;o=r+(q<<2)|0;q=d+12|0;f[q>>2]=o;r=p+(b<<2)|0;Uf(p|0,0,b<<2|0)|0;f[l>>2]=r;if((j|0)==(n|0)){s=p;t=q;v=l;w=k;x=r;y=i;z=o;A=g}else{g=j;j=p;do{g=g+-4|0;p=f[g>>2]|0;f[g>>2]=0;f[j+-4>>2]=p;j=(f[m>>2]|0)+-4|0;f[m>>2]=j}while((g|0)!=(n|0));s=j;t=q;v=l;w=f[a>>2]|0;x=f[l>>2]|0;y=f[h>>2]|0;z=f[q>>2]|0;A=f[e>>2]|0}f[a>>2]=s;f[m>>2]=w;f[h>>2]=x;f[v>>2]=y;f[e>>2]=z;f[t>>2]=A;f[d>>2]=w;Qe(d);u=c;return}function id(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=b[(f[a+8>>2]|0)+24>>0]|0;d=dn(c>>>0>1073741823?-1:c<<2)|0;e=a+28|0;g=f[e>>2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f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0<m>>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{we(i,h-m|0,2452);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+72|0;a=c+68|0;c=f[o+96>>2]|0;o=f[d+28>>2]|0;d=0;while(1){h=d*3|0;i=f[o+(h<<2)>>2]|0;if((i|0)==-1){q=0;r=11;break}g=f[(f[m>>2]|0)+12>>2]|0;k=f[g+(i<<2)>>2]|0;if(k>>>0>=p>>>0){q=0;r=11;break}i=f[a>>2]|0;f[i+(f[c+(d*12|0)>>2]<<2)>>2]=k;k=f[o+(h+1<<2)>>2]|0;if((k|0)==-1){q=0;r=11;break}l=f[g+(k<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=11;break}f[i+(f[c+(d*12|0)+4>>2]<<2)>>2]=l;l=f[o+(h+2<<2)>>2]|0;if((l|0)==-1){q=0;r=11;break}h=f[g+(l<<2)>>2]|0;if(h>>>0>=p>>>0){q=0;r=11;break}f[i+(f[c+(d*12|0)+8>>2]<<2)>>2]=h;d=d+1|0;if(d>>>0>=e>>>0){q=1;r=11;break}}if((r|0)==11)return q|0;return 0}function kd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(((d-g|0)/12|0)>>>0>=b>>>0){Uf(g|0,0,b*12|0)|0;f[e>>2]=h+(b*12|0);return}i=f[a>>2]|0;j=(g-i|0)/12|0;g=j+b|0;k=i;if(g>>>0>357913941)xm(a);l=(d-i|0)/12|0;d=l<<1;m=l>>>0<178956970?(d>>>0<g>>>0?g:d):357913941;do if(m)if(m>>>0>357913941){d=ra(8)|0;al(d,10109);f[d>>2]=3812;va(d|0,904,84)}else{n=dj(m*12|0)|0;break}else n=0;while(0);d=n+(j*12|0)|0;j=d;g=n+(m*12|0)|0;Uf(d|0,0,b*12|0)|0;m=d+(b*12|0)|0;if((h|0)==(k|0)){o=j;p=i;q=h}else{i=h;h=j;j=d;do{d=j+-12|0;b=i;i=i+-12|0;f[d>>2]=0;n=j+-8|0;f[n>>2]=0;f[j+-4>>2]=0;f[d>>2]=f[i>>2];d=b+-8|0;f[n>>2]=f[d>>2];n=b+-4|0;f[j+-4>>2]=f[n>>2];f[n>>2]=0;f[d>>2]=0;f[i>>2]=0;j=h+-12|0;h=j}while((i|0)!=(k|0));o=h;p=f[a>>2]|0;q=f[e>>2]|0}f[a>>2]=o;f[e>>2]=m;f[c>>2]=g;g=p;if((q|0)!=(g|0)){c=q;do{q=c;c=c+-12|0;m=f[c>>2]|0;if(m|0){e=q+-8|0;q=f[e>>2]|0;if((q|0)!=(m|0))f[e>>2]=q+(~((q+-4-m|0)>>>2)<<2);gn(m)}}while((c|0)!=(g|0))}if(!p)return;gn(p);return}function ld(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=u;u=u+80|0;h=g;i=g+60|0;j=g+40|0;k=h;l=d;m=k+40|0;do{f[k>>2]=f[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(m|0));Gb(a,h,i);if(f[a>>2]|0){u=g;return}h=a+4|0;n=h+11|0;if((b[n>>0]|0)<0)gn(f[h>>2]|0);if((b[i+7>>0]|0)!=1){f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;o=dj(32)|0;f[j>>2]=o;f[j+8>>2]=-2147483616;f[j+4>>2]=20;k=o;l=8495;m=k+20|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[o+20>>0]=0;f[a>>2]=-1;Qf(h,j);if((b[j+11>>0]|0)<0)gn(f[j>>2]|0);u=g;return}Je(j,b[i+8>>0]|0);i=f[j>>2]|0;if(!i){o=j+16|0;l=f[o>>2]|0;f[o>>2]=0;mi(a,l,c,d,e);if(!(f[a>>2]|0)){if((b[n>>0]|0)<0)gn(f[h>>2]|0);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}if(l|0)Sa[f[(f[l>>2]|0)+4>>2]&127](l)}else{f[a>>2]=i;Qf(h,j+4|0)}h=j+16|0;i=f[h>>2]|0;f[h>>2]=0;if(i|0)Sa[f[(f[i>>2]|0)+4>>2]&127](i);i=j+4|0;if((b[i+11>>0]|0)<0)gn(f[i>>2]|0);u=g;return}function md(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=u;u=u+112|0;g=e+100|0;h=e;i=f[(f[c+4>>2]|0)+44>>2]|0;j=dj(120)|0;f[j+4>>2]=0;f[j>>2]=2528;k=j+8|0;l=j+12|0;m=l+44|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[k>>2]=2552;l=j+56|0;m=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[j+96>>2]=0;f[j+100>>2]=0;f[j+104>>2]=0;f[j+108>>2]=i;f[j+112>>2]=d;f[j+116>>2]=0;k=j;n=f[c+8>>2]|0;c=h+4|0;l=c+4|0;m=l+40|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[h>>2]=2552;l=h+48|0;m=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[h+88>>2]=0;f[h+92>>2]=0;f[h+96>>2]=0;l=n;f[c>>2]=l;m=((f[l+4>>2]|0)-(f[n>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;ge(h+24|0,m,g);m=f[c>>2]|0;c=(f[m+28>>2]|0)-(f[m+24>>2]|0)>>2;b[g>>0]=0;ge(h+36|0,c,g);f[h+8>>2]=n;f[h+12>>2]=d;f[h+16>>2]=i;f[h+20>>2]=j;re(j,h);f[a>>2]=k;xf(h);u=e;return}function nd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b;e=c-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;if(e>>>0<=h-i>>2>>>0){k=a+4|0;l=(f[k>>2]|0)-i>>2;m=e>>>0>l>>>0;n=b+(l<<2)|0;l=m?n:c;o=l;p=o-d|0;q=p>>2;if(q|0)qi(i|0,b|0,p|0)|0;p=j+(q<<2)|0;if(!m){m=f[k>>2]|0;if((m|0)==(p|0))return;f[k>>2]=m+(~((m+-4-p|0)>>>2)<<2);return}if((l|0)==(c|0))return;l=f[k>>2]|0;p=((c+-4-o|0)>>>2)+1|0;o=n;n=l;while(1){f[n>>2]=f[o>>2];o=o+4|0;if((o|0)==(c|0))break;else n=n+4|0}f[k>>2]=l+(p<<2);return}p=i;if(!i)r=h;else{h=a+4|0;l=f[h>>2]|0;if((l|0)!=(j|0))f[h>>2]=l+(~((l+-4-i|0)>>>2)<<2);gn(p);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;r=0}if(e>>>0>1073741823)xm(a);h=r>>1;p=r>>2>>>0<536870911?(h>>>0<e>>>0?e:h):1073741823;if(p>>>0>1073741823)xm(a);h=dj(p<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(p<<2);if((b|0)==(c|0))return;p=((c+-4-d|0)>>>2)+1|0;d=b;b=h;while(1){f[b>>2]=f[d>>2];d=d+4|0;if((d|0)==(c|0))break;else b=b+4|0}f[e>>2]=h+(p<<2);return}function od(a,b,c){a=a|0;b=b|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=b;g=c-e|0;h=g>>1;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0<=j-k>>1>>>0){m=a+4|0;n=(f[m>>2]|0)-k>>1;o=h>>>0>n>>>0;p=b+(n<<1)|0;n=o?p:c;q=n;r=q-e|0;s=r>>1;if(s|0)qi(k|0,b|0,r|0)|0;r=l+(s<<1)|0;if(!o){o=f[m>>2]|0;if((o|0)==(r|0))return;f[m>>2]=o+(~((o+-2-r|0)>>>1)<<1);return}if((n|0)==(c|0))return;n=f[m>>2]|0;r=c+-2-q|0;q=p;p=n;while(1){d[p>>1]=d[q>>1]|0;q=q+2|0;if((q|0)==(c|0))break;else p=p+2|0}f[m>>2]=n+((r>>>1)+1<<1);return}r=k;if(!k)t=j;else{j=a+4|0;n=f[j>>2]|0;if((n|0)!=(l|0))f[j>>2]=n+(~((n+-2-k|0)>>>1)<<1);gn(r);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;t=0}if((g|0)<0)xm(a);g=t>>1>>>0<1073741823?(t>>>0<h>>>0?h:t):2147483647;if((g|0)<0)xm(a);t=dj(g<<1)|0;h=a+4|0;f[h>>2]=t;f[a>>2]=t;f[i>>2]=t+(g<<1);if((b|0)==(c|0))return;g=c+-2-e|0;e=b;b=t;while(1){d[b>>1]=d[e>>1]|0;e=e+2|0;if((e|0)==(c|0))break;else b=b+2|0}f[h>>2]=t+((g>>>1)+1<<1);return}function pd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b;e=c-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;if(e>>>0<=h-i>>2>>>0){k=a+4|0;l=(f[k>>2]|0)-i>>2;m=e>>>0>l>>>0;n=b+(l<<2)|0;l=m?n:c;o=l;p=o-d|0;q=p>>2;if(q|0)qi(i|0,b|0,p|0)|0;p=j+(q<<2)|0;if(!m){m=f[k>>2]|0;if((m|0)==(p|0))return;f[k>>2]=m+(~((m+-4-p|0)>>>2)<<2);return}if((l|0)==(c|0))return;l=f[k>>2]|0;p=c+-4-o|0;o=n;n=l;while(1){f[n>>2]=f[o>>2];o=o+4|0;if((o|0)==(c|0))break;else n=n+4|0}f[k>>2]=l+((p>>>2)+1<<2);return}p=i;if(!i)r=h;else{h=a+4|0;l=f[h>>2]|0;if((l|0)!=(j|0))f[h>>2]=l+(~((l+-4-i|0)>>>2)<<2);gn(p);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;r=0}if(e>>>0>1073741823)xm(a);h=r>>1;p=r>>2>>>0<536870911?(h>>>0<e>>>0?e:h):1073741823;if(p>>>0>1073741823)xm(a);h=dj(p<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(p<<2);if((b|0)==(c|0))return;p=c+-4-d|0;d=b;b=h;while(1){f[b>>2]=f[d>>2];d=d+4|0;if((d|0)==(c|0))break;else b=b+4|0}f[e>>2]=h+((p>>>2)+1<<2);return}function qd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+8|0;e=f[d>>2]|0;g=f[a>>2]|0;h=g;do if(e-g>>2>>>0>=b>>>0){i=a+4|0;j=f[i>>2]|0;k=j-g>>2;l=k>>>0<b>>>0;m=l?k:b;n=j;if(m|0){j=m;m=h;while(1){f[m>>2]=f[c>>2];j=j+-1|0;if(!j)break;else m=m+4|0}}if(!l){m=h+(b<<2)|0;if((m|0)==(n|0))return;else{o=i;p=n+(~((n+-4-m|0)>>>2)<<2)|0;break}}else{m=b-k|0;j=m;q=n;while(1){f[q>>2]=f[c>>2];j=j+-1|0;if(!j)break;else q=q+4|0}o=i;p=n+(m<<2)|0;break}}else{q=g;if(!g)r=e;else{j=a+4|0;k=f[j>>2]|0;if((k|0)!=(h|0))f[j>>2]=k+(~((k+-4-g|0)>>>2)<<2);gn(q);f[d>>2]=0;f[j>>2]=0;f[a>>2]=0;r=0}if(b>>>0>1073741823)xm(a);j=r>>1;q=r>>2>>>0<536870911?(j>>>0<b>>>0?b:j):1073741823;if(q>>>0>1073741823)xm(a);j=dj(q<<2)|0;k=a+4|0;f[k>>2]=j;f[a>>2]=j;f[d>>2]=j+(q<<2);q=b;l=j;while(1){f[l>>2]=f[c>>2];q=q+-1|0;if(!q)break;else l=l+4|0}o=k;p=j+(b<<2)|0}while(0);f[o>>2]=p;return}function rd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d;g=c+8|0;i=g;j=f[i+4>>2]|0;k=c+16|0;l=k;m=f[l>>2]|0;n=f[l+4>>2]|0;if(!((j|0)>(n|0)|((j|0)==(n|0)?(f[i>>2]|0)>>>0>m>>>0:0))){o=0;u=d;return o|0}b[a+12>>0]=b[(f[c>>2]|0)+m>>0]|0;m=k;i=Uj(f[m>>2]|0,f[m+4>>2]|0,1,0)|0;m=k;f[m>>2]=i;f[m+4>>2]=I;a:do if((bg(e,c)|0?(m=f[e>>2]|0,i=g,n=k,j=f[n>>2]|0,l=f[n+4>>2]|0,n=Wj(f[i>>2]|0,f[i+4>>2]|0,j|0,l|0)|0,i=I,!((i|0)<0|(i|0)==0&n>>>0<m>>>0)):0)?(n=(f[c>>2]|0)+j|0,(m|0)>=1):0){f[a>>2]=n;i=m+-1|0;p=n+i|0;switch((h[p>>0]|0)>>>6&3){case 0:{f[a+4>>2]=i;q=b[p>>0]&63;break}case 1:{if((m|0)<2){r=0;break a}f[a+4>>2]=m+-2;p=n+m+-2|0;q=(h[p+1>>0]|0)<<8&16128|(h[p>>0]|0);break}case 2:{if((m|0)<3){r=0;break a}f[a+4>>2]=m+-3;p=n+m+-3|0;q=(h[p+1>>0]|0)<<8|(h[p>>0]|0)|(h[p+2>>0]|0)<<16&4128768;break}default:{r=0;break a}}p=q+4096|0;f[a+8>>2]=p;if(p>>>0<1048576){p=Uj(j|0,l|0,m|0,0)|0;m=k;f[m>>2]=p;f[m+4>>2]=I;r=1}else r=0}else r=0;while(0);o=r;u=d;return o|0}function sd(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=u;u=u+32|0;i=h+16|0;j=h;k=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;do if((c+-1|0)>>>0<6&(Na[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1){l=Na[f[(f[b>>2]|0)+36>>2]&127](b)|0;m=Oa[f[(f[b>>2]|0)+44>>2]&127](b,d)|0;if((l|0)==0|(m|0)==0){f[a>>2]=0;u=h;return}n=Oa[f[(f[b>>2]|0)+40>>2]&127](b,d)|0;if(!n){f[j>>2]=f[b+44>>2];f[j+4>>2]=l;f[j+12>>2]=m;f[j+8>>2]=m+12;hc(a,i,c,k,e,j,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}else{f[j>>2]=f[b+44>>2];f[j+4>>2]=n;f[j+12>>2]=m;f[j+8>>2]=m+12;gc(a,i,c,k,e,j,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}}while(0);f[a>>2]=0;u=h;return}function td(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;c=u;u=u+16|0;d=c;e=a+76|0;g=f[e>>2]|0;h=a+80|0;i=f[h>>2]|0;if((i|0)!=(g|0))f[h>>2]=i+(~((i+-4-g|0)>>>2)<<2);f[e>>2]=0;f[h>>2]=0;f[a+84>>2]=0;if(g|0)gn(g);g=a+64|0;h=f[g>>2]|0;e=a+68|0;if((f[e>>2]|0)!=(h|0))f[e>>2]=h;f[g>>2]=0;f[e>>2]=0;f[a+72>>2]=0;if(h|0)gn(h);h=b+4|0;e=f[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>>16;b[l+3>>0]=m>>24;j=j+1|0;k=f[i>>2]|0}while(j>>>0<(f[c>>2]|0)-k>>2>>>0)}k=a+20|0;a=f[e>>2]|0;c=(f[g>>2]|0)-a|0;if(c>>>0<4294967292){Xg(e,c+4|0,0);o=f[e>>2]|0;p=o+c|0;q=h[k>>0]|h[k+1>>0]<<8|h[k+2>>0]<<16|h[k+3>>0]<<24;b[p>>0]=q;b[p+1>>0]=q>>8;b[p+2>>0]=q>>16;b[p+3>>0]=q>>24;return}else{o=a;p=o+c|0;q=h[k>>0]|h[k+1>>0]<<8|h[k+2>>0]<<16|h[k+3>>0]<<24;b[p>>0]=q;b[p+1>>0]=q>>8;b[p+2>>0]=q>>16;b[p+3>>0]=q>>24;return}}function vd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=c;e=b;g=d-e|0;h=g>>2;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0>j-k>>2>>>0){m=k;if(!k)n=j;else{j=a+4|0;o=f[j>>2]|0;if((o|0)!=(l|0))f[j>>2]=o+(~((o+-4-k|0)>>>2)<<2);gn(m);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;n=0}if(h>>>0>1073741823)xm(a);j=n>>1;m=n>>2>>>0<536870911?(j>>>0<h>>>0?h:j):1073741823;if(m>>>0>1073741823)xm(a);j=dj(m<<2)|0;n=a+4|0;f[n>>2]=j;f[a>>2]=j;f[i>>2]=j+(m<<2);if((g|0)<=0)return;be(j|0,b|0,g|0)|0;f[n>>2]=j+(g>>>2<<2);return}g=a+4|0;a=f[g>>2]|0;j=a-k>>2;k=h>>>0>j>>>0;h=k?b+(j<<2)|0:c;c=a;j=a;if((h|0)==(b|0))p=l;else{a=h+-4-e|0;e=b;b=l;while(1){f[b>>2]=f[e>>2];e=e+4|0;if((e|0)==(h|0))break;else b=b+4|0}p=l+((a>>>2)+1<<2)|0}if(k){k=d-h|0;if((k|0)<=0)return;be(j|0,h|0,k|0)|0;f[g>>2]=(f[g>>2]|0)+(k>>>2<<2);return}else{if((p|0)==(c|0))return;f[g>>2]=c+(~((c+-4-p|0)>>>2)<<2);return}}function wd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+16|0;e=d;if(!(Ef(e,c)|0)){g=0;u=d;return g|0}i=e;e=f[i>>2]|0;j=f[i+4>>2]|0;i=c+8|0;k=c+16|0;l=k;m=f[l>>2]|0;n=f[l+4>>2]|0;l=Wj(f[i>>2]|0,f[i+4>>2]|0,m|0,n|0)|0;i=I;if(j>>>0>i>>>0|(j|0)==(i|0)&e>>>0>l>>>0){g=0;u=d;return g|0}l=(f[c>>2]|0)+m|0;c=Uj(m|0,n|0,e|0,j|0)|0;j=k;f[j>>2]=c;f[j+4>>2]=I;if((e|0)<1){g=0;u=d;return g|0}f[a+40>>2]=l;j=e+-1|0;c=l+j|0;a:do switch((h[c>>0]|0)>>>6&3){case 0:{f[a+44>>2]=j;o=b[c>>0]&63;break}case 1:{if((e|0)<2){g=0;u=d;return g|0}else{f[a+44>>2]=e+-2;k=l+e+-2|0;o=(h[k+1>>0]|0)<<8&16128|(h[k>>0]|0);break a}break}case 2:{if((e|0)<3){g=0;u=d;return g|0}else{f[a+44>>2]=e+-3;k=l+e+-3|0;o=(h[k+1>>0]|0)<<8|(h[k>>0]|0)|(h[k+2>>0]|0)<<16&4128768;break a}break}case 3:{f[a+44>>2]=e+-4;k=l+e+-4|0;o=(h[k+2>>0]|0)<<16|(h[k+3>>0]|0)<<24&1056964608|(h[k+1>>0]|0)<<8|(h[k>>0]|0);break}default:{}}while(0);e=o+16384|0;f[a+48>>2]=e;g=e>>>0<4194304;u=d;return g|0}function xd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=u;u=u+112|0;d=c+96|0;e=c+16|0;g=c+4|0;h=c;i=e+76|0;j=e;k=j+76|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));f[i>>2]=-1;f[g>>2]=0;i=g+4|0;f[i>>2]=0;f[g+8>>2]=0;f[h>>2]=g;f[d>>2]=f[h>>2];if(nc(e,a,d)|0){d=f[g>>2]|0;pd(b,d,d+((f[i>>2]|0)-d>>2<<2)|0);l=f[e+68>>2]|0}else l=0;d=f[g>>2]|0;if(d|0){g=f[i>>2]|0;if((g|0)!=(d|0))f[i>>2]=g+(~((g+-4-d|0)>>>2)<<2);gn(d)}d=f[e+56>>2]|0;if(d|0)gn(d);d=f[e+32>>2]|0;if(d|0){g=e+36|0;i=f[g>>2]|0;if((i|0)!=(d|0))f[g>>2]=i+(~((i+-4-d|0)>>>2)<<2);gn(d)}d=f[e+20>>2]|0;if(d|0){i=e+24|0;g=f[i>>2]|0;if((g|0)!=(d|0))f[i>>2]=g+(~((g+-4-d|0)>>>2)<<2);gn(d)}d=f[e+8>>2]|0;if(d|0){g=e+12|0;i=f[g>>2]|0;if((i|0)!=(d|0))f[g>>2]=i+(~((i+-4-d|0)>>>2)<<2);gn(d)}d=e+4|0;e=f[d>>2]|0;f[d>>2]=0;if(!e){u=c;return l|0}mf(e);gn(e);u=c;return l|0}function yd(a,b,c,d){a=a|0;b=$(b);c=$(c);d=d|0;var e=La,f=La,g=La,h=La,i=La,j=La,k=0.0,l=La,m=La,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=La,u=La,v=0,w=0;e=$(b+c);f=$(b-c);if(!(f<=$(.5))|(!(f>=$(-.5))|(!(e>=$(.5))|!(e<=$(1.5))))){do if(!(e<=$(.5))){if(e>=$(1.5)){g=$($(1.5)-c);h=$($(1.5)-b);break}if(!(f<=$(-.5))){g=$(c+$(.5));h=$(b+$(-.5));break}else{g=$(c+$(-.5));h=$(b+$(.5));break}}else{g=$($(.5)-c);h=$($(.5)-b)}while(0);i=$(h+g);j=$(g-h);k=-1.0;l=g;m=h}else{i=e;j=f;k=1.0;l=b;m=c}c=$(+l*2.0+-1.0);l=$(+m*2.0+-1.0);o=+i*2.0;p=o+-1.0;q=3.0-o;o=+j*2.0;r=o+1.0;s=1.0-o;o=s<r?s:r;r=q<p?q:p;j=$(k*(o<r?o:r));i=$($(l*l)+$($(c*c)+$(j*j)));if(+i<1.0e-06){n[d>>2]=$(0.0);t=$(0.0);u=$(0.0);v=d+4|0;n[v>>2]=u;w=d+8|0;n[w>>2]=t;return}else{m=$($(1.0)/$(L($(i))));i=$(m*j);n[d>>2]=i;t=$(m*l);u=$(m*c);v=d+4|0;n[v>>2]=u;w=d+8|0;n[w>>2]=t;return}}function zd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=c&255;g=(d|0)!=0;a:do if(g&(a&3|0)!=0){h=c&255;i=a;j=d;while(1){if((b[i>>0]|0)==h<<24>>24){k=i;l=j;m=6;break a}n=i+1|0;o=j+-1|0;p=(o|0)!=0;if(p&(n&3|0)!=0){i=n;j=o}else{q=n;r=o;s=p;m=5;break}}}else{q=a;r=d;s=g;m=5}while(0);if((m|0)==5)if(s){k=q;l=r;m=6}else{t=q;u=0}b:do if((m|0)==6){q=c&255;if((b[k>>0]|0)==q<<24>>24){t=k;u=l}else{r=X(e,16843009)|0;c:do if(l>>>0>3){s=k;g=l;while(1){d=f[s>>2]^r;if((d&-2139062144^-2139062144)&d+-16843009|0)break;d=s+4|0;a=g+-4|0;if(a>>>0>3){s=d;g=a}else{v=d;w=a;m=11;break c}}x=s;y=g}else{v=k;w=l;m=11}while(0);if((m|0)==11)if(!w){t=v;u=0;break}else{x=v;y=w}while(1){if((b[x>>0]|0)==q<<24>>24){t=x;u=y;break b}r=x+1|0;y=y+-1|0;if(!y){t=r;u=0;break}else x=r}}}while(0);return (u|0?t:0)|0}function Ad(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0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;if((m|0)!=0?(n=oh(e,k?f[g>>2]|0:g,m)|0,(n|0)!=0):0)if((n|0)<0)o=8;else o=10;else if(j>>>0<l>>>0)o=8;else o=10;if((o|0)==8){o=0;n=f[a>>2]|0;if(!n){o=9;break}else{p=a;q=n}}else if((o|0)==10){o=0;n=j>>>0<l>>>0?j:l;if((n|0)!=0?(l=oh(k?f[g>>2]|0:g,e,n)|0,(l|0)!=0):0){if((l|0)>=0){o=16;break}}else o=12;if((o|0)==12?(o=0,!i):0){o=16;break}r=a+4|0;i=f[r>>2]|0;if(!i){o=15;break}else{p=r;q=i}}d=p;a=q}if((o|0)==9){f[c>>2]=a;h=a;return h|0}else if((o|0)==15){f[c>>2]=a;h=r;return h|0}else if((o|0)==16){f[c>>2]=a;h=d;return h|0}return 0}function Cd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;d=u;u=u+32|0;e=d+24|0;g=d+16|0;h=d+8|0;i=d;j=a+4|0;k=f[j>>2]|0;l=f[b>>2]|0;m=f[b+4>>2]|0;b=f[c>>2]|0;n=f[c+4>>2]|0;c=b-l<<3;f[j>>2]=k-m+n+c;j=(f[a>>2]|0)+(k>>>5<<2)|0;a=k&31;k=j;if((m|0)!=(a|0)){f[e>>2]=l;f[e+4>>2]=m;f[g>>2]=b;f[g+4>>2]=n;f[h>>2]=k;f[h+4>>2]=a;Cc(i,e,g,h);u=d;return}h=n-m+c|0;c=l;if((h|0)>0){if(!m){o=h;p=j;q=0;r=l;s=c}else{l=32-m|0;n=(h|0)<(l|0)?h:l;g=-1>>>(l-n|0)&-1<<m;f[j>>2]=f[j>>2]&~g|f[c>>2]&g;g=n+m|0;l=c+4|0;o=h-n|0;p=j+(g>>>5<<2)|0;q=g&31;r=l;s=l}l=(o|0)/32|0;qi(p|0,r|0,l<<2|0)|0;r=o-(l<<5)|0;o=p+(l<<2)|0;p=o;if((r|0)>0){g=-1>>>(32-r|0);f[o>>2]=f[o>>2]&~g|f[s+(l<<2)>>2]&g;t=r;v=p}else{t=q;v=p}}else{t=m;v=k}f[i>>2]=v;f[i+4>>2]=t;u=d;return}function Dd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=u;u=u+32|0;g=e+12|0;h=e;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;i=fg(c)|0;if(i>>>0>4294967279)xm(g);if(i>>>0<11){b[g+11>>0]=i;if(!i)j=g;else{k=g;l=6}}else{m=i+16&-16;n=dj(m)|0;f[g>>2]=n;f[g+8>>2]=m|-2147483648;f[g+4>>2]=i;k=n;l=6}if((l|0)==6){be(k|0,c|0,i|0)|0;j=k}b[j+i>>0]=0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;i=fg(d)|0;if(i>>>0>4294967279)xm(h);if(i>>>0<11){b[h+11>>0]=i;if(!i)o=h;else{p=h;l=12}}else{j=i+16&-16;k=dj(j)|0;f[h>>2]=k;f[h+8>>2]=j|-2147483648;f[h+4>>2]=i;p=k;l=12}if((l|0)==12){be(p|0,d|0,i|0)|0;o=p}b[o+i>>0]=0;i=f[a+4>>2]|0;if((i|0)!=0?(o=Kc(i,g,h)|0,(o|0)!=0):0)q=mh(a,f[o+40>>2]|0)|0;else q=-1;if((b[h+11>>0]|0)<0)gn(f[h>>2]|0);if((b[g+11>>0]|0)>=0){u=e;return q|0}gn(f[g>>2]|0);u=e;return q|0}function Ed(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;Dg(f[a+4>>2]|0,(f[h+56>>2]|0)-(f[h+52>>2]|0)>>2);h=a+76|0;a=f[h>>2]|0;if(!a){i=f[(f[g>>2]|0)+64>>2]|0;g=(f[i+4>>2]|0)-(f[i>>2]|0)>>2;i=(g>>>0)/3|0;if(g>>>0<=2){j=1;u=b;return j|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(qb(e,c)|0)){j=0;k=10;break}if((g|0)>=(i|0)){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}else{i=f[a>>2]|0;if((f[a+4>>2]|0)==(i|0)){j=1;u=b;return j|0}a=0;g=i;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(qb(e,c)|0)){j=0;k=10;break}i=f[h>>2]|0;g=f[i>>2]|0;if(a>>>0>=(f[i+4>>2]|0)-g>>2>>>0){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}return 0}function Fd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=c;g=d-e|0;h=a+8|0;i=f[h>>2]|0;j=f[a>>2]|0;k=j;if(g>>>0>(i-j|0)>>>0){if(!j)l=i;else{i=a+4|0;if((f[i>>2]|0)!=(k|0))f[i>>2]=k;gn(k);f[h>>2]=0;f[i>>2]=0;f[a>>2]=0;l=0}if((g|0)<0)xm(a);i=l<<1;m=l>>>0<1073741823?(i>>>0<g>>>0?g:i):2147483647;if((m|0)<0)xm(a);i=dj(m)|0;l=a+4|0;f[l>>2]=i;f[a>>2]=i;f[h>>2]=i+m;if((c|0)==(d|0))return;else{n=c;o=i}do{b[o>>0]=b[n>>0]|0;n=n+1|0;o=(f[l>>2]|0)+1|0;f[l>>2]=o}while((n|0)!=(d|0));return}else{n=a+4|0;a=(f[n>>2]|0)-j|0;j=g>>>0>a>>>0;g=c+a|0;a=j?g:d;o=a-e|0;if(o|0)qi(k|0,c|0,o|0)|0;c=k+o|0;if(!j){if((f[n>>2]|0)==(c|0))return;f[n>>2]=c;return}if((a|0)==(d|0))return;a=g;g=f[n>>2]|0;do{b[g>>0]=b[a>>0]|0;a=a+1|0;g=(f[n>>2]|0)+1|0;f[n>>2]=g}while((a|0)!=(d|0));return}}function Gd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=La,t=0,v=La,w=La;d=u;u=u+16|0;e=d;g=f[a+24>>2]|0;h=a+8|0;i=b[(f[h>>2]|0)+24>>0]|0;j=i<<24>>24;k=j<<2;l=dn(j>>>0>1073741823?-1:j<<2)|0;ym(e);if(!(pj(e,$(n[a+32>>2]),(1<<g)+-1|0)|0)){m=0;en(l);u=d;return m|0}g=f[a+16>>2]|0;if(!(f[g+80>>2]|0))o=0;else o=(f[f[g>>2]>>2]|0)+(f[g+48>>2]|0)|0;if(!c){m=1;en(l);u=d;return m|0}g=a+28|0;if(i<<24>>24>0){p=0;q=0;r=0}else{i=0;a=0;while(1){be((f[f[(f[h>>2]|0)+64>>2]>>2]|0)+a|0,l|0,k|0)|0;i=i+1|0;if((i|0)==(c|0)){m=1;break}else a=a+k|0}en(l);u=d;return m|0}while(1){a=f[g>>2]|0;s=$(n[e>>2]);i=0;t=q;while(1){v=$(s*$(f[o+(t<<2)>>2]|0));w=$(v+$(n[a+(i<<2)>>2]));n[l+(i<<2)>>2]=w;i=i+1|0;if((i|0)==(j|0))break;else t=t+1|0}be((f[f[(f[h>>2]|0)+64>>2]>>2]|0)+r|0,l|0,k|0)|0;p=p+1|0;if((p|0)==(c|0)){m=1;break}else{q=q+j|0;r=r+k|0}}en(l);u=d;return m|0}function Hd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(d-g>>2>>>0>=b>>>0){Uf(g|0,0,b<<2|0)|0;f[e>>2]=g+(b<<2);return}i=f[a>>2]|0;j=g-i>>2;g=j+b|0;k=i;if(g>>>0>1073741823)xm(a);l=d-i|0;d=l>>1;m=l>>2>>>0<536870911?(d>>>0<g>>>0?g:d):1073741823;do if(m)if(m>>>0>1073741823){d=ra(8)|0;al(d,10109);f[d>>2]=3812;va(d|0,904,84)}else{n=dj(m<<2)|0;break}else n=0;while(0);d=n+(j<<2)|0;Uf(d|0,0,b<<2|0)|0;b=d;j=n+(m<<2)|0;m=n+(g<<2)|0;if((h|0)==(k|0)){o=b;p=i;q=h}else{i=h;h=b;b=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[b+-4>>2]=d;b=h+-4|0;h=b}while((i|0)!=(k|0));o=h;p=f[a>>2]|0;q=f[e>>2]|0}f[a>>2]=o;f[e>>2]=m;f[c>>2]=j;j=p;if((q|0)!=(j|0)){c=q;do{c=c+-4|0;q=f[c>>2]|0;f[c>>2]=0;if(q|0)Sa[f[(f[q>>2]|0)+4>>2]&127](q)}while((c|0)!=(j|0))}if(!p)return;gn(p);return}function Id(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+4|0;e=f[a>>2]|0;g=((f[d>>2]|0)-e|0)/12|0;h=g+1|0;if(h>>>0>357913941)xm(a);i=a+8|0;j=((f[i>>2]|0)-e|0)/12|0;e=j<<1;k=j>>>0<178956970?(e>>>0<h>>>0?h:e):357913941;do if(k)if(k>>>0>357913941){e=ra(8)|0;al(e,10109);f[e>>2]=3812;va(e|0,904,84)}else{l=dj(k*12|0)|0;break}else l=0;while(0);e=l+(g*12|0)|0;g=e;h=l+(k*12|0)|0;Qf(e,c);c=e+12|0;k=f[a>>2]|0;l=f[d>>2]|0;if((l|0)==(k|0)){m=g;n=k;o=k}else{j=l;l=g;g=e;do{e=g+-12|0;j=j+-12|0;f[e>>2]=f[j>>2];f[e+4>>2]=f[j+4>>2];f[e+8>>2]=f[j+8>>2];f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;g=l+-12|0;l=g}while((j|0)!=(k|0));m=l;n=f[a>>2]|0;o=f[d>>2]|0}f[a>>2]=m;f[d>>2]=c;f[i>>2]=h;h=n;if((o|0)!=(h|0)){i=o;do{i=i+-12|0;if((b[i+11>>0]|0)<0)gn(f[i>>2]|0)}while((i|0)!=(h|0))}if(!n)return;gn(n);return}function Jd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=c;e=b;g=d-e|0;h=g>>2;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0<=j-k>>2>>>0){m=a+4|0;n=(f[m>>2]|0)-k>>2;o=h>>>0>n>>>0;p=o?b+(n<<2)|0:c;c=p;n=c-e|0;e=n>>2;if(e|0)qi(k|0,b|0,n|0)|0;n=l+(e<<2)|0;if(o){o=d-c|0;if((o|0)<=0)return;be(f[m>>2]|0,p|0,o|0)|0;f[m>>2]=(f[m>>2]|0)+(o>>>2<<2);return}else{o=f[m>>2]|0;if((o|0)==(n|0))return;f[m>>2]=o+(~((o+-4-n|0)>>>2)<<2);return}}n=k;if(!k)q=j;else{j=a+4|0;o=f[j>>2]|0;if((o|0)!=(l|0))f[j>>2]=o+(~((o+-4-k|0)>>>2)<<2);gn(n);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;q=0}if(h>>>0>1073741823)xm(a);j=q>>1;n=q>>2>>>0<536870911?(j>>>0<h>>>0?h:j):1073741823;if(n>>>0>1073741823)xm(a);j=dj(n<<2)|0;h=a+4|0;f[h>>2]=j;f[a>>2]=j;f[i>>2]=j+(n<<2);if((g|0)<=0)return;be(j|0,b|0,g|0)|0;f[h>>2]=j+(g>>>2<<2);return}function Kd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+16|0;d=c;e=dj(64)|0;g=dj(12)|0;h=f[(f[a+4>>2]|0)+80>>2]|0;f[g+4>>2]=0;f[g>>2]=2700;f[g+8>>2]=h;f[d>>2]=g;Eh(e,d);g=e;if((b|0)>=0){h=a+8|0;i=a+12|0;a=f[i>>2]|0;j=f[h>>2]|0;k=a-j>>2;do if((k|0)<=(b|0)){l=b+1|0;m=a;if(l>>>0>k>>>0){Hd(h,l-k|0);break}if(l>>>0<k>>>0?(n=j+(l<<2)|0,(n|0)!=(m|0)):0){l=m;do{m=l+-4|0;f[i>>2]=m;o=f[m>>2]|0;f[m>>2]=0;if(o|0)Sa[f[(f[o>>2]|0)+4>>2]&127](o);l=f[i>>2]|0}while((l|0)!=(n|0))}}while(0);i=(f[h>>2]|0)+(b<<2)|0;b=f[i>>2]|0;f[i>>2]=g;if(!b)p=1;else{Sa[f[(f[b>>2]|0)+4>>2]&127](b);p=1}}else{Sa[f[(f[e>>2]|0)+4>>2]&127](e);p=0}e=f[d>>2]|0;f[d>>2]=0;if(!e){u=c;return p|0}Sa[f[(f[e>>2]|0)+4>>2]&127](e);u=c;return p|0}function Ld(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;Dg(f[a+4>>2]|0,(f[h+28>>2]|0)-(f[h+24>>2]|0)>>2);h=a+76|0;a=f[h>>2]|0;if(!a){i=f[g>>2]|0;g=(f[i+4>>2]|0)-(f[i>>2]|0)>>2;i=(g>>>0)/3|0;if(g>>>0<=2){j=1;u=b;return j|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(tb(e,c)|0)){j=0;k=10;break}if((g|0)>=(i|0)){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}else{i=f[a>>2]|0;if((f[a+4>>2]|0)==(i|0)){j=1;u=b;return j|0}a=0;g=i;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(tb(e,c)|0)){j=0;k=10;break}i=f[h>>2]|0;g=f[i>>2]|0;if(a>>>0>=(f[i+4>>2]|0)-g>>2>>>0){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}return 0}function Md(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=f[b>>2]|0;do if((c|0)!=-1){b=f[(f[(f[a+4>>2]|0)+12>>2]|0)+(c<<2)>>2]|0;d=c+1|0;e=((d>>>0)%3|0|0)==0?c+-2|0:d;if((e|0)==-1)g=-1;else g=f[(f[(f[a>>2]|0)+96>>2]|0)+(((e|0)/3|0)*12|0)+(((e|0)%3|0)<<2)>>2]|0;if((b|0)!=-1){e=(((b>>>0)%3|0|0)==0?2:-1)+b|0;if((e|0)==-1){h=-1;i=b;j=0}else{h=f[(f[(f[a>>2]|0)+96>>2]|0)+(((e|0)/3|0)*12|0)+(((e|0)%3|0)<<2)>>2]|0;i=b;j=0}}else{h=-1;i=-1;j=1}if((g|0)!=(h|0)){k=-1;return k|0}b=(((c>>>0)%3|0|0)==0?2:-1)+c|0;if((b|0)==-1)if(j){l=-1;m=-1;n=i;break}else o=-1;else{e=f[(f[(f[a>>2]|0)+96>>2]|0)+(((b|0)/3|0)*12|0)+(((b|0)%3|0)<<2)>>2]|0;if(j){l=-1;m=e;n=i;break}else o=e}e=i+1|0;b=((e>>>0)%3|0|0)==0?i+-2|0:e;if((b|0)==-1){l=-1;m=o;n=i}else{l=f[(f[(f[a>>2]|0)+96>>2]|0)+(((b|0)/3|0)*12|0)+(((b|0)%3|0)<<2)>>2]|0;m=o;n=i}}else{l=-1;m=-1;n=-1}while(0);k=(m|0)!=(l|0)?-1:n;return k|0}function Nd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=a+20|0;if(bc(e,c)|0){g=0;return g|0}a=Bb(e,c)|0;c=f[d>>2]|0;f[d>>2]=0;d=f[a>>2]|0;f[a>>2]=c;if(!d){g=1;return g|0}c=f[d+28>>2]|0;if(c|0){a=c;do{c=a;a=f[a>>2]|0;We(c+8|0);gn(c)}while((a|0)!=0)}a=d+20|0;c=f[a>>2]|0;f[a>>2]=0;if(c|0)gn(c);c=f[d+8>>2]|0;if(c|0){a=c;do{c=a;a=f[a>>2]|0;e=c+8|0;h=f[c+20>>2]|0;if(h|0){i=c+24|0;if((f[i>>2]|0)!=(h|0))f[i>>2]=h;gn(h)}if((b[e+11>>0]|0)<0)gn(f[e>>2]|0);gn(c)}while((a|0)!=0)}a=f[d>>2]|0;f[d>>2]=0;if(a|0)gn(a);gn(d);g=1;return g|0}function Od(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;f[e>>2]=b;g=a+8|0;if(((f[a+12>>2]|0)-(f[g>>2]|0)>>2|0)<=(b|0))ve(g,b+1|0);h=f[(f[c>>2]|0)+56>>2]|0;do if((h|0)<5){i=a+20+(h*12|0)+4|0;j=f[i>>2]|0;if((j|0)==(f[a+20+(h*12|0)+8>>2]|0)){wf(a+20+(h*12|0)|0,e);break}else{f[j>>2]=b;f[i>>2]=j+4;break}}while(0);b=f[c>>2]|0;h=f[e>>2]|0;f[b+60>>2]=h;e=(f[g>>2]|0)+(h<<2)|0;f[c>>2]=0;c=f[e>>2]|0;f[e>>2]=b;if(!c){u=d;return}b=c+88|0;e=f[b>>2]|0;f[b>>2]=0;if(e|0){b=f[e+8>>2]|0;if(b|0){h=e+12|0;if((f[h>>2]|0)!=(b|0))f[h>>2]=b;gn(b)}gn(e)}e=f[c+68>>2]|0;if(e|0){b=c+72|0;h=f[b>>2]|0;if((h|0)!=(e|0))f[b>>2]=h+(~((h+-4-e|0)>>>2)<<2);gn(e)}e=c+64|0;h=f[e>>2]|0;f[e>>2]=0;if(h|0){e=f[h>>2]|0;if(e|0){b=h+4|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;gn(e)}gn(h)}gn(c);u=d;return}function Pd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;d=u;u=u+48|0;e=d+16|0;g=d;h=d+32|0;i=a+28|0;j=f[i>>2]|0;f[h>>2]=j;k=a+20|0;l=(f[k>>2]|0)-j|0;f[h+4>>2]=l;f[h+8>>2]=b;f[h+12>>2]=c;b=l+c|0;l=a+60|0;f[g>>2]=f[l>>2];f[g+4>>2]=h;f[g+8>>2]=2;j=lk(Aa(146,g|0)|0)|0;a:do if((b|0)!=(j|0)){g=2;m=b;n=h;o=j;while(1){if((o|0)<0)break;m=m-o|0;p=f[n+4>>2]|0;q=o>>>0>p>>>0;r=q?n+8|0:n;s=g+(q<<31>>31)|0;t=o-(q?p:0)|0;f[r>>2]=(f[r>>2]|0)+t;p=r+4|0;f[p>>2]=(f[p>>2]|0)-t;f[e>>2]=f[l>>2];f[e+4>>2]=r;f[e+8>>2]=s;o=lk(Aa(146,e|0)|0)|0;if((m|0)==(o|0)){v=3;break a}else{g=s;n=r}}f[a+16>>2]=0;f[i>>2]=0;f[k>>2]=0;f[a>>2]=f[a>>2]|32;if((g|0)==2)w=0;else w=c-(f[n+4>>2]|0)|0}else v=3;while(0);if((v|0)==3){v=f[a+44>>2]|0;f[a+16>>2]=v+(f[a+48>>2]|0);a=v;f[i>>2]=a;f[k>>2]=a;w=c}u=d;return w|0}function Qd(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=2804;b=f[a+68>>2]|0;if(b|0){c=a+72|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+56>>2]|0;if(b|0){d=a+60|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+44>>2]|0;if(b|0){c=a+48|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+32>>2]|0;if(b|0){d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+20>>2]|0;if(b|0){c=a+24|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}Oe(a+8|0);b=a+4|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;b=a+40|0;d=f[b>>2]|0;if(d|0){c=a+44|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[c>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0){Bf(i);gn(i)}h=f[c>>2]|0}while((h|0)!=(d|0));g=f[b>>2]|0}gn(g)}Bf(a);gn(a);return}function Rd(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a+12|0;d=f[a>>2]|0;e=a+8|0;g=f[e>>2]|0;h=(g|0)==-1;if(!(b[c>>0]|0)){do if(((!h?(i=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(i|0)!=-1):0)?(f[(f[d>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)==0:0)?(j=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(i<<2)>>2]|0,(j|0)!=-1):0)if(!((j>>>0)%3|0)){k=j+2|0;break}else{k=j+-1|0;break}else k=-1;while(0);f[e>>2]=k;return}k=g+1|0;if(((!h?(h=((k>>>0)%3|0|0)==0?g+-2|0:k,(h|0)!=-1):0)?(f[(f[d>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0)==0:0)?(k=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(h<<2)>>2]|0,h=k+1|0,(k|0)!=-1):0){g=((h>>>0)%3|0|0)==0?k+-2|0:h;f[e>>2]=g;if((g|0)!=-1){if((g|0)!=(f[a+4>>2]|0))return;f[e>>2]=-1;return}}else f[e>>2]=-1;g=f[a+4>>2]|0;do if((((g|0)!=-1?(a=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(a|0)!=-1):0)?(f[(f[d>>2]|0)+(a>>>5<<2)>>2]&1<<(a&31)|0)==0:0)?(h=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(a<<2)>>2]|0,(h|0)!=-1):0)if(!((h>>>0)%3|0)){l=h+2|0;break}else{l=h+-1|0;break}else l=-1;while(0);f[e>>2]=l;b[c>>0]=0;return}function Sd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;a=f[d>>2]|0;do if(a|0){e=b[c+11>>0]|0;g=e<<24>>24<0;h=g?f[c+4>>2]|0:e&255;e=g?f[c>>2]|0:c;g=d;i=a;a:while(1){j=i;while(1){k=j+16|0;l=b[k+11>>0]|0;m=l<<24>>24<0;n=m?f[j+20>>2]|0:l&255;l=h>>>0<n>>>0?h:n;if((l|0)!=0?(o=oh(m?f[k>>2]|0:k,e,l)|0,(o|0)!=0):0){if((o|0)>=0)break}else p=6;if((p|0)==6?(p=0,n>>>0>=h>>>0):0)break;n=f[j+4>>2]|0;if(!n){q=g;break a}else j=n}i=f[j>>2]|0;if(!i){q=j;break}else g=j}if((q|0)!=(d|0)){g=q+16|0;i=b[g+11>>0]|0;n=i<<24>>24<0;o=n?f[q+20>>2]|0:i&255;i=o>>>0<h>>>0?o:h;if(i|0?(l=oh(e,n?f[g>>2]|0:g,i)|0,l|0):0){if((l|0)<0)break;else r=q;return r|0}if(h>>>0>=o>>>0){r=q;return r|0}}}while(0);r=d;return r|0}function Td(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=u;u=u+32|0;g=e+8|0;i=e;if((d|0)!=3){f[a>>2]=0;u=e;return}d=f[b+12>>2]|0;j=f[b+4>>2]|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;a:do if((c|0)==-2){k=0;l=8}else{b=f[(f[(f[j+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;do if((Na[f[(f[j>>2]|0)+8>>2]&127](j)|0)==1){Mc(i,j,c,d,g,((h[j+36>>0]|0)<<8|(h[j+37>>0]|0))&65535);m=f[i>>2]|0;if(!m){f[i>>2]=0;break}else{n=i;o=m;break a}}while(0);m=dj(24)|0;f[m+4>>2]=b;p=m+8|0;f[p>>2]=f[g>>2];f[p+4>>2]=f[g+4>>2];f[p+8>>2]=f[g+8>>2];f[p+12>>2]=f[g+12>>2];f[m>>2]=1932;k=m;l=8}while(0);if((l|0)==8){f[i>>2]=k;n=i;o=k}f[a>>2]=o;f[n>>2]=0;u=e;return}function Ud(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if(((e-h|0)/12|0)>>>0>=b>>>0){i=b;j=h;do{f[j>>2]=f[c>>2];f[j+4>>2]=f[c+4>>2];f[j+8>>2]=f[c+8>>2];j=(f[g>>2]|0)+12|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=(h-i|0)/12|0;h=j+b|0;if(h>>>0>357913941)xm(a);k=(e-i|0)/12|0;i=k<<1;e=k>>>0<178956970?(i>>>0<h>>>0?h:i):357913941;do if(e)if(e>>>0>357913941){i=ra(8)|0;al(i,10109);f[i>>2]=3812;va(i|0,904,84)}else{l=dj(e*12|0)|0;break}else l=0;while(0);i=l+(j*12|0)|0;j=l+(e*12|0)|0;e=b;b=i;l=i;do{f[b>>2]=f[c>>2];f[b+4>>2]=f[c+4>>2];f[b+8>>2]=f[c+8>>2];b=l+12|0;l=b;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;b=(f[g>>2]|0)-e|0;c=i+(((b|0)/-12|0)*12|0)|0;if((b|0)>0)be(c|0,e|0,b|0)|0;f[a>>2]=c;f[g>>2]=l;f[d>>2]=j;if(!e)return;gn(e);return}function Vd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d>>2;g=e+1|0;if(g>>>0>1073741823)xm(a);h=a+8|0;i=(f[h>>2]|0)-d|0;d=i>>1;j=i>>2>>>0<536870911?(d>>>0<g>>>0?g:d):1073741823;do if(j)if(j>>>0>1073741823){d=ra(8)|0;al(d,10109);f[d>>2]=3812;va(d|0,904,84)}else{k=dj(j<<2)|0;break}else k=0;while(0);d=k+(e<<2)|0;e=d;g=k+(j<<2)|0;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;j=d+4|0;b=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(b|0)){l=e;m=b;n=b}else{i=k;k=e;e=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[e+-4>>2]=d;e=k+-4|0;k=e}while((i|0)!=(b|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=j;f[h>>2]=g;g=m;if((n|0)!=(g|0)){h=n;do{h=h+-4|0;n=f[h>>2]|0;f[h>>2]=0;if(n|0){Bf(n);gn(n)}}while((h|0)!=(g|0))}if(!m)return;gn(m);return}function Wd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;e=u;u=u+80|0;g=e;h=e+64|0;Th(g);i=f[(f[a+8>>2]|0)+56>>2]|0;j=X(di(5)|0,d)|0;ig(g,i,0,d&255,5,0,j,((j|0)<0)<<31>>31,0,0);j=dj(96)|0;Ih(j,g);b[j+84>>0]=1;g=f[j+68>>2]|0;d=j+72|0;i=f[d>>2]|0;if((i|0)!=(g|0))f[d>>2]=i+(~((i+-4-g|0)>>>2)<<2);Zf(j,c)|0;f[h>>2]=j;Hf(a,h);a=f[h>>2]|0;f[h>>2]=0;if(!a){u=e;return}h=a+88|0;j=f[h>>2]|0;f[h>>2]=0;if(j|0){h=f[j+8>>2]|0;if(h|0){c=j+12|0;if((f[c>>2]|0)!=(h|0))f[c>>2]=h;gn(h)}gn(j)}j=f[a+68>>2]|0;if(j|0){h=a+72|0;c=f[h>>2]|0;if((c|0)!=(j|0))f[h>>2]=c+(~((c+-4-j|0)>>>2)<<2);gn(j)}j=a+64|0;c=f[j>>2]|0;f[j>>2]=0;if(c|0){j=f[c>>2]|0;if(j|0){h=c+4|0;if((f[h>>2]|0)!=(j|0))f[h>>2]=j;gn(j)}gn(c)}gn(a);u=e;return}function Xd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=f[c>>2]|0;c=f[a>>2]|0;e=c+(d>>>5<<2)|0;f[e>>2]=f[e>>2]|1<<(d&31);e=f[a+64>>2]|0;g=(d|0)==-1;h=d+1|0;if(!g?(i=((h>>>0)%3|0|0)==0?d+-2|0:h,(i|0)!=-1):0)j=f[(f[e>>2]|0)+(i<<2)>>2]|0;else j=-1;i=a+12|0;h=(f[i>>2]|0)+(j>>>5<<2)|0;f[h>>2]=f[h>>2]|1<<(j&31);if(g){j=(f[i>>2]|0)+536870908|0;f[j>>2]=f[j>>2]|-2147483648;return}j=(((d>>>0)%3|0|0)==0?2:-1)+d|0;if((j|0)==-1)k=-1;else k=f[(f[e>>2]|0)+(j<<2)>>2]|0;j=(f[i>>2]|0)+(k>>>5<<2)|0;f[j>>2]=f[j>>2]|1<<(k&31);if(g)return;g=f[(f[e+12>>2]|0)+(d<<2)>>2]|0;if((g|0)==-1)return;b[a+24>>0]=0;a=c+(g>>>5<<2)|0;f[a>>2]=f[a>>2]|1<<(g&31);a=g+1|0;c=((a>>>0)%3|0|0)==0?g+-2|0:a;if((c|0)==-1)l=-1;else l=f[(f[e>>2]|0)+(c<<2)>>2]|0;c=(f[i>>2]|0)+(l>>>5<<2)|0;f[c>>2]=f[c>>2]|1<<(l&31);l=(((g>>>0)%3|0|0)==0?2:-1)+g|0;if((l|0)==-1)m=-1;else m=f[(f[e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[c>>2]=0;if(h|0){c=f[h>>2]|0;if(c|0){e=h+4|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;gn(c)}gn(h)}gn(g)}g=a+84|0;h=a+88|0;a=f[h>>2]|0;c=f[g>>2]|0;e=a-c>>2;if((e|0)>(b|0)){u=d;return}i=b+1|0;b=a;if(i>>>0>e>>>0){Ae(g,i-e|0);u=d;return}if(i>>>0>=e>>>0){u=d;return}e=c+(i<<2)|0;if((e|0)==(b|0)){u=d;return}f[h>>2]=b+(~((b+-4-e|0)>>>2)<<2);u=d;return}function _d(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=b+8|0;d=f[c>>2]|0;e=f[c+4>>2]|0;c=b+16|0;g=c;i=f[g>>2]|0;j=f[g+4>>2]|0;g=Uj(i|0,j|0,4,0)|0;k=I;if((e|0)<(k|0)|(e|0)==(k|0)&d>>>0<g>>>0){l=0;return l|0}m=f[b>>2]|0;n=m+i|0;o=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;n=c;f[n>>2]=g;f[n+4>>2]=k;k=Uj(i|0,j|0,8,0)|0;j=I;if((e|0)<(j|0)|(e|0)==(j|0)&d>>>0<k>>>0){l=0;return l|0}d=m+g|0;g=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;d=c;f[d>>2]=k;f[d+4>>2]=j;if((o|0)>(g|0)){l=0;return l|0}f[a+12>>2]=o;f[a+16>>2]=g;j=Wj(g|0,((g|0)<0)<<31>>31|0,o|0,((o|0)<0)<<31>>31|0)|0;o=I;if(!(o>>>0<0|(o|0)==0&j>>>0<2147483647)){l=0;return l|0}o=j+1|0;f[a+20>>2]=o;j=(o|0)/2|0;g=a+24|0;f[g>>2]=j;f[a+28>>2]=0-j;if(!(o&1))f[g>>2]=j+-1;l=rd(a+108|0,b)|0;return l|0}function $d(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=u;u=u+16|0;e=d+8|0;g=d+4|0;h=d;if(!c){i=0;u=d;return i|0}f[a>>2]=b;f[e>>2]=0;bg(e,b)|0;a:do if(!(f[e>>2]|0))j=8;else{b=0;while(1){bg(g,f[a>>2]|0)|0;k=dj(44)|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;n[k+16>>2]=$(1.0);l=k+20|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;f[l+12>>2]=0;n[k+36>>2]=$(1.0);f[k+40>>2]=f[g>>2];if(!(kc(a,k)|0))break;f[h>>2]=k;Hg(c,h)|0;l=f[h>>2]|0;f[h>>2]=0;if(l|0){Bf(l);gn(l)}b=b+1|0;if(b>>>0>=(f[e>>2]|0)>>>0){j=8;break a}}Bf(k);gn(k);m=0}while(0);if((j|0)==8)m=kc(a,c)|0;i=m;u=d;return i|0}function ae(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;if(c>>>0>4294967279)xm(a);d=a+11|0;e=b[d>>0]|0;g=e<<24>>24<0;if(g){h=f[a+4>>2]|0;i=(f[a+8>>2]&2147483647)+-1|0}else{h=e&255;i=10}j=h>>>0>c>>>0?h:c;c=j>>>0<11;k=c?10:(j+16&-16)+-1|0;do if((k|0)!=(i|0)){do if(c){j=f[a>>2]|0;if(g){l=0;m=j;n=a;o=13}else{Rk(a,j,(e&255)+1|0)|0;gn(j);o=16}}else{j=k+1|0;p=dj(j)|0;if(g){l=1;m=f[a>>2]|0;n=p;o=13;break}else{Rk(p,a,(e&255)+1|0)|0;q=p;r=j;s=a+4|0;o=15;break}}while(0);if((o|0)==13){j=a+4|0;Rk(n,m,(f[j>>2]|0)+1|0)|0;gn(m);if(l){q=n;r=k+1|0;s=j;o=15}else o=16}if((o|0)==15){f[a+8>>2]=r|-2147483648;f[s>>2]=h;f[a>>2]=q;break}else if((o|0)==16){b[d>>0]=h;break}}while(0);return}function be(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0;if((d|0)>=8192)return Da(a|0,c|0,d|0)|0;e=a|0;g=a+d|0;if((a&3)==(c&3)){while(a&3){if(!d)return e|0;b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0;d=d-1|0}h=g&-4|0;d=h-64|0;while((a|0)<=(d|0)){f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];f[a+12>>2]=f[c+12>>2];f[a+16>>2]=f[c+16>>2];f[a+20>>2]=f[c+20>>2];f[a+24>>2]=f[c+24>>2];f[a+28>>2]=f[c+28>>2];f[a+32>>2]=f[c+32>>2];f[a+36>>2]=f[c+36>>2];f[a+40>>2]=f[c+40>>2];f[a+44>>2]=f[c+44>>2];f[a+48>>2]=f[c+48>>2];f[a+52>>2]=f[c+52>>2];f[a+56>>2]=f[c+56>>2];f[a+60>>2]=f[c+60>>2];a=a+64|0;c=c+64|0}while((a|0)<(h|0)){f[a>>2]=f[c>>2];a=a+4|0;c=c+4|0}}else{h=g-4|0;while((a|0)<(h|0)){b[a>>0]=b[c>>0]|0;b[a+1>>0]=b[c+1>>0]|0;b[a+2>>0]=b[c+2>>0]|0;b[a+3>>0]=b[c+3>>0]|0;a=a+4|0;c=c+4|0}}while((a|0)<(g|0)){b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0}return e|0}function ce(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=f[c+88>>2]|0;if(!d){e=0;return e|0}if((f[d>>2]|0)!=1){e=0;return e|0}g=d+8|0;d=f[g>>2]|0;f[a+4>>2]=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;i=a+8|0;j=c+24|0;c=b[j>>0]|0;k=c<<24>>24;l=a+12|0;m=f[l>>2]|0;n=f[i>>2]|0;o=m-n>>2;p=n;n=m;if(o>>>0>=k>>>0)if(o>>>0>k>>>0?(m=p+(k<<2)|0,(m|0)!=(n|0)):0){f[l>>2]=n+(~((n+-4-m|0)>>>2)<<2);q=c;r=d}else{q=c;r=d}else{ef(i,k-o|0);q=b[j>>0]|0;r=f[g>>2]|0}g=r+4|0;j=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;if(q<<24>>24>0){g=f[i>>2]|0;i=q<<24>>24;q=j;o=4;k=0;while(1){f[g+(k<<2)>>2]=q;o=o+4|0;k=k+1|0;d=r+o|0;c=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;if((k|0)>=(i|0)){s=c;break}else q=c}}else s=j;f[a+20>>2]=s;e=1;return e|0}function de(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;do if(!(Cl(a,f[c+8>>2]|0,g)|0)){if(!(Cl(a,f[c>>2]|0,g)|0)){h=f[a+8>>2]|0;Wa[f[(f[h>>2]|0)+24>>2]&3](h,c,d,e,g);break}if((f[c+16>>2]|0)!=(d|0)?(h=c+20|0,(f[h>>2]|0)!=(d|0)):0){f[c+32>>2]=e;i=c+44|0;if((f[i>>2]|0)==4)break;j=c+52|0;b[j>>0]=0;k=c+53|0;b[k>>0]=0;l=f[a+8>>2]|0;Xa[f[(f[l>>2]|0)+20>>2]&3](l,c,d,d,1,g);if(b[k>>0]|0)if(!(b[j>>0]|0)){m=3;n=11}else o=3;else{m=4;n=11}if((n|0)==11){f[h>>2]=d;h=c+40|0;f[h>>2]=(f[h>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0){b[c+54>>0]=1;o=m}else o=m}f[i>>2]=o;break}if((e|0)==1)f[c+32>>2]=1}else Zi(0,c,d,e);while(0);return}function ee(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=f[a+32>>2]|0;d=c+8|0;e=f[d+4>>2]|0;g=c+16|0;h=g;i=f[h>>2]|0;j=f[h+4>>2]|0;if(!((e|0)>(j|0)|((e|0)==(j|0)?(f[d>>2]|0)>>>0>i>>>0:0))){k=0;return k|0}d=b[(f[c>>2]|0)+i>>0]|0;c=Uj(i|0,j|0,1,0)|0;j=g;f[j>>2]=c;f[j+4>>2]=I;j=a+48|0;c=f[j>>2]|0;f[j>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);switch(d<<24>>24){case 0:{d=dj(384)|0;pg(d);c=f[j>>2]|0;f[j>>2]=d;if(!c)l=d;else{Sa[f[(f[c>>2]|0)+4>>2]&127](c);m=9}break}case 2:{c=dj(440)|0;jf(c);d=f[j>>2]|0;f[j>>2]=c;if(!d)l=c;else{Sa[f[(f[d>>2]|0)+4>>2]&127](d);m=9}break}default:m=9}if((m|0)==9){m=f[j>>2]|0;if(!m){k=0;return k|0}else l=m}k=Oa[f[(f[l>>2]|0)+8>>2]&127](l,a)|0;return k|0}function fe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e+12|0;h=e+8|0;i=e;f[i>>2]=f[b>>2];f[g>>2]=f[i>>2];i=cc(a,g,h,e+4|0,c)|0;c=f[i>>2]|0;if(c|0){j=c;u=e;return j|0}c=dj(40)|0;Qf(c+16|0,d);Qf(c+28|0,d+12|0);d=f[h>>2]|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=d;f[i>>2]=c;d=f[f[a>>2]>>2]|0;if(!d)k=c;else{f[a>>2]=d;k=f[i>>2]|0}Jc(f[a+4>>2]|0,k);k=a+8|0;f[k>>2]=(f[k>>2]|0)+1;j=c;u=e;return j|0}function ge(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=0;if(!c){u=e;return}i=a+8|0;j=f[i>>2]|0;k=j<<5;if(k>>>0<c>>>0){f[g>>2]=0;l=g+4|0;f[l>>2]=0;m=g+8|0;f[m>>2]=0;if((c|0)<0)xm(a);n=j<<6;j=c+31&-32;$e(g,k>>>0<1073741823?(n>>>0<j>>>0?j:n):2147483647);n=f[a>>2]|0;f[a>>2]=f[g>>2];f[g>>2]=n;g=f[h>>2]|0;f[h>>2]=c;f[l>>2]=g;g=f[i>>2]|0;f[i>>2]=f[m>>2];f[m>>2]=g;if(n|0)gn(n);o=a}else{f[h>>2]=c;o=a}a=f[o>>2]|0;o=a;h=a;a=c>>>5;n=a<<2;if(!(b[d>>0]|0)){Uf(h|0,0,n|0)|0;d=c&31;g=o+(a<<2)|0;if(!d){u=e;return}f[g>>2]=f[g>>2]&~(-1>>>(32-d|0));u=e;return}else{Uf(h|0,-1,n|0)|0;n=c&31;c=o+(a<<2)|0;if(!n){u=e;return}f[c>>2]=f[c>>2]|-1>>>(32-n|0);u=e;return}}function he(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;c=b+8|0;d=f[c>>2]|0;e=f[c+4>>2]|0;c=b+16|0;g=c;i=f[g>>2]|0;j=f[g+4>>2]|0;g=Uj(i|0,j|0,4,0)|0;k=I;if((e|0)<(k|0)|(e|0)==(k|0)&d>>>0<g>>>0){l=0;return l|0}m=f[b>>2]|0;b=m+i|0;n=h[b>>0]|h[b+1>>0]<<8|h[b+2>>0]<<16|h[b+3>>0]<<24;b=c;f[b>>2]=g;f[b+4>>2]=k;k=Uj(i|0,j|0,8,0)|0;j=I;if((e|0)<(j|0)|(e|0)==(j|0)&d>>>0<k>>>0){l=0;return l|0}d=m+g|0;g=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;d=c;f[d>>2]=k;f[d+4>>2]=j;if((n|0)>(g|0)){l=0;return l|0}f[a+12>>2]=n;f[a+16>>2]=g;j=Wj(g|0,((g|0)<0)<<31>>31|0,n|0,((n|0)<0)<<31>>31|0)|0;n=I;if(!(n>>>0<0|(n|0)==0&j>>>0<2147483647)){l=0;return l|0}n=j+1|0;f[a+20>>2]=n;j=(n|0)/2|0;g=a+24|0;f[g>>2]=j;f[a+28>>2]=0-j;if(n&1|0){l=1;return l|0}f[g>>2]=j+-1;l=1;return l|0}function ie(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=a+12|0;a:do if((f[e>>2]|0)!=(c|0)){g=f[a>>2]|0;h=a+4|0;i=f[h>>2]|0;if((i|0)!=(g|0)){j=i;while(1){i=j+-12|0;f[h>>2]=i;if((b[i+11>>0]|0)<0){gn(f[i>>2]|0);k=f[h>>2]|0}else k=i;if((k|0)==(g|0))break;else j=k}}f[e>>2]=c;j=f[c+8>>2]|0;if(j|0){i=a+8|0;l=j;j=g;while(1){m=l+8|0;if((j|0)==(f[i>>2]|0))Id(a,m);else{Qf(j,m);f[h>>2]=(f[h>>2]|0)+12}m=f[l>>2]|0;if(!m)break a;l=m;j=f[h>>2]|0}}}while(0);if((d|0)<0){n=0;return n|0}c=f[a>>2]|0;if((((f[a+4>>2]|0)-c|0)/12|0)>>>0<=d>>>0){n=0;return n|0}a=c+(d*12|0)|0;if((b[a+11>>0]|0)<0){n=f[a>>2]|0;return n|0}else{n=a;return n|0}return 0}function je(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=u;u=u+16|0;d=c;e=f[(f[a>>2]|0)+8>>2]|0;g=a+8|0;h=a+12|0;i=(f[h>>2]|0)-(f[g>>2]|0)>>2;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;Ua[e&15](a,i,d);i=f[d>>2]|0;f[d>>2]=0;if(!i){k=f[h>>2]|0;l=f[g>>2]|0;m=k-l|0;n=m>>2;o=n+-1|0;u=c;return o|0}d=i+88|0;a=f[d>>2]|0;f[d>>2]=0;if(a|0){d=f[a+8>>2]|0;if(d|0){e=a+12|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;gn(d)}gn(a)}a=f[i+68>>2]|0;if(a|0){d=i+72|0;e=f[d>>2]|0;if((e|0)!=(a|0))f[d>>2]=e+(~((e+-4-a|0)>>>2)<<2);gn(a)}a=i+64|0;e=f[a>>2]|0;f[a>>2]=0;if(e|0){a=f[e>>2]|0;if(a|0){d=e+4|0;if((f[d>>2]|0)!=(a|0))f[d>>2]=a;gn(a)}gn(e)}gn(i);k=f[h>>2]|0;l=f[g>>2]|0;m=k-l|0;n=m>>2;o=n+-1|0;u=c;return o|0}function ke(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=1048576){if((h|0)!=1048576?(e=i+4194304|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else ef(a,1048576-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else le(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>1048576){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==1048576;return k|0}function le(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;if(d-g>>3>>>0>=b>>>0){h=b;i=g;do{j=i;f[j>>2]=0;f[j+4>>2]=0;i=(f[e>>2]|0)+8|0;f[e>>2]=i;h=h+-1|0}while((h|0)!=0);return}h=f[a>>2]|0;i=g-h>>3;g=i+b|0;if(g>>>0>536870911)xm(a);j=d-h|0;h=j>>2;d=j>>3>>>0<268435455?(h>>>0<g>>>0?g:h):536870911;do if(d)if(d>>>0>536870911){h=ra(8)|0;al(h,10109);f[h>>2]=3812;va(h|0,904,84)}else{k=dj(d<<3)|0;break}else k=0;while(0);h=k+(i<<3)|0;i=k+(d<<3)|0;d=b;b=h;k=h;do{g=b;f[g>>2]=0;f[g+4>>2]=0;b=k+8|0;k=b;d=d+-1|0}while((d|0)!=0);d=f[a>>2]|0;b=(f[e>>2]|0)-d|0;g=h+(0-(b>>3)<<3)|0;if((b|0)>0)be(g|0,d|0,b|0)|0;f[a>>2]=g;f[e>>2]=k;f[c>>2]=i;if(!d)return;gn(d);return}function me(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=524288){if((h|0)!=524288?(e=i+2097152|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else ef(a,524288-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else le(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>524288){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==524288;return k|0}function ne(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=262144){if((h|0)!=262144?(e=i+1048576|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else ef(a,262144-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else le(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>262144){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==262144;return k|0}function oe(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;if(!c){g=0;u=d;return g|0}h=a+84|0;i=f[h>>2]|0;j=a+88|0;k=f[j>>2]|0;if((k|0)!=(i|0))f[j>>2]=k+(~((k+-4-i|0)>>>2)<<2);f[h>>2]=0;f[j>>2]=0;f[a+92>>2]=0;if(i|0)gn(i);i=a+72|0;j=f[i>>2]|0;h=a+76|0;if((f[h>>2]|0)!=(j|0))f[h>>2]=j;f[i>>2]=0;f[h>>2]=0;f[a+80>>2]=0;if(j|0)gn(j);j=c+4|0;h=(f[j>>2]|0)-(f[c>>2]|0)>>2;b[e>>0]=0;ge(a,h,e);h=c+24|0;i=c+28|0;k=(f[i>>2]|0)-(f[h>>2]|0)>>2;b[e>>0]=0;ge(a+12|0,k,e);qd(a+28|0,(f[j>>2]|0)-(f[c>>2]|0)>>2,2792);Dg(a+52|0,(f[i>>2]|0)-(f[h>>2]|0)>>2);Dg(a+40|0,(f[i>>2]|0)-(f[h>>2]|0)>>2);f[a+64>>2]=c;b[a+24>>0]=1;g=1;u=d;return g|0}function pe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=65536){if((h|0)!=65536?(e=i+262144|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else ef(a,65536-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else le(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>65536){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==65536;return k|0}function qe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=32768){if((h|0)!=32768?(e=i+131072|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else ef(a,32768-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else le(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>32768){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==32768;return k|0}function re(a,b){a=a|0;b=b|0;var c=0;c=a+8|0;gd(c,b)|0;if((c|0)==(b|0)){f[a+92>>2]=f[b+84>>2];return}else{vd(a+56|0,f[b+48>>2]|0,f[b+52>>2]|0);vd(a+68|0,f[b+60>>2]|0,f[b+64>>2]|0);vd(a+80|0,f[b+72>>2]|0,f[b+76>>2]|0);f[a+92>>2]=f[b+84>>2];Jd(a+96|0,f[b+88>>2]|0,f[b+92>>2]|0);return}}function se(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=8192){if((h|0)!=8192?(e=i+32768|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else ef(a,8192-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else le(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>8192){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==8192;return k|0}function te(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=e-g>>2;i=g;g=e;if(h>>>0>=4096){if((h|0)!=4096?(e=i+16384|0,(e|0)!=(g|0)):0)f[d>>2]=g+(~((g+-4-e|0)>>>2)<<2)}else ef(a,4096-h|0);h=a+12|0;e=a+16|0;g=f[e>>2]|0;d=f[h>>2]|0;i=g-d>>3;j=d;d=g;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(g=j+(c<<3)|0,(g|0)!=(d|0)):0)f[e>>2]=d+(~((d+-8-g|0)>>>3)<<3);if(!c){k=0;return k|0}}else le(h,c-i|0);i=f[h>>2]|0;h=0;g=0;do{d=b+(h<<2)|0;f[i+(h<<3)>>2]=f[d>>2];f[i+(h<<3)+4>>2]=g;e=g;g=(f[d>>2]|0)+g|0;if(g>>>0>4096){k=0;l=19;break}if(e>>>0<g>>>0){d=f[a>>2]|0;j=e;do{f[d+(j<<2)>>2]=h;j=j+1|0}while((j|0)!=(g|0))}h=h+1|0}while(h>>>0<c>>>0);if((l|0)==19)return k|0;k=(g|0)==4096;return k|0}function ue(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=u;u=u+224|0;g=e+120|0;h=e+80|0;i=e;j=e+136|0;k=h;l=k+40|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(l|0));f[g>>2]=f[d>>2];if((hb(0,c,g,i,h)|0)<0)m=-1;else{if((f[a+76>>2]|0)>-1)n=mn(a)|0;else n=0;d=f[a>>2]|0;k=d&32;if((b[a+74>>0]|0)<1)f[a>>2]=d&-33;d=a+48|0;if(!(f[d>>2]|0)){l=a+44|0;o=f[l>>2]|0;f[l>>2]=j;p=a+28|0;f[p>>2]=j;q=a+20|0;f[q>>2]=j;f[d>>2]=80;r=a+16|0;f[r>>2]=j+80;j=hb(a,c,g,i,h)|0;if(!o)s=j;else{Pa[f[a+36>>2]&31](a,0,0)|0;t=(f[q>>2]|0)==0?-1:j;f[l>>2]=o;f[d>>2]=0;f[r>>2]=0;f[p>>2]=0;f[q>>2]=0;s=t}}else s=hb(a,c,g,i,h)|0;h=f[a>>2]|0;f[a>>2]=h|k;if(n|0)ln(a);m=(h&32|0)==0?s:-1}u=e;return m|0}function ve(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e>>2;h=d;if(g>>>0<b>>>0){hd(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+(b<<2)|0;if((g|0)==(h|0))return;else i=h;do{h=i+-4|0;f[c>>2]=h;b=f[h>>2]|0;f[h>>2]=0;if(b|0){h=b+88|0;e=f[h>>2]|0;f[h>>2]=0;if(e|0){h=f[e+8>>2]|0;if(h|0){a=e+12|0;if((f[a>>2]|0)!=(h|0))f[a>>2]=h;gn(h)}gn(e)}e=f[b+68>>2]|0;if(e|0){h=b+72|0;a=f[h>>2]|0;if((a|0)!=(e|0))f[h>>2]=a+(~((a+-4-e|0)>>>2)<<2);gn(e)}e=b+64|0;a=f[e>>2]|0;f[e>>2]=0;if(a|0){e=f[a>>2]|0;if(e|0){h=a+4|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;gn(e)}gn(a)}gn(b)}i=f[c>>2]|0}while((i|0)!=(g|0));return}function we(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;i=h;if(e-h>>2>>>0>=b>>>0){j=b;k=i;while(1){f[k>>2]=f[c>>2];j=j+-1|0;if(!j)break;else k=k+4|0}f[g>>2]=i+(b<<2);return}i=f[a>>2]|0;k=h-i|0;h=k>>2;j=h+b|0;if(j>>>0>1073741823)xm(a);l=e-i|0;e=l>>1;m=l>>2>>>0<536870911?(e>>>0<j>>>0?j:e):1073741823;do if(m)if(m>>>0>1073741823){e=ra(8)|0;al(e,10109);f[e>>2]=3812;va(e|0,904,84)}else{e=dj(m<<2)|0;n=e;o=e;break}else{n=0;o=0}while(0);e=n+(h<<2)|0;h=n+(m<<2)|0;m=b;j=e;while(1){f[j>>2]=f[c>>2];m=m+-1|0;if(!m)break;else j=j+4|0}if((k|0)>0)be(o|0,i|0,k|0)|0;f[a>>2]=n;f[g>>2]=e+(b<<2);f[d>>2]=h;if(!i)return;gn(i);return}function xe(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=(f[a>>2]|0)+1794895138|0;g=Dl(f[a+8>>2]|0,e)|0;h=Dl(f[a+12>>2]|0,e)|0;i=Dl(f[a+16>>2]|0,e)|0;a:do if((g>>>0<c>>>2>>>0?(j=c-(g<<2)|0,h>>>0<j>>>0&i>>>0<j>>>0):0)?((i|h)&3|0)==0:0){j=h>>>2;k=i>>>2;l=0;m=g;while(1){n=m>>>1;o=l+n|0;p=o<<1;q=p+j|0;r=Dl(f[a+(q<<2)>>2]|0,e)|0;s=Dl(f[a+(q+1<<2)>>2]|0,e)|0;if(!(s>>>0<c>>>0&r>>>0<(c-s|0)>>>0)){t=0;break a}if(b[a+(s+r)>>0]|0){t=0;break a}r=yh(d,a+s|0)|0;if(!r)break;s=(r|0)<0;if((m|0)==1){t=0;break a}else{l=s?l:o;m=s?n:m-n|0}}m=p+k|0;l=Dl(f[a+(m<<2)>>2]|0,e)|0;j=Dl(f[a+(m+1<<2)>>2]|0,e)|0;if(j>>>0<c>>>0&l>>>0<(c-j|0)>>>0)t=(b[a+(j+l)>>0]|0)==0?a+j|0:0;else t=0}else t=0;while(0);return t|0}function ye(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h=u;u=u+64|0;i=h;j=f[a>>2]|0;k=a+(f[j+-8>>2]|0)|0;l=f[j+-4>>2]|0;f[i>>2]=e;f[i+4>>2]=a;f[i+8>>2]=c;f[i+12>>2]=g;g=i+16|0;c=i+20|0;a=i+24|0;j=i+28|0;m=i+32|0;n=i+40|0;o=g;p=o+36|0;do{f[o>>2]=0;o=o+4|0}while((o|0)<(p|0));d[g+36>>1]=0;b[g+38>>0]=0;a:do if(Cl(l,e,0)|0){f[i+48>>2]=1;Xa[f[(f[l>>2]|0)+20>>2]&3](l,i,k,k,1,0);q=(f[a>>2]|0)==1?k:0}else{Wa[f[(f[l>>2]|0)+24>>2]&3](l,i,k,1,0);switch(f[i+36>>2]|0){case 0:{q=(f[n>>2]|0)==1&(f[j>>2]|0)==1&(f[m>>2]|0)==1?f[c>>2]|0:0;break a;break}case 1:break;default:{q=0;break a}}if((f[a>>2]|0)!=1?!((f[n>>2]|0)==0&(f[j>>2]|0)==1&(f[m>>2]|0)==1):0){q=0;break}q=f[g>>2]|0}while(0);u=h;return q|0}function ze(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=La;d=u;u=u+32|0;e=d+16|0;g=d;h=a+8|0;i=b[(f[h>>2]|0)+24>>0]<<2;j=f[a+16>>2]|0;if(!(f[j+80>>2]|0))k=0;else k=(f[f[j>>2]>>2]|0)+(f[j+48>>2]|0)|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;j=f[a+24>>2]|0;if((j+-2|0)>>>0>28){l=0;u=d;return l|0}f[g>>2]=j;a=1<<j;f[g+4>>2]=a+-1;j=a+-2|0;a=g+8|0;f[a>>2]=j;f[g+12>>2]=(j|0)/2|0;if(!c){l=1;u=d;return l|0}m=0;n=0;o=0;p=j;while(1){q=$($(1.0)/$(p|0));yd(g,$(q*$(f[k+(m<<2)>>2]|0)),$(q*$(f[k+((m|1)<<2)>>2]|0)),e);be((f[f[(f[h>>2]|0)+64>>2]>>2]|0)+o|0,e|0,i|0)|0;j=n+1|0;if((j|0)==(c|0)){l=1;break}m=m+2|0;n=j;o=o+i|0;p=f[a>>2]|0}u=d;return l|0}function Ae(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(d-g>>2>>>0>=b>>>0){i=b;j=h;while(1){f[j>>2]=1;i=i+-1|0;if(!i)break;else j=j+4|0}f[e>>2]=h+(b<<2);return}h=f[a>>2]|0;j=g-h|0;g=j>>2;i=g+b|0;if(i>>>0>1073741823)xm(a);k=d-h|0;d=k>>1;l=k>>2>>>0<536870911?(d>>>0<i>>>0?i:d):1073741823;do if(l)if(l>>>0>1073741823){d=ra(8)|0;al(d,10109);f[d>>2]=3812;va(d|0,904,84)}else{d=dj(l<<2)|0;m=d;n=d;break}else{m=0;n=0}while(0);d=m+(g<<2)|0;g=m+(l<<2)|0;l=b;i=d;while(1){f[i>>2]=1;l=l+-1|0;if(!l)break;else i=i+4|0}if((j|0)>0)be(n|0,h|0,j|0)|0;f[a>>2]=m;f[e>>2]=d+(b<<2);f[c>>2]=g;if(!h)return;gn(h);return}function Be(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a+12|0;d=f[a>>2]|0;e=a+8|0;g=f[e>>2]|0;h=(g|0)==-1;if(!(b[c>>0]|0)){do if((!h?(i=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(i|0)!=-1):0)?(j=f[(f[d+12>>2]|0)+(i<<2)>>2]|0,(j|0)!=-1):0)if(!((j>>>0)%3|0)){k=j+2|0;break}else{k=j+-1|0;break}else k=-1;while(0);f[e>>2]=k;return}k=g+1|0;if((!h?(h=((k>>>0)%3|0|0)==0?g+-2|0:k,(h|0)!=-1):0)?(k=f[(f[d+12>>2]|0)+(h<<2)>>2]|0,h=k+1|0,(k|0)!=-1):0){g=((h>>>0)%3|0|0)==0?k+-2|0:h;f[e>>2]=g;if((g|0)!=-1){if((g|0)!=(f[a+4>>2]|0))return;f[e>>2]=-1;return}}else f[e>>2]=-1;g=f[a+4>>2]|0;do if(((g|0)!=-1?(a=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(a|0)!=-1):0)?(h=f[(f[d+12>>2]|0)+(a<<2)>>2]|0,(h|0)!=-1):0)if(!((h>>>0)%3|0)){l=h+2|0;break}else{l=h+-1|0;break}else l=-1;while(0);f[e>>2]=l;b[c>>0]=0;return}function Ce(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=f[a+4>>2]|0;if(!d){e=0;return e|0}a=b[c+11>>0]|0;g=a<<24>>24<0;h=g?f[c+4>>2]|0:a&255;a=g?f[c>>2]|0:c;c=d;while(1){d=c+16|0;g=b[d+11>>0]|0;i=g<<24>>24<0;j=i?f[c+20>>2]|0:g&255;g=j>>>0<h>>>0;k=g?j:h;if((k|0)!=0?(l=oh(a,i?f[d>>2]|0:d,k)|0,(l|0)!=0):0)if((l|0)<0)m=7;else m=8;else if(h>>>0<j>>>0)m=7;else m=8;if((m|0)==7){m=0;n=c}else if((m|0)==8){m=0;l=h>>>0<j>>>0?h:j;if((l|0)!=0?(j=oh(i?f[d>>2]|0:d,a,l)|0,(j|0)!=0):0){if((j|0)>=0){e=1;m=14;break}}else m=10;if((m|0)==10?(m=0,!g):0){e=1;m=14;break}n=c+4|0}c=f[n>>2]|0;if(!c){e=0;m=14;break}}if((m|0)==14)return e|0;return 0}function De(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=u;u=u+32|0;e=d+12|0;g=d;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;h=fg(c)|0;if(h>>>0>4294967279)xm(e);if(h>>>0<11){b[e+11>>0]=h;if(!h)i=e;else{j=e;k=6}}else{l=h+16&-16;m=dj(l)|0;f[e>>2]=m;f[e+8>>2]=l|-2147483648;f[e+4>>2]=h;j=m;k=6}if((k|0)==6){be(j|0,c|0,h|0)|0;i=j}b[i+h>>0]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=g+11|0;b[h>>0]=4;f[g>>2]=1701667182;b[g+4>>0]=0;i=f[a+4>>2]|0;if((i|0)!=0?(j=Kc(i,g,e)|0,(j|0)!=0):0)n=mh(a,f[j+40>>2]|0)|0;else n=-1;if((b[h>>0]|0)<0)gn(f[g>>2]|0);if((b[e+11>>0]|0)>=0){u=d;return n|0}gn(f[e>>2]|0);u=d;return n|0}function Ee(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,i=0;if((b|0)==-2)g=0;else{i=f[(f[(f[d+4>>2]|0)+8>>2]|0)+(c<<2)>>2]|0;do if((Na[f[(f[d>>2]|0)+8>>2]&127](d)|0)==1){sd(a,d,b,c,e,((h[d+36>>0]|0)<<8|(h[d+37>>0]|0))&65535);if(!(f[a>>2]|0)){f[a>>2]=0;break}else return}while(0);d=dj(44)|0;f[d>>2]=1256;f[d+4>>2]=i;i=d+8|0;f[i>>2]=f[e>>2];f[i+4>>2]=f[e+4>>2];f[i+8>>2]=f[e+8>>2];f[i+12>>2]=f[e+12>>2];f[i+16>>2]=f[e+16>>2];f[i+20>>2]=f[e+20>>2];Bg(d+32|0,e+24|0);f[d>>2]=1312;g=d}f[a>>2]=g;return}function Fe(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+16|0;if(b[d+84>>0]|0){g=f[e>>2]|0;return g|0}a=f[e>>2]|0;if(!a){g=f[e>>2]|0;return g|0}h=a+84|0;if(!(b[h>>0]|0)){g=f[e>>2]|0;return g|0}i=(f[d+72>>2]|0)-(f[d+68>>2]|0)>>2;b[h>>0]=0;h=a+68|0;j=a+72|0;a=f[j>>2]|0;k=f[h>>2]|0;l=a-k>>2;m=k;k=a;if(i>>>0<=l>>>0)if(i>>>0<l>>>0?(a=m+(i<<2)|0,(a|0)!=(k|0)):0){f[j>>2]=k+(~((k+-4-a|0)>>>2)<<2);n=d}else n=d;else{we(h,i-l|0,1124);n=f[c>>2]|0}if(b[n+84>>0]|0){g=f[e>>2]|0;return g|0}c=f[n+68>>2]|0;l=c;i=(f[n+72>>2]|0)-c>>2;if(!i){g=f[e>>2]|0;return g|0}c=f[(f[e>>2]|0)+68>>2]|0;n=0;do{f[c+(n<<2)>>2]=f[l+(n<<2)>>2];n=n+1|0}while(n>>>0<i>>>0);g=f[e>>2]|0;return g|0}function Ge(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=a+8|0;g=f[e>>2]|0;h=b[g+24>>0]|0;i=h<<24>>24;j=i<<1;k=dn(i>>>0>2147483647?-1:i<<1)|0;l=f[a+16>>2]|0;if(!(f[l+80>>2]|0))m=0;else m=(f[f[l>>2]>>2]|0)+(f[l+48>>2]|0)|0;if(!c){en(k);return}if(h<<24>>24>0){h=0;l=0;a=0;while(1){n=0;o=a;while(1){d[k+(n<<1)>>1]=f[m+(o<<2)>>2];n=n+1|0;if((n|0)==(i|0))break;else o=o+1|0}be((f[f[(f[e>>2]|0)+64>>2]>>2]|0)+l|0,k|0,j|0)|0;h=h+1|0;if((h|0)==(c|0))break;else{l=l+j|0;a=a+i|0}}en(k);return}else{be(f[f[g+64>>2]>>2]|0,k|0,j|0)|0;if((c|0)==1){en(k);return}else{p=0;q=1}do{p=p+j|0;be((f[f[(f[e>>2]|0)+64>>2]>>2]|0)+p|0,k|0,j|0)|0;q=q+1|0}while((q|0)!=(c|0));en(k);return}}function He(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=a+8|0;e=f[d>>2]|0;g=b[e+24>>0]|0;h=g<<24>>24;i=h<<2;j=dn(h>>>0>1073741823?-1:h<<2)|0;k=f[a+16>>2]|0;if(!(f[k+80>>2]|0))l=0;else l=(f[f[k>>2]>>2]|0)+(f[k+48>>2]|0)|0;if(!c){en(j);return}if(g<<24>>24>0){g=0;k=0;a=0;while(1){m=0;n=a;while(1){f[j+(m<<2)>>2]=f[l+(n<<2)>>2];m=m+1|0;if((m|0)==(h|0))break;else n=n+1|0}be((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+k|0,j|0,i|0)|0;g=g+1|0;if((g|0)==(c|0))break;else{k=k+i|0;a=a+h|0}}en(j);return}else{be(f[f[e+64>>2]>>2]|0,j|0,i|0)|0;if((c|0)==1){en(j);return}else{o=0;p=1}do{o=o+i|0;be((f[f[(f[d>>2]|0)+64>>2]>>2]|0)+o|0,j|0,i|0)|0;p=p+1|0}while((p|0)!=(c|0));en(j);return}}function Ie(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=f[a+196>>2]|0;if(b|0){c=a+200|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=a+184|0;d=f[b>>2]|0;if(d|0){c=a+188|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;while(1){e=h+-12|0;f[c>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);gn(i);j=f[c>>2]|0}if((j|0)==(d|0))break;else h=j}g=f[b>>2]|0}gn(g)}g=f[a+156>>2]|0;if(g|0){b=a+160|0;j=f[b>>2]|0;if((j|0)!=(g|0))f[b>>2]=j+(~((j+-4-g|0)>>>2)<<2);gn(g)}g=a+136|0;a=f[g>>2]|0;f[g>>2]=0;if(!a)return;g=a+-4|0;j=f[g>>2]|0;if(j|0){b=a+(j<<4)|0;do b=b+-16|0;while((b|0)!=(a|0))}en(g);return}function Je(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+32|0;e=d+16|0;g=d;switch(c<<24>>24){case 0:{c=dj(48)|0;Tl(c);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=c;u=d;return}case 1:{c=dj(52)|0;Zk(c);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=c;u=d;return}default:{c=dj(32)|0;f[g>>2]=c;f[g+8>>2]=-2147483616;f[g+4>>2]=28;h=c;i=8439;j=h+28|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[c+28>>0]=0;f[e>>2]=-1;c=e+4|0;Qf(c,g);f[a>>2]=f[e>>2];Qf(a+4|0,c);f[a+16>>2]=0;if((b[c+11>>0]|0)<0)gn(f[c>>2]|0);if((b[g+11>>0]|0)<0)gn(f[g>>2]|0);u=d;return}}}function Ke(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;c=b+8|0;d=f[c>>2]|0;e=f[c+4>>2]|0;c=b+16|0;g=c;i=f[g>>2]|0;j=f[g+4>>2]|0;g=Uj(i|0,j|0,4,0)|0;k=I;if((e|0)<(k|0)|(e|0)==(k|0)&d>>>0<g>>>0){l=0;return l|0}m=(f[b>>2]|0)+i|0;n=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=c;f[m>>2]=g;f[m+4>>2]=k;k=Uj(i|0,j|0,8,0)|0;j=I;if((e|0)<(j|0)|(e|0)==(j|0)&d>>>0<k>>>0){l=0;return l|0}d=c;f[d>>2]=k;f[d+4>>2]=j;if(!(n&1)){l=0;return l|0}j=(_(n|0)|0)^31;if((j+-1|0)>>>0>28){l=0;return l|0}f[a+8>>2]=j+1;n=2<<j;f[a+12>>2]=n+-1;j=n+-2|0;f[a+16>>2]=j;f[a+20>>2]=(j|0)/2|0;l=rd(a+88|0,b)|0;return l|0}function Le(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=(d-e|0)/144|0;h=d;if(g>>>0<b>>>0){Ic(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+(b*144|0)|0;if((g|0)==(h|0))return;else i=h;do{f[c>>2]=i+-144;h=f[i+-12>>2]|0;if(h|0){b=i+-8|0;e=f[b>>2]|0;if((e|0)!=(h|0))f[b>>2]=e+(~((e+-4-h|0)>>>2)<<2);gn(h)}h=f[i+-28>>2]|0;if(h|0){e=i+-24|0;b=f[e>>2]|0;if((b|0)!=(h|0))f[e>>2]=b+(~((b+-4-h|0)>>>2)<<2);gn(h)}h=f[i+-40>>2]|0;if(h|0){b=i+-36|0;e=f[b>>2]|0;if((e|0)!=(h|0))f[b>>2]=e+(~((e+-4-h|0)>>>2)<<2);gn(h)}tf(i+-140|0);i=f[c>>2]|0}while((i|0)!=(g|0));return}function Me(a,b){a=a|0;b=b|0;var c=0,d=La,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=$a(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Sb(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=$a(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;Sb(a,e);return}function Ne(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=1136;b=a+60|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);c=f[a+48>>2]|0;if(c|0){b=a+52|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);gn(c)}c=a+36|0;d=f[c>>2]|0;if(d|0){b=a+40|0;e=f[b>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[b>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0)Sa[f[(f[i>>2]|0)+4>>2]&127](i);h=f[b>>2]|0}while((h|0)!=(d|0));g=f[c>>2]|0}gn(g)}f[a>>2]=1032;g=f[a+16>>2]|0;if(g|0){c=a+20|0;d=f[c>>2]|0;if((d|0)!=(g|0))f[c>>2]=d+(~((d+-4-g|0)>>>2)<<2);gn(g)}g=f[a+4>>2]|0;if(!g)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(g|0))f[d>>2]=a+(~((a+-4-g|0)>>>2)<<2);gn(g);return}function Oe(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d;do{d=g+-4|0;f[c>>2]=d;h=f[d>>2]|0;f[d>>2]=0;if(h|0){d=h+88|0;i=f[d>>2]|0;f[d>>2]=0;if(i|0){d=f[i+8>>2]|0;if(d|0){j=i+12|0;if((f[j>>2]|0)!=(d|0))f[j>>2]=d;gn(d)}gn(i)}i=f[h+68>>2]|0;if(i|0){d=h+72|0;j=f[d>>2]|0;if((j|0)!=(i|0))f[d>>2]=j+(~((j+-4-i|0)>>>2)<<2);gn(i)}i=h+64|0;j=f[i>>2]|0;f[i>>2]=0;if(j|0){i=f[j>>2]|0;if(i|0){d=j+4|0;if((f[d>>2]|0)!=(i|0))f[d>>2]=i;gn(i)}gn(j)}gn(h)}g=f[c>>2]|0}while((g|0)!=(b|0));e=f[a>>2]|0}gn(e);return}function Pe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=(d|0)<0;do if(!b){if(e){g=0;return g|0}h=a+4|0;i=f[h>>2]|0;j=f[a>>2]|0;k=i-j|0;if(k>>>0<c>>>0){hf(a,c-k|0);break}if(k>>>0>c>>>0?(k=j+c|0,(k|0)!=(i|0)):0)f[h>>2]=k}else{if(e){g=0;return g|0}k=a+4|0;h=f[k>>2]|0;i=f[a>>2]|0;j=h-i|0;do if(0<(d|0)|0==(d|0)&j>>>0<c>>>0){if(j>>>0<c>>>0){hf(a,c-j|0);break}if(j>>>0>c>>>0?(l=i+c|0,(l|0)!=(h|0)):0){f[k>>2]=l;m=15}else m=15}else m=15;while(0);if((m|0)==15?(c|0)==0:0)break;qi(f[a>>2]|0,b|0,c|0)|0}while(0);c=a+24|0;a=c;b=Uj(f[a>>2]|0,f[a+4>>2]|0,1,0)|0;a=c;f[a>>2]=b;f[a+4>>2]=I;g=1;return g|0}function Qe(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=f[a+4>>2]|0;c=a+8|0;d=f[c>>2]|0;if((d|0)!=(b|0)){e=d;do{d=e+-4|0;f[c>>2]=d;g=f[d>>2]|0;f[d>>2]=0;if(g|0){d=g+88|0;h=f[d>>2]|0;f[d>>2]=0;if(h|0){d=f[h+8>>2]|0;if(d|0){i=h+12|0;if((f[i>>2]|0)!=(d|0))f[i>>2]=d;gn(d)}gn(h)}h=f[g+68>>2]|0;if(h|0){d=g+72|0;i=f[d>>2]|0;if((i|0)!=(h|0))f[d>>2]=i+(~((i+-4-h|0)>>>2)<<2);gn(h)}h=g+64|0;i=f[h>>2]|0;f[h>>2]=0;if(i|0){h=f[i>>2]|0;if(h|0){d=i+4|0;if((f[d>>2]|0)!=(h|0))f[d>>2]=h;gn(h)}gn(i)}gn(g)}e=f[c>>2]|0}while((e|0)!=(b|0))}b=f[a>>2]|0;if(!b)return;gn(b);return}function Re(a,b){a=a|0;b=b|0;var c=0,d=La,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=$a(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){jc(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=$a(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;jc(a,e);return}function Se(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=dj(32)|0;f[a>>2]=g;f[a+4>>2]=c+8;c=a+8|0;b[c>>0]=0;h=g+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;h=g+20|0;i=e+12|0;f[h>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;g=e+16|0;e=f[g>>2]|0;j=f[i>>2]|0;k=e-j|0;if(!k){l=j;m=e;n=0}else{hf(h,k);l=f[i>>2]|0;m=f[g>>2]|0;n=f[h>>2]|0}be(n|0,l|0,m-l|0)|0;b[c>>0]=1;c=f[a>>2]|0;f[c+4>>2]=d;f[c>>2]=0;return}function Te(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=a+60|0;d=f[c>>2]|0;if(!d){e=0;return e|0}f[d+4>>2]=a+48;if(!(Na[f[(f[d>>2]|0)+12>>2]&127](d)|0)){e=0;return e|0}d=Na[f[(f[a>>2]|0)+24>>2]&127](a)|0;a:do if((d|0)>0){g=0;while(1){h=(Na[f[(f[a>>2]|0)+28>>2]&127](a)|0)+4|0;i=f[h>>2]|0;h=Oa[f[(f[a>>2]|0)+20>>2]&127](a,g)|0;j=f[c>>2]|0;g=g+1|0;if(!(Oa[f[(f[j>>2]|0)+8>>2]&127](j,f[(f[i+8>>2]|0)+(h<<2)>>2]|0)|0)){e=0;break}if((g|0)>=(d|0))break a}return e|0}while(0);if(!(Oa[f[(f[a>>2]|0)+36>>2]&127](a,b)|0)){e=0;return e|0}if(!(Oa[f[(f[a>>2]|0)+40>>2]&127](a,b)|0)){e=0;return e|0}e=Na[f[(f[a>>2]|0)+44>>2]&127](a)|0;return e|0}function Ue(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a=u;u=u+32|0;e=a+12|0;g=a;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=fg(d)|0;if(h>>>0>4294967279)xm(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=dj(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){be(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;Rf(c,g,e)|0;c=e+11|0;h=b[c>>0]|0;i=h<<24>>24<0?f[e>>2]|0:e;if((b[g+11>>0]|0)<0){gn(f[g>>2]|0);n=b[c>>0]|0}else n=h;if(n<<24>>24>=0){u=a;return i|0}gn(f[e>>2]|0);u=a;return i|0}function Ve(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=d+16|0;g=f[e>>2]|0;if(!g)if(!(Kh(d)|0)){h=f[e>>2]|0;i=5}else j=0;else{h=g;i=5}a:do if((i|0)==5){g=d+20|0;e=f[g>>2]|0;k=e;if((h-e|0)>>>0<c>>>0){j=Pa[f[d+36>>2]&31](d,a,c)|0;break}b:do if((b[d+75>>0]|0)>-1){e=c;while(1){if(!e){l=0;m=a;n=c;o=k;break b}p=e+-1|0;if((b[a+p>>0]|0)==10)break;else e=p}p=Pa[f[d+36>>2]&31](d,a,e)|0;if(p>>>0<e>>>0){j=p;break a}l=e;m=a+e|0;n=c-e|0;o=f[g>>2]|0}else{l=0;m=a;n=c;o=k}while(0);be(o|0,m|0,n|0)|0;f[g>>2]=(f[g>>2]|0)+n;j=l+n|0}while(0);return j|0}function We(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+12|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d+28>>2]|0;if(c|0){e=c;do{c=e;e=f[e>>2]|0;We(c+8|0);gn(c)}while((e|0)!=0)}e=d+20|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0)gn(c);c=f[d+8>>2]|0;if(c|0){e=c;do{c=e;e=f[e>>2]|0;g=c+8|0;h=f[c+20>>2]|0;if(h|0){i=c+24|0;if((f[i>>2]|0)!=(h|0))f[i>>2]=h;gn(h)}if((b[g+11>>0]|0)<0)gn(f[g>>2]|0);gn(c)}while((e|0)!=0)}e=f[d>>2]|0;f[d>>2]=0;if(e|0)gn(e);gn(d)}if((b[a+11>>0]|0)>=0)return;gn(f[a>>2]|0);return}function Xe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=(f[b+4>>2]|0)-(f[b>>2]|0)|0;b=d>>2;e=a+8|0;a=f[(f[e>>2]|0)+40>>2]|0;g=dn((a|0)>-1?a:-1)|0;h=c+8|0;if((d|0)<=0){i=1;en(g);return i|0}d=c+16|0;j=0;k=0;while(1){l=h;m=f[l>>2]|0;n=f[l+4>>2]|0;l=d;o=f[l>>2]|0;p=Uj(o|0,f[l+4>>2]|0,a|0,0)|0;l=I;if((n|0)<(l|0)|(n|0)==(l|0)&m>>>0<p>>>0){i=0;q=5;break}be(g|0,(f[c>>2]|0)+o|0,a|0)|0;o=d;f[o>>2]=p;f[o+4>>2]=l;be((f[f[(f[e>>2]|0)+64>>2]>>2]|0)+j|0,g|0,a|0)|0;k=k+1|0;if((k|0)>=(b|0)){i=1;q=5;break}else j=j+a|0}if((q|0)==5){en(g);return i|0}return 0}function Ye(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=a+216|0;e=a+220|0;g=f[d>>2]|0;if((f[e>>2]|0)==(g|0)){h=0;return h|0}i=a+4|0;a=0;j=g;a:while(1){g=f[j+(a*144|0)>>2]|0;if(((g|0)>=0?(k=f[i>>2]|0,l=f[k+8>>2]|0,(g|0)<((f[k+12>>2]|0)-l>>2|0)):0)?(k=f[l+(g<<2)>>2]|0,(Na[f[(f[k>>2]|0)+24>>2]&127](k)|0)>0):0){g=0;do{if((Oa[f[(f[k>>2]|0)+20>>2]&127](k,g)|0)==(c|0))break a;g=g+1|0}while((g|0)<(Na[f[(f[k>>2]|0)+24>>2]&127](k)|0))}k=a+1|0;j=f[d>>2]|0;if(k>>>0>=(((f[e>>2]|0)-j|0)/144|0)>>>0){h=0;m=11;break}else a=k}if((m|0)==11)return h|0;m=f[d>>2]|0;h=(b[m+(a*144|0)+100>>0]|0)==0?0:m+(a*144|0)+4|0;return h|0}function Ze(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0;c=b+8|0;d=f[c>>2]|0;e=f[c+4>>2]|0;c=b+16|0;g=c;i=f[g>>2]|0;j=f[g+4>>2]|0;g=Uj(i|0,j|0,4,0)|0;k=I;if((e|0)<(k|0)|(e|0)==(k|0)&d>>>0<g>>>0){l=0;return l|0}m=(f[b>>2]|0)+i|0;b=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;m=c;f[m>>2]=g;f[m+4>>2]=k;k=Uj(i|0,j|0,8,0)|0;j=I;if((e|0)<(j|0)|(e|0)==(j|0)&d>>>0<k>>>0){l=0;return l|0}d=c;f[d>>2]=k;f[d+4>>2]=j;if(!(b&1)){l=0;return l|0}j=(_(b|0)|0)^31;if((j+-1|0)>>>0>28){l=0;return l|0}f[a+8>>2]=j+1;b=2<<j;f[a+12>>2]=b+-1;j=b+-2|0;f[a+16>>2]=j;f[a+20>>2]=(j|0)/2|0;l=1;return l|0}function _e(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=a+216|0;d=a+220|0;e=f[c>>2]|0;a:do if((f[d>>2]|0)!=(e|0)){g=a+4|0;h=0;i=e;b:while(1){j=f[i+(h*144|0)>>2]|0;if(((j|0)>=0?(k=f[g>>2]|0,l=f[k+8>>2]|0,(j|0)<((f[k+12>>2]|0)-l>>2|0)):0)?(k=f[l+(j<<2)>>2]|0,(Na[f[(f[k>>2]|0)+24>>2]&127](k)|0)>0):0){j=0;do{if((Oa[f[(f[k>>2]|0)+20>>2]&127](k,j)|0)==(b|0))break b;j=j+1|0}while((j|0)<(Na[f[(f[k>>2]|0)+24>>2]&127](k)|0))}k=h+1|0;i=f[c>>2]|0;if(k>>>0>=(((f[d>>2]|0)-i|0)/144|0)>>>0)break a;else h=k}m=(f[c>>2]|0)+(h*144|0)+104|0;return m|0}while(0);m=a+184|0;return m|0}function $e(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=u;u=u+32|0;d=c+16|0;e=c+8|0;g=c;h=a+8|0;if(f[h>>2]<<5>>>0>=b>>>0){u=c;return}f[d>>2]=0;i=d+4|0;f[i>>2]=0;j=d+8|0;f[j>>2]=0;if((b|0)<0)xm(d);k=((b+-1|0)>>>5)+1|0;b=dj(k<<2)|0;f[d>>2]=b;f[i>>2]=0;f[j>>2]=k;k=f[a>>2]|0;f[e>>2]=k;f[e+4>>2]=0;b=a+4|0;l=f[b>>2]|0;f[g>>2]=k+(l>>>5<<2);f[g+4>>2]=l&31;Cd(d,e,g);g=f[a>>2]|0;f[a>>2]=f[d>>2];f[d>>2]=g;d=f[b>>2]|0;f[b>>2]=f[i>>2];f[i>>2]=d;d=f[h>>2]|0;f[h>>2]=f[j>>2];f[j>>2]=d;if(g|0)gn(g);u=c;return}function af(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=u;u=u+16|0;e=c;do if(((h[(f[a+4>>2]|0)+36>>0]|0)<<8&65535)>511){g=d+8|0;i=f[g+4>>2]|0;j=d+16|0;k=j;l=f[k>>2]|0;m=f[k+4>>2]|0;if((i|0)>(m|0)|((i|0)==(m|0)?(f[g>>2]|0)>>>0>l>>>0:0)){g=b[(f[d>>2]|0)+l>>0]|0;i=Uj(l|0,m|0,1,0)|0;m=j;f[m>>2]=i;f[m+4>>2]=I;m=g&255;f[a+24>>2]=m;n=m;break}else{o=0;u=c;return o|0}}else n=f[a+24>>2]|0;while(0);f[e>>2]=976;f[e+4>>2]=-1;Hl(e,n);o=kh(e,f[a+16>>2]|0)|0;u=c;return o|0}function bf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d|0;g=(e|0)/12|0;h=g+1|0;if(h>>>0>357913941)xm(a);i=a+8|0;j=((f[i>>2]|0)-d|0)/12|0;k=j<<1;l=j>>>0<178956970?(k>>>0<h>>>0?h:k):357913941;do if(l)if(l>>>0>357913941){k=ra(8)|0;al(k,10109);f[k>>2]=3812;va(k|0,904,84)}else{m=dj(l*12|0)|0;break}else m=0;while(0);k=m+(g*12|0)|0;f[k>>2]=f[b>>2];f[k+4>>2]=f[b+4>>2];f[k+8>>2]=f[b+8>>2];b=k+(((e|0)/-12|0)*12|0)|0;if((e|0)>0)be(b|0,d|0,e|0)|0;f[a>>2]=b;f[c>>2]=k+12;f[i>>2]=m+(l*12|0);if(!d)return;gn(d);return}function cf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=u;u=u+16|0;d=c;e=Bd(a,d,b)|0;g=f[e>>2]|0;if(g|0){h=g;i=h+28|0;u=c;return i|0}g=dj(40)|0;Qf(g+16|0,b);b=g+28|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;b=f[d>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=b;f[e>>2]=g;b=f[f[a>>2]>>2]|0;if(!b)j=g;else{f[a>>2]=b;j=f[e>>2]|0}Jc(f[a+4>>2]|0,j);j=a+8|0;f[j>>2]=(f[j>>2]|0)+1;h=g;i=h+28|0;u=c;return i|0}function df(a,c,d,e,g,h,i,j){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0;k=u;u=u+16|0;l=k;if((-18-c|0)>>>0<d>>>0)xm(a);if((b[a+11>>0]|0)<0)m=f[a>>2]|0;else m=a;if(c>>>0<2147483623){n=d+c|0;d=c<<1;o=n>>>0<d>>>0?d:n;p=o>>>0<11?11:o+16&-16}else p=-17;o=dj(p)|0;if(g|0)Rk(o,m,g)|0;if(i|0)Rk(o+g|0,j,i)|0;j=e-h|0;e=j-g|0;if(e|0)Rk(o+g+i|0,m+g+h|0,e)|0;if((c|0)!=10)gn(m);f[a>>2]=o;f[a+8>>2]=p|-2147483648;p=j+i|0;f[a+4>>2]=p;b[l>>0]=0;Ul(o+p|0,l);u=k;return}function ef(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;if(d-g>>2>>>0>=b>>>0){Uf(g|0,0,b<<2|0)|0;f[e>>2]=g+(b<<2);return}h=f[a>>2]|0;i=g-h|0;g=i>>2;j=g+b|0;if(j>>>0>1073741823)xm(a);k=d-h|0;d=k>>1;l=k>>2>>>0<536870911?(d>>>0<j>>>0?j:d):1073741823;do if(l)if(l>>>0>1073741823){d=ra(8)|0;al(d,10109);f[d>>2]=3812;va(d|0,904,84)}else{d=dj(l<<2)|0;m=d;n=d;break}else{m=0;n=0}while(0);d=m+(g<<2)|0;Uf(d|0,0,b<<2|0)|0;if((i|0)>0)be(n|0,h|0,i|0)|0;f[a>>2]=m;f[e>>2]=d+(b<<2);f[c>>2]=m+(l<<2);if(!h)return;gn(h);return}function ff(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d;do{f[c>>2]=g+-144;d=f[g+-12>>2]|0;if(d|0){h=g+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);gn(d)}d=f[g+-28>>2]|0;if(d|0){i=g+-24|0;h=f[i>>2]|0;if((h|0)!=(d|0))f[i>>2]=h+(~((h+-4-d|0)>>>2)<<2);gn(d)}d=f[g+-40>>2]|0;if(d|0){h=g+-36|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);gn(d)}tf(g+-140|0);g=f[c>>2]|0}while((g|0)!=(b|0));e=f[a>>2]|0}gn(e);return}function gf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0;a=u;u=u+16|0;e=a;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;g=fg(d)|0;if(g>>>0>4294967279)xm(e);if(g>>>0<11){b[e+11>>0]=g;if(!g)h=e;else{i=e;j=6}}else{k=g+16&-16;l=dj(k)|0;f[e>>2]=l;f[e+8>>2]=k|-2147483648;f[e+4>>2]=g;i=l;j=6}if((j|0)==6){be(i|0,d|0,g|0)|0;h=i}b[h+g>>0]=0;g=(_b(c,e)|0)!=0;if((b[e+11>>0]|0)>=0){u=a;return g|0}gn(f[e>>2]|0);u=a;return g|0}function hf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if((e-h|0)>>>0>=c>>>0){i=c;j=h;do{b[j>>0]=0;j=(f[g>>2]|0)+1|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=h-i|0;h=j+c|0;if((h|0)<0)xm(a);k=e-i|0;i=k<<1;e=k>>>0<1073741823?(i>>>0<h>>>0?h:i):2147483647;if(!e)l=0;else l=dj(e)|0;i=l+j|0;j=l+e|0;e=c;c=i;l=i;do{b[l>>0]=0;l=c+1|0;c=l;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;l=(f[g>>2]|0)-e|0;h=i+(0-l)|0;if((l|0)>0)be(h|0,e|0,l|0)|0;f[a>>2]=h;f[g>>2]=c;f[d>>2]=j;if(!e)return;gn(e);return}function jf(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2572;b=a+84|0;c=a+4|0;d=c+80|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+88>>2]=-1;f[a+92>>2]=-1;b=a+152|0;c=a+96|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));n[b>>2]=$(1.0);b=a+212|0;c=a+156|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+216>>2]=0;f[a+220>>2]=0;f[a+224>>2]=0;Ji(a+232|0);b=a+380|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[a+400>>2]=-1;f[a+404>>2]=-1;f[a+408>>2]=2;f[a+412>>2]=7;b=a+416|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;return}function kf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0;d=u;u=u+32|0;c=d;if((h[(f[a+4>>2]|0)+36>>0]<<8&65535)>511?!(Na[f[(f[a>>2]|0)+52>>2]&127](a)|0):0){e=0;u=d;return e|0}f[c>>2]=1004;f[c+4>>2]=-1;g=c+8|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;Qh(c,f[a+24>>2]|0,f[a+28>>2]|0,b[(f[a+8>>2]|0)+24>>0]|0,$(n[a+32>>2]));i=kh(c,f[a+16>>2]|0)|0;f[c>>2]=1004;a=f[g>>2]|0;if(a|0){g=c+12|0;c=f[g>>2]|0;if((c|0)!=(a|0))f[g>>2]=c+(~((c+-4-a|0)>>>2)<<2);gn(a)}e=i;u=d;return e|0}
+function Ya(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0;b=u;u=u+16|0;c=b;do if(a>>>0<245){d=a>>>0<11?16:a+11&-8;e=d>>>3;g=f[3300]|0;h=g>>>e;if(h&3|0){i=(h&1^1)+e|0;j=13240+(i<<1<<2)|0;k=j+8|0;l=f[k>>2]|0;m=l+8|0;n=f[m>>2]|0;if((n|0)==(j|0))f[3300]=g&~(1<<i);else{f[n+12>>2]=j;f[k>>2]=n}n=i<<3;f[l+4>>2]=n|3;i=l+n+4|0;f[i>>2]=f[i>>2]|1;o=m;u=b;return o|0}m=f[3302]|0;if(d>>>0>m>>>0){if(h|0){i=2<<e;n=h<<e&(i|0-i);i=(n&0-n)+-1|0;n=i>>>12&16;e=i>>>n;i=e>>>5&8;h=e>>>i;e=h>>>2&4;l=h>>>e;h=l>>>1&2;k=l>>>h;l=k>>>1&1;j=(i|n|e|h|l)+(k>>>l)|0;l=13240+(j<<1<<2)|0;k=l+8|0;h=f[k>>2]|0;e=h+8|0;n=f[e>>2]|0;if((n|0)==(l|0)){i=g&~(1<<j);f[3300]=i;p=i}else{f[n+12>>2]=l;f[k>>2]=n;p=g}n=j<<3;j=n-d|0;f[h+4>>2]=d|3;k=h+d|0;f[k+4>>2]=j|1;f[h+n>>2]=j;if(m|0){n=f[3305]|0;h=m>>>3;l=13240+(h<<1<<2)|0;i=1<<h;if(!(p&i)){f[3300]=p|i;q=l;r=l+8|0}else{i=l+8|0;q=f[i>>2]|0;r=i}f[r>>2]=n;f[q+12>>2]=n;f[n+8>>2]=q;f[n+12>>2]=l}f[3302]=j;f[3305]=k;o=e;u=b;return o|0}e=f[3301]|0;if(e){k=(e&0-e)+-1|0;j=k>>>12&16;l=k>>>j;k=l>>>5&8;n=l>>>k;l=n>>>2&4;i=n>>>l;n=i>>>1&2;h=i>>>n;i=h>>>1&1;s=f[13504+((k|j|l|n|i)+(h>>>i)<<2)>>2]|0;i=(f[s+4>>2]&-8)-d|0;h=f[s+16+(((f[s+16>>2]|0)==0&1)<<2)>>2]|0;if(!h){t=s;v=i}else{n=s;s=i;i=h;while(1){h=(f[i+4>>2]&-8)-d|0;l=h>>>0<s>>>0;j=l?h:s;h=l?i:n;i=f[i+16+(((f[i+16>>2]|0)==0&1)<<2)>>2]|0;if(!i){t=h;v=j;break}else{n=h;s=j}}}s=t+d|0;if(s>>>0>t>>>0){n=f[t+24>>2]|0;i=f[t+12>>2]|0;do if((i|0)==(t|0)){j=t+20|0;h=f[j>>2]|0;if(!h){l=t+16|0;k=f[l>>2]|0;if(!k){w=0;break}else{x=k;y=l}}else{x=h;y=j}while(1){j=x+20|0;h=f[j>>2]|0;if(h|0){x=h;y=j;continue}j=x+16|0;h=f[j>>2]|0;if(!h)break;else{x=h;y=j}}f[y>>2]=0;w=x}else{j=f[t+8>>2]|0;f[j+12>>2]=i;f[i+8>>2]=j;w=i}while(0);do if(n|0){i=f[t+28>>2]|0;j=13504+(i<<2)|0;if((t|0)==(f[j>>2]|0)){f[j>>2]=w;if(!w){f[3301]=e&~(1<<i);break}}else{f[n+16+(((f[n+16>>2]|0)!=(t|0)&1)<<2)>>2]=w;if(!w)break}f[w+24>>2]=n;i=f[t+16>>2]|0;if(i|0){f[w+16>>2]=i;f[i+24>>2]=w}i=f[t+20>>2]|0;if(i|0){f[w+20>>2]=i;f[i+24>>2]=w}}while(0);if(v>>>0<16){n=v+d|0;f[t+4>>2]=n|3;e=t+n+4|0;f[e>>2]=f[e>>2]|1}else{f[t+4>>2]=d|3;f[s+4>>2]=v|1;f[s+v>>2]=v;if(m|0){e=f[3305]|0;n=m>>>3;i=13240+(n<<1<<2)|0;j=1<<n;if(!(g&j)){f[3300]=g|j;z=i;A=i+8|0}else{j=i+8|0;z=f[j>>2]|0;A=j}f[A>>2]=e;f[z+12>>2]=e;f[e+8>>2]=z;f[e+12>>2]=i}f[3302]=v;f[3305]=s}o=t+8|0;u=b;return o|0}else B=d}else B=d}else B=d}else if(a>>>0<=4294967231){i=a+11|0;e=i&-8;j=f[3301]|0;if(j){n=0-e|0;h=i>>>8;if(h)if(e>>>0>16777215)C=31;else{i=(h+1048320|0)>>>16&8;l=h<<i;h=(l+520192|0)>>>16&4;k=l<<h;l=(k+245760|0)>>>16&2;D=14-(h|i|l)+(k<<l>>>15)|0;C=e>>>(D+7|0)&1|D<<1}else C=0;D=f[13504+(C<<2)>>2]|0;a:do if(!D){E=0;F=0;G=n;H=57}else{l=0;k=n;i=D;h=e<<((C|0)==31?0:25-(C>>>1)|0);I=0;while(1){J=(f[i+4>>2]&-8)-e|0;if(J>>>0<k>>>0)if(!J){K=0;L=i;M=i;H=61;break a}else{N=i;O=J}else{N=l;O=k}J=f[i+20>>2]|0;i=f[i+16+(h>>>31<<2)>>2]|0;P=(J|0)==0|(J|0)==(i|0)?I:J;J=(i|0)==0;if(J){E=P;F=N;G=O;H=57;break}else{l=N;k=O;h=h<<((J^1)&1);I=P}}}while(0);if((H|0)==57){if((E|0)==0&(F|0)==0){D=2<<C;n=j&(D|0-D);if(!n){B=e;break}D=(n&0-n)+-1|0;n=D>>>12&16;d=D>>>n;D=d>>>5&8;s=d>>>D;d=s>>>2&4;g=s>>>d;s=g>>>1&2;m=g>>>s;g=m>>>1&1;Q=0;R=f[13504+((D|n|d|s|g)+(m>>>g)<<2)>>2]|0}else{Q=F;R=E}if(!R){S=Q;T=G}else{K=G;L=R;M=Q;H=61}}if((H|0)==61)while(1){H=0;g=(f[L+4>>2]&-8)-e|0;m=g>>>0<K>>>0;s=m?g:K;g=m?L:M;L=f[L+16+(((f[L+16>>2]|0)==0&1)<<2)>>2]|0;if(!L){S=g;T=s;break}else{K=s;M=g;H=61}}if((S|0)!=0?T>>>0<((f[3302]|0)-e|0)>>>0:0){g=S+e|0;if(g>>>0<=S>>>0){o=0;u=b;return o|0}s=f[S+24>>2]|0;m=f[S+12>>2]|0;do if((m|0)==(S|0)){d=S+20|0;n=f[d>>2]|0;if(!n){D=S+16|0;I=f[D>>2]|0;if(!I){U=0;break}else{V=I;W=D}}else{V=n;W=d}while(1){d=V+20|0;n=f[d>>2]|0;if(n|0){V=n;W=d;continue}d=V+16|0;n=f[d>>2]|0;if(!n)break;else{V=n;W=d}}f[W>>2]=0;U=V}else{d=f[S+8>>2]|0;f[d+12>>2]=m;f[m+8>>2]=d;U=m}while(0);do if(s){m=f[S+28>>2]|0;d=13504+(m<<2)|0;if((S|0)==(f[d>>2]|0)){f[d>>2]=U;if(!U){d=j&~(1<<m);f[3301]=d;X=d;break}}else{f[s+16+(((f[s+16>>2]|0)!=(S|0)&1)<<2)>>2]=U;if(!U){X=j;break}}f[U+24>>2]=s;d=f[S+16>>2]|0;if(d|0){f[U+16>>2]=d;f[d+24>>2]=U}d=f[S+20>>2]|0;if(d){f[U+20>>2]=d;f[d+24>>2]=U;X=j}else X=j}else X=j;while(0);do if(T>>>0>=16){f[S+4>>2]=e|3;f[g+4>>2]=T|1;f[g+T>>2]=T;j=T>>>3;if(T>>>0<256){s=13240+(j<<1<<2)|0;d=f[3300]|0;m=1<<j;if(!(d&m)){f[3300]=d|m;Y=s;Z=s+8|0}else{m=s+8|0;Y=f[m>>2]|0;Z=m}f[Z>>2]=g;f[Y+12>>2]=g;f[g+8>>2]=Y;f[g+12>>2]=s;break}s=T>>>8;if(s)if(T>>>0>16777215)_=31;else{m=(s+1048320|0)>>>16&8;d=s<<m;s=(d+520192|0)>>>16&4;j=d<<s;d=(j+245760|0)>>>16&2;n=14-(s|m|d)+(j<<d>>>15)|0;_=T>>>(n+7|0)&1|n<<1}else _=0;n=13504+(_<<2)|0;f[g+28>>2]=_;d=g+16|0;f[d+4>>2]=0;f[d>>2]=0;d=1<<_;if(!(X&d)){f[3301]=X|d;f[n>>2]=g;f[g+24>>2]=n;f[g+12>>2]=g;f[g+8>>2]=g;break}d=T<<((_|0)==31?0:25-(_>>>1)|0);j=f[n>>2]|0;while(1){if((f[j+4>>2]&-8|0)==(T|0)){H=97;break}$=j+16+(d>>>31<<2)|0;n=f[$>>2]|0;if(!n){H=96;break}else{d=d<<1;j=n}}if((H|0)==96){f[$>>2]=g;f[g+24>>2]=j;f[g+12>>2]=g;f[g+8>>2]=g;break}else if((H|0)==97){d=j+8|0;n=f[d>>2]|0;f[n+12>>2]=g;f[d>>2]=g;f[g+8>>2]=n;f[g+12>>2]=j;f[g+24>>2]=0;break}}else{n=T+e|0;f[S+4>>2]=n|3;d=S+n+4|0;f[d>>2]=f[d>>2]|1}while(0);o=S+8|0;u=b;return o|0}else B=e}else B=e}else B=-1;while(0);S=f[3302]|0;if(S>>>0>=B>>>0){T=S-B|0;$=f[3305]|0;if(T>>>0>15){_=$+B|0;f[3305]=_;f[3302]=T;f[_+4>>2]=T|1;f[$+S>>2]=T;f[$+4>>2]=B|3}else{f[3302]=0;f[3305]=0;f[$+4>>2]=S|3;T=$+S+4|0;f[T>>2]=f[T>>2]|1}o=$+8|0;u=b;return o|0}$=f[3303]|0;if($>>>0>B>>>0){T=$-B|0;f[3303]=T;S=f[3306]|0;_=S+B|0;f[3306]=_;f[_+4>>2]=T|1;f[S+4>>2]=B|3;o=S+8|0;u=b;return o|0}if(!(f[3418]|0)){f[3420]=4096;f[3419]=4096;f[3421]=-1;f[3422]=-1;f[3423]=0;f[3411]=0;f[3418]=c&-16^1431655768;aa=4096}else aa=f[3420]|0;c=B+48|0;S=B+47|0;T=aa+S|0;_=0-aa|0;aa=T&_;if(aa>>>0<=B>>>0){o=0;u=b;return o|0}X=f[3410]|0;if(X|0?(Y=f[3408]|0,Z=Y+aa|0,Z>>>0<=Y>>>0|Z>>>0>X>>>0):0){o=0;u=b;return o|0}b:do if(!(f[3411]&4)){X=f[3306]|0;c:do if(X){Z=13648;while(1){Y=f[Z>>2]|0;if(Y>>>0<=X>>>0?(ba=Z+4|0,(Y+(f[ba>>2]|0)|0)>>>0>X>>>0):0)break;Y=f[Z+8>>2]|0;if(!Y){H=118;break c}else Z=Y}j=T-$&_;if(j>>>0<2147483647){Y=Yh(j|0)|0;if((Y|0)==((f[Z>>2]|0)+(f[ba>>2]|0)|0))if((Y|0)==(-1|0))ca=j;else{da=j;ea=Y;H=135;break b}else{fa=Y;ga=j;H=126}}else ca=0}else H=118;while(0);do if((H|0)==118){X=Yh(0)|0;if((X|0)!=(-1|0)?(e=X,j=f[3419]|0,Y=j+-1|0,U=((Y&e|0)==0?0:(Y+e&0-j)-e|0)+aa|0,e=f[3408]|0,j=U+e|0,U>>>0>B>>>0&U>>>0<2147483647):0){Y=f[3410]|0;if(Y|0?j>>>0<=e>>>0|j>>>0>Y>>>0:0){ca=0;break}Y=Yh(U|0)|0;if((Y|0)==(X|0)){da=U;ea=X;H=135;break b}else{fa=Y;ga=U;H=126}}else ca=0}while(0);do if((H|0)==126){U=0-ga|0;if(!(c>>>0>ga>>>0&(ga>>>0<2147483647&(fa|0)!=(-1|0))))if((fa|0)==(-1|0)){ca=0;break}else{da=ga;ea=fa;H=135;break b}Y=f[3420]|0;X=S-ga+Y&0-Y;if(X>>>0>=2147483647){da=ga;ea=fa;H=135;break b}if((Yh(X|0)|0)==(-1|0)){Yh(U|0)|0;ca=0;break}else{da=X+ga|0;ea=fa;H=135;break b}}while(0);f[3411]=f[3411]|4;ha=ca;H=133}else{ha=0;H=133}while(0);if(((H|0)==133?aa>>>0<2147483647:0)?(ca=Yh(aa|0)|0,aa=Yh(0)|0,fa=aa-ca|0,ga=fa>>>0>(B+40|0)>>>0,!((ca|0)==(-1|0)|ga^1|ca>>>0<aa>>>0&((ca|0)!=(-1|0)&(aa|0)!=(-1|0))^1)):0){da=ga?fa:ha;ea=ca;H=135}if((H|0)==135){ca=(f[3408]|0)+da|0;f[3408]=ca;if(ca>>>0>(f[3409]|0)>>>0)f[3409]=ca;ca=f[3306]|0;do if(ca){ha=13648;while(1){ia=f[ha>>2]|0;ja=ha+4|0;ka=f[ja>>2]|0;if((ea|0)==(ia+ka|0)){H=143;break}fa=f[ha+8>>2]|0;if(!fa)break;else ha=fa}if(((H|0)==143?(f[ha+12>>2]&8|0)==0:0)?ea>>>0>ca>>>0&ia>>>0<=ca>>>0:0){f[ja>>2]=ka+da;fa=(f[3303]|0)+da|0;ga=ca+8|0;aa=(ga&7|0)==0?0:0-ga&7;ga=ca+aa|0;S=fa-aa|0;f[3306]=ga;f[3303]=S;f[ga+4>>2]=S|1;f[ca+fa+4>>2]=40;f[3307]=f[3422];break}if(ea>>>0<(f[3304]|0)>>>0)f[3304]=ea;fa=ea+da|0;S=13648;while(1){if((f[S>>2]|0)==(fa|0)){H=151;break}ga=f[S+8>>2]|0;if(!ga){la=13648;break}else S=ga}if((H|0)==151)if(!(f[S+12>>2]&8)){f[S>>2]=ea;ha=S+4|0;f[ha>>2]=(f[ha>>2]|0)+da;ha=ea+8|0;ga=ea+((ha&7|0)==0?0:0-ha&7)|0;ha=fa+8|0;aa=fa+((ha&7|0)==0?0:0-ha&7)|0;ha=ga+B|0;c=aa-ga-B|0;f[ga+4>>2]=B|3;do if((ca|0)!=(aa|0)){if((f[3305]|0)==(aa|0)){ba=(f[3302]|0)+c|0;f[3302]=ba;f[3305]=ha;f[ha+4>>2]=ba|1;f[ha+ba>>2]=ba;break}ba=f[aa+4>>2]|0;if((ba&3|0)==1){_=ba&-8;$=ba>>>3;d:do if(ba>>>0<256){T=f[aa+8>>2]|0;X=f[aa+12>>2]|0;if((X|0)==(T|0)){f[3300]=f[3300]&~(1<<$);break}else{f[T+12>>2]=X;f[X+8>>2]=T;break}}else{T=f[aa+24>>2]|0;X=f[aa+12>>2]|0;do if((X|0)==(aa|0)){U=aa+16|0;Y=U+4|0;j=f[Y>>2]|0;if(!j){e=f[U>>2]|0;if(!e){ma=0;break}else{na=e;oa=U}}else{na=j;oa=Y}while(1){Y=na+20|0;j=f[Y>>2]|0;if(j|0){na=j;oa=Y;continue}Y=na+16|0;j=f[Y>>2]|0;if(!j)break;else{na=j;oa=Y}}f[oa>>2]=0;ma=na}else{Y=f[aa+8>>2]|0;f[Y+12>>2]=X;f[X+8>>2]=Y;ma=X}while(0);if(!T)break;X=f[aa+28>>2]|0;Y=13504+(X<<2)|0;do if((f[Y>>2]|0)!=(aa|0)){f[T+16+(((f[T+16>>2]|0)!=(aa|0)&1)<<2)>>2]=ma;if(!ma)break d}else{f[Y>>2]=ma;if(ma|0)break;f[3301]=f[3301]&~(1<<X);break d}while(0);f[ma+24>>2]=T;X=aa+16|0;Y=f[X>>2]|0;if(Y|0){f[ma+16>>2]=Y;f[Y+24>>2]=ma}Y=f[X+4>>2]|0;if(!Y)break;f[ma+20>>2]=Y;f[Y+24>>2]=ma}while(0);pa=aa+_|0;qa=_+c|0}else{pa=aa;qa=c}$=pa+4|0;f[$>>2]=f[$>>2]&-2;f[ha+4>>2]=qa|1;f[ha+qa>>2]=qa;$=qa>>>3;if(qa>>>0<256){ba=13240+($<<1<<2)|0;Z=f[3300]|0;Y=1<<$;if(!(Z&Y)){f[3300]=Z|Y;ra=ba;sa=ba+8|0}else{Y=ba+8|0;ra=f[Y>>2]|0;sa=Y}f[sa>>2]=ha;f[ra+12>>2]=ha;f[ha+8>>2]=ra;f[ha+12>>2]=ba;break}ba=qa>>>8;do if(!ba)ta=0;else{if(qa>>>0>16777215){ta=31;break}Y=(ba+1048320|0)>>>16&8;Z=ba<<Y;$=(Z+520192|0)>>>16&4;X=Z<<$;Z=(X+245760|0)>>>16&2;j=14-($|Y|Z)+(X<<Z>>>15)|0;ta=qa>>>(j+7|0)&1|j<<1}while(0);ba=13504+(ta<<2)|0;f[ha+28>>2]=ta;_=ha+16|0;f[_+4>>2]=0;f[_>>2]=0;_=f[3301]|0;j=1<<ta;if(!(_&j)){f[3301]=_|j;f[ba>>2]=ha;f[ha+24>>2]=ba;f[ha+12>>2]=ha;f[ha+8>>2]=ha;break}j=qa<<((ta|0)==31?0:25-(ta>>>1)|0);_=f[ba>>2]|0;while(1){if((f[_+4>>2]&-8|0)==(qa|0)){H=192;break}ua=_+16+(j>>>31<<2)|0;ba=f[ua>>2]|0;if(!ba){H=191;break}else{j=j<<1;_=ba}}if((H|0)==191){f[ua>>2]=ha;f[ha+24>>2]=_;f[ha+12>>2]=ha;f[ha+8>>2]=ha;break}else if((H|0)==192){j=_+8|0;ba=f[j>>2]|0;f[ba+12>>2]=ha;f[j>>2]=ha;f[ha+8>>2]=ba;f[ha+12>>2]=_;f[ha+24>>2]=0;break}}else{ba=(f[3303]|0)+c|0;f[3303]=ba;f[3306]=ha;f[ha+4>>2]=ba|1}while(0);o=ga+8|0;u=b;return o|0}else la=13648;while(1){ha=f[la>>2]|0;if(ha>>>0<=ca>>>0?(va=ha+(f[la+4>>2]|0)|0,va>>>0>ca>>>0):0)break;la=f[la+8>>2]|0}ga=va+-47|0;ha=ga+8|0;c=ga+((ha&7|0)==0?0:0-ha&7)|0;ha=ca+16|0;ga=c>>>0<ha>>>0?ca:c;c=ga+8|0;aa=da+-40|0;fa=ea+8|0;S=(fa&7|0)==0?0:0-fa&7;fa=ea+S|0;ba=aa-S|0;f[3306]=fa;f[3303]=ba;f[fa+4>>2]=ba|1;f[ea+aa+4>>2]=40;f[3307]=f[3422];aa=ga+4|0;f[aa>>2]=27;f[c>>2]=f[3412];f[c+4>>2]=f[3413];f[c+8>>2]=f[3414];f[c+12>>2]=f[3415];f[3412]=ea;f[3413]=da;f[3415]=0;f[3414]=c;c=ga+24|0;do{ba=c;c=c+4|0;f[c>>2]=7}while((ba+8|0)>>>0<va>>>0);if((ga|0)!=(ca|0)){c=ga-ca|0;f[aa>>2]=f[aa>>2]&-2;f[ca+4>>2]=c|1;f[ga>>2]=c;ba=c>>>3;if(c>>>0<256){fa=13240+(ba<<1<<2)|0;S=f[3300]|0;j=1<<ba;if(!(S&j)){f[3300]=S|j;wa=fa;xa=fa+8|0}else{j=fa+8|0;wa=f[j>>2]|0;xa=j}f[xa>>2]=ca;f[wa+12>>2]=ca;f[ca+8>>2]=wa;f[ca+12>>2]=fa;break}fa=c>>>8;if(fa)if(c>>>0>16777215)ya=31;else{j=(fa+1048320|0)>>>16&8;S=fa<<j;fa=(S+520192|0)>>>16&4;ba=S<<fa;S=(ba+245760|0)>>>16&2;Z=14-(fa|j|S)+(ba<<S>>>15)|0;ya=c>>>(Z+7|0)&1|Z<<1}else ya=0;Z=13504+(ya<<2)|0;f[ca+28>>2]=ya;f[ca+20>>2]=0;f[ha>>2]=0;S=f[3301]|0;ba=1<<ya;if(!(S&ba)){f[3301]=S|ba;f[Z>>2]=ca;f[ca+24>>2]=Z;f[ca+12>>2]=ca;f[ca+8>>2]=ca;break}ba=c<<((ya|0)==31?0:25-(ya>>>1)|0);S=f[Z>>2]|0;while(1){if((f[S+4>>2]&-8|0)==(c|0)){H=213;break}za=S+16+(ba>>>31<<2)|0;Z=f[za>>2]|0;if(!Z){H=212;break}else{ba=ba<<1;S=Z}}if((H|0)==212){f[za>>2]=ca;f[ca+24>>2]=S;f[ca+12>>2]=ca;f[ca+8>>2]=ca;break}else if((H|0)==213){ba=S+8|0;c=f[ba>>2]|0;f[c+12>>2]=ca;f[ba>>2]=ca;f[ca+8>>2]=c;f[ca+12>>2]=S;f[ca+24>>2]=0;break}}}else{c=f[3304]|0;if((c|0)==0|ea>>>0<c>>>0)f[3304]=ea;f[3412]=ea;f[3413]=da;f[3415]=0;f[3309]=f[3418];f[3308]=-1;f[3313]=13240;f[3312]=13240;f[3315]=13248;f[3314]=13248;f[3317]=13256;f[3316]=13256;f[3319]=13264;f[3318]=13264;f[3321]=13272;f[3320]=13272;f[3323]=13280;f[3322]=13280;f[3325]=13288;f[3324]=13288;f[3327]=13296;f[3326]=13296;f[3329]=13304;f[3328]=13304;f[3331]=13312;f[3330]=13312;f[3333]=13320;f[3332]=13320;f[3335]=13328;f[3334]=13328;f[3337]=13336;f[3336]=13336;f[3339]=13344;f[3338]=13344;f[3341]=13352;f[3340]=13352;f[3343]=13360;f[3342]=13360;f[3345]=13368;f[3344]=13368;f[3347]=13376;f[3346]=13376;f[3349]=13384;f[3348]=13384;f[3351]=13392;f[3350]=13392;f[3353]=13400;f[3352]=13400;f[3355]=13408;f[3354]=13408;f[3357]=13416;f[3356]=13416;f[3359]=13424;f[3358]=13424;f[3361]=13432;f[3360]=13432;f[3363]=13440;f[3362]=13440;f[3365]=13448;f[3364]=13448;f[3367]=13456;f[3366]=13456;f[3369]=13464;f[3368]=13464;f[3371]=13472;f[3370]=13472;f[3373]=13480;f[3372]=13480;f[3375]=13488;f[3374]=13488;c=da+-40|0;ba=ea+8|0;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c(r,e);break}J=(K|0)==3;switch(L|0){case 7:{I=93;break b;break}case 3:case 5:{L=f[l>>2]|0;if((f[g>>2]|0)==(L|0)){M=-1;I=179;break a}K=f[L+-4>>2]|0;L=F*3|0;U=J?L:L+2|0;N=L+(J&1)|0;X=(J?2:1)+L|0;J=f[v>>2]|0;W=f[J+12>>2]|0;f[W+(X<<2)>>2]=K;f[W+(K<<2)>>2]=X;W=J+24|0;O=J+28|0;S=f[O>>2]|0;if((S|0)==(f[J+32>>2]|0)){wf(W,2384);_=f[O>>2]|0}else{f[S>>2]=-1;J=S+4|0;f[O>>2]=J;_=J}J=_-(f[W>>2]|0)>>2;W=J+-1|0;O=f[v>>2]|0;S=f[O+24>>2]|0;Q=S;if(((f[O+28>>2]|0)-S>>2|0)>(q|0)){M=-1;I=179;break a}S=f[O>>2]|0;f[S+(X<<2)>>2]=W;if(J|0)f[Q+(W<<2)>>2]=X;if((K|0)!=-1){X=(((K>>>0)%3|0|0)==0?2:-1)+K|0;if((X|0)!=-1){W=f[S+(X<<2)>>2]|0;f[S+(U<<2)>>2]=W;if((W|0)!=-1)f[Q+(W<<2)>>2]=U}else f[S+(U<<2)>>2]=-1;W=K+1|0;Q=((W>>>0)%3|0|0)==0?K+-2|0:W;if((Q|0)==-1)aa=-1;else aa=f[S+(Q<<2)>>2]|0}else{f[S+(U<<2)>>2]=-1;aa=-1}f[S+(N<<2)>>2]=aa;N=f[l>>2]|0;f[N+-4>>2]=L;ba=N;I=113;break b;break}case 1:break;default:{M=-1;I=179;break a}}N=f[g>>2]|0;L=f[l>>2]|0;if((N|0)==(L|0)){M=-1;I=179;break a}S=L+-4|0;U=f[S>>2]|0;f[l>>2]=S;Q=f[C>>2]|0;c:do if(Q){W=Q+-1|0;K=(W&Q|0)==0;if(!K)if(F>>>0<Q>>>0)ca=F;else ca=(F>>>0)%(Q>>>0)|0;else ca=W&F;X=f[(f[h>>2]|0)+(ca<<2)>>2]|0;if((X|0)!=0?(J=f[X>>2]|0,(J|0)!=0):0){d:do if(K){X=J;while(1){O=f[X+4>>2]|0;R=(O|0)==(F|0);if(!(R|(O&W|0)==(ca|0))){da=N;ea=S;break c}if(R?(f[X+8>>2]|0)==(F|0):0){fa=X;break d}X=f[X>>2]|0;if(!X){da=N;ea=S;break c}}}else{X=J;while(1){R=f[X+4>>2]|0;if((R|0)==(F|0)){if((f[X+8>>2]|0)==(F|0)){fa=X;break d}}else{if(R>>>0<Q>>>0)ga=R;else ga=(R>>>0)%(Q>>>0)|0;if((ga|0)!=(ca|0)){da=N;ea=S;break c}}X=f[X>>2]|0;if(!X){da=N;ea=S;break c}}}while(0);J=fa+12|0;if((S|0)==(f[w>>2]|0)){wf(g,J);da=f[g>>2]|0;ea=f[l>>2]|0;break}else{f[S>>2]=f[J>>2];f[l>>2]=L;da=N;ea=L;break}}else{da=N;ea=S}}else{da=N;ea=S}while(0);if((da|0)==(ea|0)){M=-1;I=179;break a}S=f[ea+-4>>2]|0;N=(S|0)==-1;if(!N?(f[(f[(f[v>>2]|0)+12>>2]|0)+(S<<2)>>2]|0)!=-1:0){M=-1;I=179;break a}L=(U|0)==-1;Q=f[v>>2]|0;J=f[Q+12>>2]|0;if(!L?(f[J+(U<<2)>>2]|0)!=-1:0){M=-1;I=179;break a}W=F*3|0;K=W+2|0;f[J+(S<<2)>>2]=K;f[J+(K<<2)>>2]=S;X=W+1|0;f[J+(U<<2)>>2]=X;f[J+(X<<2)>>2]=U;if(!N){N=(((S>>>0)%3|0|0)==0?2:-1)+S|0;if((N|0)==-1)ha=-1;else ha=f[(f[Q>>2]|0)+(N<<2)>>2]|0;N=f[Q>>2]|0;f[N+(W<<2)>>2]=ha;R=S+1|0;O=((R>>>0)%3|0|0)==0?S+-2|0:R;if((O|0)==-1){ia=-1;ja=ha;ka=N;la=Q}else{ia=f[N+(O<<2)>>2]|0;ja=ha;ka=N;la=Q}}else{N=f[Q>>2]|0;f[N+(W<<2)>>2]=-1;ia=-1;ja=-1;ka=N;la=Q}f[ka+(X<<2)>>2]=ia;if(!L){L=(((U>>>0)%3|0|0)==0?2:-1)+U|0;if((L|0)!=-1){X=f[ka+(L<<2)>>2]|0;f[ka+(K<<2)>>2]=X;if((X|0)!=-1)f[(f[Q+24>>2]|0)+(X<<2)>>2]=K}else f[ka+(K<<2)>>2]=-1;X=U+1|0;L=((X>>>0)%3|0|0)==0?U+-2|0:X;if((L|0)==-1){ma=-1;na=-1}else{ma=f[ka+(L<<2)>>2]|0;na=L}}else{f[ka+(K<<2)>>2]=-1;ma=-1;na=-1}f[e>>2]=ma;K=f[D>>2]|0;L=K+(ja<<2)|0;f[L>>2]=(f[L>>2]|0)+(f[K+(ma<<2)>>2]|0);K=f[Q+24>>2]|0;if((ja|0)!=-1)f[K+(ja<<2)>>2]=f[K+(f[e>>2]<<2)>>2];e:do if((na|0)!=-1){Q=f[la>>2]|0;L=na;do{f[Q+(L<<2)>>2]=ja;X=L+1|0;N=((X>>>0)%3|0|0)==0?L+-2|0:X;if((N|0)==-1)break e;X=f[J+(N<<2)>>2]|0;N=X+1|0;if((X|0)==-1)break e;L=((N>>>0)%3|0|0)==0?X+-2|0:N}while((L|0)!=-1)}while(0);f[K+(f[e>>2]<<2)>>2]=-1;do if(o){J=f[m>>2]|0;if((J|0)==(f[E>>2]|0)){wf(i,e);oa=f[l>>2]|0;break}else{f[J>>2]=f[e>>2];f[m>>2]=J+4;oa=ea;break}}else oa=ea;while(0);f[oa+-4>>2]=W;f[j>>2]=f[oa+-4>>2];f[e>>2]=f[j>>2];oc(r,e)}while(0);if((I|0)==93){I=0;f[e>>2]=F*3;H=f[v>>2]|0;K=H+24|0;J=H+28|0;U=f[J>>2]|0;if((U|0)==(f[H+32>>2]|0)){wf(K,2384);pa=f[J>>2]|0}else{f[U>>2]=-1;H=U+4|0;f[J>>2]=H;pa=H}H=pa-(f[K>>2]|0)>>2;K=H+-1|0;J=f[v>>2]|0;U=f[e>>2]|0;L=f[J>>2]|0;f[L+(U<<2)>>2]=K;Q=J+24|0;N=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}else{va=Q+-1|0;break}else va=-1;else{J=Q+1|0;if(X)va=-1;else va=((J>>>0)%3|0|0)==0?Q+-2|0:J}while(0);f[e>>2]=z-L;Q=qc(h,e)|0;f[Q>>2]=va;H=f[y>>2]|0}while((H|0)!=(f[x>>2]|0))}while(0);if((G|0)<(c|0))F=G;else{wa=G;xa=v;I=126;break a}}M=-1;I=179}else{wa=0;xa=a+8|0;I=126}while(0);g:do if((I|0)==126){c=f[xa>>2]|0;if(((f[c+28>>2]|0)-(f[c+24>>2]|0)>>2|0)<=(q|0)){va=f[l>>2]|0;do if((va|0)!=(f[g>>2]|0)){j=a+312|0;ba=a+60|0;ua=a+64|0;ta=a+68|0;sa=a+76|0;qa=a+80|0;ra=a+72|0;pa=wa;oa=va;h:while(1){ea=oa;f[e>>2]=f[ea+-4>>2];f[l>>2]=ea+-4;do if(!(Wg(j)|0)){ea=f[ua>>2]|0;o=f[ta>>2]|0;if((ea|0)==(o<<5|0)){if((ea+1|0)<0){I=154;break h}ja=o<<6;o=ea+32&-32;$e(ba,ea>>>0<1073741823?(ja>>>0<o>>>0?o:ja):2147483647);ya=f[ua>>2]|0}else ya=ea;f[ua>>2]=ya+1;ea=(f[ba>>2]|0)+(ya>>>5<<2)|0;f[ea>>2]=f[ea>>2]&~(1<<(ya&31));ea=f[sa>>2]|0;if((ea|0)==(f[qa>>2]|0)){wf(ra,e);za=pa;break}else{f[ea>>2]=f[e>>2];f[sa>>2]=ea+4;za=pa;break}}else{ea=f[xa>>2]|0;ja=f[ea>>2]|0;o=ja;if((pa|0)>=(((f[ea+4>>2]|0)-ja>>2>>>0)/3|0|0)){I=160;break h}ja=f[e>>2]|0;na=ja+1|0;if((ja|0)!=-1?(la=((na>>>0)%3|0|0)==0?ja+-2|0:na,(la|0)!=-1):0)Aa=f[o+(la<<2)>>2]|0;else Aa=-1;la=f[ea+24>>2]|0;na=f[la+(Aa<<2)>>2]|0;ma=na+1|0;if((na|0)!=-1?(ka=((ma>>>0)%3|0|0)==0?na+-2|0:ma,ma=ka+1|0,(ka|0)!=-1):0){na=((ma>>>0)%3|0|0)==0?ka+-2|0:ma;if((na|0)==-1){Ba=-1;Ca=ka}else{Ba=f[o+(na<<2)>>2]|0;Ca=ka}}else{Ba=-1;Ca=-1}ka=f[la+(Ba<<2)>>2]|0;la=ka+1|0;if((ka|0)!=-1?(na=((la>>>0)%3|0|0)==0?ka+-2|0:la,la=na+1|0,(na|0)!=-1):0){ka=((la>>>0)%3|0|0)==0?na+-2|0:la;if((ka|0)==-1){Da=-1;Ea=na}else{Da=f[o+(ka<<2)>>2]|0;Ea=na}}else{Da=-1;Ea=-1}na=pa*3|0;f[k>>2]=na;ka=f[ea+12>>2]|0;f[ka+(na<<2)>>2]=ja;f[ka+(ja<<2)>>2]=na;na=(f[k>>2]|0)+1|0;f[ka+(na<<2)>>2]=Ca;f[ka+(Ca<<2)>>2]=na;na=(f[k>>2]|0)+2|0;f[ka+(na<<2)>>2]=Ea;f[ka+(Ea<<2)>>2]=na;na=f[k>>2]|0;ka=o+(na<<2)|0;f[ka>>2]=Ba;f[o+(na+1<<2)>>2]=Da;f[o+(na+2<<2)>>2]=Aa;if((na|0)==-1)Fa=-1;else Fa=f[ka>>2]|0;ka=f[p>>2]|0;na=ka+(Fa>>>5<<2)|0;f[na>>2]=f[na>>2]&~(1<<(Fa&31));na=(f[k>>2]|0)+1|0;if((na|0)==-1)Ga=-1;else Ga=f[o+(na<<2)>>2]|0;na=ka+(Ga>>>5<<2)|0;f[na>>2]=f[na>>2]&~(1<<(Ga&31));na=(f[k>>2]|0)+2|0;if((na|0)==-1)Ha=-1;else Ha=f[o+(na<<2)>>2]|0;na=ka+(Ha>>>5<<2)|0;f[na>>2]=f[na>>2]&~(1<<(Ha&31));na=pa+1|0;ka=f[ua>>2]|0;o=f[ta>>2]|0;if((ka|0)==(o<<5|0)){if((ka+1|0)<0){I=144;break h}ja=o<<6;o=ka+32&-32;$e(ba,ka>>>0<1073741823?(ja>>>0<o>>>0?o:ja):2147483647);Ia=f[ua>>2]|0}else Ia=ka;f[ua>>2]=Ia+1;ka=(f[ba>>2]|0)+(Ia>>>5<<2)|0;f[ka>>2]=f[ka>>2]|1<<(Ia&31);ka=f[sa>>2]|0;if((ka|0)==(f[qa>>2]|0))wf(ra,k);else{f[ka>>2]=f[k>>2];f[sa>>2]=ka+4}za=na}while(0);oa=f[l>>2]|0;if((oa|0)==(f[g>>2]|0)){I=161;break}else pa=za}if((I|0)==144)xm(ba);else if((I|0)==154)xm(ba);else if((I|0)==160){M=-1;I=179;break g}else if((I|0)==161){Ja=za;Ka=f[xa>>2]|0;break}}else{Ja=wa;Ka=c}while(0);if((Ja|0)==(((f[Ka+4>>2]|0)-(f[Ka>>2]|0)>>2>>>0)/3|0|0)){c=(f[Ka+28>>2]|0)-(f[Ka+24>>2]|0)>>2;va=f[i>>2]|0;pa=f[m>>2]|0;if((va|0)==(pa|0)){La=c;Ma=va}else{oa=e+4|0;sa=e+8|0;ra=e+12|0;qa=c;c=va;va=Ka;while(1){ua=f[c>>2]|0;ta=qa+-1|0;j=f[va+24>>2]|0;if((f[j+(ta<<2)>>2]|0)==-1){G=qa;while(1){na=G+-1|0;ka=G+-2|0;if((f[j+(ka<<2)>>2]|0)==-1)G=na;else{Na=na;Oa=ka;break}}}else{Na=qa;Oa=ta}if(Oa>>>0<ua>>>0){Pa=Na;Qa=va}else{f[e>>2]=va;G=f[j+(Oa<<2)>>2]|0;f[oa>>2]=G;f[sa>>2]=G;b[ra>>0]=1;if((G|0)==-1){Ra=j;Sa=va}else{ba=va;ka=G;do{f[(f[ba>>2]|0)+(ka<<2)>>2]=ua;Be(e);ka=f[sa>>2]|0;ba=f[xa>>2]|0}while((ka|0)!=-1);Ra=f[ba+24>>2]|0;Sa=ba}if((ua|0)==-1)Ta=Ra+(Oa<<2)|0;else{ka=Ra+(Oa<<2)|0;f[Ra+(ua<<2)>>2]=f[ka>>2];Ta=ka}f[Ta>>2]=-1;ka=f[p>>2]|0;j=ka+(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k=d;f[e>>2]=0;l=e+4|0;f[l>>2]=0;f[e+8>>2]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[g+16>>2]=$(1.0);f[i>>2]=0;m=i+4|0;f[m>>2]=0;f[i+8>>2]=0;o=(f[a+216>>2]|0)==(f[a+220>>2]|0);p=a+120|0;q=f[a+124>>2]|0;a:do if((c|0)>0){r=a+308|0;s=g+4|0;t=a+8|0;v=i+8|0;w=e+8|0;x=a+304|0;y=a+296|0;z=a+300|0;A=a+36|0;B=a+40|0;C=c+-1|0;D=0;b:while(1){E=D+1|0;c:do if(!(b[r>>0]|0))F=43;else{G=f[x>>2]|0;H=f[y>>2]|0;I=f[z>>2]|0;J=H+(G>>>3)|0;if(J>>>0<I>>>0?(K=h[J>>0]|0,J=G+1|0,f[x>>2]=J,1<<(G&7)&K|0):0){K=H+(J>>>3)|0;if(K>>>0<I>>>0){L=(h[K>>0]|0)>>>(J&7)&1;K=G+2|0;f[x>>2]=K;M=L;N=K}else{M=0;N=J}J=H+(N>>>3)|0;if(J>>>0<I>>>0){I=(h[J>>0]|0)>>>(N&7);f[x>>2]=N+1;O=I<<1&2}else O=0;I=(O|M)<<1|1;J=(I|0)==5;switch(I&7){case 1:{F=43;break c;break}case 3:case 5:{I=f[l>>2]|0;if((f[e>>2]|0)==(I|0)){P=-1;F=183;break a}H=f[I+-4>>2]|0;I=D*3|0;K=J?I:I+2|0;L=I+(J&1)|0;G=(J?2:1)+I|0;J=f[t>>2]|0;Q=f[J+12>>2]|0;f[Q+(G<<2)>>2]=H;f[Q+(H<<2)>>2]=G;Q=J+24|0;R=J+28|0;S=f[R>>2]|0;if((S|0)==(f[J+32>>2]|0)){wf(Q,2384);T=f[R>>2]|0}else{f[S>>2]=-1;J=S+4|0;f[R>>2]=J;T=J}J=T-(f[Q>>2]|0)>>2;Q=J+-1|0;R=f[t>>2]|0;S=f[R+24>>2]|0;U=S;if(((f[R+28>>2]|0)-S>>2|0)>(q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0)!=-1){f[Q+(I<<2)>>2]=(f[j>>2]|0)+1;L=I+1|0;if((L|0)!=-1){_=L;F=109}}else{_=0;F=109}}else{f[Q+(I<<2)>>2]=K+1;_=1;F=109}if((F|0)==109){F=0;f[Q+(_<<2)>>2]=(f[j>>2]|0)+2}Q=f[l>>2]|0;if((Q|0)==(f[w>>2]|0))wf(e,j);else{f[Q>>2]=f[j>>2];f[l>>2]=Q+4}break}default:{F=182;break b}}Q=c-D+-1|0;K=f[B>>2]|0;if((K|0)==(f[A>>2]|0))break;else aa=K;while(1){K=aa;I=f[K+-8>>2]|0;if(I>>>0>Q>>>0){P=-1;F=183;break a}if((I|0)!=(Q|0))break c;I=b[K+-4>>0]|0;L=f[K+-12>>2]|0;f[B>>2]=K+-12;if((L|0)<0){P=-1;F=183;break a}K=f[(f[l>>2]|0)+-4>>2]|0;U=(K|0)==-1;do if(!(I&1))if(!U)if(!((K>>>0)%3|0)){ba=K+2|0;break}else{ba=K+-1|0;break}else ba=-1;else{G=K+1|0;if(U)ba=-1;else ba=((G>>>0)%3|0|0)==0?K+-2|0:G}while(0);f[j>>2]=C-L;K=qc(g,j)|0;f[K>>2]=ba;aa=f[B>>2]|0;if((aa|0)==(f[A>>2]|0))break c}}Q=f[l>>2]|0;if((f[e>>2]|0)==(Q|0)){P=-1;F=183;break a}K=Q+-4|0;Q=f[K>>2]|0;U=f[t>>2]|0;I=(Q|0)==-1;G=Q+1|0;if(!I?(S=((G>>>0)%3|0|0)==0?Q+-2|0:G,(S|0)!=-1):0)ca=f[(f[U>>2]|0)+(S<<2)>>2]|0;else ca=-1;S=f[U+24>>2]|0;G=f[S+(ca<<2)>>2]|0;H=G+1|0;if((G|0)==-1)da=-1;else da=((H>>>0)%3|0|0)==0?G+-2|0:H;H=D*3|0;G=H+1|0;J=f[U+12>>2]|0;f[J+(Q<<2)>>2]=G;f[J+(G<<2)>>2]=Q;R=H+2|0;f[J+(da<<2)>>2]=R;f[J+(R<<2)>>2]=da;J=f[U>>2]|0;f[J+(H<<2)>>2]=ca;U=da+1|0;if((da|0)!=-1?(ea=((U>>>0)%3|0|0)==0?da+-2|0:U,(ea|0)!=-1):0)fa=f[J+(ea<<2)>>2]|0;else fa=-1;f[J+(G<<2)>>2]=fa;if(!I?(I=(((Q>>>0)%3|0|0)==0?2:-1)+Q|0,(I|0)!=-1):0){Q=f[J+(I<<2)>>2]|0;f[J+(R<<2)>>2]=Q;if((Q|0)!=-1)f[S+(Q<<2)>>2]=R}else f[J+(R<<2)>>2]=-1;R=(f[p>>2]|0)+(ca>>>5<<2)|0;f[R>>2]=f[R>>2]&~(1<<(ca&31));f[K>>2]=H}while(0);if((F|0)==43){F=0;H=f[e>>2]|0;K=f[l>>2]|0;if((H|0)==(K|0)){P=-1;F=183;break a}R=K+-4|0;J=f[R>>2]|0;f[l>>2]=R;Q=f[s>>2]|0;d:do if(Q){S=Q+-1|0;I=(S&Q|0)==0;if(!I)if(D>>>0<Q>>>0)ga=D;else ga=(D>>>0)%(Q>>>0)|0;else ga=S&D;G=f[(f[g>>2]|0)+(ga<<2)>>2]|0;if((G|0)!=0?(ea=f[G>>2]|0,(ea|0)!=0):0){e:do if(I){G=ea;while(1){U=f[G+4>>2]|0;ha=(U|0)==(D|0);if(!(ha|(U&S|0)==(ga|0))){ia=H;ja=R;break d}if(ha?(f[G+8>>2]|0)==(D|0):0){ka=G;break e}G=f[G>>2]|0;if(!G){ia=H;ja=R;break d}}}else{G=ea;while(1){L=f[G+4>>2]|0;if((L|0)==(D|0)){if((f[G+8>>2]|0)==(D|0)){ka=G;break e}}else{if(L>>>0<Q>>>0)la=L;else la=(L>>>0)%(Q>>>0)|0;if((la|0)!=(ga|0)){ia=H;ja=R;break d}}G=f[G>>2]|0;if(!G){ia=H;ja=R;break d}}}while(0);ea=ka+12|0;if((R|0)==(f[w>>2]|0)){wf(e,ea);ia=f[e>>2]|0;ja=f[l>>2]|0;break}else{f[R>>2]=f[ea>>2];f[l>>2]=K;ia=H;ja=K;break}}else{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>0)%3|0|0)==0?K+-2|0:G;if((H|0)==-1)break f;G=f[ea+(H<<2)>>2]|0;H=G+1|0;if((G|0)==-1)break f;K=((H>>>0)%3|0|0)==0?G+-2|0:H}while((K|0)!=-1)}while(0);f[I+(f[j>>2]<<2)>>2]=-1;do if(o){ea=f[m>>2]|0;if((ea|0)==(f[v>>2]|0)){wf(i,j);ta=f[l>>2]|0;break}else{f[ea>>2]=f[j>>2];f[m>>2]=ea+4;ta=ja;break}}else ta=ja;while(0);f[ta+-4>>2]=S}if((E|0)<(c|0))D=E;else{ua=E;va=t;F=129;break a}}if((F|0)==114){P=-1;F=183;break}}else{ua=0;va=a+8|0;F=129}while(0);g:do if((F|0)==129){c=f[va>>2]|0;if(((f[c+28>>2]|0)-(f[c+24>>2]|0)>>2|0)<=(q|0)){ta=f[l>>2]|0;do if((ta|0)!=(f[e>>2]|0)){ja=a+312|0;o=a+60|0;oa=a+64|0;sa=a+68|0;qa=a+76|0;ra=a+80|0;pa=a+72|0;na=ua;ma=ta;h:while(1){ia=ma;f[j>>2]=f[ia+-4>>2];f[l>>2]=ia+-4;do if(!(Wg(ja)|0)){ia=f[oa>>2]|0;ka=f[sa>>2]|0;if((ia|0)==(ka<<5|0)){if((ia+1|0)<0){F=157;break h}ga=ka<<6;ka=ia+32&-32;$e(o,ia>>>0<1073741823?(ga>>>0<ka>>>0?ka:ga):2147483647);wa=f[oa>>2]|0}else wa=ia;f[oa>>2]=wa+1;ia=(f[o>>2]|0)+(wa>>>5<<2)|0;f[ia>>2]=f[ia>>2]&~(1<<(wa&31));ia=f[qa>>2]|0;if((ia|0)==(f[ra>>2]|0)){wf(pa,j);xa=na;break}else{f[ia>>2]=f[j>>2];f[qa>>2]=ia+4;xa=na;break}}else{ia=f[va>>2]|0;ga=f[ia>>2]|0;ka=ga;if((na|0)>=(((f[ia+4>>2]|0)-ga>>2>>>0)/3|0|0)){F=163;break h}ga=f[j>>2]|0;la=ga+1|0;if((ga|0)!=-1?(ca=((la>>>0)%3|0|0)==0?ga+-2|0:la,(ca|0)!=-1):0)ya=f[ka+(ca<<2)>>2]|0;else ya=-1;ca=f[ia+24>>2]|0;la=f[ca+(ya<<2)>>2]|0;fa=la+1|0;if((la|0)!=-1?(da=((fa>>>0)%3|0|0)==0?la+-2|0:fa,fa=da+1|0,(da|0)!=-1):0){la=((fa>>>0)%3|0|0)==0?da+-2|0:fa;if((la|0)==-1){za=-1;Aa=da}else{za=f[ka+(la<<2)>>2]|0;Aa=da}}else{za=-1;Aa=-1}da=f[ca+(za<<2)>>2]|0;ca=da+1|0;if((da|0)!=-1?(la=((ca>>>0)%3|0|0)==0?da+-2|0:ca,ca=la+1|0,(la|0)!=-1):0){da=((ca>>>0)%3|0|0)==0?la+-2|0:ca;if((da|0)==-1){Ba=-1;Ca=la}else{Ba=f[ka+(da<<2)>>2]|0;Ca=la}}else{Ba=-1;Ca=-1}la=na*3|0;f[k>>2]=la;da=f[ia+12>>2]|0;f[da+(la<<2)>>2]=ga;f[da+(ga<<2)>>2]=la;la=(f[k>>2]|0)+1|0;f[da+(la<<2)>>2]=Aa;f[da+(Aa<<2)>>2]=la;la=(f[k>>2]|0)+2|0;f[da+(la<<2)>>2]=Ca;f[da+(Ca<<2)>>2]=la;la=f[k>>2]|0;da=ka+(la<<2)|0;f[da>>2]=za;f[ka+(la+1<<2)>>2]=Ba;f[ka+(la+2<<2)>>2]=ya;if((la|0)==-1)Da=-1;else Da=f[da>>2]|0;da=f[p>>2]|0;la=da+(Da>>>5<<2)|0;f[la>>2]=f[la>>2]&~(1<<(Da&31));la=(f[k>>2]|0)+1|0;if((la|0)==-1)Ea=-1;else Ea=f[ka+(la<<2)>>2]|0;la=da+(Ea>>>5<<2)|0;f[la>>2]=f[la>>2]&~(1<<(Ea&31));la=(f[k>>2]|0)+2|0;if((la|0)==-1)Fa=-1;else Fa=f[ka+(la<<2)>>2]|0;la=da+(Fa>>>5<<2)|0;f[la>>2]=f[la>>2]&~(1<<(Fa&31));la=na+1|0;da=f[oa>>2]|0;ka=f[sa>>2]|0;if((da|0)==(ka<<5|0)){if((da+1|0)<0){F=147;break h}ga=ka<<6;ka=da+32&-32;$e(o,da>>>0<1073741823?(ga>>>0<ka>>>0?ka:ga):2147483647);Ga=f[oa>>2]|0}else Ga=da;f[oa>>2]=Ga+1;da=(f[o>>2]|0)+(Ga>>>5<<2)|0;f[da>>2]=f[da>>2]|1<<(Ga&31);da=f[qa>>2]|0;if((da|0)==(f[ra>>2]|0))wf(pa,k);else{f[da>>2]=f[k>>2];f[qa>>2]=da+4}xa=la}while(0);ma=f[l>>2]|0;if((ma|0)==(f[e>>2]|0)){F=164;break}else na=xa}if((F|0)==147)xm(o);else if((F|0)==157)xm(o);else if((F|0)==163){P=-1;F=183;break g}else if((F|0)==164){Ha=xa;Ia=f[va>>2]|0;break}}else{Ha=ua;Ia=c}while(0);if((Ha|0)==(((f[Ia+4>>2]|0)-(f[Ia>>2]|0)>>2>>>0)/3|0|0)){c=(f[Ia+28>>2]|0)-(f[Ia+24>>2]|0)>>2;ta=f[i>>2]|0;na=f[m>>2]|0;if((ta|0)==(na|0)){Ja=c;Ka=ta}else{ma=j+4|0;qa=j+8|0;pa=j+12|0;ra=c;c=ta;ta=Ia;while(1){oa=f[c>>2]|0;sa=ra+-1|0;ja=f[ta+24>>2]|0;if((f[ja+(sa<<2)>>2]|0)==-1){E=ra;while(1){S=E+-1|0;la=E+-2|0;if((f[ja+(la<<2)>>2]|0)==-1)E=S;else{La=S;Ma=la;break}}}else{La=ra;Ma=sa}if(Ma>>>0<oa>>>0){Na=La;Oa=ta}else{f[j>>2]=ta;E=f[ja+(Ma<<2)>>2]|0;f[ma>>2]=E;f[qa>>2]=E;b[pa>>0]=1;if((E|0)==-1){Pa=ja;Qa=ta}else{o=ta;la=E;do{f[(f[o>>2]|0)+(la<<2)>>2]=oa;Be(j);la=f[qa>>2]|0;o=f[va>>2]|0}while((la|0)!=-1);Pa=f[o+24>>2]|0;Qa=o}if((oa|0)==-1)Ra=Pa+(Ma<<2)|0;else{la=Pa+(Ma<<2)|0;f[Pa+(oa<<2)>>2]=f[la>>2];Ra=la}f[Ra>>2]=-1;la=f[p>>2]|0;ja=la+(Ma>>>5<<2)|0;sa=1<<(Ma&31);E=la+(oa>>>5<<2)|0;la=1<<(oa&31);if(!(f[ja>>2]&sa))Sa=f[E>>2]&~la;else Sa=f[E>>2]|la;f[E>>2]=Sa;f[ja>>2]=f[ja>>2]&~sa;Na=La+-1|0;Oa=Qa}c=c+4|0;if((c|0)==(na|0)){P=Na;F=183;break}else{ra=Na;ta=Oa}}}}else{P=-1;F=183}}else{P=-1;F=183}}while(0);if((F|0)==183){Ja=P;Ka=f[i>>2]|0}if(Ka|0){i=f[m>>2]|0;if((i|0)!=(Ka|0))f[m>>2]=i+(~((i+-4-Ka|0)>>>2)<<2);gn(Ka)}Ka=f[g+8>>2]|0;if(Ka|0){i=Ka;do{Ka=i;i=f[i>>2]|0;gn(Ka)}while((i|0)!=0)}i=f[g>>2]|0;f[g>>2]=0;if(i|0)gn(i);i=f[e>>2]|0;if(!i){u=d;return Ja|0}e=f[l>>2]|0;if((e|0)!=(i|0))f[l>>2]=e+(~((e+-4-i|0)>>>2)<<2);gn(i);u=d;return Ja|0}function $a(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;b=u;u=u+16|0;c=b;d=b+8|0;e=b+4|0;f[d>>2]=a;do if(a>>>0>=212){g=(a>>>0)/210|0;h=g*210|0;f[e>>2]=a-h;i=0;j=g;g=(Sh(3508,3700,e,c)|0)-3508>>2;k=h;a:while(1){l=(f[3508+(g<<2)>>2]|0)+k|0;h=5;while(1){if(h>>>0>=47){m=211;n=i;o=8;break}p=f[3316+(h<<2)>>2]|0;q=(l>>>0)/(p>>>0)|0;if(q>>>0<p>>>0){o=106;break a}if((l|0)==(X(q,p)|0)){r=i;break}else h=h+1|0}b:do if((o|0)==8){c:while(1){o=0;h=(l>>>0)/(m>>>0)|0;do if(h>>>0>=m>>>0)if((l|0)!=(X(h,m)|0)){p=m+10|0;q=(l>>>0)/(p>>>0)|0;if(q>>>0>=p>>>0)if((l|0)!=(X(q,p)|0)){q=m+12|0;s=(l>>>0)/(q>>>0)|0;if(s>>>0>=q>>>0)if((l|0)!=(X(s,q)|0)){s=m+16|0;t=(l>>>0)/(s>>>0)|0;if(t>>>0>=s>>>0)if((l|0)!=(X(t,s)|0)){t=m+18|0;v=(l>>>0)/(t>>>0)|0;if(v>>>0>=t>>>0)if((l|0)!=(X(v,t)|0)){v=m+22|0;w=(l>>>0)/(v>>>0)|0;if(w>>>0>=v>>>0)if((l|0)!=(X(w,v)|0)){w=m+28|0;x=(l>>>0)/(w>>>0)|0;if(x>>>0>=w>>>0)if((l|0)==(X(x,w)|0)){y=w;z=9;A=n}else{x=m+30|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+36|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+40|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+42|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+46|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+52|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+58|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+60|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+66|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+70|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+72|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+78|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+82|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+88|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+96|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+100|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+102|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+106|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+108|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+112|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+120|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+126|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+130|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+136|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+138|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+142|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+148|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+150|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+156|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+162|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+166|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+168|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+172|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+178|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+180|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+186|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+190|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+192|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+196|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+198|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+208|0;B=(l>>>0)/(x>>>0)|0;C=B>>>0<x>>>0;D=(l|0)==(X(B,x)|0);y=C|D?x:m+210|0;z=C?1:D?9:0;A=C?l:n}else{y=w;z=1;A=l}}else{y=v;z=9;A=n}else{y=v;z=1;A=l}}else{y=t;z=9;A=n}else{y=t;z=1;A=l}}else{y=s;z=9;A=n}else{y=s;z=1;A=l}}else{y=q;z=9;A=n}else{y=q;z=1;A=l}}else{y=p;z=9;A=n}else{y=p;z=1;A=l}}else{y=m;z=9;A=n}else{y=m;z=1;A=l}while(0);switch(z&15){case 9:{r=A;break b;break}case 0:{m=y;n=A;o=8;break}default:break c}}if(!z)r=A;else{o=107;break a}}while(0);h=g+1|0;p=(h|0)==48;q=j+(p&1)|0;i=r;j=q;g=p?0:h;k=q*210|0}if((o|0)==106){f[d>>2]=l;E=l;break}else if((o|0)==107){f[d>>2]=l;E=A;break}}else{k=Sh(3316,3508,d,c)|0;E=f[k>>2]|0}while(0);u=b;return E|0}function ab(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,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=G+1|0;J=((I>>>0)%3|0|0)==0?G+-2|0:I;if((J|0)==-1)K=-1;else K=f[F+(J<<2)>>2]|0;J=(((G>>>0)%3|0|0)==0?2:-1)+G|0;if((J|0)==-1)L=-1;else L=f[F+(J<<2)>>2]|0;if((H|0)!=(K|0)?!((H|0)==(L|0)|(K|0)==(L|0)):0){H=0;J=A;F=E;I=D;while(1){M=H+G|0;if(!(f[(f[e>>2]|0)+(M>>>5<<2)>>2]&1<<(M&31))){N=f[(f[a>>2]|0)+(M<<2)>>2]|0;f[g>>2]=N;if(!(f[F+(N>>>5<<2)>>2]&1<<(N&31))){O=0;P=J;Q=N}else{N=f[i>>2]|0;if((N|0)==(f[y>>2]|0))wf(h,2760);else{f[N>>2]=-1;f[i>>2]=N+4}N=f[v>>2]|0;if((N|0)==(f[w>>2]|0))wf(z,g);else{f[N>>2]=f[g>>2];f[v>>2]=N+4}N=f[l>>2]|0;R=f[j>>2]|0;if((N|0)==(R<<5|0)){if((N+1|0)<0){S=50;break a}T=R<<6;R=N+32&-32;$e(d,N>>>0<1073741823?(T>>>0<R>>>0?R:T):2147483647);U=f[l>>2]|0}else U=N;f[l>>2]=U+1;N=(f[d>>2]|0)+(U>>>5<<2)|0;f[N>>2]=f[N>>2]&~(1<<(U&31));f[g>>2]=J;O=1;P=J+1|0;Q=J}N=f[d>>2]|0;T=N+(Q>>>5<<2)|0;f[T>>2]=f[T>>2]|1<<(Q&31);T=N;b:do if(O){R=M;while(1){if((R|0)==-1){S=64;break b}V=(f[e>>2]|0)+(R>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(R&31);V=f[g>>2]|0;f[(f[h>>2]|0)+(V<<2)>>2]=R;f[(f[a>>2]|0)+(R<<2)>>2]=V;V=R+1|0;W=((V>>>0)%3|0|0)==0?R+-2|0:V;do if((W|0)==-1)X=-1;else{V=f[(f[x>>2]|0)+(W<<2)>>2]|0;Y=V+1|0;if((V|0)==-1){X=-1;break}X=((Y>>>0)%3|0|0)==0?V+-2|0:Y}while(0);if((X|0)==(M|0))break;else R=X}}else{R=M;while(1){if((R|0)==-1){S=64;break b}W=(f[e>>2]|0)+(R>>>5<<2)|0;f[W>>2]=f[W>>2]|1<<(R&31);f[(f[h>>2]|0)+(f[g>>2]<<2)>>2]=R;W=R+1|0;Y=((W>>>0)%3|0|0)==0?R+-2|0:W;do if((Y|0)==-1)Z=-1;else{W=f[(f[x>>2]|0)+(Y<<2)>>2]|0;V=W+1|0;if((W|0)==-1){Z=-1;break}Z=((V>>>0)%3|0|0)==0?W+-2|0:V}while(0);if((Z|0)==(M|0))break;else R=Z}}while(0);c:do if((S|0)==64){S=0;if((M|0)==-1)break;R=(((M>>>0)%3|0|0)==0?2:-1)+M|0;if((R|0)==-1)break;Y=f[(f[x>>2]|0)+(R<<2)>>2]|0;if((Y|0)==-1)break;R=Y+(((Y>>>0)%3|0|0)==0?2:-1)|0;if((R|0)==-1)break;if(!O){Y=R;while(1){V=(f[e>>2]|0)+(Y>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(Y&31);V=(((Y>>>0)%3|0|0)==0?2:-1)+Y|0;if((V|0)==-1)break c;W=f[(f[x>>2]|0)+(V<<2)>>2]|0;if((W|0)==-1)break c;Y=W+(((W>>>0)%3|0|0)==0?2:-1)|0;if((Y|0)==-1)break c}}Y=f[a>>2]|0;W=R;do{V=(f[e>>2]|0)+(W>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(W&31);f[Y+(W<<2)>>2]=f[g>>2];V=(((W>>>0)%3|0|0)==0?2:-1)+W|0;if((V|0)==-1)break c;_=f[(f[x>>2]|0)+(V<<2)>>2]|0;if((_|0)==-1)break c;W=_+(((_>>>0)%3|0|0)==0?2:-1)|0}while((W|0)!=-1)}while(0);$=P;aa=T;ba=N}else{$=J;aa=I;ba=F}if((H|0)<2){H=H+1|0;J=$;F=ba;I=aa}else{ca=$;da=aa;ea=ba;break}}}else{ca=A;da=D;ea=E}}else{ca=A;da=D;ea=E}C=C+1|0;B=f[a>>2]|0;if(C>>>0>=(((f[m>>2]|0)-B>>2>>>0)/3|0)>>>0){S=18;break}else{A=ca;D=da;E=ea}}if((S|0)==18){fa=da;ga=f[l>>2]|0;break}else if((S|0)==50)xm(d)}else{fa=q;ga=p}}else{fa=q;ga=p}while(0);p=a+44|0;f[p>>2]=0;a=fa;fa=ga>>>5;q=a+(fa<<2)|0;S=ga&31;ga=(fa|0)!=0;d:do if(fa|S|0)if(!S){l=a;da=0;ea=ga;while(1){e:do if(ea){if(!(f[l>>2]&1)){ca=da+1|0;f[p>>2]=ca;ha=ca}else ha=da;if(!(f[l>>2]&2)){ca=ha+1|0;f[p>>2]=ca;ia=ca}else ia=ha;if(!(f[l>>2]&4)){ca=ia+1|0;f[p>>2]=ca;ja=ca}else ja=ia;if(!(f[l>>2]&8)){ca=ja+1|0;f[p>>2]=ca;ka=ca}else ka=ja;if(!(f[l>>2]&16)){ca=ka+1|0;f[p>>2]=ca;la=ca}else la=ka;if(!(f[l>>2]&32)){ca=la+1|0;f[p>>2]=ca;ma=ca}else ma=la;if(!(f[l>>2]&64)){ca=ma+1|0;f[p>>2]=ca;na=ca}else na=ma;if(!(f[l>>2]&128)){ca=na+1|0;f[p>>2]=ca;oa=ca}else oa=na;if(!(f[l>>2]&256)){ca=oa+1|0;f[p>>2]=ca;pa=ca}else pa=oa;if(!(f[l>>2]&512)){ca=pa+1|0;f[p>>2]=ca;qa=ca}else qa=pa;if(!(f[l>>2]&1024)){ca=qa+1|0;f[p>>2]=ca;ra=ca}else ra=qa;if(!(f[l>>2]&2048)){ca=ra+1|0;f[p>>2]=ca;sa=ca}else sa=ra;if(!(f[l>>2]&4096)){ca=sa+1|0;f[p>>2]=ca;ta=ca}else ta=sa;if(!(f[l>>2]&8192)){ca=ta+1|0;f[p>>2]=ca;ua=ca}else ua=ta;if(!(f[l>>2]&16384)){ca=ua+1|0;f[p>>2]=ca;va=ca}else va=ua;if(!(f[l>>2]&32768)){ca=va+1|0;f[p>>2]=ca;wa=ca}else wa=va;if(!(f[l>>2]&65536)){ca=wa+1|0;f[p>>2]=ca;xa=ca}else xa=wa;if(!(f[l>>2]&131072)){ca=xa+1|0;f[p>>2]=ca;ya=ca}else ya=xa;if(!(f[l>>2]&262144)){ca=ya+1|0;f[p>>2]=ca;za=ca}else za=ya;if(!(f[l>>2]&524288)){ca=za+1|0;f[p>>2]=ca;Aa=ca}else Aa=za;if(!(f[l>>2]&1048576)){ca=Aa+1|0;f[p>>2]=ca;Ba=ca}else Ba=Aa;if(!(f[l>>2]&2097152)){ca=Ba+1|0;f[p>>2]=ca;Ca=ca}else Ca=Ba;if(!(f[l>>2]&4194304)){ca=Ca+1|0;f[p>>2]=ca;Da=ca}else Da=Ca;if(!(f[l>>2]&8388608)){ca=Da+1|0;f[p>>2]=ca;Ea=ca}else Ea=Da;if(!(f[l>>2]&16777216)){ca=Ea+1|0;f[p>>2]=ca;Fa=ca}else Fa=Ea;if(!(f[l>>2]&33554432)){ca=Fa+1|0;f[p>>2]=ca;Ga=ca}else Ga=Fa;if(!(f[l>>2]&67108864)){ca=Ga+1|0;f[p>>2]=ca;Ha=ca}else Ha=Ga;if(!(f[l>>2]&134217728)){ca=Ha+1|0;f[p>>2]=ca;Ia=ca}else Ia=Ha;if(!(f[l>>2]&268435456)){ca=Ia+1|0;f[p>>2]=ca;Ja=ca}else Ja=Ia;if(!(f[l>>2]&536870912)){ca=Ja+1|0;f[p>>2]=ca;Ka=ca}else Ka=Ja;if(!(f[l>>2]&1073741824)){ca=Ka+1|0;f[p>>2]=ca;La=ca}else La=Ka;if((f[l>>2]|0)<=-1){Ma=La;break}ca=La+1|0;f[p>>2]=ca;Ma=ca}else{ca=0;m=da;while(1){if(!(f[l>>2]&1<<ca)){ba=m+1|0;f[p>>2]=ba;Na=ba}else Na=m;if((ca|0)==31){Ma=Na;break e}ca=ca+1|0;if(!ca)break d;else m=Na}}while(0);l=l+4|0;if((q|0)==(l|0))break;else{da=Ma;ea=1}}}else{if(ga){ea=0;da=a;l=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xb;da=m;l=Wb}}}else{Yb=a;Zb=0}l=0;da=Zb;while(1){if(!(f[Yb>>2]&1<<l)){ea=da+1|0;f[p>>2]=ea;_b=ea}else _b=da;l=l+1|0;if((l|0)==(S|0))break;else da=_b}}while(0);_b=f[e>>2]|0;if(_b|0)gn(_b);_b=f[d>>2]|0;if(!_b){u=c;return 1}gn(_b);u=c;return 1}function bb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=La,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Uj(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;if(!(b[a+32>>0]|0)){r=o;m=0;while(1){s=$(b[r>>0]|0);n[g+(m<<2)>>2]=s;m=m+1|0;q=b[k>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){t=q;break}else r=r+1|0}}else{r=o;m=0;while(1){s=$($(b[r>>0]|0)/$(127.0));n[g+(m<<2)>>2]=s;m=m+1|0;q=b[k>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){t=q;break}else r=r+1|0}}}else t=l;r=t<<24>>24;if(t<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 2:{r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;q=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;u=Uj(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+u|0;if(!(b[a+32>>0]|0)){u=o;k=0;while(1){s=$(h[u>>0]|0);n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){v=q;break}else u=u+1|0}}else{u=o;k=0;while(1){s=$($(h[u>>0]|0)/$(255.0));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){v=l;break}else u=u+1|0}}}else v=m;u=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 3:{u=a+48|0;k=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Uj(hj(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,k|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;l=0;while(1){s=$(d[u>>1]|0);n[g+(l<<2)>>2]=s;l=l+1|0;q=b[r>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){w=q;break}else u=u+2|0}}else{u=o;l=0;while(1){s=$($(d[u>>1]|0)/$(32767.0));n[g+(l<<2)>>2]=s;l=l+1|0;m=b[r>>0]|0;if((l|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else u=u+2|0}}else w=k;u=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 4:{u=a+48|0;l=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Uj(hj(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,l|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;m=0;while(1){s=$(j[u>>1]|0);n[g+(m<<2)>>2]=s;m=m+1|0;q=b[r>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){x=q;break}else u=u+2|0}}else{u=o;m=0;while(1){s=$($(j[u>>1]|0)/$(65535.0));n[g+(m<<2)>>2]=s;m=m+1|0;k=b[r>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){x=k;break}else u=u+2|0}}else x=l;u=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 5:{u=a+48|0;m=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Uj(hj(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,m|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;k=0;while(1){s=$(f[u>>2]|0);n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){y=q;break}else u=u+4|0}}else{u=o;k=0;while(1){s=$($(f[u>>2]|0)*$(4.65661287e-10));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){y=l;break}else u=u+4|0}}else y=m;u=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 6:{u=a+48|0;k=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Uj(hj(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,k|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;l=0;while(1){s=$((f[u>>2]|0)>>>0);n[g+(l<<2)>>2]=s;l=l+1|0;q=b[r>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){z=q;break}else u=u+4|0}}else{u=o;l=0;while(1){s=$($((f[u>>2]|0)>>>0)*$(2.32830644e-10));n[g+(l<<2)>>2]=s;l=l+1|0;m=b[r>>0]|0;if((l|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){z=m;break}else u=u+4|0}}else z=k;u=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 7:{u=a+48|0;l=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Uj(hj(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,l|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;m=0;while(1){q=u;s=$(+((f[q>>2]|0)>>>0)+4294967296.0*+(f[q+4>>2]|0));n[g+(m<<2)>>2]=s;m=m+1|0;q=b[r>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else u=u+8|0}}else{u=o;m=0;while(1){k=u;s=$($(+((f[k>>2]|0)>>>0)+4294967296.0*+(f[k+4>>2]|0))*$(1.08420217e-19));n[g+(m<<2)>>2]=s;m=m+1|0;k=b[r>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){A=k;break}else u=u+8|0}}else A=l;u=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 8:{u=a+48|0;m=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Uj(hj(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,m|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;k=0;while(1){q=u;s=$(+((f[q>>2]|0)>>>0)+4294967296.0*+((f[q+4>>2]|0)>>>0));n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){B=q;break}else u=u+8|0}}else{u=o;k=0;while(1){l=u;s=$($(+((f[l>>2]|0)>>>0)+4294967296.0*+((f[l+4>>2]|0)>>>0))*$(5.42101086e-20));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){B=l;break}else u=u+8|0}}else B=m;u=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 9:{u=a+24|0;k=b[u>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){r=f[f[a>>2]>>2]|0;o=a+40|0;l=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;q=Uj(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=r+q|0;q=0;while(1){f[g+(q<<2)>>2]=f[o>>2];q=q+1|0;r=b[u>>0]|0;if((q|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){C=r;break}else o=o+4|0}}else C=k;o=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 10:{o=a+24|0;q=b[o>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){u=f[f[a>>2]>>2]|0;m=a+40|0;r=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;l=Uj(r|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=u+l|0;l=0;while(1){s=$(+p[m>>3]);n[g+(l<<2)>>2]=s;l=l+1|0;u=b[o>>0]|0;if((l|0)>=((u<<24>>24>e<<24>>24?e:u)<<24>>24|0)){D=u;break}else m=m+8|0}}else D=q;m=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 11:{m=a+24|0;l=b[m>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){o=f[f[a>>2]>>2]|0;k=a+40|0;u=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=Uj(u|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=o+r|0;r=0;while(1){s=$((b[k>>0]|0)!=0&1);n[g+(r<<2)>>2]=s;r=r+1|0;o=b[m>>0]|0;if((r|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){E=o;break}else k=k+1|0}}else E=l;k=E<<24>>24;if(E<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function cb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T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o=f[n>>2]|0;k=f[p>>2]|0;f[k+(j<<2)>>2]=(m|0)<(o|0)?o:m;r=k}j=j+1|0;s=f[i>>2]|0}while((j|0)<(s|0));if((s|0)>0){s=a+20|0;j=0;do{p=(f[b+(j<<2)>>2]|0)+(f[r+(j<<2)>>2]|0)|0;q=c+(j<<2)|0;f[q>>2]=p;if((p|0)<=(f[l>>2]|0)){if((p|0)<(f[n>>2]|0)){t=(f[s>>2]|0)+p|0;v=18}}else{t=p-(f[s>>2]|0)|0;v=18}if((v|0)==18){v=0;f[q>>2]=t}j=j+1|0}while((j|0)<(f[i>>2]|0))}}j=f[a+48>>2]|0;t=f[a+52>>2]|0;s=dj(16)|0;f[s>>2]=0;f[s+4>>2]=0;f[s+8>>2]=0;f[s+12>>2]=0;f[h>>2]=0;n=h+4|0;f[n>>2]=0;f[h+8>>2]=0;do if(e)if(e>>>0>1073741823)xm(h);else{l=e<<2;r=dj(l)|0;f[h>>2]=r;q=r+(e<<2)|0;f[h+8>>2]=q;Uf(r|0,0,l|0)|0;f[n>>2]=q;w=r;break}else w=0;while(0);r=a+56|0;q=f[r>>2]|0;l=f[q+4>>2]|0;p=f[q>>2]|0;k=l-p|0;m=k>>2;a:do if((k|0)>4){o=j+64|0;x=j+28|0;y=(e|0)>0;z=a+16|0;A=a+32|0;B=a+12|0;C=a+20|0;D=e<<2;E=(e|0)==1;if(l-p>>2>>>0>1){F=1;G=p}else{H=q;xm(H)}while(1){I=f[G+(F<<2)>>2]|0;J=(((I>>>0)%3|0|0)==0?2:-1)+I|0;K=J>>>5;L=1<<(J&31);M=(I|0)==-1|(J|0)==-1;N=1;O=0;P=I;b:while(1){Q=N^1;R=O;S=P;while(1){if((S|0)==-1){T=R;v=58;break b}U=f[d+(R*12|0)>>2]|0;if(((f[(f[j>>2]|0)+(S>>>5<<2)>>2]&1<<(S&31)|0)==0?(V=f[(f[(f[o>>2]|0)+12>>2]|0)+(S<<2)>>2]|0,(V|0)!=-1):0)?(W=f[x>>2]|0,Y=f[t>>2]|0,Z=f[Y+(f[W+(V<<2)>>2]<<2)>>2]|0,_=V+1|0,$=f[Y+(f[W+((((_>>>0)%3|0|0)==0?V+-2|0:_)<<2)>>2]<<2)>>2]|0,_=f[Y+(f[W+((((V>>>0)%3|0|0)==0?2:-1)+V<<2)>>2]<<2)>>2]|0,(Z|0)<(F|0)&($|0)<(F|0)&(_|0)<(F|0)):0){V=X(Z,e)|0;Z=X($,e)|0;$=X(_,e)|0;if(y){_=0;do{f[U+(_<<2)>>2]=(f[c+(_+$<<2)>>2]|0)+(f[c+(_+Z<<2)>>2]|0)-(f[c+(_+V<<2)>>2]|0);_=_+1|0}while((_|0)!=(e|0))}_=R+1|0;if((_|0)==4){aa=4;v=38;break b}else ba=_}else ba=R;do if(N){_=S+1|0;V=((_>>>0)%3|0|0)==0?S+-2|0:_;if(((V|0)!=-1?(f[(f[j>>2]|0)+(V>>>5<<2)>>2]&1<<(V&31)|0)==0:0)?(_=f[(f[(f[o>>2]|0)+12>>2]|0)+(V<<2)>>2]|0,V=_+1|0,(_|0)!=-1):0)ca=((V>>>0)%3|0|0)==0?_+-2|0:V;else ca=-1}else{V=(((S>>>0)%3|0|0)==0?2:-1)+S|0;if(((V|0)!=-1?(f[(f[j>>2]|0)+(V>>>5<<2)>>2]&1<<(V&31)|0)==0:0)?(_=f[(f[(f[o>>2]|0)+12>>2]|0)+(V<<2)>>2]|0,(_|0)!=-1):0)if(!((_>>>0)%3|0)){ca=_+2|0;break}else{ca=_+-1|0;break}else ca=-1}while(0);if((ca|0)==(I|0)){T=ba;v=58;break b}if((ca|0)!=-1|Q){R=ba;S=ca}else break}if(M){N=0;O=ba;P=-1;continue}if(f[(f[j>>2]|0)+(K<<2)>>2]&L|0){N=0;O=ba;P=-1;continue}S=f[(f[(f[o>>2]|0)+12>>2]|0)+(J<<2)>>2]|0;if((S|0)==-1){N=0;O=ba;P=-1;continue}if(!((S>>>0)%3|0)){N=0;O=ba;P=S+2|0;continue}else{N=0;O=ba;P=S+-1|0;continue}}if((v|0)==58){v=0;if((T|0)>0){aa=T;v=38}else{da=X(F,e)|0;v=73}}if((v|0)==38){v=0;if(y){Uf(f[h>>2]|0,0,D|0)|0;P=aa+-1|0;O=s+(P<<2)|0;N=a+60+(P*12|0)+4|0;J=a+60+(P*12|0)|0;P=f[h>>2]|0;L=0;K=0;while(1){M=f[O>>2]|0;f[O>>2]=M+1;if((f[N>>2]|0)>>>0<=M>>>0){ea=0;fa=P;break a}if(!(f[(f[J>>2]|0)+(M>>>5<<2)>>2]&1<<(M&31))){M=f[d+(L*12|0)>>2]|0;I=0;do{S=P+(I<<2)|0;f[S>>2]=(f[S>>2]|0)+(f[M+(I<<2)>>2]|0);I=I+1|0}while((I|0)!=(e|0));ga=K+1|0}else ga=K;L=L+1|0;if((L|0)>=(aa|0)){ha=ga;break}else K=ga}}else{K=aa+-1|0;L=s+(K<<2)|0;P=a+60+(K*12|0)|0;J=f[h>>2]|0;N=f[a+60+(K*12|0)+4>>2]|0;K=0;O=0;I=f[L>>2]|0;while(1){M=I;I=I+1|0;f[L>>2]=I;if(N>>>0<=M>>>0){ea=0;fa=J;break a}S=O+((f[(f[P>>2]|0)+(M>>>5<<2)>>2]&1<<(M&31)|0)==0&1)|0;K=K+1|0;if((K|0)>=(aa|0)){ha=S;break}else O=S}}O=X(F,e)|0;if(ha){K=f[h>>2]|0;if(y?(f[K>>2]=(f[K>>2]|0)/(ha|0)|0,!E):0){P=1;do{J=K+(P<<2)|0;f[J>>2]=(f[J>>2]|0)/(ha|0)|0;P=P+1|0}while((P|0)!=(e|0))}P=b+(O<<2)|0;J=c+(O<<2)|0;if((f[i>>2]|0)>0){N=0;do{I=f[K+(N<<2)>>2]|0;L=f[z>>2]|0;if((I|0)>(L|0)){S=f[A>>2]|0;f[S+(N<<2)>>2]=L;ia=S}else{S=f[B>>2]|0;L=f[A>>2]|0;f[L+(N<<2)>>2]=(I|0)<(S|0)?S:I;ia=L}N=N+1|0;ja=f[i>>2]|0}while((N|0)<(ja|0));if((ja|0)>0){N=0;do{K=(f[P+(N<<2)>>2]|0)+(f[ia+(N<<2)>>2]|0)|0;L=J+(N<<2)|0;f[L>>2]=K;do if((K|0)>(f[z>>2]|0)){ka=K-(f[C>>2]|0)|0;v=95}else{if((K|0)>=(f[B>>2]|0))break;ka=(f[C>>2]|0)+K|0;v=95}while(0);if((v|0)==95){v=0;f[L>>2]=ka}N=N+1|0}while((N|0)<(f[i>>2]|0))}}}else{da=O;v=73}}if((v|0)==73?(v=0,N=c+((X(F+-1|0,e)|0)<<2)|0,J=b+(da<<2)|0,P=c+(da<<2)|0,(f[i>>2]|0)>0):0){K=0;do{I=f[N+(K<<2)>>2]|0;S=f[z>>2]|0;if((I|0)>(S|0)){M=f[A>>2]|0;f[M+(K<<2)>>2]=S;la=M}else{M=f[B>>2]|0;S=f[A>>2]|0;f[S+(K<<2)>>2]=(I|0)<(M|0)?M:I;la=S}K=K+1|0;ma=f[i>>2]|0}while((K|0)<(ma|0));if((ma|0)>0){K=0;do{N=(f[J+(K<<2)>>2]|0)+(f[la+(K<<2)>>2]|0)|0;O=P+(K<<2)|0;f[O>>2]=N;if((N|0)<=(f[z>>2]|0)){if((N|0)<(f[B>>2]|0)){na=(f[C>>2]|0)+N|0;v=83}}else{na=N-(f[C>>2]|0)|0;v=83}if((v|0)==83){v=0;f[O>>2]=na}K=K+1|0}while((K|0)<(f[i>>2]|0))}}F=F+1|0;if((F|0)>=(m|0)){v=100;break}K=f[r>>2]|0;G=f[K>>2]|0;if((f[K+4>>2]|0)-G>>2>>>0<=F>>>0){H=K;v=28;break}}if((v|0)==28)xm(H);else if((v|0)==100){ea=1;fa=f[h>>2]|0;break}}else{ea=1;fa=w}while(0);if(fa|0){w=f[n>>2]|0;if((w|0)!=(fa|0))f[n>>2]=w+(~((w+-4-fa|0)>>>2)<<2);gn(fa)}gn(s);s=f[d+36>>2]|0;if(s|0){fa=d+40|0;w=f[fa>>2]|0;if((w|0)!=(s|0))f[fa>>2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|0)==0?Y+-2|0:V;else ca=-1}else{V=(((P>>>0)%3|0|0)==0?2:-1)+P|0;if((V|0)!=-1?(Y=f[S+(V<<2)>>2]|0,(Y|0)!=-1):0)if(!((Y>>>0)%3|0)){ca=Y+2|0;break}else{ca=Y+-1|0;break}else ca=-1}while(0);if((ca|0)==(H|0)){Q=ba;v=58;break b}if((ca|0)!=-1|N){O=ba;P=ca}else break}if(J){K=0;L=ba;M=-1;continue}P=f[S+(I<<2)>>2]|0;if((P|0)==-1){K=0;L=ba;M=-1;continue}if(!((P>>>0)%3|0)){K=0;L=ba;M=P+2|0;continue}else{K=0;L=ba;M=P+-1|0;continue}}if((v|0)==58){v=0;if((Q|0)>0){aa=Q;v=41}else{da=X(E,e)|0;v=73}}if((v|0)==41){v=0;if(x){Uf(f[h>>2]|0,0,C|0)|0;M=aa+-1|0;L=s+(M<<2)|0;K=a+60+(M*12|0)+4|0;I=a+60+(M*12|0)|0;M=f[h>>2]|0;J=0;H=0;while(1){P=f[L>>2]|0;f[L>>2]=P+1;if((f[K>>2]|0)>>>0<=P>>>0){ea=0;fa=M;break a}if(!(f[(f[I>>2]|0)+(P>>>5<<2)>>2]&1<<(P&31))){P=f[d+(J*12|0)>>2]|0;O=0;do{N=M+(O<<2)|0;f[N>>2]=(f[N>>2]|0)+(f[P+(O<<2)>>2]|0);O=O+1|0}while((O|0)!=(e|0));ga=H+1|0}else ga=H;J=J+1|0;if((J|0)>=(aa|0)){ha=ga;break}else H=ga}}else{H=aa+-1|0;J=s+(H<<2)|0;M=a+60+(H*12|0)|0;I=f[h>>2]|0;K=f[a+60+(H*12|0)+4>>2]|0;H=0;L=0;O=f[J>>2]|0;while(1){P=O;O=O+1|0;f[J>>2]=O;if(K>>>0<=P>>>0){ea=0;fa=I;break a}N=L+((f[(f[M>>2]|0)+(P>>>5<<2)>>2]&1<<(P&31)|0)==0&1)|0;H=H+1|0;if((H|0)>=(aa|0)){ha=N;break}else L=N}}L=X(E,e)|0;if(ha){H=f[h>>2]|0;if(x?(f[H>>2]=(f[H>>2]|0)/(ha|0)|0,!D):0){M=1;do{I=H+(M<<2)|0;f[I>>2]=(f[I>>2]|0)/(ha|0)|0;M=M+1|0}while((M|0)!=(e|0))}M=b+(L<<2)|0;I=c+(L<<2)|0;if((f[i>>2]|0)>0){K=0;do{O=f[H+(K<<2)>>2]|0;J=f[y>>2]|0;if((O|0)>(J|0)){N=f[z>>2]|0;f[N+(K<<2)>>2]=J;ia=N}else{N=f[A>>2]|0;J=f[z>>2]|0;f[J+(K<<2)>>2]=(O|0)<(N|0)?N:O;ia=J}K=K+1|0;ja=f[i>>2]|0}while((K|0)<(ja|0));if((ja|0)>0){K=0;do{H=(f[M+(K<<2)>>2]|0)+(f[ia+(K<<2)>>2]|0)|0;J=I+(K<<2)|0;f[J>>2]=H;do if((H|0)>(f[y>>2]|0)){ka=H-(f[B>>2]|0)|0;v=95}else{if((H|0)>=(f[A>>2]|0))break;ka=(f[B>>2]|0)+H|0;v=95}while(0);if((v|0)==95){v=0;f[J>>2]=ka}K=K+1|0}while((K|0)<(f[i>>2]|0))}}}else{da=L;v=73}}if((v|0)==73?(v=0,K=c+((X(E+-1|0,e)|0)<<2)|0,I=b+(da<<2)|0,M=c+(da<<2)|0,(f[i>>2]|0)>0):0){H=0;do{O=f[K+(H<<2)>>2]|0;N=f[y>>2]|0;if((O|0)>(N|0)){P=f[z>>2]|0;f[P+(H<<2)>>2]=N;la=P}else{P=f[A>>2]|0;N=f[z>>2]|0;f[N+(H<<2)>>2]=(O|0)<(P|0)?P:O;la=N}H=H+1|0;ma=f[i>>2]|0}while((H|0)<(ma|0));if((ma|0)>0){H=0;do{K=(f[I+(H<<2)>>2]|0)+(f[la+(H<<2)>>2]|0)|0;L=M+(H<<2)|0;f[L>>2]=K;if((K|0)<=(f[y>>2]|0)){if((K|0)<(f[A>>2]|0)){na=(f[B>>2]|0)+K|0;v=83}}else{na=K-(f[B>>2]|0)|0;v=83}if((v|0)==83){v=0;f[L>>2]=na}H=H+1|0}while((H|0)<(f[i>>2]|0))}}E=E+1|0;if((E|0)>=(m|0)){v=100;break}H=f[r>>2]|0;F=f[H>>2]|0;if((f[H+4>>2]|0)-F>>2>>>0<=E>>>0){G=H;v=28;break}}if((v|0)==28)xm(G);else if((v|0)==100){ea=1;fa=f[h>>2]|0;break}}else{ea=1;fa=w}while(0);if(fa|0){w=f[n>>2]|0;if((w|0)!=(fa|0))f[n>>2]=w+(~((w+-4-fa|0)>>>2)<<2);gn(fa)}gn(s);s=f[d+36>>2]|0;if(s|0){fa=d+40|0;w=f[fa>>2]|0;if((w|0)!=(s|0))f[fa>>2]=w+(~((w+-4-s|0)>>>2)<<2);gn(s)}s=f[d+24>>2]|0;if(s|0){w=d+28|0;fa=f[w>>2]|0;if((fa|0)!=(s|0))f[w>>2]=fa+(~((fa+-4-s|0)>>>2)<<2);gn(s)}s=f[d+12>>2]|0;if(s|0){fa=d+16|0;w=f[fa>>2]|0;if((w|0)!=(s|0))f[fa>>2]=w+(~((w+-4-s|0)>>>2)<<2);gn(s)}s=f[d>>2]|0;if(!s){u=g;return ea|0}w=d+4|0;d=f[w>>2]|0;if((d|0)!=(s|0))f[w>>2]=d+(~((d+-4-s|0)>>>2)<<2);gn(s);u=g;return ea|0}function eb(a,c,d,e,g,i){a=a|0;c=+c;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0,D=0.0,E=0,F=0,G=0,H=0.0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0.0,ga=0.0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0;j=u;u=u+560|0;k=j+8|0;l=j;m=j+524|0;n=m;o=j+512|0;f[l>>2]=0;p=o+12|0;Ck(c)|0;if((I|0)<0){q=-c;r=1;s=10679}else{q=c;r=(g&2049|0)!=0&1;s=(g&2048|0)==0?((g&1|0)==0?10680:10685):10682}Ck(q)|0;do if(0==0&(I&2146435072|0)==2146435072){t=(i&32|0)!=0;v=r+3|0;dh(a,32,d,v,g&-65537);ml(a,s,r);ml(a,q!=q|0.0!=0.0?(t?10706:10710):t?10698:10702,3);dh(a,32,d,v,g^8192);w=v}else{c=+Mm(q,l)*2.0;v=c!=0.0;if(v)f[l>>2]=(f[l>>2]|0)+-1;t=i|32;if((t|0)==97){x=i&32;y=(x|0)==0?s:s+9|0;z=r|2;A=12-e|0;do if(!(e>>>0>11|(A|0)==0)){B=8.0;C=A;do{C=C+-1|0;B=B*16.0}while((C|0)!=0);if((b[y>>0]|0)==45){D=-(B+(-c-B));break}else{D=c+B-B;break}}else D=c;while(0);A=f[l>>2]|0;C=(A|0)<0?0-A|0:A;E=qg(C,((C|0)<0)<<31>>31,p)|0;if((E|0)==(p|0)){C=o+11|0;b[C>>0]=48;F=C}else F=E;b[F+-1>>0]=(A>>31&2)+43;A=F+-2|0;b[A>>0]=i+15;E=(e|0)<1;C=(g&8|0)==0;G=m;H=D;while(1){J=~~H;K=G+1|0;b[G>>0]=x|h[10714+J>>0];H=(H-+(J|0))*16.0;if((K-n|0)==1?!(C&(E&H==0.0)):0){b[K>>0]=46;L=G+2|0}else L=K;if(!(H!=0.0))break;else G=L}G=L;if((e|0)!=0?(-2-n+G|0)<(e|0):0){M=G-n|0;N=e+2|0}else{E=G-n|0;M=E;N=E}E=p-A|0;G=E+z+N|0;dh(a,32,d,G,g);ml(a,y,z);dh(a,48,d,G,g^65536);ml(a,m,M);dh(a,48,N-M|0,0,0);ml(a,A,E);dh(a,32,d,G,g^8192);w=G;break}G=(e|0)<0?6:e;if(v){E=(f[l>>2]|0)+-28|0;f[l>>2]=E;O=c*268435456.0;P=E}else{O=c;P=f[l>>2]|0}E=(P|0)<0?k:k+288|0;C=E;H=O;do{x=~~H>>>0;f[C>>2]=x;C=C+4|0;H=(H-+(x>>>0))*1.0e9}while(H!=0.0);if((P|0)>0){v=E;A=C;z=P;while(1){y=(z|0)<29?z:29;x=A+-4|0;if(x>>>0>=v>>>0){K=x;x=0;do{J=Rj(f[K>>2]|0,0,y|0)|0;Q=Uj(J|0,I|0,x|0,0)|0;J=I;R=bj(Q|0,J|0,1e9,0)|0;f[K>>2]=R;x=Il(Q|0,J|0,1e9,0)|0;K=K+-4|0}while(K>>>0>=v>>>0);if(x){K=v+-4|0;f[K>>2]=x;S=K}else S=v}else S=v;K=A;while(1){if(K>>>0<=S>>>0)break;J=K+-4|0;if(!(f[J>>2]|0))K=J;else break}x=(f[l>>2]|0)-y|0;f[l>>2]=x;if((x|0)>0){v=S;A=K;z=x}else{T=S;U=K;V=x;break}}}else{T=E;U=C;V=P}if((V|0)<0){z=((G+25|0)/9|0)+1|0;A=(t|0)==102;v=T;x=U;J=V;while(1){Q=0-J|0;R=(Q|0)<9?Q:9;if(v>>>0<x>>>0){Q=(1<<R)+-1|0;W=1e9>>>R;Y=0;Z=v;do{_=f[Z>>2]|0;f[Z>>2]=(_>>>R)+Y;Y=X(_&Q,W)|0;Z=Z+4|0}while(Z>>>0<x>>>0);Z=(f[v>>2]|0)==0?v+4|0:v;if(!Y){$=Z;aa=x}else{f[x>>2]=Y;$=Z;aa=x+4|0}}else{$=(f[v>>2]|0)==0?v+4|0:v;aa=x}Z=A?E:$;W=(aa-Z>>2|0)>(z|0)?Z+(z<<2)|0:aa;J=(f[l>>2]|0)+R|0;f[l>>2]=J;if((J|0)>=0){ba=$;ca=W;break}else{v=$;x=W}}}else{ba=T;ca=U}x=E;if(ba>>>0<ca>>>0){v=(x-ba>>2)*9|0;J=f[ba>>2]|0;if(J>>>0<10)da=v;else{z=v;v=10;while(1){v=v*10|0;A=z+1|0;if(J>>>0<v>>>0){da=A;break}else z=A}}}else da=0;z=(t|0)==103;v=(G|0)!=0;J=G-((t|0)!=102?da:0)+((v&z)<<31>>31)|0;if((J|0)<(((ca-x>>2)*9|0)+-9|0)){A=J+9216|0;J=E+4+(((A|0)/9|0)+-1024<<2)|0;C=(A|0)%9|0;if((C|0)<8){A=C;C=10;while(1){W=C*10|0;if((A|0)<7){A=A+1|0;C=W}else{ea=W;break}}}else ea=10;C=f[J>>2]|0;A=(C>>>0)%(ea>>>0)|0;t=(J+4|0)==(ca|0);if(!(t&(A|0)==0)){B=(((C>>>0)/(ea>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;W=(ea|0)/2|0;H=A>>>0<W>>>0?.5:t&(A|0)==(W|0)?1.0:1.5;if(!r){fa=H;ga=B}else{W=(b[s>>0]|0)==45;fa=W?-H:H;ga=W?-B:B}W=C-A|0;f[J>>2]=W;if(ga+fa!=ga){A=W+ea|0;f[J>>2]=A;if(A>>>0>999999999){A=ba;W=J;while(1){C=W+-4|0;f[W>>2]=0;if(C>>>0<A>>>0){t=A+-4|0;f[t>>2]=0;ha=t}else ha=A;t=(f[C>>2]|0)+1|0;f[C>>2]=t;if(t>>>0>999999999){A=ha;W=C}else{ia=ha;ja=C;break}}}else{ia=ba;ja=J}W=(x-ia>>2)*9|0;A=f[ia>>2]|0;if(A>>>0<10){ka=ja;la=W;ma=ia}else{C=W;W=10;while(1){W=W*10|0;t=C+1|0;if(A>>>0<W>>>0){ka=ja;la=t;ma=ia;break}else C=t}}}else{ka=J;la=da;ma=ba}}else{ka=J;la=da;ma=ba}C=ka+4|0;na=la;oa=ca>>>0>C>>>0?C:ca;pa=ma}else{na=da;oa=ca;pa=ba}C=oa;while(1){if(C>>>0<=pa>>>0){qa=0;break}W=C+-4|0;if(!(f[W>>2]|0))C=W;else{qa=1;break}}J=0-na|0;do if(z){W=G+((v^1)&1)|0;if((W|0)>(na|0)&(na|0)>-5){ra=i+-1|0;sa=W+-1-na|0}else{ra=i+-2|0;sa=W+-1|0}W=g&8;if(!W){if(qa?(A=f[C+-4>>2]|0,(A|0)!=0):0)if(!((A>>>0)%10|0)){t=0;Z=10;while(1){Z=Z*10|0;Q=t+1|0;if((A>>>0)%(Z>>>0)|0|0){ta=Q;break}else t=Q}}else ta=0;else ta=9;t=((C-x>>2)*9|0)+-9|0;if((ra|32|0)==102){Z=t-ta|0;A=(Z|0)>0?Z:0;ua=ra;va=(sa|0)<(A|0)?sa:A;wa=0;break}else{A=t+na-ta|0;t=(A|0)>0?A:0;ua=ra;va=(sa|0)<(t|0)?sa:t;wa=0;break}}else{ua=ra;va=sa;wa=W}}else{ua=i;va=G;wa=g&8}while(0);G=va|wa;x=(G|0)!=0&1;v=(ua|32|0)==102;if(v){xa=0;ya=(na|0)>0?na:0}else{z=(na|0)<0?J:na;t=qg(z,((z|0)<0)<<31>>31,p)|0;z=p;if((z-t|0)<2){A=t;while(1){Z=A+-1|0;b[Z>>0]=48;if((z-Z|0)<2)A=Z;else{za=Z;break}}}else za=t;b[za+-1>>0]=(na>>31&2)+43;A=za+-2|0;b[A>>0]=ua;xa=A;ya=z-A|0}A=r+1+va+x+ya|0;dh(a,32,d,A,g);ml(a,s,r);dh(a,48,d,A,g^65536);if(v){J=pa>>>0>E>>>0?E:pa;Z=m+9|0;R=Z;Y=m+8|0;Q=J;do{K=qg(f[Q>>2]|0,0,Z)|0;if((Q|0)==(J|0))if((K|0)==(Z|0)){b[Y>>0]=48;Aa=Y}else Aa=K;else if(K>>>0>m>>>0){Uf(m|0,48,K-n|0)|0;y=K;while(1){_=y+-1|0;if(_>>>0>m>>>0)y=_;else{Aa=_;break}}}else Aa=K;ml(a,Aa,R-Aa|0);Q=Q+4|0}while(Q>>>0<=E>>>0);if(G|0)ml(a,10730,1);if(Q>>>0<C>>>0&(va|0)>0){E=va;R=Q;while(1){Y=qg(f[R>>2]|0,0,Z)|0;if(Y>>>0>m>>>0){Uf(m|0,48,Y-n|0)|0;J=Y;while(1){v=J+-1|0;if(v>>>0>m>>>0)J=v;else{Ba=v;break}}}else Ba=Y;ml(a,Ba,(E|0)<9?E:9);R=R+4|0;J=E+-9|0;if(!(R>>>0<C>>>0&(E|0)>9)){Ca=J;break}else E=J}}else Ca=va;dh(a,48,Ca+9|0,9,0)}else{E=qa?C:pa+4|0;if((va|0)>-1){R=m+9|0;Z=(wa|0)==0;Q=R;G=0-n|0;J=m+8|0;K=va;v=pa;while(1){x=qg(f[v>>2]|0,0,R)|0;if((x|0)==(R|0)){b[J>>0]=48;Da=J}else Da=x;do if((v|0)==(pa|0)){x=Da+1|0;ml(a,Da,1);if(Z&(K|0)<1){Ea=x;break}ml(a,10730,1);Ea=x}else{if(Da>>>0<=m>>>0){Ea=Da;break}Uf(m|0,48,Da+G|0)|0;x=Da;while(1){z=x+-1|0;if(z>>>0>m>>>0)x=z;else{Ea=z;break}}}while(0);Y=Q-Ea|0;ml(a,Ea,(K|0)>(Y|0)?Y:K);x=K-Y|0;v=v+4|0;if(!(v>>>0<E>>>0&(x|0)>-1)){Fa=x;break}else K=x}}else Fa=va;dh(a,48,Fa+18|0,18,0);ml(a,xa,p-xa|0)}dh(a,32,d,A,g^8192);w=A}while(0);u=j;return ((w|0)<(d|0)?d:w)|0}function fb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0;c=u;u=u+48|0;d=c+36|0;e=c+24|0;g=c+12|0;h=c;i=a+4|0;j=f[(f[i>>2]|0)+44>>2]|0;k=a+8|0;l=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else{Ud(x,t-y|0,d);y=f[i>>2]|0;G=f[y+44>>2]|0;R=f[x>>2]|0;S=y;T=G;U=f[G+100>>2]|0;V=f[G+96>>2]|0}I=S;J=T;K=S;L=R;M=V;N=U}f[L+(H*12|0)>>2]=F;f[L+(H*12|0)+4>>2]=f[q>>2];f[L+(H*12|0)+8>>2]=f[s>>2];if(t>>>0>=((N-M|0)/12|0)>>>0){r=I;break}else{v=J;j=M;n=I;w=K;l=N}}}f[(f[r+4>>2]|0)+80>>2]=b;W=1;u=c;return W|0}f[e>>2]=0;b=e+4|0;f[b>>2]=0;f[e+8>>2]=0;r=f[k>>2]|0;N=(f[r+4>>2]|0)-(f[r>>2]|0)|0;l=N>>2;f[g>>2]=0;K=g+4|0;f[K>>2]=0;f[g+8>>2]=0;do if(l|0)if(l>>>0>1073741823)xm(g);else{w=dj(N)|0;f[g>>2]=w;I=w+(l<<2)|0;f[g+8>>2]=I;Uf(w|0,0,N|0)|0;f[K>>2]=I;break}while(0);a:do if(((f[r+28>>2]|0)-(f[r+24>>2]|0)|0)>0){N=a+120|0;l=e+8|0;I=0;w=r;while(1){n=f[(f[w+24>>2]|0)+(I<<2)>>2]|0;b:do if((n|0)!=-1){c:do if((f[(f[N>>2]|0)+(I>>>5<<2)>>2]&1<<(I&31)|0)==0?(M=f[m>>2]|0,j=f[p>>2]|0,J=j,(M|0)!=(j|0)):0){v=(((n>>>0)%3|0|0)==0?2:-1)+n|0;t=(M-j|0)/144|0;if((v|0)==-1){j=0;while(1){M=f[(f[f[J+(j*144|0)+68>>2]>>2]|0)+(n<<2)>>2]|0;if(1<<(M&31)&f[(f[J+(j*144|0)+16>>2]|0)+(M>>>5<<2)>>2]|0){X=0;break a}j=j+1|0;if(j>>>0>=t>>>0){Y=n;break c}}}j=w+12|0;M=0;while(1){s=f[(f[f[J+(M*144|0)+68>>2]>>2]|0)+(n<<2)>>2]|0;if(1<<(s&31)&f[(f[J+(M*144|0)+16>>2]|0)+(s>>>5<<2)>>2]|0){s=f[J+(M*144|0)+32>>2]|0;L=f[s+(n<<2)>>2]|0;q=f[j>>2]|0;F=f[q+(v<<2)>>2]|0;do if((F|0)!=-1)if(!((F>>>0)%3|0)){Z=F+2|0;break}else{Z=F+-1|0;break}else Z=-1;while(0);if((Z|0)!=(n|0)){F=Z;while(1){if((F|0)==-1){X=0;break a}if((f[s+(F<<2)>>2]|0)!=(L|0)){Y=F;break c}U=(((F>>>0)%3|0|0)==0?2:-1)+F|0;do if((U|0)!=-1){V=f[q+(U<<2)>>2]|0;if((V|0)==-1){_=-1;break}if(!((V>>>0)%3|0)){_=V+2|0;break}else{_=V+-1|0;break}}else _=-1;while(0);if((_|0)==(n|0))break;else F=_}}}M=M+1|0;if(M>>>0>=t>>>0){Y=n;break}}}else Y=n;while(0);t=f[b>>2]|0;f[(f[g>>2]|0)+(Y<<2)>>2]=t-(f[e>>2]|0)>>2;f[d>>2]=Y;M=t;if((f[l>>2]|0)>>>0>M>>>0){f[M>>2]=Y;f[b>>2]=M+4;$=w}else{wf(e,d);$=f[k>>2]|0}if((((Y|0)!=-1?(M=(((Y>>>0)%3|0|0)==0?2:-1)+Y|0,(M|0)!=-1):0)?(t=f[(f[$+12>>2]|0)+(M<<2)>>2]|0,(t|0)!=-1):0)?(M=t+(((t>>>0)%3|0|0)==0?2:-1)|0,(M|0)!=-1&(M|0)!=(Y|0)):0){t=Y;v=M;M=$;while(1){j=f[m>>2]|0;J=f[p>>2]|0;F=J;d:do if((j|0)==(J|0))B=66;else{q=(j-J|0)/144|0;L=0;while(1){s=f[F+(L*144|0)+32>>2]|0;L=L+1|0;if((f[s+(v<<2)>>2]|0)!=(f[s+(t<<2)>>2]|0))break;if(L>>>0>=q>>>0){B=66;break d}}q=f[b>>2]|0;f[(f[g>>2]|0)+(v<<2)>>2]=q-(f[e>>2]|0)>>2;f[d>>2]=v;L=q;if((f[l>>2]|0)>>>0>L>>>0){f[L>>2]=v;f[b>>2]=L+4;aa=M}else{wf(e,d);aa=f[k>>2]|0}ba=aa}while(0);if((B|0)==66){B=0;F=f[g>>2]|0;f[F+(v<<2)>>2]=f[F+(t<<2)>>2];ba=M}if((v|0)==-1){ca=ba;break b}F=(((v>>>0)%3|0|0)==0?2:-1)+v|0;if((F|0)==-1){ca=ba;break b}J=f[(f[ba+12>>2]|0)+(F<<2)>>2]|0;if((J|0)==-1){ca=ba;break b}F=J+(((J>>>0)%3|0|0)==0?2:-1)|0;if((F|0)!=-1&(F|0)!=(Y|0)){J=v;v=F;M=ba;t=J}else{ca=ba;break}}}else ca=$}else ca=w;while(0);I=I+1|0;if((I|0)>=((f[ca+28>>2]|0)-(f[ca+24>>2]|0)>>2|0)){B=27;break}else w=ca}}else B=27;while(0);if((B|0)==27){B=f[i>>2]|0;ca=f[B+44>>2]|0;$=f[ca+100>>2]|0;ba=f[ca+96>>2]|0;if(($|0)==(ba|0))da=B;else{Y=h+4|0;aa=h+8|0;k=0;p=ca;ca=ba;ba=$;$=B;m=B;while(1){f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;B=(f[g>>2]|0)+(k*3<<2)|0;f[h>>2]=f[B>>2];f[h+4>>2]=f[B+4>>2];f[h+8>>2]=f[B+8>>2];B=p+96|0;_=p+100|0;Z=(ba-ca|0)/12|0;r=ca;a=k;k=k+1|0;if(a>>>0<Z>>>0){ea=r;fa=ca;ga=ba;ha=$;ia=p;ja=m}else{w=ba;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;if(k>>>0<=Z>>>0)if(k>>>0<Z>>>0?(I=r+(k*12|0)|0,(I|0)!=(w|0)):0){l=w+(~(((w+-12-I|0)>>>0)/12|0)*12|0)|0;f[_>>2]=l;ka=r;la=m;ma=p;na=l;oa=ca}else{ka=r;la=m;ma=p;na=ba;oa=ca}else{Ud(B,k-Z|0,d);Z=f[i>>2]|0;r=f[Z+44>>2]|0;ka=f[B>>2]|0;la=Z;ma=r;na=f[r+100>>2]|0;oa=f[r+96>>2]|0}ea=ka;fa=oa;ga=na;ha=la;ia=ma;ja=la}f[ea+(a*12|0)>>2]=f[h>>2];f[ea+(a*12|0)+4>>2]=f[Y>>2];f[ea+(a*12|0)+8>>2]=f[aa>>2];if(k>>>0>=((ga-fa|0)/12|0)>>>0){da=ha;break}else{p=ia;ca=fa;ba=ga;$=ha;m=ja}}}f[(f[da+4>>2]|0)+80>>2]=(f[b>>2]|0)-(f[e>>2]|0)>>2;X=1}da=f[g>>2]|0;if(da|0){g=f[K>>2]|0;if((g|0)!=(da|0))f[K>>2]=g+(~((g+-4-da|0)>>>2)<<2);gn(da)}da=f[e>>2]|0;if(da|0){e=f[b>>2]|0;if((e|0)!=(da|0))f[b>>2]=e+(~((e+-4-da|0)>>>2)<<2);gn(da)}W=X;u=c;return W|0}function gb(a){a=a|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;c=u;u=u+80|0;e=c+40|0;g=c+68|0;h=c+64|0;i=c+60|0;j=c+52|0;k=c;l=c+56|0;m=c+48|0;f[a+132>>2]=0;n=a+148|0;if(f[n>>2]|0){o=a+144|0;p=f[o>>2]|0;if(p|0){q=p;do{p=q;q=f[q>>2]|0;gn(p)}while((q|0)!=0)}f[o>>2]=0;o=f[a+140>>2]|0;if(o|0){q=a+136|0;p=0;do{f[(f[q>>2]|0)+(p<<2)>>2]=0;p=p+1|0}while((p|0)!=(o|0))}f[n>>2]=0}n=a+4|0;if(!(bg(g,f[(f[n>>2]|0)+32>>2]|0)|0)){r=0;u=c;return r|0}o=a+156|0;f[o>>2]=f[g>>2];if(((bg(h,f[(f[n>>2]|0)+32>>2]|0)|0?(g=f[h>>2]|0,g>>>0<=1431655765):0)?(f[o>>2]|0)>>>0<=(g*3|0)>>>0:0)?(g=f[(f[n>>2]|0)+32>>2]|0,p=g+8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if((v|0)!=(s|0)){t=v;do{f[w>>2]=t+-144;v=f[t+-12>>2]|0;if(v|0){y=t+-8|0;z=f[y>>2]|0;if((z|0)!=(v|0))f[y>>2]=z+(~((z+-4-v|0)>>>2)<<2);gn(v)}v=f[t+-28>>2]|0;if(v|0){z=t+-24|0;y=f[z>>2]|0;if((y|0)!=(v|0))f[z>>2]=y+(~((y+-4-v|0)>>>2)<<2);gn(v)}v=f[t+-40>>2]|0;if(v|0){y=t+-36|0;z=f[y>>2]|0;if((z|0)!=(v|0))f[y>>2]=z+(~((z+-4-v|0)>>>2)<<2);gn(v)}tf(t+-140|0);t=f[w>>2]|0}while((t|0)!=(s|0))}s=p&255;Le(g,s);if(!(Ff(f[q>>2]|0,f[h>>2]|0,(f[j>>2]|0)+(f[o>>2]|0)|0)|0)){x=0;break}t=(f[j>>2]|0)+(f[o>>2]|0)|0;b[e>>0]=1;ge(a+120|0,t,e);if((Dc(a,f[(f[n>>2]|0)+32>>2]|0)|0)==-1){x=0;break}t=a+232|0;f[a+376>>2]=a;v=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;z=f[v>>2]|0;v=(f[z>>2]|0)+(f[z+16>>2]|0)|0;z=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;y=f[z>>2]|0;z=y+8|0;A=y+16|0;y=Wj(f[z>>2]|0,f[z+4>>2]|0,f[A>>2]|0,f[A+4>>2]|0)|0;A=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;_i(t,v,y,d[(f[A>>2]|0)+38>>1]|0);f[a+372>>2]=s;Ci(k);s=a+272|0;A=s;y=t;v=A+40|0;do{f[A>>2]=f[y>>2];A=A+4|0;y=y+4|0}while((A|0)<(v|0));a:do if(bh(s,1,e)|0){A=t;y=s;v=A+40|0;do{f[A>>2]=f[y>>2];A=A+4|0;y=y+4|0}while((A|0)<(v|0));z=e;B=f[z>>2]|0;C=f[z+4>>2]|0;z=a+240|0;D=a+248|0;E=D;F=f[E>>2]|0;G=f[E+4>>2]|0;E=Wj(f[z>>2]|0,f[z+4>>2]|0,F|0,G|0)|0;z=I;if(C>>>0>z>>>0|(C|0)==(z|0)&B>>>0>E>>>0){H=50;break}E=Uj(F|0,G|0,B|0,C|0)|0;C=D;f[C>>2]=E;f[C+4>>2]=I;if(!(rd(a+312|0,t)|0)){J=0;break}if(!(qf(t)|0)){J=0;break}A=k;y=t;v=A+40|0;do{f[A>>2]=f[y>>2];A=A+4|0;y=y+4|0}while((A|0)<(v|0));C=_a(a,f[i>>2]|0)|0;if((C|0)==-1){J=0;break}E=f[(f[n>>2]|0)+32>>2]|0;D=k+16|0;B=f[D>>2]|0;G=(f[k>>2]|0)+B|0;F=k+8|0;z=Wj(f[F>>2]|0,f[F+4>>2]|0,B|0,f[D+4>>2]|0)|0;_i(E,G,z,d[E+38>>1]|0);do if((f[w>>2]|0)!=(f[g>>2]|0)){E=f[q>>2]|0;if((f[E+4>>2]|0)==(f[E>>2]|0))break;E=0;do{f[l>>2]=E;f[e>>2]=f[l>>2];E=E+3|0;if(!(Fb(a,e)|0)){J=0;break a}z=f[q>>2]|0}while(E>>>0<(f[z+4>>2]|0)-(f[z>>2]|0)>>2>>>0)}while(0);if(b[a+308>>0]|0)ei(s);E=f[g>>2]|0;if((f[w>>2]|0)!=(E|0)){z=0;G=E;do{oe(G+(z*144|0)+4|0,f[q>>2]|0)|0;E=f[g>>2]|0;D=f[E+(z*144|0)+132>>2]|0;B=f[E+(z*144|0)+136>>2]|0;if((D|0)==(B|0))K=E;else{F=D;D=E;while(1){f[m>>2]=f[F>>2];f[e>>2]=f[m>>2];Xd(D+(z*144|0)+4|0,e);F=F+4|0;E=f[g>>2]|0;if((F|0)==(B|0)){K=E;break}else D=E}}Ph(K+(z*144|0)+4|0,0,0);z=z+1|0;G=f[g>>2]|0}while(z>>>0<(((f[w>>2]|0)-G|0)/144|0)>>>0)}G=f[q>>2]|0;z=(f[G+28>>2]|0)-(f[G+24>>2]|0)>>2;G=a+196|0;D=a+200|0;B=f[D>>2]|0;F=f[G>>2]|0;E=B-F>>2;L=F;F=B;do if(z>>>0>E>>>0)ef(G,z-E|0);else{if(z>>>0>=E>>>0)break;B=L+(z<<2)|0;if((B|0)==(F|0))break;f[D>>2]=F+(~((F+-4-B|0)>>>2)<<2)}while(0);Dg(a+184|0,z);F=f[g>>2]|0;if((f[w>>2]|0)!=(F|0)){D=0;L=F;do{F=L;E=(f[F+(D*144|0)+60>>2]|0)-(f[F+(D*144|0)+56>>2]|0)>>2;G=f[q>>2]|0;B=(f[G+28>>2]|0)-(f[G+24>>2]|0)>>2;G=(E|0)<(B|0)?B:E;E=F+(D*144|0)+116|0;B=F+(D*144|0)+120|0;M=f[B>>2]|0;N=f[E>>2]|0;O=M-N>>2;P=N;N=M;do if(G>>>0>O>>>0)ef(E,G-O|0);else{if(G>>>0>=O>>>0)break;M=P+(G<<2)|0;if((M|0)==(N|0))break;f[B>>2]=N+(~((N+-4-M|0)>>>2)<<2)}while(0);Dg(F+(D*144|0)+104|0,G);D=D+1|0;L=f[g>>2]|0}while(D>>>0<(((f[w>>2]|0)-L|0)/144|0)>>>0)}J=fb(a,C)|0}else H=50;while(0);if((H|0)==50)J=0;x=J}else x=0;while(0);Q=x}else Q=0;R=Q}else R=0;r=R;u=c;return r|0}function hb(a,c,e,g,h){a=a|0;c=c|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0;i=u;u=u+64|0;j=i+16|0;k=i;l=i+24|0;m=i+8|0;n=i+20|0;f[j>>2]=c;c=(a|0)!=0;o=l+40|0;q=o;r=l+39|0;l=m+4|0;s=0;t=0;v=0;a:while(1){do if((t|0)>-1)if((s|0)>(2147483647-t|0)){w=on()|0;f[w>>2]=75;x=-1;break}else{x=s+t|0;break}else x=t;while(0);w=f[j>>2]|0;y=b[w>>0]|0;if(!(y<<24>>24)){z=88;break}else{A=y;B=w}b:while(1){switch(A<<24>>24){case 37:{C=B;D=B;z=9;break b;break}case 0:{E=B;break b;break}default:{}}y=B+1|0;f[j>>2]=y;A=b[y>>0]|0;B=y}c:do if((z|0)==9)while(1){z=0;if((b[D+1>>0]|0)!=37){E=C;break c}y=C+1|0;D=D+2|0;f[j>>2]=D;if((b[D>>0]|0)!=37){E=y;break}else{C=y;z=9}}while(0);y=E-w|0;if(c)ml(a,w,y);if(y|0){s=y;t=x;continue}y=(Rm(b[(f[j>>2]|0)+1>>0]|0)|0)==0;F=f[j>>2]|0;if(!y?(b[F+2>>0]|0)==36:0){G=(b[F+1>>0]|0)+-48|0;H=1;J=3}else{G=-1;H=v;J=1}y=F+J|0;f[j>>2]=y;F=b[y>>0]|0;K=(F<<24>>24)+-32|0;if(K>>>0>31|(1<<K&75913|0)==0){L=0;M=F;N=y}else{K=0;O=F;F=y;while(1){y=1<<(O<<24>>24)+-32|K;P=F+1|0;f[j>>2]=P;Q=b[P>>0]|0;R=(Q<<24>>24)+-32|0;if(R>>>0>31|(1<<R&75913|0)==0){L=y;M=Q;N=P;break}else{K=y;O=Q;F=P}}}if(M<<24>>24==42){if((Rm(b[N+1>>0]|0)|0)!=0?(F=f[j>>2]|0,(b[F+2>>0]|0)==36):0){O=F+1|0;f[h+((b[O>>0]|0)+-48<<2)>>2]=10;S=f[g+((b[O>>0]|0)+-48<<3)>>2]|0;T=1;U=F+3|0}else{if(H|0){V=-1;break}if(c){F=(f[e>>2]|0)+(4-1)&~(4-1);O=f[F>>2]|0;f[e>>2]=F+4;W=O}else W=0;S=W;T=0;U=(f[j>>2]|0)+1|0}f[j>>2]=U;O=(S|0)<0;X=O?0-S|0:S;Y=O?L|8192:L;Z=T;_=U}else{O=Vh(j)|0;if((O|0)<0){V=-1;break}X=O;Y=L;Z=H;_=f[j>>2]|0}do if((b[_>>0]|0)==46){if((b[_+1>>0]|0)!=42){f[j>>2]=_+1;O=Vh(j)|0;$=O;aa=f[j>>2]|0;break}if(Rm(b[_+2>>0]|0)|0?(O=f[j>>2]|0,(b[O+3>>0]|0)==36):0){F=O+2|0;f[h+((b[F>>0]|0)+-48<<2)>>2]=10;K=f[g+((b[F>>0]|0)+-48<<3)>>2]|0;F=O+4|0;f[j>>2]=F;$=K;aa=F;break}if(Z|0){V=-1;break a}if(c){F=(f[e>>2]|0)+(4-1)&~(4-1);K=f[F>>2]|0;f[e>>2]=F+4;ba=K}else ba=0;K=(f[j>>2]|0)+2|0;f[j>>2]=K;$=ba;aa=K}else{$=-1;aa=_}while(0);K=0;F=aa;while(1){if(((b[F>>0]|0)+-65|0)>>>0>57){V=-1;break a}O=F;F=F+1|0;f[j>>2]=F;ca=b[(b[O>>0]|0)+-65+(10198+(K*58|0))>>0]|0;da=ca&255;if((da+-1|0)>>>0>=8)break;else K=da}if(!(ca<<24>>24)){V=-1;break}O=(G|0)>-1;do if(ca<<24>>24==19)if(O){V=-1;break a}else z=50;else{if(O){f[h+(G<<2)>>2]=da;P=g+(G<<3)|0;Q=f[P+4>>2]|0;y=k;f[y>>2]=f[P>>2];f[y+4>>2]=Q;z=50;break}if(!c){V=0;break a}Xc(k,da,e);ea=f[j>>2]|0}while(0);if((z|0)==50){z=0;if(c)ea=F;else{s=0;t=x;v=Z;continue}}O=b[ea+-1>>0]|0;Q=(K|0)!=0&(O&15|0)==3?O&-33:O;O=Y&-65537;y=(Y&8192|0)==0?Y:O;d:do switch(Q|0){case 110:{switch((K&255)<<24>>24){case 0:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 1:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 2:{P=f[k>>2]|0;f[P>>2]=x;f[P+4>>2]=((x|0)<0)<<31>>31;s=0;t=x;v=Z;continue a;break}case 3:{d[f[k>>2]>>1]=x;s=0;t=x;v=Z;continue a;break}case 4:{b[f[k>>2]>>0]=x;s=0;t=x;v=Z;continue a;break}case 6:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 7:{P=f[k>>2]|0;f[P>>2]=x;f[P+4>>2]=((x|0)<0)<<31>>31;s=0;t=x;v=Z;continue a;break}default:{s=0;t=x;v=Z;continue a}}break}case 112:{fa=120;ga=$>>>0>8?$:8;ha=y|8;z=62;break}case 88:case 120:{fa=Q;ga=$;ha=y;z=62;break}case 111:{P=k;R=f[P>>2]|0;ia=f[P+4>>2]|0;P=Zh(R,ia,o)|0;ja=q-P|0;ka=P;la=0;ma=10662;na=(y&8|0)==0|($|0)>(ja|0)?$:ja+1|0;oa=y;pa=R;qa=ia;z=68;break}case 105:case 100:{ia=k;R=f[ia>>2]|0;ja=f[ia+4>>2]|0;if((ja|0)<0){ia=Wj(0,0,R|0,ja|0)|0;P=I;ra=k;f[ra>>2]=ia;f[ra+4>>2]=P;sa=1;ta=10662;ua=ia;va=P;z=67;break d}else{sa=(y&2049|0)!=0&1;ta=(y&2048|0)==0?((y&1|0)==0?10662:10664):10663;ua=R;va=ja;z=67;break d}break}case 117:{ja=k;sa=0;ta=10662;ua=f[ja>>2]|0;va=f[ja+4>>2]|0;z=67;break}case 99:{b[r>>0]=f[k>>2];wa=r;xa=0;ya=10662;za=o;Aa=1;Ba=O;break}case 109:{ja=on()|0;Ca=rl(f[ja>>2]|0)|0;z=72;break}case 115:{ja=f[k>>2]|0;Ca=ja|0?ja:10672;z=72;break}case 67:{f[m>>2]=f[k>>2];f[l>>2]=0;f[k>>2]=m;Da=-1;Ea=m;z=76;break}case 83:{ja=f[k>>2]|0;if(!$){dh(a,32,X,0,y);Fa=0;z=85}else{Da=$;Ea=ja;z=76}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{s=eb(a,+p[k>>3],X,$,y,Q)|0;t=x;v=Z;continue a;break}default:{wa=w;xa=0;ya=10662;za=o;Aa=$;Ba=y}}while(0);e:do if((z|0)==62){z=0;w=k;Q=f[w>>2]|0;K=f[w+4>>2]|0;w=Jh(Q,K,o,fa&32)|0;F=(ha&8|0)==0|(Q|0)==0&(K|0)==0;ka=w;la=F?0:2;ma=F?10662:10662+(fa>>4)|0;na=ga;oa=ha;pa=Q;qa=K;z=68}else if((z|0)==67){z=0;ka=qg(ua,va,o)|0;la=sa;ma=ta;na=$;oa=y;pa=ua;qa=va;z=68}else if((z|0)==72){z=0;K=zd(Ca,0,$)|0;Q=(K|0)==0;wa=Ca;xa=0;ya=10662;za=Q?Ca+$|0:K;Aa=Q?$:K-Ca|0;Ba=O}else if((z|0)==76){z=0;K=Ea;Q=0;F=0;while(1){w=f[K>>2]|0;if(!w){Ga=Q;Ha=F;break}ja=cl(n,w)|0;if((ja|0)<0|ja>>>0>(Da-Q|0)>>>0){Ga=Q;Ha=ja;break}w=ja+Q|0;if(Da>>>0>w>>>0){K=K+4|0;Q=w;F=ja}else{Ga=w;Ha=ja;break}}if((Ha|0)<0){V=-1;break a}dh(a,32,X,Ga,y);if(!Ga){Fa=0;z=85}else{F=Ea;Q=0;while(1){K=f[F>>2]|0;if(!K){Fa=Ga;z=85;break e}ja=cl(n,K)|0;Q=ja+Q|0;if((Q|0)>(Ga|0)){Fa=Ga;z=85;break e}ml(a,n,ja);if(Q>>>0>=Ga>>>0){Fa=Ga;z=85;break}else F=F+4|0}}}while(0);if((z|0)==68){z=0;O=(pa|0)!=0|(qa|0)!=0;F=(na|0)!=0|O;Q=q-ka+((O^1)&1)|0;wa=F?ka:o;xa=la;ya=ma;za=o;Aa=F?((na|0)>(Q|0)?na:Q):na;Ba=(na|0)>-1?oa&-65537:oa}else if((z|0)==85){z=0;dh(a,32,X,Fa,y^8192);s=(X|0)>(Fa|0)?X:Fa;t=x;v=Z;continue}Q=za-wa|0;F=(Aa|0)<(Q|0)?Q:Aa;O=F+xa|0;ja=(X|0)<(O|0)?O:X;dh(a,32,ja,O,Ba);ml(a,ya,xa);dh(a,48,ja,O,Ba^65536);dh(a,48,F,Q,0);ml(a,wa,Q);dh(a,32,ja,O,Ba^8192);s=ja;t=x;v=Z}f:do if((z|0)==88)if(!a)if(v){Z=1;while(1){t=f[h+(Z<<2)>>2]|0;if(!t){Ia=Z;break}Xc(g+(Z<<3)|0,t,e);t=Z+1|0;if((Z|0)<9)Z=t;else{Ia=t;break}}if((Ia|0)<10){Z=Ia;while(1){if(f[h+(Z<<2)>>2]|0){V=-1;break f}if((Z|0)<9)Z=Z+1|0;else{V=1;break}}}else V=1}else V=0;else V=x;while(0);u=i;return V|0}function ib(a){a=a|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0;c=u;u=u+80|0;e=c+64|0;g=c+60|0;h=c+56|0;i=c+52|0;j=c+48|0;k=c;l=c+44|0;m=c+40|0;f[a+132>>2]=0;n=a+148|0;if(f[n>>2]|0){o=a+144|0;p=f[o>>2]|0;if(p|0){q=p;do{p=q;q=f[q>>2]|0;gn(p)}while((q|0)!=0)}f[o>>2]=0;o=f[a+140>>2]|0;if(o|0){q=a+136|0;p=0;do{f[(f[q>>2]|0)+(p<<2)>>2]=0;p=p+1|0}while((p|0)!=(o|0))}f[n>>2]=0}n=a+4|0;if(!(bg(g,f[(f[n>>2]|0)+32>>2]|0)|0)){r=0;u=c;return r|0}o=a+156|0;f[o>>2]=f[g>>2];if(((bg(h,f[(f[n>>2]|0)+32>>2]|0)|0?(g=f[h>>2]|0,g>>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>>2]=-1;f[a+92>>2]=-1;f[a+88>>2]=-1;g=a+216|0;s=f[g>>2]|0;w=a+220|0;v=f[w>>2]|0;if((v|0)!=(s|0)){t=v;do{f[w>>2]=t+-144;v=f[t+-12>>2]|0;if(v|0){y=t+-8|0;z=f[y>>2]|0;if((z|0)!=(v|0))f[y>>2]=z+(~((z+-4-v|0)>>>2)<<2);gn(v)}v=f[t+-28>>2]|0;if(v|0){z=t+-24|0;y=f[z>>2]|0;if((y|0)!=(v|0))f[z>>2]=y+(~((y+-4-v|0)>>>2)<<2);gn(v)}v=f[t+-40>>2]|0;if(v|0){y=t+-36|0;z=f[y>>2]|0;if((z|0)!=(v|0))f[y>>2]=z+(~((z+-4-v|0)>>>2)<<2);gn(v)}tf(t+-140|0);t=f[w>>2]|0}while((t|0)!=(s|0))}s=p&255;Le(g,s);if(!(Ff(f[q>>2]|0,f[h>>2]|0,(f[j>>2]|0)+(f[o>>2]|0)|0)|0)){x=0;break}t=(f[j>>2]|0)+(f[o>>2]|0)|0;b[e>>0]=1;ge(a+120|0,t,e);if((Dc(a,f[(f[n>>2]|0)+32>>2]|0)|0)==-1){x=0;break}t=a+232|0;f[a+376>>2]=a;v=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;z=f[v>>2]|0;v=(f[z>>2]|0)+(f[z+16>>2]|0)|0;z=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;y=f[z>>2]|0;z=y+8|0;A=y+16|0;y=Wj(f[z>>2]|0,f[z+4>>2]|0,f[A>>2]|0,f[A+4>>2]|0)|0;A=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;_i(t,v,y,d[(f[A>>2]|0)+38>>1]|0);A=Na[f[(f[a>>2]|0)+36>>2]&127](a)|0;f[a+380>>2]=A;f[a+384>>2]=(f[j>>2]|0)+(f[o>>2]|0);f[a+372>>2]=s;Ci(k);a:do if(ic(t,k)|0){s=Za(a,f[i>>2]|0)|0;if((s|0)==-1){B=0;break}A=f[(f[n>>2]|0)+32>>2]|0;y=k+16|0;v=f[y>>2]|0;z=(f[k>>2]|0)+v|0;C=k+8|0;D=Wj(f[C>>2]|0,f[C+4>>2]|0,v|0,f[y+4>>2]|0)|0;_i(A,z,D,d[A+38>>1]|0);do if((f[w>>2]|0)!=(f[g>>2]|0)){A=f[q>>2]|0;if((f[A+4>>2]|0)==(f[A>>2]|0))break;A=0;do{f[l>>2]=A;f[e>>2]=f[l>>2];A=A+3|0;if(!(Fb(a,e)|0)){B=0;break a}D=f[q>>2]|0}while(A>>>0<(f[D+4>>2]|0)-(f[D>>2]|0)>>2>>>0)}while(0);if(b[a+308>>0]|0)ei(a+272|0);A=f[g>>2]|0;if((f[w>>2]|0)!=(A|0)){D=0;z=A;do{oe(z+(D*144|0)+4|0,f[q>>2]|0)|0;A=f[g>>2]|0;y=f[A+(D*144|0)+132>>2]|0;v=f[A+(D*144|0)+136>>2]|0;if((y|0)==(v|0))E=A;else{C=y;y=A;while(1){f[m>>2]=f[C>>2];f[e>>2]=f[m>>2];Xd(y+(D*144|0)+4|0,e);C=C+4|0;A=f[g>>2]|0;if((C|0)==(v|0)){E=A;break}else y=A}}Ph(E+(D*144|0)+4|0,0,0);D=D+1|0;z=f[g>>2]|0}while(D>>>0<(((f[w>>2]|0)-z|0)/144|0)>>>0)}z=f[q>>2]|0;D=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2;z=a+196|0;y=a+200|0;v=f[y>>2]|0;C=f[z>>2]|0;A=v-C>>2;F=C;C=v;do if(D>>>0>A>>>0)ef(z,D-A|0);else{if(D>>>0>=A>>>0)break;v=F+(D<<2)|0;if((v|0)==(C|0))break;f[y>>2]=C+(~((C+-4-v|0)>>>2)<<2)}while(0);Dg(a+184|0,D);C=f[g>>2]|0;if((f[w>>2]|0)!=(C|0)){y=0;F=C;do{C=F;A=(f[C+(y*144|0)+60>>2]|0)-(f[C+(y*144|0)+56>>2]|0)>>2;z=f[q>>2]|0;v=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2;z=(A|0)<(v|0)?v:A;A=C+(y*144|0)+116|0;v=C+(y*144|0)+120|0;G=f[v>>2]|0;H=f[A>>2]|0;J=G-H>>2;K=H;H=G;do if(z>>>0>J>>>0)ef(A,z-J|0);else{if(z>>>0>=J>>>0)break;G=K+(z<<2)|0;if((G|0)==(H|0))break;f[v>>2]=H+(~((H+-4-G|0)>>>2)<<2)}while(0);Dg(C+(y*144|0)+104|0,z);y=y+1|0;F=f[g>>2]|0}while(y>>>0<(((f[w>>2]|0)-F|0)/144|0)>>>0)}B=fb(a,s)|0}else B=0;while(0);x=B}else x=0;while(0);L=x}else L=0;M=L}else M=0;r=M;u=c;return r|0}function jb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=La,D=0,E=0.0,F=0,G=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Uj(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){m=b[o>>0]|0;q=g+(r<<3)|0;f[q>>2]=m;f[q+4>>2]=((m|0)<0)<<31>>31;r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(o<<3)|0,0,(e<<24>>24)-o<<3|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Uj(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=g+(t<<3)|0;f[k>>2]=h[m>>0];f[k+4>>2]=0;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(m<<3)|0,0,(e<<24>>24)-m<<3|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Uj(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){o=d[l>>1]|0;k=g+(q<<3)|0;f[k>>2]=o;f[k+4>>2]=((o|0)<0)<<31>>31;q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(l<<3)|0,0,(e<<24>>24)-l<<3|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=hj(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Uj(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){m=g+(k<<3)|0;f[m>>2]=j[r>>1];f[m+4>>2]=0;k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(r<<3)|0,0,(e<<24>>24)-r<<3|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=hj(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Uj(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){l=f[t>>2]|0;m=g+(o<<3)|0;f[m>>2]=l;f[m+4>>2]=((l|0)<0)<<31>>31;o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(t<<3)|0,0,(e<<24>>24)-t<<3|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=hj(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Uj(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){r=g+(m<<3)|0;f[r>>2]=f[q>>2];f[r+4>>2]=0;m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(q<<3)|0,0,(e<<24>>24)-q<<3|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Uj(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){t=k;r=f[t+4>>2]|0;z=g+(l<<3)|0;f[z>>2]=f[t>>2];f[z+4>>2]=r;l=l+1|0;r=b[q>>0]|0;if((l|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){A=r;break}else k=k+8|0}}else A=m;k=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(k<<3)|0,0,(e<<24>>24)-k<<3|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;r=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;z=Uj(r|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+z|0;z=0;while(1){q=o;r=f[q+4>>2]|0;t=g+(z<<3)|0;f[t>>2]=f[q>>2];f[t+4>>2]=r;z=z+1|0;r=b[k>>0]|0;if((z|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){B=r;break}else o=o+8|0}}else B=l;o=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(o<<3)|0,0,(e<<24>>24)-o<<3|0)|0;i=1;return i|0}case 9:{o=a+24|0;z=b[o>>0]|0;if((z<<24>>24>e<<24>>24?e:z)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;r=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Uj(r|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){C=$(n[m>>2]);k=+K(+C)>=1.0?(+C>0.0?~~+Y(+J(+C/4294967296.0),4294967295.0)>>>0:~~+W((+C-+(~~+C>>>0))/4294967296.0)>>>0):0;r=g+(t<<3)|0;f[r>>2]=~~+C>>>0;f[r+4>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){D=k;break}else m=m+4|0}}else D=z;m=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(m<<3)|0,0,(e<<24>>24)-m<<3|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;r=Uj(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+r|0;r=0;while(1){E=+p[l>>3];o=+K(E)>=1.0?(E>0.0?~~+Y(+J(E/4294967296.0),4294967295.0)>>>0:~~+W((E-+(~~E>>>0))/4294967296.0)>>>0):0;k=g+(r<<3)|0;f[k>>2]=~~E>>>0;f[k+4>>2]=o;r=r+1|0;o=b[m>>0]|0;if((r|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){F=o;break}else l=l+8|0}}else F=t;l=F<<24>>24;if(F<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(l<<3)|0,0,(e<<24>>24)-l<<3|0)|0;i=1;return i|0}case 11:{l=a+24|0;r=b[l>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){m=f[f[a>>2]>>2]|0;z=a+40|0;o=hj(f[z>>2]|0,f[z+4>>2]|0,f[c>>2]|0,0)|0;z=a+48|0;k=Uj(o|0,I|0,f[z>>2]|0,f[z+4>>2]|0)|0;z=m+k|0;k=0;while(1){m=g+(k<<3)|0;f[m>>2]=h[z>>0];f[m+4>>2]=0;k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){G=m;break}else z=z+1|0}}else G=r;z=G<<24>>24;if(G<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(z<<3)|0,0,(e<<24>>24)-z<<3|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function kb(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;c=u;u=u+32|0;d=c+20|0;e=c+16|0;g=c+4|0;i=c;j=a+32|0;if(!(bg(d,f[j>>2]|0)|0)){k=0;u=c;return k|0}if(!(bg(e,f[j>>2]|0)|0)){k=0;u=c;return k|0}l=f[d>>2]|0;if(l>>>0>1431655765){k=0;u=c;return k|0}m=f[e>>2]|0;n=hj(l|0,0,3,0)|0;o=I;if(o>>>0<0|(o|0)==0&n>>>0<m>>>0){k=0;u=c;return k|0}n=f[j>>2]|0;o=n+8|0;p=f[o+4>>2]|0;q=n+16|0;r=q;s=f[r>>2]|0;t=f[r+4>>2]|0;if(!((p|0)>(t|0)|((p|0)==(t|0)?(f[o>>2]|0)>>>0>s>>>0:0))){k=0;u=c;return k|0}o=b[(f[n>>2]|0)+s>>0]|0;p=Uj(s|0,t|0,1,0)|0;r=I;v=q;f[v>>2]=p;f[v+4>>2]=r;a:do if(!(o<<24>>24)){if(!(fd(a,l)|0)){k=0;u=c;return k|0}}else{if(m>>>0<256){if(!l)break;v=a+44|0;q=g+4|0;w=g+8|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;x=n+8|0;y=f[x>>2]|0;z=f[x+4>>2]|0;b:do if((z|0)>(r|0)|(z|0)==(r|0)&y>>>0>p>>>0){x=0;A=n;B=l;C=p;D=r;E=z;F=y;while(1){G=A+16|0;H=f[A>>2]|0;J=b[H+C>>0]|0;K=Uj(C|0,D|0,1,0)|0;L=I;M=G;f[M>>2]=K;f[M+4>>2]=L;f[g>>2]=J&255;if(!((E|0)>(L|0)|(E|0)==(L|0)&F>>>0>K>>>0))break b;L=b[H+K>>0]|0;K=Uj(C|0,D|0,2,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>>0<R>>>0)break c;Q=M+P|0;P=h[Q>>0]|h[Q+1>>0]<<8;Q=L;f[Q>>2]=R;f[Q+4>>2]=O;f[q>>2]=P&65535;P=f[v>>2]|0;O=P+100|0;Q=f[O>>2]|0;if((Q|0)==(f[P+104>>2]|0)){bf(P+96|0,g);S=f[d>>2]|0}else{f[Q>>2]=f[g>>2];f[Q+4>>2]=f[g+4>>2];f[Q+8>>2]=f[g+8>>2];f[O>>2]=(f[O>>2]|0)+12;S=G}F=F+1|0;if(F>>>0>=S>>>0)break a;D=f[j>>2]|0;O=D+16|0;E=f[O>>2]|0;H=f[O+4>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;O=D+8|0;J=f[O>>2]|0;K=f[O+4>>2]|0;A=Uj(E|0,H|0,2,0)|0;x=I;if((K|0)<(x|0)|(K|0)==(x|0)&J>>>0<A>>>0)break;else G=S}}while(0);k=0;u=c;return k|0}v=a+44|0;if((f[(f[v>>2]|0)+80>>2]|0)>>>0<2097152?(((h[a+36>>0]|0)<<8|(h[a+37>>0]|0))&65535)>513:0){if(!l)break;q=g+4|0;w=g+8|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;d:do if(bg(i,n)|0){z=0;do{f[g>>2]=f[i>>2];if(!(bg(i,f[j>>2]|0)|0))break d;f[q>>2]=f[i>>2];if(!(bg(i,f[j>>2]|0)|0))break d;f[w>>2]=f[i>>2];B=f[v>>2]|0;C=B+100|0;y=f[C>>2]|0;if((y|0)==(f[B+104>>2]|0))bf(B+96|0,g);else{f[y>>2]=f[g>>2];f[y+4>>2]=f[g+4>>2];f[y+8>>2]=f[g+8>>2];f[C>>2]=(f[C>>2]|0)+12}z=z+1|0;if(z>>>0>=(f[d>>2]|0)>>>0)break a;C=f[j>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0}while(bg(i,C)|0)}while(0);k=0;u=c;return k|0}if(l|0){w=g+4|0;q=g+8|0;f[g>>2]=0;f[g+4>>2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=o}o=w+24|0;f[(f[w+12>>2]|0)+(v<<2)>>2]=f[o>>2];f[o>>2]=(f[o>>2]|0)+1}o=f[b>>2]|0;a:do if((o|0)<3){v=a+24|0;w=a+16|0;s=a+20|0;t=a+12|0;p=a+88|0;r=o;while(1){g=r;while(1){x=a+48+(g*12|0)+4|0;y=f[x>>2]|0;if((f[a+48+(g*12|0)>>2]|0)!=(y|0))break;if((g|0)<2)g=g+1|0;else break a}n=y+-4|0;q=f[n>>2]|0;f[x>>2]=n;f[b>>2]=g;f[i>>2]=q;if((q|0)==-1)break;n=(q>>>0)/3|0;j=f[v>>2]|0;do if(!(f[j+(n>>>5<<2)>>2]&1<<(n&31))){k=q;m=j;b:while(1){z=(k>>>0)/3|0;A=m+(z>>>5<<2)|0;f[A>>2]=1<<(z&31)|f[A>>2];A=f[i>>2]|0;if((A|0)==-1)B=-1;else B=f[(f[f[h>>2]>>2]|0)+(A<<2)>>2]|0;z=(f[l>>2]|0)+(B>>>5<<2)|0;C=1<<(B&31);D=f[z>>2]|0;if(!(C&D)){f[z>>2]=D|C;C=f[i>>2]|0;f[e>>2]=C;D=f[(f[(f[w>>2]|0)+96>>2]|0)+(((C>>>0)/3|0)*12|0)+(((C>>>0)%3|0)<<2)>>2]|0;C=f[s>>2]|0;f[d>>2]=D;z=f[C+4>>2]|0;C=z+4|0;E=f[C>>2]|0;if((E|0)==(f[z+8>>2]|0))wf(z,d);else{f[E>>2]=D;f[C>>2]=E+4}E=f[t>>2]|0;C=E+4|0;D=f[C>>2]|0;if((D|0)==(f[E+8>>2]|0)){wf(E,e);F=f[t>>2]|0}else{f[D>>2]=f[e>>2];f[C>>2]=D+4;F=E}E=F+24|0;f[(f[F+12>>2]|0)+(B<<2)>>2]=f[E>>2];f[E>>2]=(f[E>>2]|0)+1;G=f[i>>2]|0}else G=A;A=f[h>>2]|0;if((G|0)==-1){H=93;break}E=G+1|0;D=((E>>>0)%3|0|0)==0?G+-2|0:E;if((D|0)==-1)I=-1;else I=f[(f[A+12>>2]|0)+(D<<2)>>2]|0;D=(((G>>>0)%3|0|0)==0?2:-1)+G|0;if((D|0)==-1)J=-1;else J=f[(f[A+12>>2]|0)+(D<<2)>>2]|0;D=(I|0)==-1;E=D?-1:(I>>>0)/3|0;C=(J|0)==-1;z=C?-1:(J>>>0)/3|0;if(D)K=1;else K=(f[(f[v>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)!=0;do if(C)if(K){H=93;break b}else H=82;else{if(f[(f[v>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)if(K){H=93;break b}else{H=82;break}E=f[(f[A>>2]|0)+(J<<2)>>2]|0;if(!(1<<(E&31)&f[(f[l>>2]|0)+(E>>>5<<2)>>2])){L=(f[p>>2]|0)+(E<<2)|0;E=f[L>>2]|0;f[L>>2]=E+1;M=(E|0)>0?1:2}else M=0;if(K?(M|0)<=(f[b>>2]|0):0){N=J;break}f[d>>2]=J;E=a+48+(M*12|0)+4|0;L=f[E>>2]|0;if((L|0)==(f[a+48+(M*12|0)+8>>2]|0))wf(a+48+(M*12|0)|0,d);else{f[L>>2]=J;f[E>>2]=L+4}if((f[b>>2]|0)>(M|0))f[b>>2]=M;if(K){H=93;break b}else H=82}while(0);if((H|0)==82){H=0;if(D)O=-1;else O=f[(f[f[h>>2]>>2]|0)+(I<<2)>>2]|0;if(!(1<<(O&31)&f[(f[l>>2]|0)+(O>>>5<<2)>>2])){A=(f[p>>2]|0)+(O<<2)|0;z=f[A>>2]|0;f[A>>2]=z+1;P=(z|0)>0?1:2}else P=0;if((P|0)>(f[b>>2]|0))break;else N=I}f[i>>2]=N;k=N;m=f[v>>2]|0}if((H|0)==93){H=0;Q=f[b>>2]|0;break}f[d>>2]=I;m=a+48+(P*12|0)+4|0;k=f[m>>2]|0;if((k|0)==(f[a+48+(P*12|0)+8>>2]|0))wf(a+48+(P*12|0)|0,d);else{f[k>>2]=I;f[m>>2]=k+4}k=f[b>>2]|0;if((k|0)>(P|0)){f[b>>2]=P;R=P}else R=k;Q=R}else Q=g;while(0);if((Q|0)<3)r=Q;else break a}u=c;return 1}while(0);f[i>>2]=-1;u=c;return 1}function mb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{j=a+24|0;k=b[j>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;m=a+40|0;o=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;q=Uj(o|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=l+q|0;q=0;while(1){d[g+(q<<1)>>1]=b[m>>0]|0;q=q+1|0;l=b[j>>0]|0;if((q|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){r=l;break}else m=m+1|0}}else r=k;m=r<<24>>24;if(r<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(m<<1)|0,0,(e<<24>>24)-m<<1|0)|0;i=1;return i|0}case 2:{m=a+24|0;q=b[m>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){j=f[f[a>>2]>>2]|0;l=a+40|0;o=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;s=Uj(o|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=j+s|0;s=0;while(1){d[g+(s<<1)>>1]=h[l>>0]|0;s=s+1|0;j=b[m>>0]|0;if((s|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){t=j;break}else l=l+1|0}}else t=q;l=t<<24>>24;if(t<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(l<<1)|0,0,(e<<24>>24)-l<<1|0)|0;i=1;return i|0}case 3:{l=a+24|0;s=b[l>>0]|0;if((s<<24>>24>e<<24>>24?e:s)<<24>>24>0){m=f[f[a>>2]>>2]|0;k=a+40|0;j=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;o=Uj(j|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=m+o|0;o=0;while(1){d[g+(o<<1)>>1]=d[k>>1]|0;o=o+1|0;m=b[l>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){u=m;break}else k=k+2|0}}else u=s;k=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(k<<1)|0,0,(e<<24>>24)-k<<1|0)|0;i=1;return i|0}case 4:{k=a+24|0;o=b[k>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){l=f[f[a>>2]>>2]|0;q=a+40|0;m=hj(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;j=Uj(m|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=l+j|0;j=0;while(1){d[g+(j<<1)>>1]=d[q>>1]|0;j=j+1|0;l=b[k>>0]|0;if((j|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){v=l;break}else q=q+2|0}}else v=o;q=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(q<<1)|0,0,(e<<24>>24)-q<<1|0)|0;i=1;return i|0}case 5:{q=a+24|0;j=b[q>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){k=f[f[a>>2]>>2]|0;s=a+40|0;l=hj(f[s>>2]|0,f[s+4>>2]|0,f[c>>2]|0,0)|0;s=a+48|0;m=Uj(l|0,I|0,f[s>>2]|0,f[s+4>>2]|0)|0;s=k+m|0;m=0;while(1){d[g+(m<<1)>>1]=f[s>>2];m=m+1|0;k=b[q>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){w=k;break}else s=s+4|0}}else w=j;s=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(s<<1)|0,0,(e<<24>>24)-s<<1|0)|0;i=1;return i|0}case 6:{s=a+24|0;m=b[s>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;k=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;l=Uj(k|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+l|0;l=0;while(1){d[g+(l<<1)>>1]=f[o>>2];l=l+1|0;q=b[s>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){x=q;break}else o=o+4|0}}else x=m;o=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(o<<1)|0,0,(e<<24>>24)-o<<1|0)|0;i=1;return i|0}case 7:{o=a+24|0;l=b[o>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){s=f[f[a>>2]>>2]|0;j=a+40|0;q=hj(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;k=Uj(q|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=s+k|0;k=0;while(1){d[g+(k<<1)>>1]=f[j>>2];k=k+1|0;s=b[o>>0]|0;if((k|0)>=((s<<24>>24>e<<24>>24?e:s)<<24>>24|0)){y=s;break}else j=j+8|0}}else y=l;j=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(j<<1)|0,0,(e<<24>>24)-j<<1|0)|0;i=1;return i|0}case 8:{j=a+24|0;k=b[j>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){o=f[f[a>>2]>>2]|0;m=a+40|0;s=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;q=Uj(s|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=o+q|0;q=0;while(1){d[g+(q<<1)>>1]=f[m>>2];q=q+1|0;o=b[j>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){z=o;break}else m=m+8|0}}else z=k;m=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(m<<1)|0,0,(e<<24>>24)-m<<1|0)|0;i=1;return i|0}case 9:{m=a+24|0;q=b[m>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){j=f[f[a>>2]>>2]|0;l=a+40|0;o=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;s=Uj(o|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=j+s|0;s=0;while(1){j=~~$(n[l>>2])&65535;d[g+(s<<1)>>1]=j;s=s+1|0;j=b[m>>0]|0;if((s|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){A=j;break}else l=l+4|0}}else A=q;l=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(l<<1)|0,0,(e<<24>>24)-l<<1|0)|0;i=1;return i|0}case 10:{l=a+24|0;s=b[l>>0]|0;if((s<<24>>24>e<<24>>24?e:s)<<24>>24>0){m=f[f[a>>2]>>2]|0;k=a+40|0;j=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;o=Uj(j|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=m+o|0;o=0;while(1){d[g+(o<<1)>>1]=~~+p[k>>3];o=o+1|0;m=b[l>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){B=m;break}else k=k+8|0}}else B=s;k=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(k<<1)|0,0,(e<<24>>24)-k<<1|0)|0;i=1;return i|0}case 11:{k=a+24|0;o=b[k>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){l=f[f[a>>2]>>2]|0;q=a+40|0;m=hj(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;j=Uj(m|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=l+j|0;j=0;while(1){d[g+(j<<1)>>1]=h[q>>0]|0;j=j+1|0;l=b[k>>0]|0;if((j|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){C=l;break}else q=q+1|0}}else C=o;q=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(q<<1)|0,0,(e<<24>>24)-q<<1|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function nb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{j=a+24|0;k=b[j>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;m=a+40|0;o=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;q=Uj(o|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=l+q|0;q=0;while(1){d[g+(q<<1)>>1]=b[m>>0]|0;q=q+1|0;l=b[j>>0]|0;if((q|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){r=l;break}else m=m+1|0}}else r=k;m=r<<24>>24;if(r<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(m<<1)|0,0,(e<<24>>24)-m<<1|0)|0;i=1;return i|0}case 2:{m=a+24|0;q=b[m>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){j=f[f[a>>2]>>2]|0;l=a+40|0;o=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;s=Uj(o|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=j+s|0;s=0;while(1){d[g+(s<<1)>>1]=h[l>>0]|0;s=s+1|0;j=b[m>>0]|0;if((s|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){t=j;break}else l=l+1|0}}else t=q;l=t<<24>>24;if(t<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(l<<1)|0,0,(e<<24>>24)-l<<1|0)|0;i=1;return i|0}case 3:{l=a+24|0;s=b[l>>0]|0;if((s<<24>>24>e<<24>>24?e:s)<<24>>24>0){m=f[f[a>>2]>>2]|0;k=a+40|0;j=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;o=Uj(j|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=m+o|0;o=0;while(1){d[g+(o<<1)>>1]=d[k>>1]|0;o=o+1|0;m=b[l>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){u=m;break}else k=k+2|0}}else u=s;k=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(k<<1)|0,0,(e<<24>>24)-k<<1|0)|0;i=1;return i|0}case 4:{k=a+24|0;o=b[k>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){l=f[f[a>>2]>>2]|0;q=a+40|0;m=hj(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;j=Uj(m|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=l+j|0;j=0;while(1){d[g+(j<<1)>>1]=d[q>>1]|0;j=j+1|0;l=b[k>>0]|0;if((j|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){v=l;break}else q=q+2|0}}else v=o;q=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(q<<1)|0,0,(e<<24>>24)-q<<1|0)|0;i=1;return i|0}case 5:{q=a+24|0;j=b[q>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){k=f[f[a>>2]>>2]|0;s=a+40|0;l=hj(f[s>>2]|0,f[s+4>>2]|0,f[c>>2]|0,0)|0;s=a+48|0;m=Uj(l|0,I|0,f[s>>2]|0,f[s+4>>2]|0)|0;s=k+m|0;m=0;while(1){d[g+(m<<1)>>1]=f[s>>2];m=m+1|0;k=b[q>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){w=k;break}else s=s+4|0}}else w=j;s=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(s<<1)|0,0,(e<<24>>24)-s<<1|0)|0;i=1;return i|0}case 6:{s=a+24|0;m=b[s>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;k=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;l=Uj(k|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+l|0;l=0;while(1){d[g+(l<<1)>>1]=f[o>>2];l=l+1|0;q=b[s>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){x=q;break}else o=o+4|0}}else x=m;o=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(o<<1)|0,0,(e<<24>>24)-o<<1|0)|0;i=1;return i|0}case 7:{o=a+24|0;l=b[o>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){s=f[f[a>>2]>>2]|0;j=a+40|0;q=hj(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;k=Uj(q|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=s+k|0;k=0;while(1){d[g+(k<<1)>>1]=f[j>>2];k=k+1|0;s=b[o>>0]|0;if((k|0)>=((s<<24>>24>e<<24>>24?e:s)<<24>>24|0)){y=s;break}else j=j+8|0}}else y=l;j=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(j<<1)|0,0,(e<<24>>24)-j<<1|0)|0;i=1;return i|0}case 8:{j=a+24|0;k=b[j>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){o=f[f[a>>2]>>2]|0;m=a+40|0;s=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;q=Uj(s|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=o+q|0;q=0;while(1){d[g+(q<<1)>>1]=f[m>>2];q=q+1|0;o=b[j>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){z=o;break}else m=m+8|0}}else z=k;m=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(m<<1)|0,0,(e<<24>>24)-m<<1|0)|0;i=1;return i|0}case 9:{m=a+24|0;q=b[m>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){j=f[f[a>>2]>>2]|0;l=a+40|0;o=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;s=Uj(o|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=j+s|0;s=0;while(1){j=~~$(n[l>>2]);d[g+(s<<1)>>1]=j;s=s+1|0;j=b[m>>0]|0;if((s|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){A=j;break}else l=l+4|0}}else A=q;l=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(l<<1)|0,0,(e<<24>>24)-l<<1|0)|0;i=1;return i|0}case 10:{l=a+24|0;s=b[l>>0]|0;if((s<<24>>24>e<<24>>24?e:s)<<24>>24>0){m=f[f[a>>2]>>2]|0;k=a+40|0;j=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;o=Uj(j|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=m+o|0;o=0;while(1){d[g+(o<<1)>>1]=~~+p[k>>3];o=o+1|0;m=b[l>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){B=m;break}else k=k+8|0}}else B=s;k=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(k<<1)|0,0,(e<<24>>24)-k<<1|0)|0;i=1;return i|0}case 11:{k=a+24|0;o=b[k>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){l=f[f[a>>2]>>2]|0;q=a+40|0;m=hj(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;j=Uj(m|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=l+j|0;j=0;while(1){d[g+(j<<1)>>1]=h[q>>0]|0;j=j+1|0;l=b[k>>0]|0;if((j|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){C=l;break}else q=q+1|0}}else C=o;q=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(q<<1)|0,0,(e<<24>>24)-q<<1|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function ob(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Uj(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){f[g+(r<<2)>>2]=b[o>>0];r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Uj(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){f[g+(t<<2)>>2]=h[m>>0];t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Uj(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=d[l>>1];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=hj(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Uj(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=j[r>>1];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=hj(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Uj(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){f[g+(o<<2)>>2]=f[t>>2];o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(t<<2)|0,0,(e<<24>>24)-t<<2|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=hj(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Uj(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){f[g+(m<<2)>>2]=f[q>>2];m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(q<<2)|0,0,(e<<24>>24)-q<<2|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Uj(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){f[g+(l<<2)>>2]=f[k>>2];l=l+1|0;t=b[q>>0]|0;if((l|0)>=((t<<24>>24>e<<24>>24?e:t)<<24>>24|0)){z=t;break}else k=k+8|0}}else z=m;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;t=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Uj(t|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+r|0;r=0;while(1){f[g+(r<<2)>>2]=f[o>>2];r=r+1|0;q=b[k>>0]|0;if((r|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else o=o+8|0}}else A=l;o=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 9:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Uj(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=~~$(n[m>>2])>>>0;f[g+(t<<2)>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else m=m+4|0}}else B=r;m=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Uj(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=~~+p[l>>3]>>>0;q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){C=o;break}else l=l+8|0}}else C=t;l=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 11:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=hj(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Uj(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=h[r>>0];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){D=m;break}else r=r+1|0}}else D=q;r=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function pb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Uj(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){f[g+(r<<2)>>2]=b[o>>0];r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Uj(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){f[g+(t<<2)>>2]=h[m>>0];t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Uj(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=d[l>>1];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=hj(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Uj(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=j[r>>1];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=hj(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Uj(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){f[g+(o<<2)>>2]=f[t>>2];o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(t<<2)|0,0,(e<<24>>24)-t<<2|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=hj(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Uj(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){f[g+(m<<2)>>2]=f[q>>2];m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(q<<2)|0,0,(e<<24>>24)-q<<2|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Uj(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){f[g+(l<<2)>>2]=f[k>>2];l=l+1|0;t=b[q>>0]|0;if((l|0)>=((t<<24>>24>e<<24>>24?e:t)<<24>>24|0)){z=t;break}else k=k+8|0}}else z=m;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;t=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Uj(t|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+r|0;r=0;while(1){f[g+(r<<2)>>2]=f[o>>2];r=r+1|0;q=b[k>>0]|0;if((r|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else o=o+8|0}}else A=l;o=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 9:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Uj(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=~~$(n[m>>2]);f[g+(t<<2)>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else m=m+4|0}}else B=r;m=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Uj(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=~~+p[l>>3];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){C=o;break}else l=l+8|0}}else C=t;l=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 11:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=hj(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Uj(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=h[r>>0];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){D=m;break}else r=r+1|0}}else D=q;r=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}Uf(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function qb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;c=u;u=u+16|0;d=c+8|0;e=c;g=f[b>>2]|0;if((g|0)==-1){h=1;u=c;return h|0}i=(g>>>0)/3|0;j=a+24|0;if(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0){h=1;u=c;return h|0}i=a+48|0;k=f[i>>2]|0;l=a+52|0;m=f[l>>2]|0;if((m|0)==(k|0))n=k;else{o=m+(~((m+-4-k|0)>>>2)<<2)|0;f[l>>2]=o;n=o}o=a+56|0;if((n|0)==(f[o>>2]|0))wf(i,b);else{f[n>>2]=g;f[l>>2]=n+4}n=a+4|0;g=f[n>>2]|0;k=f[b>>2]|0;m=k+1|0;do if((k|0)!=-1){p=f[g+28>>2]|0;q=f[p+((((m>>>0)%3|0|0)==0?k+-2|0:m)<<2)>>2]|0;if(!((k>>>0)%3|0)){r=q;s=k+2|0;t=p;break}else{r=q;s=k+-1|0;t=p;break}}else{p=f[g+28>>2]|0;r=f[p+-4>>2]|0;s=-1;t=p}while(0);g=f[t+(s<<2)>>2]|0;if((r|0)==-1|(g|0)==-1){h=0;u=c;return h|0}s=a+36|0;t=f[s>>2]|0;k=t+(r>>>5<<2)|0;m=1<<(r&31);p=f[k>>2]|0;if(!(p&m)){f[k>>2]=p|m;m=f[b>>2]|0;p=m+1|0;if((m|0)==-1)v=-1;else v=((p>>>0)%3|0|0)==0?m+-2|0:p;f[e>>2]=v;p=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((v>>>0)/3|0)*12|0)+(((v>>>0)%3|0)<<2)>>2]|0;v=f[a+20>>2]|0;f[d>>2]=p;m=f[v+4>>2]|0;v=m+4|0;k=f[v>>2]|0;if((k|0)==(f[m+8>>2]|0))wf(m,d);else{f[k>>2]=p;f[v>>2]=k+4}k=a+12|0;v=f[k>>2]|0;p=v+4|0;m=f[p>>2]|0;if((m|0)==(f[v+8>>2]|0)){wf(v,e);w=f[k>>2]|0}else{f[m>>2]=f[e>>2];f[p>>2]=m+4;w=v}v=w+24|0;f[(f[w+12>>2]|0)+(r<<2)>>2]=f[v>>2];f[v>>2]=(f[v>>2]|0)+1;x=f[s>>2]|0}else x=t;t=x+(g>>>5<<2)|0;x=1<<(g&31);v=f[t>>2]|0;if(!(v&x)){f[t>>2]=v|x;x=f[b>>2]|0;do if((x|0)!=-1)if(!((x>>>0)%3|0)){y=x+2|0;break}else{y=x+-1|0;break}else y=-1;while(0);f[e>>2]=y;x=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((y>>>0)/3|0)*12|0)+(((y>>>0)%3|0)<<2)>>2]|0;y=f[a+20>>2]|0;f[d>>2]=x;v=f[y+4>>2]|0;y=v+4|0;t=f[y>>2]|0;if((t|0)==(f[v+8>>2]|0))wf(v,d);else{f[t>>2]=x;f[y>>2]=t+4}t=a+12|0;y=f[t>>2]|0;x=y+4|0;v=f[x>>2]|0;if((v|0)==(f[y+8>>2]|0)){wf(y,e);z=f[t>>2]|0}else{f[v>>2]=f[e>>2];f[x>>2]=v+4;z=y}y=z+24|0;f[(f[z+12>>2]|0)+(g<<2)>>2]=f[y>>2];f[y>>2]=(f[y>>2]|0)+1}y=f[i>>2]|0;g=f[l>>2]|0;if((y|0)==(g|0)){h=1;u=c;return h|0}z=a+16|0;v=a+20|0;x=a+12|0;a=g;g=y;a:while(1){y=f[a+-4>>2]|0;f[b>>2]=y;t=(y>>>0)/3|0;if((y|0)!=-1?(y=(f[j>>2]|0)+(t>>>5<<2)|0,r=1<<(t&31),t=f[y>>2]|0,(t&r|0)==0):0){f[y>>2]=t|r;r=f[n>>2]|0;t=f[b>>2]|0;y=f[(f[r+28>>2]|0)+(t<<2)>>2]|0;if((y|0)==-1){h=0;A=79;break}else{B=y;C=r;D=t}b:while(1){t=(f[s>>2]|0)+(B>>>5<<2)|0;r=1<<(B&31);y=f[t>>2]|0;do if(!(y&r)){w=f[(f[C+40>>2]|0)+(B<<2)>>2]|0;if((w|0)==-1)E=1;else{m=f[(f[f[C+64>>2]>>2]|0)+(w<<2)>>2]|0;E=(1<<(m&31)&f[(f[C+12>>2]|0)+(m>>>5<<2)>>2]|0)!=0}f[t>>2]=y|r;m=f[b>>2]|0;f[e>>2]=m;w=f[(f[(f[z>>2]|0)+96>>2]|0)+(((m>>>0)/3|0)*12|0)+(((m>>>0)%3|0)<<2)>>2]|0;m=f[v>>2]|0;f[d>>2]=w;p=f[m+4>>2]|0;m=p+4|0;k=f[m>>2]|0;if((k|0)==(f[p+8>>2]|0))wf(p,d);else{f[k>>2]=w;f[m>>2]=k+4}k=f[x>>2]|0;m=k+4|0;w=f[m>>2]|0;if((w|0)==(f[k+8>>2]|0)){wf(k,e);F=f[x>>2]|0}else{f[w>>2]=f[e>>2];f[m>>2]=w+4;F=k}k=F+24|0;f[(f[F+12>>2]|0)+(B<<2)>>2]=f[k>>2];f[k>>2]=(f[k>>2]|0)+1;k=f[n>>2]|0;w=f[b>>2]|0;if(E){G=w;H=k;A=59;break}m=w+1|0;do if((w|0)==-1)I=-1;else{p=((m>>>0)%3|0|0)==0?w+-2|0:m;if((p|0)==-1){I=-1;break}if(f[(f[k>>2]|0)+(p>>>5<<2)>>2]&1<<(p&31)|0){I=-1;break}I=f[(f[(f[k+64>>2]|0)+12>>2]|0)+(p<<2)>>2]|0}while(0);f[b>>2]=I;J=(I>>>0)/3|0;K=k}else{G=D;H=C;A=59}while(0);if((A|0)==59){A=0;r=G+1|0;if((G|0)==-1){A=60;break}y=((r>>>0)%3|0|0)==0?G+-2|0:r;do if((y|0)==-1)L=-1;else{if(f[(f[H>>2]|0)+(y>>>5<<2)>>2]&1<<(y&31)|0){L=-1;break}L=f[(f[(f[H+64>>2]|0)+12>>2]|0)+(y<<2)>>2]|0}while(0);f[d>>2]=L;y=(((G>>>0)%3|0|0)==0?2:-1)+G|0;do if((y|0)==-1)M=-1;else{if(f[(f[H>>2]|0)+(y>>>5<<2)>>2]&1<<(y&31)|0){M=-1;break}M=f[(f[(f[H+64>>2]|0)+12>>2]|0)+(y<<2)>>2]|0}while(0);y=(L|0)==-1;r=(L>>>0)/3|0;t=y?-1:r;m=(M|0)==-1;w=(M>>>0)/3|0;p=m?-1:w;do if(!y){q=f[j>>2]|0;if(f[q+(t>>>5<<2)>>2]&1<<(t&31)|0){A=69;break}if(m){N=L;O=r;break}if(!(f[q+(p>>>5<<2)>>2]&1<<(p&31))){A=74;break b}else{N=L;O=r}}else A=69;while(0);if((A|0)==69){A=0;if(m){A=71;break}if(!(f[(f[j>>2]|0)+(p>>>5<<2)>>2]&1<<(p&31))){N=M;O=w}else{A=71;break}}f[b>>2]=N;J=O;K=H}r=(f[j>>2]|0)+(J>>>5<<2)|0;f[r>>2]=f[r>>2]|1<<(J&31);D=f[b>>2]|0;B=f[(f[K+28>>2]|0)+(D<<2)>>2]|0;if((B|0)==-1){h=0;A=79;break a}else C=K}do if((A|0)==60){A=0;f[d>>2]=-1;A=71}else if((A|0)==74){A=0;r=f[l>>2]|0;f[r+-4>>2]=M;if((r|0)==(f[o>>2]|0)){wf(i,d);P=f[l>>2]|0;break}else{f[r>>2]=f[d>>2];t=r+4|0;f[l>>2]=t;P=t;break}}while(0);if((A|0)==71){A=0;t=(f[l>>2]|0)+-4|0;f[l>>2]=t;P=t}Q=f[i>>2]|0;R=P}else{t=a+-4|0;f[l>>2]=t;Q=g;R=t}if((Q|0)==(R|0)){h=1;A=79;break}else{a=R;g=Q}}if((A|0)==79){u=c;return h|0}return 0}function rb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;if(!g){h=0;return h|0}do switch(f[a+28>>2]|0){case 1:{i=a+24|0;j=b[i>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){k=f[f[a>>2]>>2]|0;l=a+40|0;m=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;o=Uj(m|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=k+o|0;o=0;while(1){b[g+o>>0]=b[l>>0]|0;o=o+1|0;k=b[i>>0]|0;if((o|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){q=k;break}else l=l+1|0}}else q=j;l=q<<24>>24;if(q<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+l|0,0,(e<<24>>24)-l|0)|0;h=1;return h|0}case 2:{l=a+24|0;o=b[l>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){i=f[f[a>>2]>>2]|0;k=a+40|0;m=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=Uj(m|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=i+r|0;r=0;while(1){b[g+r>>0]=b[k>>0]|0;r=r+1|0;i=b[l>>0]|0;if((r|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0)){s=i;break}else k=k+1|0}}else s=o;k=s<<24>>24;if(s<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+k|0,0,(e<<24>>24)-k|0)|0;h=1;return h|0}case 3:{k=a+24|0;r=b[k>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){l=f[f[a>>2]>>2]|0;j=a+40|0;i=hj(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;m=Uj(i|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=l+m|0;m=0;while(1){b[g+m>>0]=d[j>>1];m=m+1|0;l=b[k>>0]|0;if((m|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){t=l;break}else j=j+2|0}}else t=r;j=t<<24>>24;if(t<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+j|0,0,(e<<24>>24)-j|0)|0;h=1;return h|0}case 4:{j=a+24|0;m=b[j>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;l=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;i=Uj(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+i|0;i=0;while(1){b[g+i>>0]=d[o>>1];i=i+1|0;k=b[j>>0]|0;if((i|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else o=o+2|0}}else u=m;o=u<<24>>24;if(u<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+o|0,0,(e<<24>>24)-o|0)|0;h=1;return h|0}case 5:{o=a+24|0;i=b[o>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){j=f[f[a>>2]>>2]|0;r=a+40|0;k=hj(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;l=Uj(k|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=j+l|0;l=0;while(1){b[g+l>>0]=f[r>>2];l=l+1|0;j=b[o>>0]|0;if((l|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){v=j;break}else r=r+4|0}}else v=i;r=v<<24>>24;if(v<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+r|0,0,(e<<24>>24)-r|0)|0;h=1;return h|0}case 6:{r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){o=f[f[a>>2]>>2]|0;m=a+40|0;j=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;k=Uj(j|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=o+k|0;k=0;while(1){b[g+k>>0]=f[m>>2];k=k+1|0;o=b[r>>0]|0;if((k|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){w=o;break}else m=m+4|0}}else w=l;m=w<<24>>24;if(w<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+m|0,0,(e<<24>>24)-m|0)|0;h=1;return h|0}case 7:{m=a+24|0;k=b[m>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){r=f[f[a>>2]>>2]|0;i=a+40|0;o=hj(f[i>>2]|0,f[i+4>>2]|0,f[c>>2]|0,0)|0;i=a+48|0;j=Uj(o|0,I|0,f[i>>2]|0,f[i+4>>2]|0)|0;i=r+j|0;j=0;while(1){b[g+j>>0]=f[i>>2];j=j+1|0;r=b[m>>0]|0;if((j|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){x=r;break}else i=i+8|0}}else x=k;i=x<<24>>24;if(x<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+i|0,0,(e<<24>>24)-i|0)|0;h=1;return h|0}case 8:{i=a+24|0;j=b[i>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){m=f[f[a>>2]>>2]|0;l=a+40|0;r=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;o=Uj(r|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=m+o|0;o=0;while(1){b[g+o>>0]=f[l>>2];o=o+1|0;m=b[i>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){y=m;break}else l=l+8|0}}else y=j;l=y<<24>>24;if(y<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+l|0,0,(e<<24>>24)-l|0)|0;h=1;return h|0}case 9:{l=a+24|0;o=b[l>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){i=f[f[a>>2]>>2]|0;k=a+40|0;m=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=Uj(m|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=i+r|0;r=0;while(1){i=~~$(n[k>>2])&255;b[g+r>>0]=i;r=r+1|0;i=b[l>>0]|0;if((r|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0)){z=i;break}else k=k+4|0}}else z=o;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+k|0,0,(e<<24>>24)-k|0)|0;h=1;return h|0}case 10:{k=a+24|0;r=b[k>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){l=f[f[a>>2]>>2]|0;j=a+40|0;i=hj(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;m=Uj(i|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=l+m|0;m=0;while(1){b[g+m>>0]=~~+p[j>>3];m=m+1|0;l=b[k>>0]|0;if((m|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){A=l;break}else j=j+8|0}}else A=r;j=A<<24>>24;if(A<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+j|0,0,(e<<24>>24)-j|0)|0;h=1;return h|0}case 11:{j=a+24|0;m=b[j>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;l=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;i=Uj(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+i|0;i=0;while(1){b[g+i>>0]=b[o>>0]|0;i=i+1|0;k=b[j>>0]|0;if((i|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else o=o+1|0}}else B=m;o=B<<24>>24;if(B<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+o|0,0,(e<<24>>24)-o|0)|0;h=1;return h|0}default:{h=0;return h|0}}while(0);return 0}function sb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;if(!g){h=0;return h|0}do switch(f[a+28>>2]|0){case 1:{i=a+24|0;j=b[i>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){k=f[f[a>>2]>>2]|0;l=a+40|0;m=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;o=Uj(m|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=k+o|0;o=0;while(1){b[g+o>>0]=b[l>>0]|0;o=o+1|0;k=b[i>>0]|0;if((o|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){q=k;break}else l=l+1|0}}else q=j;l=q<<24>>24;if(q<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+l|0,0,(e<<24>>24)-l|0)|0;h=1;return h|0}case 2:{l=a+24|0;o=b[l>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){i=f[f[a>>2]>>2]|0;k=a+40|0;m=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=Uj(m|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=i+r|0;r=0;while(1){b[g+r>>0]=b[k>>0]|0;r=r+1|0;i=b[l>>0]|0;if((r|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0)){s=i;break}else k=k+1|0}}else s=o;k=s<<24>>24;if(s<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+k|0,0,(e<<24>>24)-k|0)|0;h=1;return h|0}case 3:{k=a+24|0;r=b[k>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){l=f[f[a>>2]>>2]|0;j=a+40|0;i=hj(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;m=Uj(i|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=l+m|0;m=0;while(1){b[g+m>>0]=d[j>>1];m=m+1|0;l=b[k>>0]|0;if((m|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){t=l;break}else j=j+2|0}}else t=r;j=t<<24>>24;if(t<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+j|0,0,(e<<24>>24)-j|0)|0;h=1;return h|0}case 4:{j=a+24|0;m=b[j>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;l=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;i=Uj(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+i|0;i=0;while(1){b[g+i>>0]=d[o>>1];i=i+1|0;k=b[j>>0]|0;if((i|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else o=o+2|0}}else u=m;o=u<<24>>24;if(u<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+o|0,0,(e<<24>>24)-o|0)|0;h=1;return h|0}case 5:{o=a+24|0;i=b[o>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){j=f[f[a>>2]>>2]|0;r=a+40|0;k=hj(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;l=Uj(k|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=j+l|0;l=0;while(1){b[g+l>>0]=f[r>>2];l=l+1|0;j=b[o>>0]|0;if((l|0)>=((j<<24>>24>e<<24>>24?e:j)<<24>>24|0)){v=j;break}else r=r+4|0}}else v=i;r=v<<24>>24;if(v<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+r|0,0,(e<<24>>24)-r|0)|0;h=1;return h|0}case 6:{r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){o=f[f[a>>2]>>2]|0;m=a+40|0;j=hj(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;k=Uj(j|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=o+k|0;k=0;while(1){b[g+k>>0]=f[m>>2];k=k+1|0;o=b[r>>0]|0;if((k|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){w=o;break}else m=m+4|0}}else w=l;m=w<<24>>24;if(w<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+m|0,0,(e<<24>>24)-m|0)|0;h=1;return h|0}case 7:{m=a+24|0;k=b[m>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){r=f[f[a>>2]>>2]|0;i=a+40|0;o=hj(f[i>>2]|0,f[i+4>>2]|0,f[c>>2]|0,0)|0;i=a+48|0;j=Uj(o|0,I|0,f[i>>2]|0,f[i+4>>2]|0)|0;i=r+j|0;j=0;while(1){b[g+j>>0]=f[i>>2];j=j+1|0;r=b[m>>0]|0;if((j|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){x=r;break}else i=i+8|0}}else x=k;i=x<<24>>24;if(x<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+i|0,0,(e<<24>>24)-i|0)|0;h=1;return h|0}case 8:{i=a+24|0;j=b[i>>0]|0;if((j<<24>>24>e<<24>>24?e:j)<<24>>24>0){m=f[f[a>>2]>>2]|0;l=a+40|0;r=hj(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;o=Uj(r|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=m+o|0;o=0;while(1){b[g+o>>0]=f[l>>2];o=o+1|0;m=b[i>>0]|0;if((o|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){y=m;break}else l=l+8|0}}else y=j;l=y<<24>>24;if(y<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+l|0,0,(e<<24>>24)-l|0)|0;h=1;return h|0}case 9:{l=a+24|0;o=b[l>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){i=f[f[a>>2]>>2]|0;k=a+40|0;m=hj(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=Uj(m|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=i+r|0;r=0;while(1){i=~~$(n[k>>2]);b[g+r>>0]=i;r=r+1|0;i=b[l>>0]|0;if((r|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0)){z=i;break}else k=k+4|0}}else z=o;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+k|0,0,(e<<24>>24)-k|0)|0;h=1;return h|0}case 10:{k=a+24|0;r=b[k>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){l=f[f[a>>2]>>2]|0;j=a+40|0;i=hj(f[j>>2]|0,f[j+4>>2]|0,f[c>>2]|0,0)|0;j=a+48|0;m=Uj(i|0,I|0,f[j>>2]|0,f[j+4>>2]|0)|0;j=l+m|0;m=0;while(1){b[g+m>>0]=~~+p[j>>3];m=m+1|0;l=b[k>>0]|0;if((m|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){A=l;break}else j=j+8|0}}else A=r;j=A<<24>>24;if(A<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+j|0,0,(e<<24>>24)-j|0)|0;h=1;return h|0}case 11:{j=a+24|0;m=b[j>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;l=hj(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;i=Uj(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+i|0;i=0;while(1){b[g+i>>0]=b[o>>0]|0;i=i+1|0;k=b[j>>0]|0;if((i|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else o=o+1|0}}else B=m;o=B<<24>>24;if(B<<24>>24>=e<<24>>24){h=1;return h|0}Uf(g+o|0,0,(e<<24>>24)-o|0)|0;h=1;return h|0}default:{h=0;return h|0}}while(0);return 0}function tb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;c=u;u=u+16|0;d=c+8|0;e=c;g=f[b>>2]|0;if((g|0)==-1){h=1;u=c;return h|0}i=(g>>>0)/3|0;j=a+24|0;if(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0){h=1;u=c;return h|0}i=a+48|0;k=f[i>>2]|0;l=a+52|0;m=f[l>>2]|0;if((m|0)==(k|0))n=k;else{o=m+(~((m+-4-k|0)>>>2)<<2)|0;f[l>>2]=o;n=o}o=a+56|0;if((n|0)==(f[o>>2]|0))wf(i,b);else{f[n>>2]=g;f[l>>2]=n+4}n=a+4|0;g=f[n>>2]|0;k=f[b>>2]|0;m=k+1|0;if((k|0)==-1){h=0;u=c;return h|0}p=((m>>>0)%3|0|0)==0?k+-2|0:m;if((p|0)==-1)q=-1;else q=f[(f[g>>2]|0)+(p<<2)>>2]|0;p=(((k>>>0)%3|0|0)==0?2:-1)+k|0;if((p|0)==-1){h=0;u=c;return h|0}k=f[(f[g>>2]|0)+(p<<2)>>2]|0;if((q|0)==-1|(k|0)==-1){h=0;u=c;return h|0}p=a+36|0;g=f[p>>2]|0;m=g+(q>>>5<<2)|0;r=1<<(q&31);s=f[m>>2]|0;if(!(s&r)){f[m>>2]=s|r;r=f[b>>2]|0;s=r+1|0;if((r|0)==-1)t=-1;else t=((s>>>0)%3|0|0)==0?r+-2|0:s;f[e>>2]=t;s=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((t>>>0)/3|0)*12|0)+(((t>>>0)%3|0)<<2)>>2]|0;t=f[a+20>>2]|0;f[d>>2]=s;r=f[t+4>>2]|0;t=r+4|0;m=f[t>>2]|0;if((m|0)==(f[r+8>>2]|0))wf(r,d);else{f[m>>2]=s;f[t>>2]=m+4}m=a+12|0;t=f[m>>2]|0;s=t+4|0;r=f[s>>2]|0;if((r|0)==(f[t+8>>2]|0)){wf(t,e);v=f[m>>2]|0}else{f[r>>2]=f[e>>2];f[s>>2]=r+4;v=t}t=v+24|0;f[(f[v+12>>2]|0)+(q<<2)>>2]=f[t>>2];f[t>>2]=(f[t>>2]|0)+1;w=f[p>>2]|0}else w=g;g=w+(k>>>5<<2)|0;w=1<<(k&31);t=f[g>>2]|0;if(!(t&w)){f[g>>2]=t|w;w=f[b>>2]|0;do if((w|0)!=-1)if(!((w>>>0)%3|0)){x=w+2|0;break}else{x=w+-1|0;break}else x=-1;while(0);f[e>>2]=x;w=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((x>>>0)/3|0)*12|0)+(((x>>>0)%3|0)<<2)>>2]|0;x=f[a+20>>2]|0;f[d>>2]=w;t=f[x+4>>2]|0;x=t+4|0;g=f[x>>2]|0;if((g|0)==(f[t+8>>2]|0))wf(t,d);else{f[g>>2]=w;f[x>>2]=g+4}g=a+12|0;x=f[g>>2]|0;w=x+4|0;t=f[w>>2]|0;if((t|0)==(f[x+8>>2]|0)){wf(x,e);y=f[g>>2]|0}else{f[t>>2]=f[e>>2];f[w>>2]=t+4;y=x}x=y+24|0;f[(f[y+12>>2]|0)+(k<<2)>>2]=f[x>>2];f[x>>2]=(f[x>>2]|0)+1}x=f[i>>2]|0;k=f[l>>2]|0;if((x|0)==(k|0)){h=1;u=c;return h|0}y=a+16|0;t=a+20|0;w=a+12|0;a=k;k=x;a:while(1){x=f[a+-4>>2]|0;f[b>>2]=x;g=(x>>>0)/3|0;if((x|0)!=-1?(x=(f[j>>2]|0)+(g>>>5<<2)|0,q=1<<(g&31),g=f[x>>2]|0,(g&q|0)==0):0){f[x>>2]=g|q;q=f[b>>2]|0;if((q|0)==-1){h=0;z=80;break}g=f[n>>2]|0;x=q;b:while(1){q=f[(f[g>>2]|0)+(x<<2)>>2]|0;if((q|0)==-1){h=0;z=80;break a}v=(f[p>>2]|0)+(q>>>5<<2)|0;r=1<<(q&31);s=f[v>>2]|0;do if(!(s&r)){m=f[(f[g+24>>2]|0)+(q<<2)>>2]|0;A=m+1|0;do if((m|0)==-1)B=1;else{C=((A>>>0)%3|0|0)==0?m+-2|0:A;if((C|0)==-1){B=1;break}D=f[(f[g+12>>2]|0)+(C<<2)>>2]|0;C=D+1|0;if((D|0)==-1){B=1;break}B=((((C>>>0)%3|0|0)==0?D+-2|0:C)|0)==-1}while(0);f[v>>2]=s|r;A=f[b>>2]|0;f[e>>2]=A;m=f[(f[(f[y>>2]|0)+96>>2]|0)+(((A>>>0)/3|0)*12|0)+(((A>>>0)%3|0)<<2)>>2]|0;A=f[t>>2]|0;f[d>>2]=m;C=f[A+4>>2]|0;A=C+4|0;D=f[A>>2]|0;if((D|0)==(f[C+8>>2]|0))wf(C,d);else{f[D>>2]=m;f[A>>2]=D+4}D=f[w>>2]|0;A=D+4|0;m=f[A>>2]|0;if((m|0)==(f[D+8>>2]|0)){wf(D,e);E=f[w>>2]|0}else{f[m>>2]=f[e>>2];f[A>>2]=m+4;E=D}D=E+24|0;f[(f[E+12>>2]|0)+(q<<2)>>2]=f[D>>2];f[D>>2]=(f[D>>2]|0)+1;D=f[n>>2]|0;m=f[b>>2]|0;if(B)if((m|0)==-1){z=63;break b}else{F=m;G=D;z=64;break}do if((m|0)==-1)H=-1;else{A=m+1|0;C=((A>>>0)%3|0|0)==0?m+-2|0:A;if((C|0)==-1){H=-1;break}H=f[(f[D+12>>2]|0)+(C<<2)>>2]|0}while(0);f[b>>2]=H;I=(H>>>0)/3|0;J=D}else{F=x;G=g;z=64}while(0);if((z|0)==64){z=0;q=F+1|0;r=((q>>>0)%3|0|0)==0?F+-2|0:q;if((r|0)==-1)K=-1;else K=f[(f[G+12>>2]|0)+(r<<2)>>2]|0;f[d>>2]=K;r=(((F>>>0)%3|0|0)==0?2:-1)+F|0;if((r|0)==-1)L=-1;else L=f[(f[G+12>>2]|0)+(r<<2)>>2]|0;r=(K|0)==-1;q=(K>>>0)/3|0;s=r?-1:q;v=(L|0)==-1;m=(L>>>0)/3|0;C=v?-1:m;do if(!r){A=f[j>>2]|0;if(f[A+(s>>>5<<2)>>2]&1<<(s&31)|0){z=70;break}if(v){M=K;N=q;break}if(!(f[A+(C>>>5<<2)>>2]&1<<(C&31))){z=75;break b}else{M=K;N=q}}else z=70;while(0);if((z|0)==70){z=0;if(v){z=72;break}if(!(f[(f[j>>2]|0)+(C>>>5<<2)>>2]&1<<(C&31))){M=L;N=m}else{z=72;break}}f[b>>2]=M;I=N;J=G}q=(f[j>>2]|0)+(I>>>5<<2)|0;f[q>>2]=f[q>>2]|1<<(I&31);x=f[b>>2]|0;if((x|0)==-1){h=0;z=80;break a}else g=J}do if((z|0)==63){z=0;f[d>>2]=-1;z=72}else if((z|0)==75){z=0;g=f[l>>2]|0;f[g+-4>>2]=L;if((g|0)==(f[o>>2]|0)){wf(i,d);O=f[l>>2]|0;break}else{f[g>>2]=f[d>>2];x=g+4|0;f[l>>2]=x;O=x;break}}while(0);if((z|0)==72){z=0;x=(f[l>>2]|0)+-4|0;f[l>>2]=x;O=x}P=f[i>>2]|0;Q=O}else{x=a+-4|0;f[l>>2]=x;P=k;Q=x}if((P|0)==(Q|0)){h=1;z=80;break}else{a=Q;k=P}}if((z|0)==80){u=c;return h|0}return 0}function ub(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0;g=u;u=u+80|0;h=g+76|0;i=g+72|0;j=g+48|0;k=g+24|0;l=g;m=a+32|0;n=f[c>>2]|0;c=n+1|0;if((n|0)!=-1){o=((c>>>0)%3|0|0)==0?n+-2|0:c;c=(((n>>>0)%3|0|0)==0?2:-1)+n|0;if((o|0)==-1)p=-1;else p=f[(f[f[m>>2]>>2]|0)+(o<<2)>>2]|0;if((c|0)==-1){q=p;r=-1}else{q=p;r=f[(f[f[m>>2]>>2]|0)+(c<<2)>>2]|0}}else{q=-1;r=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=u;u=u+64|0;g=e+40|0;i=e+16|0;j=e;k=bc(a,c)|0;if(k|0){f[i>>2]=k;f[g>>2]=f[i>>2];bd(a,g)|0}f[j>>2]=0;k=j+4|0;f[k>>2]=0;f[j+8>>2]=0;l=f[d>>2]|0;m=(f[d+4>>2]|0)-l|0;if(!m){o=0;p=l}else{hf(j,m);o=f[j>>2]|0;p=f[d>>2]|0}be(o|0,p|0,m|0)|0;Qf(i,c);c=i+12|0;f[c>>2]=0;m=i+16|0;f[m>>2]=0;f[i+20>>2]=0;p=f[k>>2]|0;o=f[j>>2]|0;d=p-o|0;if(!d){q=o;r=p;s=0}else{hf(c,d);q=f[j>>2]|0;r=f[k>>2]|0;s=f[c>>2]|0}be(s|0,q|0,r-q|0)|0;q=i+11|0;r=b[q>>0]|0;s=r<<24>>24<0;c=s?f[i>>2]|0:i;d=s?f[i+4>>2]|0:r&255;if(d>>>0>3){r=c;s=d;p=d;while(1){o=X(h[r>>0]|h[r+1>>0]<<8|h[r+2>>0]<<16|h[r+3>>0]<<24,1540483477)|0;s=(X(o>>>24^o,1540483477)|0)^(X(s,1540483477)|0);p=p+-4|0;if(p>>>0<=3)break;else r=r+4|0}r=d+-4|0;p=r&-4;t=r-p|0;v=c+(p+4)|0;w=s}else{t=d;v=c;w=d}switch(t|0){case 3:{x=h[v+2>>0]<<16^w;y=12;break}case 2:{x=w;y=12;break}case 1:{z=w;y=13;break}default:A=w}if((y|0)==12){z=h[v+1>>0]<<8^x;y=13}if((y|0)==13)A=X(z^h[v>>0],1540483477)|0;v=X(A>>>13^A,1540483477)|0;A=v>>>15^v;v=a+4|0;z=f[v>>2]|0;x=(z|0)==0;a:do if(!x){w=z+-1|0;t=(w&z|0)==0;if(!t)if(A>>>0<z>>>0)B=A;else B=(A>>>0)%(z>>>0)|0;else B=A&w;s=f[(f[a>>2]|0)+(B<<2)>>2]|0;if((s|0)!=0?(p=f[s>>2]|0,(p|0)!=0):0){s=(d|0)==0;if(t){if(s){t=p;while(1){r=f[t+4>>2]|0;if(!((r|0)==(A|0)|(r&w|0)==(B|0))){C=B;y=54;break a}r=b[t+8+11>>0]|0;if(!((r<<24>>24<0?f[t+12>>2]|0:r&255)|0))break a;t=f[t>>2]|0;if(!t){C=B;y=54;break a}}}else D=p;while(1){t=f[D+4>>2]|0;if(!((t|0)==(A|0)|(t&w|0)==(B|0))){C=B;y=54;break a}t=D+8|0;r=b[t+11>>0]|0;o=r<<24>>24<0;l=r&255;do if(((o?f[D+12>>2]|0:l)|0)==(d|0)){r=f[t>>2]|0;if(o)if(!(oh(r,c,d)|0))break a;else break;if((b[c>>0]|0)==(r&255)<<24>>24){r=t;E=l;F=c;do{E=E+-1|0;r=r+1|0;if(!E)break a;F=F+1|0}while((b[r>>0]|0)==(b[F>>0]|0))}}while(0);D=f[D>>2]|0;if(!D){C=B;y=54;break a}}}if(s){w=p;while(1){l=f[w+4>>2]|0;if((l|0)!=(A|0)){if(l>>>0<z>>>0)G=l;else G=(l>>>0)%(z>>>0)|0;if((G|0)!=(B|0)){C=B;y=54;break a}}l=b[w+8+11>>0]|0;if(!((l<<24>>24<0?f[w+12>>2]|0:l&255)|0))break a;w=f[w>>2]|0;if(!w){C=B;y=54;break a}}}else H=p;while(1){w=f[H+4>>2]|0;if((w|0)!=(A|0)){if(w>>>0<z>>>0)I=w;else I=(w>>>0)%(z>>>0)|0;if((I|0)!=(B|0)){C=B;y=54;break a}}w=H+8|0;s=b[w+11>>0]|0;l=s<<24>>24<0;t=s&255;do if(((l?f[H+12>>2]|0:t)|0)==(d|0)){s=f[w>>2]|0;if(l)if(!(oh(s,c,d)|0))break a;else break;if((b[c>>0]|0)==(s&255)<<24>>24){s=w;o=t;F=c;do{o=o+-1|0;s=s+1|0;if(!o)break a;F=F+1|0}while((b[s>>0]|0)==(b[F>>0]|0))}}while(0);H=f[H>>2]|0;if(!H){C=B;y=54;break}}}else{C=B;y=54}}else{C=0;y=54}while(0);if((y|0)==54){Se(g,a,A,i);y=a+12|0;J=$(((f[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t;D=n;if(r>>>0<=B>>>0)if(r>>>0<B>>>0?(n=C+(r<<2)|0,(n|0)!=(D|0)):0){f[q>>2]=D+(~((D+-4-n|0)>>>2)<<2);E=l;F=p;G=k}else{E=l;F=p;G=k}else{we(d,r-B|0,e);E=f[d>>2]|0;F=f[j>>2]|0;G=f[a>>2]|0}x=E;y=E;z=G;A=F}B=y+(m<<2)|0;f[B>>2]=(f[B>>2]|0)+1;o=o+1|0;if(o>>>0>=A-z>>2>>>0){v=z;w=A;break}else{l=x;p=A;s=y;k=z;t=y}}}y=w-v|0;v=y>>2;f[e>>2]=0;w=e+4|0;f[w>>2]=0;f[e+8>>2]=0;if(!v){H=0;I=0}else{if(v>>>0>536870911)xm(e);t=dj(y<<1)|0;f[w>>2]=t;f[e>>2]=t;y=t+(v<<3)|0;f[e+8>>2]=y;z=v;v=t;k=t;while(1){s=v;f[s>>2]=-1;f[s+4>>2]=-1;s=k+8|0;A=z+-1|0;if(!A)break;else{z=A;v=s;k=s}}f[w>>2]=y;H=t;I=t}t=f[q>>2]|0;y=f[d>>2]|0;k=t-y|0;v=k>>2;f[g>>2]=0;z=g+4|0;f[z>>2]=0;f[g+8>>2]=0;s=y;do if(v)if(v>>>0>1073741823)xm(g);else{A=dj(k)|0;f[g>>2]=A;p=A+(v<<2)|0;f[g+8>>2]=p;Uf(A|0,0,k|0)|0;f[z>>2]=p;J=A;K=p;L=A;break}else{J=0;K=0;L=0}while(0);if((t|0)!=(y|0)){y=0;t=0;while(1){f[J+(t<<2)>>2]=y;k=t+1|0;if(k>>>0<v>>>0){y=(f[s+(t<<2)>>2]|0)+y|0;t=k}else break}}t=f[j>>2]|0;j=f[a>>2]|0;y=j;if((t|0)!=(j|0)){k=a+40|0;a=t-j>>2;j=H;t=H;g=H;A=H;p=H;x=H;l=0;o=J;while(1){F=f[y+(l<<2)>>2]|0;G=l+1|0;E=((G>>>0)%3|0|0)==0?l+-2|0:G;if((E|0)==-1)M=-1;else M=f[y+(E<<2)>>2]|0;E=((l>>>0)%3|0|0)==0;G=(E?2:-1)+l|0;if((G|0)==-1)N=-1;else N=f[y+(G<<2)>>2]|0;if(E?(M|0)==(N|0)|((F|0)==(M|0)|(F|0)==(N|0)):0){f[k>>2]=(f[k>>2]|0)+1;O=j;P=t;Q=g;R=A;S=p;T=x;U=l+2|0;V=o}else W=51;a:do if((W|0)==51){W=0;E=f[s+(N<<2)>>2]|0;b:do if((E|0)>0){G=0;B=f[o+(N<<2)>>2]|0;while(1){m=f[p+(B<<3)>>2]|0;if((m|0)==-1){X=j;Y=t;Z=A;_=p;break b}if((m|0)==(M|0)){m=f[p+(B<<3)+4>>2]|0;if((m|0)==-1)$=-1;else $=f[y+(m<<2)>>2]|0;if((F|0)!=($|0))break}m=G+1|0;if((m|0)<(E|0)){G=m;B=B+1|0}else{X=j;Y=t;Z=A;_=p;break b}}m=f[A+(B<<3)+4>>2]|0;r=G;n=B;D=t;while(1){r=r+1|0;if((r|0)>=(E|0))break;C=n+1|0;f[D+(n<<3)>>2]=f[D+(C<<3)>>2];f[D+(n<<3)+4>>2]=f[D+(C<<3)+4>>2];if((f[j+(n<<3)>>2]|0)==-1)break;else{n=C;D=j}}f[g+(n<<3)>>2]=-1;if((m|0)==-1){X=g;Y=g;Z=g;_=g}else{D=f[i>>2]|0;f[D+(l<<2)>>2]=m;f[D+(m<<2)>>2]=l;O=g;P=g;Q=g;R=g;S=g;T=x;U=l;V=o;break a}}else{X=j;Y=t;Z=A;_=p}while(0);E=f[s+(M<<2)>>2]|0;if((E|0)>0){D=0;r=f[J+(M<<2)>>2]|0;while(1){aa=x+(r<<3)|0;if((f[aa>>2]|0)==-1)break;D=D+1|0;if((D|0)>=(E|0)){O=x;P=x;Q=x;R=x;S=x;T=x;U=l;V=J;break a}else r=r+1|0}f[aa>>2]=N;f[H+(r<<3)+4>>2]=l;O=H;P=H;Q=H;R=H;S=H;T=H;U=l;V=J}else{O=X;P=Y;Q=g;R=Z;S=_;T=x;U=l;V=o}}while(0);l=U+1|0;if(l>>>0>=a>>>0)break;else{j=O;t=P;g=Q;A=R;p=S;x=T;o=V}}}f[b>>2]=v;if(!J){ba=H;ca=I}else{if((K|0)!=(J|0))f[z>>2]=K+(~((K+-4-J|0)>>>2)<<2);gn(L);L=f[e>>2]|0;ba=L;ca=L}if(ba|0){L=f[w>>2]|0;if((L|0)!=(ba|0))f[w>>2]=L+(~((L+-8-ba|0)>>>3)<<3);gn(ca)}ca=f[d>>2]|0;if(ca|0){d=f[q>>2]|0;if((d|0)!=(ca|0))f[q>>2]=d+(~((d+-4-ca|0)>>>2)<<2);gn(ca)}h=1;u=c;return h|0}function Ab(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!a)return;b=a+-8|0;c=f[3304]|0;d=f[a+-4>>2]|0;a=d&-8;e=b+a|0;do if(!(d&1)){g=f[b>>2]|0;if(!(d&3))return;h=b+(0-g)|0;i=g+a|0;if(h>>>0<c>>>0)return;if((f[3305]|0)==(h|0)){j=e+4|0;k=f[j>>2]|0;if((k&3|0)!=3){l=h;m=i;n=h;break}f[3302]=i;f[j>>2]=k&-2;f[h+4>>2]=i|1;f[h+i>>2]=i;return}k=g>>>3;if(g>>>0<256){g=f[h+8>>2]|0;j=f[h+12>>2]|0;if((j|0)==(g|0)){f[3300]=f[3300]&~(1<<k);l=h;m=i;n=h;break}else{f[g+12>>2]=j;f[j+8>>2]=g;l=h;m=i;n=h;break}}g=f[h+24>>2]|0;j=f[h+12>>2]|0;do if((j|0)==(h|0)){k=h+16|0;o=k+4|0;p=f[o>>2]|0;if(!p){q=f[k>>2]|0;if(!q){r=0;break}else{s=q;t=k}}else{s=p;t=o}while(1){o=s+20|0;p=f[o>>2]|0;if(p|0){s=p;t=o;continue}o=s+16|0;p=f[o>>2]|0;if(!p)break;else{s=p;t=o}}f[t>>2]=0;r=s}else{o=f[h+8>>2]|0;f[o+12>>2]=j;f[j+8>>2]=o;r=j}while(0);if(g){j=f[h+28>>2]|0;o=13504+(j<<2)|0;if((f[o>>2]|0)==(h|0)){f[o>>2]=r;if(!r){f[3301]=f[3301]&~(1<<j);l=h;m=i;n=h;break}}else{f[g+16+(((f[g+16>>2]|0)!=(h|0)&1)<<2)>>2]=r;if(!r){l=h;m=i;n=h;break}}f[r+24>>2]=g;j=h+16|0;o=f[j>>2]|0;if(o|0){f[r+16>>2]=o;f[o+24>>2]=r}o=f[j+4>>2]|0;if(o){f[r+20>>2]=o;f[o+24>>2]=r;l=h;m=i;n=h}else{l=h;m=i;n=h}}else{l=h;m=i;n=h}}else{l=b;m=a;n=b}while(0);if(n>>>0>=e>>>0)return;b=e+4|0;a=f[b>>2]|0;if(!(a&1))return;if(!(a&2)){if((f[3306]|0)==(e|0)){r=(f[3303]|0)+m|0;f[3303]=r;f[3306]=l;f[l+4>>2]=r|1;if((l|0)!=(f[3305]|0))return;f[3305]=0;f[3302]=0;return}if((f[3305]|0)==(e|0)){r=(f[3302]|0)+m|0;f[3302]=r;f[3305]=n;f[l+4>>2]=r|1;f[n+r>>2]=r;return}r=(a&-8)+m|0;s=a>>>3;do if(a>>>0<256){t=f[e+8>>2]|0;c=f[e+12>>2]|0;if((c|0)==(t|0)){f[3300]=f[3300]&~(1<<s);break}else{f[t+12>>2]=c;f[c+8>>2]=t;break}}else{t=f[e+24>>2]|0;c=f[e+12>>2]|0;do if((c|0)==(e|0)){d=e+16|0;o=d+4|0;j=f[o>>2]|0;if(!j){p=f[d>>2]|0;if(!p){u=0;break}else{v=p;w=d}}else{v=j;w=o}while(1){o=v+20|0;j=f[o>>2]|0;if(j|0){v=j;w=o;continue}o=v+16|0;j=f[o>>2]|0;if(!j)break;else{v=j;w=o}}f[w>>2]=0;u=v}else{o=f[e+8>>2]|0;f[o+12>>2]=c;f[c+8>>2]=o;u=c}while(0);if(t|0){c=f[e+28>>2]|0;h=13504+(c<<2)|0;if((f[h>>2]|0)==(e|0)){f[h>>2]=u;if(!u){f[3301]=f[3301]&~(1<<c);break}}else{f[t+16+(((f[t+16>>2]|0)!=(e|0)&1)<<2)>>2]=u;if(!u)break}f[u+24>>2]=t;c=e+16|0;h=f[c>>2]|0;if(h|0){f[u+16>>2]=h;f[h+24>>2]=u}h=f[c+4>>2]|0;if(h|0){f[u+20>>2]=h;f[h+24>>2]=u}}}while(0);f[l+4>>2]=r|1;f[n+r>>2]=r;if((l|0)==(f[3305]|0)){f[3302]=r;return}else x=r}else{f[b>>2]=a&-2;f[l+4>>2]=m|1;f[n+m>>2]=m;x=m}m=x>>>3;if(x>>>0<256){n=13240+(m<<1<<2)|0;a=f[3300]|0;b=1<<m;if(!(a&b)){f[3300]=a|b;y=n;z=n+8|0}else{b=n+8|0;y=f[b>>2]|0;z=b}f[z>>2]=l;f[y+12>>2]=l;f[l+8>>2]=y;f[l+12>>2]=n;return}n=x>>>8;if(n)if(x>>>0>16777215)A=31;else{y=(n+1048320|0)>>>16&8;z=n<<y;n=(z+520192|0)>>>16&4;b=z<<n;z=(b+245760|0)>>>16&2;a=14-(n|y|z)+(b<<z>>>15)|0;A=x>>>(a+7|0)&1|a<<1}else A=0;a=13504+(A<<2)|0;f[l+28>>2]=A;f[l+20>>2]=0;f[l+16>>2]=0;z=f[3301]|0;b=1<<A;do if(z&b){y=x<<((A|0)==31?0:25-(A>>>1)|0);n=f[a>>2]|0;while(1){if((f[n+4>>2]&-8|0)==(x|0)){B=73;break}C=n+16+(y>>>31<<2)|0;m=f[C>>2]|0;if(!m){B=72;break}else{y=y<<1;n=m}}if((B|0)==72){f[C>>2]=l;f[l+24>>2]=n;f[l+12>>2]=l;f[l+8>>2]=l;break}else if((B|0)==73){y=n+8|0;t=f[y>>2]|0;f[t+12>>2]=l;f[y>>2]=l;f[l+8>>2]=t;f[l+12>>2]=n;f[l+24>>2]=0;break}}else{f[3301]=z|b;f[a>>2]=l;f[l+24>>2]=a;f[l+12>>2]=l;f[l+8>>2]=l}while(0);l=(f[3308]|0)+-1|0;f[3308]=l;if(!l)D=13656;else return;while(1){l=f[D>>2]|0;if(!l)break;else D=l+8|0}f[3308]=-1;return}function Bb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=La,F=La,G=La,H=0,I=0,J=0,K=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;e=i;j=i;while(1){k=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;e=(X(k>>>24^k,1540483477)|0)^(X(e,1540483477)|0);j=j+-4|0;if(j>>>0<=3)break;else d=d+4|0}d=i+-4|0;j=d&-4;l=d-j|0;m=g+(j+4)|0;o=e}else{l=i;m=g;o=i}switch(l|0){case 3:{p=h[m+2>>0]<<16^o;q=6;break}case 2:{p=o;q=6;break}case 1:{r=o;q=7;break}default:s=o}if((q|0)==6){r=h[m+1>>0]<<8^p;q=7}if((q|0)==7)s=X(r^h[m>>0],1540483477)|0;m=X(s>>>13^s,1540483477)|0;s=m>>>15^m;m=a+4|0;r=f[m>>2]|0;p=(r|0)==0;a:do if(!p){o=r+-1|0;l=(o&r|0)==0;if(!l)if(s>>>0<r>>>0)t=s;else t=(s>>>0)%(r>>>0)|0;else t=s&o;e=f[(f[a>>2]|0)+(t<<2)>>2]|0;if((e|0)!=0?(j=f[e>>2]|0,(j|0)!=0):0){e=(i|0)==0;if(l){if(e){l=j;while(1){d=f[l+4>>2]|0;if(!((d|0)==(s|0)|(d&o|0)==(t|0))){u=t;break a}d=b[l+8+11>>0]|0;if(!((d<<24>>24<0?f[l+12>>2]|0:d&255)|0)){v=l;break}l=f[l>>2]|0;if(!l){u=t;break a}}w=v+20|0;return w|0}else x=j;b:while(1){l=f[x+4>>2]|0;if(!((l|0)==(s|0)|(l&o|0)==(t|0))){u=t;break a}l=x+8|0;d=b[l+11>>0]|0;k=d<<24>>24<0;y=d&255;do if(((k?f[x+12>>2]|0:y)|0)==(i|0)){d=f[l>>2]|0;if(k)if(!(oh(d,g,i)|0)){v=x;q=63;break b}else break;if((b[g>>0]|0)==(d&255)<<24>>24){d=l;z=y;A=g;do{z=z+-1|0;d=d+1|0;if(!z){v=x;q=63;break b}A=A+1|0}while((b[d>>0]|0)==(b[A>>0]|0))}}while(0);x=f[x>>2]|0;if(!x){u=t;break a}}if((q|0)==63){w=v+20|0;return w|0}}if(e){o=j;while(1){y=f[o+4>>2]|0;if((y|0)!=(s|0)){if(y>>>0<r>>>0)B=y;else B=(y>>>0)%(r>>>0)|0;if((B|0)!=(t|0)){u=t;break a}}y=b[o+8+11>>0]|0;if(!((y<<24>>24<0?f[o+12>>2]|0:y&255)|0)){v=o;break}o=f[o>>2]|0;if(!o){u=t;break a}}w=v+20|0;return w|0}else C=j;c:while(1){o=f[C+4>>2]|0;if((o|0)!=(s|0)){if(o>>>0<r>>>0)D=o;else D=(o>>>0)%(r>>>0)|0;if((D|0)!=(t|0)){u=t;break a}}o=C+8|0;e=b[o+11>>0]|0;y=e<<24>>24<0;l=e&255;do if(((y?f[C+12>>2]|0:l)|0)==(i|0)){e=f[o>>2]|0;if(y)if(!(oh(e,g,i)|0)){v=C;q=63;break c}else break;if((b[g>>0]|0)==(e&255)<<24>>24){e=o;k=l;A=g;do{k=k+-1|0;e=e+1|0;if(!k){v=C;q=63;break c}A=A+1|0}while((b[e>>0]|0)==(b[A>>0]|0))}}while(0);C=f[C>>2]|0;if(!C){u=t;break a}}if((q|0)==63){w=v+20|0;return w|0}}else u=t}else u=0;while(0);t=dj(24)|0;Qf(t+8|0,c);f[t+20>>2]=0;f[t+4>>2]=s;f[t>>2]=0;c=a+12|0;E=$(((f[c>>2]|0)+1|0)>>>0);F=$(r>>>0);G=$(n[a+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>2]|0;if((((f[a+220>>2]|0)-y|0)/144|0)>>>0<=x>>>0){s=0;u=d;return s|0}z=y+(x*144|0)|0;if((f[z>>2]|0)>-1){s=0;u=d;return s|0}else A=z}else{z=a+212|0;if((f[z>>2]|0)>-1){s=0;u=d;return s|0}else A=z}f[A>>2]=c;do if((((h[k+36>>0]|0)<<8|(h[k+37>>0]|0))&65535)>257)if((o|0)>(w|0)|(o|0)==(w|0)&n>>>0>t>>>0){A=b[p+t>>0]|0;z=Uj(q|0,r|0,3,0)|0;x=m;f[x>>2]=z;f[x+4>>2]=I;B=A&255;break}else{s=0;u=d;return s|0}else B=0;while(0);m=f[k+44>>2]|0;if(!(v<<24>>24)){if(l<<24>>24<0)C=a+184|0;else{v=l<<24>>24;k=f[a+216>>2]|0;b[k+(v*144|0)+100>>0]=0;C=k+(v*144|0)+104|0}switch((B&255)<<24>>24){case 1:{md(e,a,C);D=f[e>>2]|0;break}case 0:{Zc(e,a,C);D=f[e>>2]|0;break}default:{s=0;u=d;return s|0}}if(!D){s=0;u=d;return s|0}else E=D}else{if(l<<24>>24<0|(B|0)!=0){s=0;u=d;return s|0}B=l<<24>>24;l=f[a+216>>2]|0;a=l+(B*144|0)+104|0;D=l+(B*144|0)+4|0;C=dj(80)|0;f[C+4>>2]=0;f[C>>2]=2396;v=C+8|0;k=C+12|0;r=k+44|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(r|0));f[v>>2]=2420;q=C+56|0;f[q>>2]=0;f[C+60>>2]=0;f[C+64>>2]=0;f[C+68>>2]=m;f[C+72>>2]=a;f[C+76>>2]=0;t=g+4|0;k=t+4|0;r=k+40|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(r|0));f[g>>2]=2420;k=g+48|0;f[k>>2]=0;r=g+52|0;f[r>>2]=0;f[g+56>>2]=0;f[t>>2]=D;p=f[l+(B*144|0)+68>>2]|0;B=((f[p+4>>2]|0)-(f[p>>2]|0)>>2>>>0)/3|0;b[e>>0]=0;ge(g+24|0,B,e);B=f[t>>2]|0;t=(f[B+56>>2]|0)-(f[B+52>>2]|0)>>2;b[e>>0]=0;ge(g+36|0,t,e);f[g+8>>2]=D;f[g+12>>2]=a;f[g+16>>2]=m;f[g+20>>2]=C;gd(v,g)|0;vd(q,f[k>>2]|0,f[r>>2]|0);q=C;f[g>>2]=2420;C=f[k>>2]|0;if(C|0){k=f[r>>2]|0;if((k|0)!=(C|0))f[r>>2]=k+(~((k+-4-C|0)>>>2)<<2);gn(C)}f[g>>2]=2440;C=f[g+36>>2]|0;if(C|0)gn(C);C=f[g+24>>2]|0;if(C|0)gn(C);E=q}q=dj(64)|0;f[i>>2]=E;Eh(q,i);E=q;C=f[i>>2]|0;f[i>>2]=0;if(C|0)Sa[f[(f[C>>2]|0)+4>>2]&127](C);C=f[j>>2]|0;if((c|0)<0){Sa[f[(f[q>>2]|0)+4>>2]&127](q);s=0;u=d;return s|0}q=C+8|0;j=C+12|0;C=f[j>>2]|0;i=f[q>>2]|0;g=C-i>>2;do if((g|0)<=(c|0)){k=c+1|0;r=C;if(k>>>0>g>>>0){Hd(q,k-g|0);break}if(k>>>0<g>>>0?(v=i+(k<<2)|0,(v|0)!=(r|0)):0){k=r;do{r=k+-4|0;f[j>>2]=r;m=f[r>>2]|0;f[r>>2]=0;if(m|0)Sa[f[(f[m>>2]|0)+4>>2]&127](m);k=f[j>>2]|0}while((k|0)!=(v|0))}}while(0);j=(f[q>>2]|0)+(c<<2)|0;c=f[j>>2]|0;f[j>>2]=E;if(!c){s=1;u=d;return s|0}Sa[f[(f[c>>2]|0)+4>>2]&127](c);s=1;u=d;return s|0}function Db(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;g=a+8|0;f[g>>2]=e;d=a+32|0;h=a+36|0;i=f[h>>2]|0;j=f[d>>2]|0;k=i-j>>2;l=j;j=i;if(k>>>0>=e>>>0)if(k>>>0>e>>>0?(i=l+(e<<2)|0,(i|0)!=(j|0)):0){f[h>>2]=j+(~((j+-4-i|0)>>>2)<<2);m=e}else m=e;else{ef(d,e-k|0);m=f[g>>2]|0}k=f[a+48>>2]|0;d=f[a+52>>2]|0;i=e>>>0>1073741823?-1:e<<2;j=dn(i)|0;Uf(j|0,0,i|0)|0;if((m|0)>0){i=a+16|0;h=a+32|0;l=a+12|0;n=0;do{o=f[j+(n<<2)>>2]|0;p=f[i>>2]|0;if((o|0)>(p|0)){q=f[h>>2]|0;f[q+(n<<2)>>2]=p;r=q}else{q=f[l>>2]|0;p=f[h>>2]|0;f[p+(n<<2)>>2]=(o|0)<(q|0)?q:o;r=p}n=n+1|0;s=f[g>>2]|0}while((n|0)<(s|0));if((s|0)>0){n=a+20|0;h=0;do{p=(f[b+(h<<2)>>2]|0)+(f[r+(h<<2)>>2]|0)|0;o=c+(h<<2)|0;f[o>>2]=p;if((p|0)<=(f[i>>2]|0)){if((p|0)<(f[l>>2]|0)){t=(f[n>>2]|0)+p|0;u=18}}else{t=p-(f[n>>2]|0)|0;u=18}if((u|0)==18){u=0;f[o>>2]=t}h=h+1|0;o=f[g>>2]|0}while((h|0)<(o|0));v=o}else v=s}else v=m;m=f[a+56>>2]|0;s=f[m>>2]|0;h=(f[m+4>>2]|0)-s|0;t=h>>2;if((h|0)<=4){en(j);return 1}h=a+16|0;n=a+32|0;l=a+12|0;i=a+20|0;a=k+12|0;r=(e|0)>0;o=s;s=1;p=v;while(1){if(t>>>0<=s>>>0){u=24;break}v=f[o+(s<<2)>>2]|0;q=X(s,e)|0;if((v|0)!=-1?(w=f[(f[a>>2]|0)+(v<<2)>>2]|0,(w|0)!=-1):0){v=f[k>>2]|0;x=f[d>>2]|0;y=f[x+(f[v+(w<<2)>>2]<<2)>>2]|0;z=w+1|0;A=((z>>>0)%3|0|0)==0?w+-2|0:z;if((A|0)==-1)B=-1;else B=f[v+(A<<2)>>2]|0;A=f[x+(B<<2)>>2]|0;z=(((w>>>0)%3|0|0)==0?2:-1)+w|0;if((z|0)==-1)C=-1;else C=f[v+(z<<2)>>2]|0;z=f[x+(C<<2)>>2]|0;if((y|0)<(s|0)&(A|0)<(s|0)&(z|0)<(s|0)){x=X(y,e)|0;y=X(A,e)|0;A=X(z,e)|0;if(r){z=0;do{f[j+(z<<2)>>2]=(f[c+(z+A<<2)>>2]|0)+(f[c+(z+y<<2)>>2]|0)-(f[c+(z+x<<2)>>2]|0);z=z+1|0}while((z|0)!=(e|0))}z=b+(q<<2)|0;x=c+(q<<2)|0;if((p|0)>0){y=0;do{A=f[j+(y<<2)>>2]|0;v=f[h>>2]|0;if((A|0)>(v|0)){w=f[n>>2]|0;f[w+(y<<2)>>2]=v;D=w}else{w=f[l>>2]|0;v=f[n>>2]|0;f[v+(y<<2)>>2]=(A|0)<(w|0)?w:A;D=v}y=y+1|0;E=f[g>>2]|0}while((y|0)<(E|0));if((E|0)>0){y=0;do{v=(f[z+(y<<2)>>2]|0)+(f[D+(y<<2)>>2]|0)|0;A=x+(y<<2)|0;f[A>>2]=v;if((v|0)<=(f[h>>2]|0)){if((v|0)<(f[l>>2]|0)){F=(f[i>>2]|0)+v|0;u=56}}else{F=v-(f[i>>2]|0)|0;u=56}if((u|0)==56){u=0;f[A>>2]=F}y=y+1|0;A=f[g>>2]|0}while((y|0)<(A|0));G=A}else G=E}else G=p}else u=34}else u=34;if((u|0)==34){u=0;y=c+((X(s+-1|0,e)|0)<<2)|0;x=b+(q<<2)|0;z=c+(q<<2)|0;if((p|0)>0){A=0;do{v=f[y+(A<<2)>>2]|0;w=f[h>>2]|0;if((v|0)>(w|0)){H=f[n>>2]|0;f[H+(A<<2)>>2]=w;I=H}else{H=f[l>>2]|0;w=f[n>>2]|0;f[w+(A<<2)>>2]=(v|0)<(H|0)?H:v;I=w}A=A+1|0;J=f[g>>2]|0}while((A|0)<(J|0));if((J|0)>0){A=0;do{y=(f[x+(A<<2)>>2]|0)+(f[I+(A<<2)>>2]|0)|0;q=z+(A<<2)|0;f[q>>2]=y;if((y|0)<=(f[h>>2]|0)){if((y|0)<(f[l>>2]|0)){K=(f[i>>2]|0)+y|0;u=44}}else{K=y-(f[i>>2]|0)|0;u=44}if((u|0)==44){u=0;f[q>>2]=K}A=A+1|0;q=f[g>>2]|0}while((A|0)<(q|0));G=q}else G=J}else G=p}s=s+1|0;if((s|0)>=(t|0)){u=22;break}else p=G}if((u|0)==22){en(j);return 1}else if((u|0)==24)xm(m);return 0}function Eb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;g=a+8|0;f[g>>2]=e;d=a+32|0;h=a+36|0;i=f[h>>2]|0;j=f[d>>2]|0;k=i-j>>2;l=j;j=i;if(k>>>0>=e>>>0)if(k>>>0>e>>>0?(i=l+(e<<2)|0,(i|0)!=(j|0)):0){f[h>>2]=j+(~((j+-4-i|0)>>>2)<<2);m=e}else m=e;else{ef(d,e-k|0);m=f[g>>2]|0}k=f[a+48>>2]|0;d=f[a+52>>2]|0;i=e>>>0>1073741823?-1:e<<2;j=dn(i)|0;Uf(j|0,0,i|0)|0;if((m|0)>0){i=a+16|0;h=a+32|0;l=a+12|0;n=0;do{o=f[j+(n<<2)>>2]|0;p=f[i>>2]|0;if((o|0)>(p|0)){q=f[h>>2]|0;f[q+(n<<2)>>2]=p;r=q}else{q=f[l>>2]|0;p=f[h>>2]|0;f[p+(n<<2)>>2]=(o|0)<(q|0)?q:o;r=p}n=n+1|0;s=f[g>>2]|0}while((n|0)<(s|0));if((s|0)>0){n=a+20|0;h=0;do{p=(f[b+(h<<2)>>2]|0)+(f[r+(h<<2)>>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y:B;C=v}z=z+1|0;D=f[g>>2]|0}while((z|0)<(D|0));if((D|0)>0){z=0;do{v=(f[A+(z<<2)>>2]|0)+(f[C+(z<<2)>>2]|0)|0;B=x+(z<<2)|0;f[B>>2]=v;if((v|0)<=(f[h>>2]|0)){if((v|0)<(f[l>>2]|0)){E=(f[i>>2]|0)+v|0;u=53}}else{E=v-(f[i>>2]|0)|0;u=53}if((u|0)==53){u=0;f[B>>2]=E}z=z+1|0;B=f[g>>2]|0}while((z|0)<(B|0));F=B}else F=D}else F=q}else{z=c+((X(s+-1|0,e)|0)<<2)|0;x=b+(w<<2)|0;A=c+(w<<2)|0;if((q|0)>0){B=0;do{v=f[z+(B<<2)>>2]|0;y=f[h>>2]|0;if((v|0)>(y|0)){G=f[n>>2]|0;f[G+(B<<2)>>2]=y;H=G}else{G=f[l>>2]|0;y=f[n>>2]|0;f[y+(B<<2)>>2]=(v|0)<(G|0)?G:v;H=y}B=B+1|0;I=f[g>>2]|0}while((B|0)<(I|0));if((I|0)>0){B=0;do{z=(f[x+(B<<2)>>2]|0)+(f[H+(B<<2)>>2]|0)|0;w=A+(B<<2)|0;f[w>>2]=z;if((z|0)<=(f[h>>2]|0)){if((z|0)<(f[l>>2]|0)){J=(f[i>>2]|0)+z|0;u=41}}else{J=z-(f[i>>2]|0)|0;u=41}if((u|0)==41){u=0;f[w>>2]=J}B=B+1|0;w=f[g>>2]|0}while((B|0)<(w|0));F=w}else F=I}else F=q}s=s+1|0;if((s|0)>=(t|0)){u=22;break}else q=F}if((u|0)==22){en(j);return 1}else if((u|0)==24)xm(m);return 0}function Fb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;c=u;u=u+16|0;d=c;e=f[b>>2]|0;b=a+8|0;g=e+1|0;if((e|0)!=-1){h=((g>>>0)%3|0|0)==0?e+-2|0:g;g=e+(((e>>>0)%3|0|0)==0?2:-1)|0;i=(e>>>0)/3|0;j=a+216|0;k=a+220|0;l=a+368|0;m=f[(f[(f[b>>2]|0)+12>>2]|0)+(e<<2)>>2]|0;if((m|0)!=-1)if(((m>>>0)/3|0)>>>0>=i>>>0?(f[k>>2]|0)!=(f[j>>2]|0):0){m=0;do{if(Wg((f[l>>2]|0)+(m<<4)|0)|0){n=f[j>>2]|0;f[d>>2]=e;o=n+(m*144|0)+136|0;p=f[o>>2]|0;if(p>>>0<(f[n+(m*144|0)+140>>2]|0)>>>0){f[p>>2]=e;f[o>>2]=p+4}else wf(n+(m*144|0)+132|0,d)}m=m+1|0}while(m>>>0<(((f[k>>2]|0)-(f[j>>2]|0)|0)/144|0)>>>0);q=i;r=g;s=d;t=d;v=h;w=k;x=j;y=l;z=j}else{q=i;r=g;s=d;t=d;v=h;w=k;x=j;y=l;z=j}else{A=i;B=d;C=d;D=j;E=l;F=g;G=h;H=k;I=j;J=4}}else{j=a+216|0;A=-1;B=d;C=d;D=j;E=a+368|0;F=-1;G=-1;H=a+220|0;I=j;J=4}if((J|0)==4){j=f[H>>2]|0;a=f[I>>2]|0;if((j|0)==(a|0)){q=A;r=F;s=B;t=C;v=G;w=H;x=I;y=E;z=D}else{k=0;h=j;j=a;while(1){a=j;f[d>>2]=e;g=a+(k*144|0)+136|0;l=f[g>>2]|0;if(l>>>0<(f[a+(k*144|0)+140>>2]|0)>>>0){f[l>>2]=e;f[g>>2]=l+4;K=j;L=h}else{wf(a+(k*144|0)+132|0,d);K=f[I>>2]|0;L=f[H>>2]|0}k=k+1|0;if(k>>>0>=((L-K|0)/144|0)>>>0){q=A;r=F;s=B;t=C;v=G;w=H;x=I;y=E;z=D;break}else{h=L;j=K}}}}if((v|0)!=-1?(K=f[(f[(f[b>>2]|0)+12>>2]|0)+(v<<2)>>2]|0,(K|0)!=-1):0){if(((K>>>0)/3|0)>>>0>=q>>>0?(f[w>>2]|0)!=(f[x>>2]|0):0){K=0;do{if(Wg((f[y>>2]|0)+(K<<4)|0)|0){j=f[z>>2]|0;f[d>>2]=v;L=j+(K*144|0)+136|0;h=f[L>>2]|0;if(h>>>0<(f[j+(K*144|0)+140>>2]|0)>>>0){f[h>>2]=v;f[L>>2]=h+4}else wf(j+(K*144|0)+132|0,d)}K=K+1|0}while(K>>>0<(((f[w>>2]|0)-(f[x>>2]|0)|0)/144|0)>>>0)}}else J=27;if((J|0)==27?(J=f[w>>2]|0,K=f[x>>2]|0,(J|0)!=(K|0)):0){j=0;h=K;K=J;while(1){J=h;f[d>>2]=v;L=J+(j*144|0)+136|0;D=f[L>>2]|0;if(D>>>0<(f[J+(j*144|0)+140>>2]|0)>>>0){f[D>>2]=v;f[L>>2]=D+4;M=h;N=K}else{wf(J+(j*144|0)+132|0,d);M=f[x>>2]|0;N=f[w>>2]|0}j=j+1|0;if(j>>>0>=((N-M|0)/144|0)>>>0)break;else{h=M;K=N}}}if((r|0)!=-1?(N=f[(f[(f[b>>2]|0)+12>>2]|0)+(r<<2)>>2]|0,(N|0)!=-1):0){if(((N>>>0)/3|0)>>>0<q>>>0){u=c;return 1}if((f[w>>2]|0)==(f[x>>2]|0)){u=c;return 1}else O=0;do{if(Wg((f[y>>2]|0)+(O<<4)|0)|0){q=f[z>>2]|0;f[d>>2]=r;N=q+(O*144|0)+136|0;b=f[N>>2]|0;if(b>>>0<(f[q+(O*144|0)+140>>2]|0)>>>0){f[b>>2]=r;f[N>>2]=b+4}else wf(q+(O*144|0)+132|0,d)}O=O+1|0}while(O>>>0<(((f[w>>2]|0)-(f[x>>2]|0)|0)/144|0)>>>0);u=c;return 1}O=f[w>>2]|0;z=f[x>>2]|0;if((O|0)==(z|0)){u=c;return 1}else{P=0;Q=z;R=O}while(1){O=Q;f[d>>2]=r;z=O+(P*144|0)+136|0;y=f[z>>2]|0;if(y>>>0<(f[O+(P*144|0)+140>>2]|0)>>>0){f[y>>2]=r;f[z>>2]=y+4;S=Q;T=R}else{wf(O+(P*144|0)+132|0,d);S=f[x>>2]|0;T=f[w>>2]|0}P=P+1|0;if(P>>>0>=((T-S|0)/144|0)>>>0)break;else{Q=S;R=T}}u=c;return 1}function Gb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=u;u=u+16|0;g=e;i=c+8|0;j=i;k=f[j>>2]|0;l=f[j+4>>2]|0;j=c+16|0;m=j;n=f[m>>2]|0;o=Uj(n|0,f[m+4>>2]|0,5,0)|0;m=I;if((l|0)<(m|0)|(l|0)==(m|0)&k>>>0<o>>>0){o=dj(32)|0;f[g>>2]=o;f[g+8>>2]=-2147483616;f[g+4>>2]=29;p=o;q=9816;r=p+29|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[o+29>>0]=0;f[a>>2]=-2;Qf(a+4|0,g);if((b[g+11>>0]|0)<0)gn(f[g>>2]|0);u=e;return}o=(f[c>>2]|0)+n|0;b[d>>0]=b[o>>0]|0;b[d+1>>0]=b[o+1>>0]|0;b[d+2>>0]=b[o+2>>0]|0;b[d+3>>0]=b[o+3>>0]|0;b[d+4>>0]=b[o+4>>0]|0;o=j;n=Uj(f[o>>2]|0,f[o+4>>2]|0,5,0)|0;o=I;k=j;f[k>>2]=n;f[k+4>>2]=o;if(oh(d,9846,5)|0){k=dj(32)|0;f[g>>2]=k;f[g+8>>2]=-2147483616;f[g+4>>2]=17;p=k;q=9852;r=p+17|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[k+17>>0]=0;f[a>>2]=-1;Qf(a+4|0,g);if((b[g+11>>0]|0)<0)gn(f[g>>2]|0);u=e;return}k=i;m=f[k+4>>2]|0;if(!((m|0)>(o|0)|((m|0)==(o|0)?(f[k>>2]|0)>>>0>n>>>0:0))){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b<<2)>>2]|0)+60>>2]|0;g=e+4|0;if((g|0)!=(h|0)){j=g;g=e;do{k=f[j>>2]|0;f[j>>2]=0;l=f[g>>2]|0;f[g>>2]=k;if(l|0){k=l+88|0;m=f[k>>2]|0;f[k>>2]=0;if(m|0){k=f[m+8>>2]|0;if(k|0){n=m+12|0;if((f[n>>2]|0)!=(k|0))f[n>>2]=k;gn(k)}gn(m)}m=f[l+68>>2]|0;if(m|0){k=l+72|0;n=f[k>>2]|0;if((n|0)!=(m|0))f[k>>2]=n+(~((n+-4-m|0)>>>2)<<2);gn(m)}m=l+64|0;n=f[m>>2]|0;f[m>>2]=0;if(n|0){m=f[n>>2]|0;if(m|0){k=n+4|0;if((f[k>>2]|0)!=(m|0))f[k>>2]=m;gn(m)}gn(n)}gn(l)}j=j+4|0;g=g+4|0}while((j|0)!=(h|0));j=f[c>>2]|0;if((j|0)!=(g|0)){o=g;p=j;q=24}}else{o=e;p=h;q=24}if((q|0)==24){q=p;do{p=q+-4|0;f[c>>2]=p;h=f[p>>2]|0;f[p>>2]=0;if(h|0){p=h+88|0;e=f[p>>2]|0;f[p>>2]=0;if(e|0){p=f[e+8>>2]|0;if(p|0){j=e+12|0;if((f[j>>2]|0)!=(p|0))f[j>>2]=p;gn(p)}gn(e)}e=f[h+68>>2]|0;if(e|0){p=h+72|0;j=f[p>>2]|0;if((j|0)!=(e|0))f[p>>2]=j+(~((j+-4-e|0)>>>2)<<2);gn(e)}e=h+64|0;j=f[e>>2]|0;f[e>>2]=0;if(j|0){e=f[j>>2]|0;if(e|0){p=j+4|0;if((f[p>>2]|0)!=(e|0))f[p>>2]=e;gn(e)}gn(j)}gn(h)}q=f[c>>2]|0}while((q|0)!=(o|0))}o=f[a+4>>2]|0;a:do if(o|0){q=o+44|0;c=f[q>>2]|0;h=f[o+40>>2]|0;while(1){if((h|0)==(c|0))break a;r=h+4|0;if((f[(f[h>>2]|0)+40>>2]|0)==(i|0))break;else h=r}if((r|0)!=(c|0)){j=r;e=h;do{p=f[j>>2]|0;f[j>>2]=0;g=f[e>>2]|0;f[e>>2]=p;if(g|0){Bf(g);gn(g)}j=j+4|0;e=e+4|0}while((j|0)!=(c|0));j=f[q>>2]|0;if((j|0)==(e|0))break;else{s=e;t=j}}else{s=h;t=c}j=t;do{g=j+-4|0;f[q>>2]=g;p=f[g>>2]|0;f[g>>2]=0;if(p|0){Bf(p);gn(p)}j=f[q>>2]|0}while((j|0)!=(s|0))}while(0);b:do if((d|0)<5){s=f[a+20+(d*12|0)>>2]|0;t=a+20+(d*12|0)+4|0;r=f[t>>2]|0;i=r;c:do if((s|0)==(r|0))u=s;else{o=s;while(1){if((f[o>>2]|0)==(b|0)){u=o;break c}o=o+4|0;if((o|0)==(r|0))break b}}while(0);if((u|0)!=(r|0)){s=u+4|0;o=i-s|0;j=o>>2;if(!j)v=r;else{qi(u|0,s|0,o|0)|0;v=f[t>>2]|0}o=u+(j<<2)|0;if((v|0)!=(o|0))f[t>>2]=v+(~((v+-4-o|0)>>>2)<<2)}}while(0);v=f[a+24>>2]|0;u=f[a+20>>2]|0;d=u;if((v|0)!=(u|0)){o=v-u>>2;u=0;do{v=d+(u<<2)|0;j=f[v>>2]|0;if((j|0)>(b|0))f[v>>2]=j+-1;u=u+1|0}while(u>>>0<o>>>0)}o=f[a+36>>2]|0;u=f[a+32>>2]|0;d=u;if((o|0)!=(u|0)){j=o-u>>2;u=0;do{o=d+(u<<2)|0;v=f[o>>2]|0;if((v|0)>(b|0))f[o>>2]=v+-1;u=u+1|0}while(u>>>0<j>>>0)}j=f[a+48>>2]|0;u=f[a+44>>2]|0;d=u;if((j|0)!=(u|0)){v=j-u>>2;u=0;do{j=d+(u<<2)|0;o=f[j>>2]|0;if((o|0)>(b|0))f[j>>2]=o+-1;u=u+1|0}while(u>>>0<v>>>0)}v=f[a+60>>2]|0;u=f[a+56>>2]|0;d=u;if((v|0)!=(u|0)){o=v-u>>2;u=0;do{v=d+(u<<2)|0;j=f[v>>2]|0;if((j|0)>(b|0))f[v>>2]=j+-1;u=u+1|0}while(u>>>0<o>>>0)}o=f[a+72>>2]|0;u=f[a+68>>2]|0;a=u;if((o|0)==(u|0))return;d=o-u>>2;u=0;do{o=a+(u<<2)|0;j=f[o>>2]|0;if((j|0)>(b|0))f[o>>2]=j+-1;u=u+1|0}while(u>>>0<d>>>0);return}
+function lf(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=f[a+4>>2]|0;c=a+8|0;d=f[c>>2]|0;if((d|0)!=(b|0)){e=d;do{f[c>>2]=e+-144;d=f[e+-12>>2]|0;if(d|0){g=e+-8|0;h=f[g>>2]|0;if((h|0)!=(d|0))f[g>>2]=h+(~((h+-4-d|0)>>>2)<<2);gn(d)}d=f[e+-28>>2]|0;if(d|0){h=e+-24|0;g=f[h>>2]|0;if((g|0)!=(d|0))f[h>>2]=g+(~((g+-4-d|0)>>>2)<<2);gn(d)}d=f[e+-40>>2]|0;if(d|0){g=e+-36|0;h=f[g>>2]|0;if((h|0)!=(d|0))f[g>>2]=h+(~((h+-4-d|0)>>>2)<<2);gn(d)}tf(e+-140|0);e=f[c>>2]|0}while((e|0)!=(b|0))}b=f[a>>2]|0;if(!b)return;gn(b);return}function mf(a){a=a|0;var b=0,c=0,d=0;b=f[a+76>>2]|0;if(b|0){c=a+80|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+64>>2]|0;if(b|0){d=a+68|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;gn(b)}b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+24>>2]|0;if(b|0){c=a+28|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+12>>2]|0;if(b|0){d=a+16|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a>>2]|0;if(!b)return;c=a+4|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);gn(b);return}function nf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a=u;u=u+32|0;e=a+12|0;g=a;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=fg(d)|0;if(h>>>0>4294967279)xm(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=dj(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){be(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;h=Rf(c,g,e)|0;if((b[g+11>>0]|0)<0)gn(f[g>>2]|0);if((b[e+11>>0]|0)>=0){u=a;return h|0}gn(f[e>>2]|0);u=a;return h|0}function of(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=u;u=u+16|0;g=e;h=c+11|0;i=b[h>>0]|0;if(i<<24>>24<0)j=f[c+4>>2]|0;else j=i&255;k=j;j=i;while(1){if(j<<24>>24<0)l=f[c>>2]|0;else l=c;f[g>>2]=d;m=wj(l,k+1|0,12624,g)|0;if((m|0)>-1)if(m>>>0>k>>>0)n=m;else break;else n=k<<1|1;gg(c,n,0);k=n;j=b[h>>0]|0}gg(c,m,0);f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];a=0;while(1){if((a|0)==3)break;f[c+(a<<2)>>2]=0;a=a+1|0}u=e;return}function pf(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;b=a+8|0;c=f[b>>2]|0;if((c|0)<0){d=0;return d|0}e=a+4|0;a=f[e>>2]|0;g=a+4|0;h=f[g>>2]|0;i=f[a>>2]|0;j=h-i>>2;k=i;i=h;if(c>>>0<=j>>>0)if(c>>>0<j>>>0?(h=k+(c<<2)|0,(h|0)!=(i|0)):0){f[g>>2]=i+(~((i+-4-h|0)>>>2)<<2);l=c}else l=c;else{ef(a,c-j|0);l=f[b>>2]|0}if((l|0)<=0){d=1;return d|0}b=f[e>>2]|0;e=f[b>>2]|0;j=(f[b+4>>2]|0)-e>>2;c=e;e=0;while(1){if(j>>>0<=e>>>0){m=10;break}f[c+(e<<2)>>2]=e;e=e+1|0;if((e|0)>=(l|0)){d=1;m=12;break}}if((m|0)==10)xm(b);else if((m|0)==12)return d|0;return 0}function qf(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0;b=a+140|0;c=f[b>>2]|0;if((c|0)<=0){d=1;return d|0}e=c<<4;g=dn(c>>>0>268435455|e>>>0>4294967291?-1:e+4|0)|0;f[g>>2]=c;e=g+4|0;g=e+(c<<4)|0;c=e;do{Wk(c);c=c+16|0}while((c|0)!=(g|0));g=a+136|0;c=f[g>>2]|0;f[g>>2]=e;if(c|0){e=c+-4|0;h=f[e>>2]|0;if(h|0){i=c+(h<<4)|0;do i=i+-16|0;while((i|0)!=(c|0))}en(e)}if((f[b>>2]|0)<=0){d=1;return d|0}e=0;while(1){if(!(rd((f[g>>2]|0)+(e<<4)|0,a)|0)){d=0;j=13;break}e=e+1|0;if((e|0)>=(f[b>>2]|0)){d=1;j=13;break}}if((j|0)==13)return d|0;return 0}function rf(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;c=f[a>>2]|0;f[a>>2]=0;if(!c)return;a=f[c+28>>2]|0;if(a|0){d=a;do{a=d;d=f[d>>2]|0;e=a+8|0;rf(a+20|0);if((b[e+11>>0]|0)<0)gn(f[e>>2]|0);gn(a)}while((d|0)!=0)}d=c+20|0;a=f[d>>2]|0;f[d>>2]=0;if(a|0)gn(a);a=f[c+8>>2]|0;if(a|0){d=a;do{a=d;d=f[d>>2]|0;e=a+8|0;g=f[a+20>>2]|0;if(g|0){h=a+24|0;if((f[h>>2]|0)!=(g|0))f[h>>2]=g;gn(g)}if((b[e+11>>0]|0)<0)gn(f[e>>2]|0);gn(a)}while((d|0)!=0)}d=f[c>>2]|0;f[c>>2]=0;if(d|0)gn(d);gn(c);return}function sf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=_b(a,c)|0;if(!e){g=0;return g|0}c=f[e+20>>2]|0;if(((f[e+24>>2]|0)-c|0)!=8){g=0;return g|0}e=c;c=e;a=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;c=e+4|0;e=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;c=d;d=c;b[d>>0]=a;b[d+1>>0]=a>>8;b[d+2>>0]=a>>16;b[d+3>>0]=a>>24;a=c+4|0;b[a>>0]=e;b[a+1>>0]=e>>8;b[a+2>>0]=e>>16;b[a+3>>0]=e>>24;g=1;return g|0}function tf(a){a=a|0;var b=0,c=0,d=0;b=f[a+84>>2]|0;if(b|0){c=a+88|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+72>>2]|0;if(b|0){d=a+76|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;gn(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+40>>2]|0;if(b|0){c=a+44|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+28>>2]|0;if(b|0){d=a+32|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+12>>2]|0;if(b|0)gn(b);b=f[a>>2]|0;if(!b)return;gn(b);return}function uf(){var a=0,b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;a=u;u=u+48|0;b=a+32|0;c=a+24|0;d=a+16|0;e=a;g=a+36|0;a=gj()|0;if(a|0?(h=f[a>>2]|0,h|0):0){a=h+48|0;i=f[a>>2]|0;j=f[a+4>>2]|0;if(!((i&-256|0)==1126902528&(j|0)==1129074247)){f[c>>2]=12763;Bj(12713,c)}if((i|0)==1126902529&(j|0)==1129074247)k=f[h+44>>2]|0;else k=h+80|0;f[g>>2]=k;k=f[h>>2]|0;h=f[k+4>>2]|0;if(Pa[f[(f[206]|0)+16>>2]&31](824,k,g)|0){k=f[g>>2]|0;g=Na[f[(f[k>>2]|0)+8>>2]&127](k)|0;f[e>>2]=12763;f[e+4>>2]=h;f[e+8>>2]=g;Bj(12627,e)}else{f[d>>2]=12763;f[d+4>>2]=h;Bj(12672,d)}}Bj(12751,b)}function vf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;do if(a){if(c>>>0<128){b[a>>0]=c;e=1;break}d=(an()|0)+188|0;if(!(f[f[d>>2]>>2]|0))if((c&-128|0)==57216){b[a>>0]=c;e=1;break}else{d=on()|0;f[d>>2]=84;e=-1;break}if(c>>>0<2048){b[a>>0]=c>>>6|192;b[a+1>>0]=c&63|128;e=2;break}if(c>>>0<55296|(c&-8192|0)==57344){b[a>>0]=c>>>12|224;b[a+1>>0]=c>>>6&63|128;b[a+2>>0]=c&63|128;e=3;break}if((c+-65536|0)>>>0<1048576){b[a>>0]=c>>>18|240;b[a+1>>0]=c>>>12&63|128;b[a+2>>0]=c>>>6&63|128;b[a+3>>0]=c&63|128;e=4;break}else{d=on()|0;f[d>>2]=84;e=-1;break}}else e=1;while(0);return e|0}function wf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d|0;g=e>>2;h=g+1|0;if(h>>>0>1073741823)xm(a);i=a+8|0;j=(f[i>>2]|0)-d|0;k=j>>1;l=j>>2>>>0<536870911?(k>>>0<h>>>0?h:k):1073741823;do if(l)if(l>>>0>1073741823){k=ra(8)|0;al(k,10109);f[k>>2]=3812;va(k|0,904,84)}else{k=dj(l<<2)|0;m=k;n=k;break}else{m=0;n=0}while(0);k=m+(g<<2)|0;f[k>>2]=f[b>>2];if((e|0)>0)be(n|0,d|0,e|0)|0;f[a>>2]=m;f[c>>2]=k+4;f[i>>2]=m+(l<<2);if(!d)return;gn(d);return}function xf(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2552;b=f[a+88>>2]|0;if(b|0){c=a+92|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+72>>2]|0;if(b|0){d=a+76|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}b=f[a+60>>2]|0;if(b|0){c=a+64|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b)}f[a>>2]=2508;b=f[a+36>>2]|0;if(b|0)gn(b);b=f[a+24>>2]|0;if(!b)return;gn(b);return}function yf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0.0;a=u;u=u+32|0;e=a;g=a+8|0;p[e>>3]=0.0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=fg(d)|0;if(h>>>0>4294967279)xm(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=dj(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){be(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;sf(c,g,e)|0;n=+p[e>>3];if((b[g+11>>0]|0)>=0){u=a;return +n}gn(f[g>>2]|0);u=a;return +n}function zf(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=u;u=u+128|0;h=g+124|0;i=g;j=i;k=3192;l=j+124|0;do{f[j>>2]=f[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(l|0));if((c+-1|0)>>>0>2147483646)if(!c){m=h;n=1;o=4}else{h=on()|0;f[h>>2]=75;p=-1}else{m=a;n=c;o=4}if((o|0)==4){o=-2-m|0;c=n>>>0>o>>>0?o:n;f[i+48>>2]=c;n=i+20|0;f[n>>2]=m;f[i+44>>2]=m;o=m+c|0;m=i+16|0;f[m>>2]=o;f[i+28>>2]=o;o=ue(i,d,e)|0;if(!c)p=o;else{c=f[n>>2]|0;b[c+(((c|0)==(f[m>>2]|0))<<31>>31)>>0]=0;p=o}}u=g;return p|0}function Af(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a=u;u=u+16|0;e=a+12|0;g=a;f[e>>2]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=fg(d)|0;if(h>>>0>4294967279)xm(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=dj(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){be(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;ag(c,g,e)|0;c=f[e>>2]|0;if((b[g+11>>0]|0)>=0){u=a;return c|0}gn(f[g>>2]|0);u=a;return c|0}function Bf(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;c=f[a+28>>2]|0;if(c|0){d=c;do{c=d;d=f[d>>2]|0;e=c+8|0;g=c+20|0;h=f[g>>2]|0;f[g>>2]=0;if(h|0){Bf(h);gn(h)}if((b[e+11>>0]|0)<0)gn(f[e>>2]|0);gn(c)}while((d|0)!=0)}d=a+20|0;c=f[d>>2]|0;f[d>>2]=0;if(c|0)gn(c);c=f[a+8>>2]|0;if(c|0){d=c;do{c=d;d=f[d>>2]|0;e=c+8|0;h=f[c+20>>2]|0;if(h|0){g=c+24|0;if((f[g>>2]|0)!=(h|0))f[g>>2]=h;gn(h)}if((b[e+11>>0]|0)<0)gn(f[e>>2]|0);gn(c)}while((d|0)!=0)}d=f[a>>2]|0;f[a>>2]=0;if(!d)return;gn(d);return}function Cf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a=u;u=u+32|0;e=a;g=a+8|0;p[e>>3]=0.0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=fg(d)|0;if(h>>>0>4294967279)xm(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=dj(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){be(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;h=sf(c,g,e)|0;if((b[g+11>>0]|0)>=0){u=a;return h|0}gn(f[g>>2]|0);u=a;return h|0}function Df(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a=u;u=u+16|0;e=a+12|0;g=a;f[e>>2]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;h=fg(d)|0;if(h>>>0>4294967279)xm(g);if(h>>>0<11){b[g+11>>0]=h;if(!h)i=g;else{j=g;k=6}}else{l=h+16&-16;m=dj(l)|0;f[g>>2]=m;f[g+8>>2]=l|-2147483648;f[g+4>>2]=h;j=m;k=6}if((k|0)==6){be(j|0,d|0,h|0)|0;i=j}b[i+h>>0]=0;h=ag(c,g,e)|0;if((b[g+11>>0]|0)>=0){u=a;return h|0}gn(f[g>>2]|0);u=a;return h|0}function Ef(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=c+8|0;e=f[d+4>>2]|0;g=c+16|0;h=g;i=f[h>>2]|0;j=f[h+4>>2]|0;if(!((e|0)>(j|0)|((e|0)==(j|0)?(f[d>>2]|0)>>>0>i>>>0:0))){k=0;return k|0}d=b[(f[c>>2]|0)+i>>0]|0;e=Uj(i|0,j|0,1,0)|0;j=g;f[j>>2]=e;f[j+4>>2]=I;do if(d<<24>>24<0)if(Ef(a,c)|0){j=a;e=Rj(f[j>>2]|0,f[j+4>>2]|0,7)|0;j=I;g=a;f[g>>2]=e;f[g+4>>2]=j;l=e|d&127;m=j;break}else{k=0;return k|0}else{l=d&255;m=0}while(0);d=a;f[d>>2]=l;f[d+4>>2]=m;k=1;return k|0}function Ff(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;if(b>>>0>1431655765|(c|b|0)<0){d=0;return d|0}e=b*3|0;qd(a,e,2764);qd(a+12|0,e,2760);Dg(a+24|0,c);c=a+76|0;e=f[c>>2]|0;b=a+80|0;g=f[b>>2]|0;if((g|0)!=(e|0))f[b>>2]=g+(~((g+-4-e|0)>>>2)<<2);f[c>>2]=0;f[b>>2]=0;f[a+84>>2]=0;if(e|0)gn(e);e=a+64|0;b=f[e>>2]|0;c=a+68|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;f[e>>2]=0;f[c>>2]=0;f[a+72>>2]=0;if(!b){d=1;return d|0}gn(b);d=1;return d|0}function Gf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;e=u;u=u+48|0;g=e+4|0;h=e;if((d|0)!=1){f[a>>2]=0;u=e;return}d=f[b+12>>2]|0;i=f[b+4>>2]|0;b=g;j=b+36|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));Ee(h,c,d,i,g);i=f[g+24>>2]|0;if(i|0){d=g+28|0;g=f[d>>2]|0;if((g|0)!=(i|0))f[d>>2]=g+(~((g+-4-i|0)>>>2)<<2);gn(i)}f[a>>2]=f[h>>2];u=e;return}function Hf(a,b){a=a|0;b=b|0;var c=0,d=0;c=a+16|0;a=f[b>>2]|0;f[b>>2]=0;b=f[c>>2]|0;f[c>>2]=a;if(!b)return;a=b+88|0;c=f[a>>2]|0;f[a>>2]=0;if(c|0){a=f[c+8>>2]|0;if(a|0){d=c+12|0;if((f[d>>2]|0)!=(a|0))f[d>>2]=a;gn(a)}gn(c)}c=f[b+68>>2]|0;if(c|0){a=b+72|0;d=f[a>>2]|0;if((d|0)!=(c|0))f[a>>2]=d+(~((d+-4-c|0)>>>2)<<2);gn(c)}c=b+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){a=d+4|0;if((f[a>>2]|0)!=(c|0))f[a>>2]=c;gn(c)}gn(d)}gn(b);return}function If(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;if(c|0){h=a+11|0;i=b[h>>0]|0;if(i<<24>>24<0){j=f[a+4>>2]|0;k=(f[a+8>>2]&2147483647)+-1|0}else{j=i&255;k=10}if((k-j|0)>>>0<c>>>0){Xf(a,k,c-k+j|0,j,j,0,0);l=b[h>>0]|0}else l=i;if(l<<24>>24<0)m=f[a>>2]|0;else m=a;Pj(m+j|0,c,d)|0;d=j+c|0;if((b[h>>0]|0)<0)f[a+4>>2]=d;else b[h>>0]=d;b[g>>0]=0;Ul(m+d|0,g)}u=e;return a|0}function Jf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=a+4|0;if((Na[f[(f[b>>2]|0)+20>>2]&127](b)|0)<=0){d=1;return d|0}a=0;while(1){e=f[(f[c>>2]|0)+4>>2]|0;g=li(e,Oa[f[(f[b>>2]|0)+24>>2]&127](b,a)|0)|0;if((g|0)==-1){d=0;h=7;break}e=xh(f[c>>2]|0,g)|0;if(!e){d=0;h=7;break}a=a+1|0;if(!(Oa[f[(f[b>>2]|0)+28>>2]&127](b,e)|0)){d=0;h=7;break}if((a|0)>=(Na[f[(f[b>>2]|0)+20>>2]&127](b)|0)){d=1;h=7;break}}if((h|0)==7)return d|0;return 0}function Kf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j)k=(f[a+8>>2]&2147483647)+-1|0;else k=10;do if(k>>>0>=d>>>0){if(j)l=f[a>>2]|0;else l=a;Pk(l,c,d)|0;b[g>>0]=0;Ul(l+d|0,g);if((b[h>>0]|0)<0){f[a+4>>2]=d;break}else{b[h>>0]=d;break}}else{if(j)m=f[a+4>>2]|0;else m=i&255;df(a,k,d-k|0,m,0,m,d,c)}while(0);u=e;return a|0}function Lf(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=2284;b=a+48|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);f[a>>2]=2724;c=f[a+20>>2]|0;if(c|0){b=a+24|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);gn(c)}c=a+8|0;d=f[c>>2]|0;if(!d){gn(a);return}b=a+12|0;e=f[b>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[b>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0)Sa[f[(f[i>>2]|0)+4>>2]&127](i);h=f[b>>2]|0}while((h|0)!=(d|0));g=f[c>>2]|0}gn(g);gn(a);return}function Mf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0;d=u;u=u+80|0;e=d;g=d+56|0;i=d+40|0;j=e;k=c;c=j+40|0;do{f[j>>2]=f[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(c|0));Gb(i,e,g);e=f[i>>2]|0;if(!e){k=i+4|0;if((b[k+11>>0]|0)<0)gn(f[k>>2]|0);k=h[g+7>>0]|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=k;u=d;return}else{f[a>>2]=e;e=i+4|0;Qf(a+4|0,e);if((b[e+11>>0]|0)<0)gn(f[e>>2]|0);u=d;return}}function Nf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0;d=f[a>>2]|0;if(!d){e=0;return e|0}g=f[c>>2]|0;if(!g){e=0;return e|0}h=f[g>>2]|0;Pe(d,h,(f[g+4>>2]|0)-h|0,0)|0;b[a+24>>0]=b[c+24>>0]|0;f[a+28>>2]=f[c+28>>2];b[a+32>>0]=b[c+32>>0]|0;h=c+40|0;g=f[h+4>>2]|0;d=a+40|0;f[d>>2]=f[h>>2];f[d+4>>2]=g;g=c+48|0;d=f[g+4>>2]|0;h=a+48|0;f[h>>2]=f[g>>2];f[h+4>>2]=d;f[a+56>>2]=f[c+56>>2];d=c+8|0;c=a+8|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];e=1;return e|0}function Of(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;f[a>>2]=2284;b=a+48|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);f[a>>2]=2724;c=f[a+20>>2]|0;if(c|0){b=a+24|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);gn(c)}c=a+8|0;d=f[c>>2]|0;if(!d)return;b=a+12|0;a=f[b>>2]|0;if((a|0)==(d|0))e=d;else{g=a;do{a=g+-4|0;f[b>>2]=a;h=f[a>>2]|0;f[a>>2]=0;if(h|0)Sa[f[(f[h>>2]|0)+4>>2]&127](h);g=f[b>>2]|0}while((g|0)!=(d|0));e=f[c>>2]|0}gn(e);return}function Pf(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;if(!a){g=1;return g|0}h=d+8|0;i=f[h+4>>2]|0;j=d+16|0;k=j;l=f[k>>2]|0;m=f[k+4>>2]|0;if(!((i|0)>(m|0)|((i|0)==(m|0)?(f[h>>2]|0)>>>0>l>>>0:0))){g=0;return g|0}h=b[(f[d>>2]|0)+l>>0]|0;i=Uj(l|0,m|0,1,0)|0;m=j;f[m>>2]=i;f[m+4>>2]=I;switch(h<<24>>24){case 0:{g=ec(a,c,d,e)|0;return g|0}case 1:{g=zc(a,d,e)|0;return g|0}default:{g=0;return g|0}}return 0}function Qf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;if((b[c+11>>0]|0)<0){g=f[c>>2]|0;h=f[c+4>>2]|0;if(h>>>0>4294967279)xm(a);if(h>>>0<11){b[a+11>>0]=h;i=a}else{j=h+16&-16;k=dj(j)|0;f[a>>2]=k;f[a+8>>2]=j|-2147483648;f[a+4>>2]=h;i=k}Rk(i,g,h)|0;b[e>>0]=0;Ul(i+h|0,e)}else{f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2]}u=d;return}function Rf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=_b(a,b)|0;if(!d){e=0;return e|0}b=d+20|0;a=f[b>>2]|0;g=d+24|0;d=f[g>>2]|0;if((a|0)==(d|0)){e=0;return e|0}gg(c,d-a|0,0);a=Nh(c,0)|0;c=f[b>>2]|0;be(a|0,c|0,(f[g>>2]|0)-c|0)|0;e=1;return e|0}function Sf(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0;b[c+53>>0]=1;do if((f[c+4>>2]|0)==(e|0)){b[c+52>>0]=1;a=c+16|0;h=f[a>>2]|0;if(!h){f[a>>2]=d;f[c+24>>2]=g;f[c+36>>2]=1;if(!((g|0)==1?(f[c+48>>2]|0)==1:0))break;b[c+54>>0]=1;break}if((h|0)!=(d|0)){h=c+36|0;f[h>>2]=(f[h>>2]|0)+1;b[c+54>>0]=1;break}h=c+24|0;a=f[h>>2]|0;if((a|0)==2){f[h>>2]=g;i=g}else i=a;if((i|0)==1?(f[c+48>>2]|0)==1:0)b[c+54>>0]=1}while(0);return}function Tf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;f[a>>2]=c;f[a+68>>2]=0;f[a+72>>2]=0;Yc(e,c);g=a+4|0;h=f[e>>2]|0;f[e>>2]=0;i=f[g>>2]|0;f[g>>2]=h;if(!i){f[e>>2]=0;j=h}else{mf(i);gn(i);i=f[e>>2]|0;f[e>>2]=0;if(i|0){mf(i);gn(i)}j=f[g>>2]|0}if(!j){k=0;u=d;return k|0}j=((f[c+100>>2]|0)-(f[c+96>>2]|0)|0)/12|0;b[e>>0]=0;ge(a+56|0,j,e);k=1;u=d;return k|0}function Uf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=a+d|0;c=c&255;if((d|0)>=67){while(a&3){b[a>>0]=c;a=a+1|0}g=e&-4|0;h=g-64|0;i=c|c<<8|c<<16|c<<24;while((a|0)<=(h|0)){f[a>>2]=i;f[a+4>>2]=i;f[a+8>>2]=i;f[a+12>>2]=i;f[a+16>>2]=i;f[a+20>>2]=i;f[a+24>>2]=i;f[a+28>>2]=i;f[a+32>>2]=i;f[a+36>>2]=i;f[a+40>>2]=i;f[a+44>>2]=i;f[a+48>>2]=i;f[a+52>>2]=i;f[a+56>>2]=i;f[a+60>>2]=i;a=a+64|0}while((a|0)<(g|0)){f[a>>2]=i;a=a+4|0}}while((a|0)<(e|0)){b[a>>0]=c;a=a+1|0}return e-d|0}function Vf(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0;do if(!(Cl(a,f[c+8>>2]|0,g)|0)){if(Cl(a,f[c>>2]|0,g)|0){if((f[c+16>>2]|0)!=(d|0)?(h=c+20|0,(f[h>>2]|0)!=(d|0)):0){f[c+32>>2]=e;f[h>>2]=d;h=c+40|0;f[h>>2]=(f[h>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0)b[c+54>>0]=1;f[c+44>>2]=4;break}if((e|0)==1)f[c+32>>2]=1}}else Zi(0,c,d,e);while(0);return}function Wf(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1088;b=a+16|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;b=a+88|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=f[c+8>>2]|0;if(b|0){d=c+12|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;gn(b)}gn(c)}c=f[a+68>>2]|0;if(c|0){b=a+72|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);gn(c)}c=a+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){b=d+4|0;if((f[b>>2]|0)!=(c|0))f[b>>2]=c;gn(c)}gn(d)}gn(a);return}function Xf(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0;if((-17-c|0)>>>0<d>>>0)xm(a);if((b[a+11>>0]|0)<0)j=f[a>>2]|0;else j=a;if(c>>>0<2147483623){k=d+c|0;d=c<<1;l=k>>>0<d>>>0?d:k;m=l>>>0<11?11:l+16&-16}else m=-17;l=dj(m)|0;if(g|0)Rk(l,j,g)|0;k=e-h-g|0;if(k|0)Rk(l+g+i|0,j+g+h|0,k)|0;if((c|0)!=10)gn(j);f[a>>2]=l;f[a+8>>2]=m|-2147483648;return}function Yf(a,b){a=a|0;b=b|0;if(!b)return;else{Yf(a,f[b>>2]|0);Yf(a,f[b+4>>2]|0);cg(b+20|0,f[b+24>>2]|0);gn(b);return}}function Zf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=a+64|0;if((f[d>>2]|0)==0?(e=dj(32)|0,rj(e),g=f[d>>2]|0,f[d>>2]=e,g|0):0){e=f[g>>2]|0;if(e|0){h=g+4|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;gn(e)}gn(g)}g=di(f[a+28>>2]|0)|0;e=X(g,b[a+24>>0]|0)|0;g=((e|0)<0)<<31>>31;h=f[d>>2]|0;i=hj(e|0,g|0,c|0,0)|0;if(!(Pe(h,0,i,I)|0)){j=0;return j|0}Vg(a,f[d>>2]|0,e,g,0,0);f[a+80>>2]=c;j=1;return j|0}function _f(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+32|0;g=e+20|0;h=e+16|0;i=e;j=b[a+24>>0]|0;f[i>>2]=f[238];f[i+4>>2]=f[239];f[i+8>>2]=f[240];f[i+12>>2]=f[241];f[h>>2]=c;f[g>>2]=f[h>>2];if(!(bb(a,g,j,i)|0)){k=0;u=e;return k|0}nd(d,i,i+(j<<24>>24<<2)|0);k=1;u=e;return k|0}function $f(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+64|0;e=d;if(!(Cl(a,b,0)|0))if((b|0)!=0?(g=ye(b,848,832,0)|0,(g|0)!=0):0){b=e+4|0;h=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(h|0));f[e>>2]=g;f[e+8>>2]=a;f[e+12>>2]=-1;f[e+48>>2]=1;Va[f[(f[g>>2]|0)+28>>2]&7](g,e,f[c>>2]|0,1);if((f[e+24>>2]|0)==1){f[c>>2]=f[e+16>>2];i=1}else i=0;j=i}else j=0;else j=1;u=d;return j|0}function ag(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=_b(a,c)|0;if(!e){g=0;return g|0}c=f[e+20>>2]|0;if(((f[e+24>>2]|0)-c|0)!=4){g=0;return g|0}e=c;c=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[d>>0]=c;b[d+1>>0]=c>>8;b[d+2>>0]=c>>16;b[d+3>>0]=c>>24;g=1;return g|0}function bg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=c+8|0;e=f[d+4>>2]|0;g=c+16|0;h=g;i=f[h>>2]|0;j=f[h+4>>2]|0;if(!((e|0)>(j|0)|((e|0)==(j|0)?(f[d>>2]|0)>>>0>i>>>0:0))){k=0;return k|0}d=b[(f[c>>2]|0)+i>>0]|0;e=Uj(i|0,j|0,1,0)|0;j=g;f[j>>2]=e;f[j+4>>2]=I;j=d&255;do if(j&128)if(bg(a,c)|0){e=f[a>>2]<<7;f[a>>2]=e;l=e|d&127;break}else{k=0;return k|0}else l=j;while(0);f[a>>2]=l;k=1;return k|0}function cg(a,c){a=a|0;c=c|0;var d=0;if(!c)return;cg(a,f[c>>2]|0);cg(a,f[c+4>>2]|0);a=c+16|0;d=c+28|0;if((b[d+11>>0]|0)<0)gn(f[d>>2]|0);if((b[a+11>>0]|0)<0)gn(f[a>>2]|0);gn(c);return}function dg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=c;i=f[c+64>>2]|0;c=((f[i+4>>2]|0)-(f[i>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;ge(a+24|0,c,g);c=f[h>>2]|0;h=(f[c+56>>2]|0)-(f[c+52>>2]|0)>>2;b[g>>0]=0;ge(a+36|0,h,g);g=a+8|0;f[g>>2]=f[d>>2];f[g+4>>2]=f[d+4>>2];f[g+8>>2]=f[d+8>>2];f[g+12>>2]=f[d+12>>2];u=e;return}function eg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=2724;b=f[a+20>>2]|0;if(b|0){c=a+24|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=a+8|0;d=f[b>>2]|0;if(!d){gn(a);return}c=a+12|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[c>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0)Sa[f[(f[i>>2]|0)+4>>2]&127](i);h=f[c>>2]|0}while((h|0)!=(d|0));g=f[b>>2]|0}gn(g);gn(a);return}function fg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a;a:do if(!(c&3)){d=a;e=4}else{g=a;h=c;while(1){if(!(b[g>>0]|0)){i=h;break a}j=g+1|0;h=j;if(!(h&3)){d=j;e=4;break}else g=j}}while(0);if((e|0)==4){e=d;while(1){k=f[e>>2]|0;if(!((k&-2139062144^-2139062144)&k+-16843009))e=e+4|0;else break}if(!((k&255)<<24>>24))l=e;else{k=e;while(1){e=k+1|0;if(!(b[e>>0]|0)){l=e;break}else k=e}}i=l}return i-c|0}function gg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j)k=f[a+4>>2]|0;else k=i&255;do if(k>>>0>=c>>>0)if(j){i=(f[a>>2]|0)+c|0;b[g>>0]=0;Ul(i,g);f[a+4>>2]=c;break}else{b[g>>0]=0;Ul(a+c|0,g);b[h>>0]=c;break}else If(a,c-k|0,d)|0;while(0);u=e;return}function hg(a){a=a|0;var b=0,c=0,d=0;if(!a)return;b=a+88|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=f[c+8>>2]|0;if(b|0){d=c+12|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;gn(b)}gn(c)}c=f[a+68>>2]|0;if(c|0){b=a+72|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);gn(c)}c=a+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){b=d+4|0;if((f[b>>2]|0)!=(c|0))f[b>>2]=c;gn(c)}gn(d)}gn(a);return}function ig(a,c,d,e,g,h,i,j,k,l){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0;f[a>>2]=d;if(d|0){m=d+16|0;n=f[m+4>>2]|0;o=a+8|0;f[o>>2]=f[m>>2];f[o+4>>2]=n;n=d+24|0;d=f[n+4>>2]|0;o=a+16|0;f[o>>2]=f[n>>2];f[o+4>>2]=d}b[a+24>>0]=e;f[a+28>>2]=g;b[a+32>>0]=h&1;h=a+40|0;f[h>>2]=i;f[h+4>>2]=j;j=a+48|0;f[j>>2]=k;f[j+4>>2]=l;f[a+56>>2]=c;return}function jg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;if((f[c+76>>2]|0)>=0?(mn(c)|0)!=0:0){d=a&255;e=a&255;if((e|0)!=(b[c+75>>0]|0)?(g=c+20|0,h=f[g>>2]|0,h>>>0<(f[c+16>>2]|0)>>>0):0){f[g>>2]=h+1;b[h>>0]=d;i=e}else i=kg(c,a)|0;ln(c);j=i}else k=3;do if((k|0)==3){i=a&255;e=a&255;if((e|0)!=(b[c+75>>0]|0)?(d=c+20|0,h=f[d>>2]|0,h>>>0<(f[c+16>>2]|0)>>>0):0){f[d>>2]=h+1;b[h>>0]=i;j=e;break}j=kg(c,a)|0}while(0);return j|0}function kg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;d=u;u=u+16|0;e=d;g=c&255;b[e>>0]=g;i=a+16|0;j=f[i>>2]|0;if(!j)if(!(Kh(a)|0)){k=f[i>>2]|0;l=4}else m=-1;else{k=j;l=4}do if((l|0)==4){j=a+20|0;i=f[j>>2]|0;if(i>>>0<k>>>0?(n=c&255,(n|0)!=(b[a+75>>0]|0)):0){f[j>>2]=i+1;b[i>>0]=g;m=n;break}if((Pa[f[a+36>>2]&31](a,e,1)|0)==1)m=h[e>>0]|0;else m=-1}while(0);u=d;return m|0}function lg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=dj(88)|0;d=c+60|0;e=c;g=e+60|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f[d>>2]=c;d=c+64|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;d=td(c,b)|0;f[a>>2]=d?c:0;a=d?0:c;if(d)return;mf(a);gn(a);return}function mg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;g=d+4|0;f[e>>2]=c;c=dj(32)|0;f[g>>2]=c;f[g+8>>2]=-2147483616;f[g+4>>2]=24;h=c;i=8516;j=h+24|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[c+24>>0]=0;sg(Ub(a,e)|0,g,1);if((b[g+11>>0]|0)>=0){u=d;return}gn(f[g>>2]|0);u=d;return}function ng(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=c;i=((f[c+4>>2]|0)-(f[c>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;ge(a+24|0,i,g);i=f[h>>2]|0;h=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;b[g>>0]=0;ge(a+36|0,h,g);g=a+8|0;f[g>>2]=f[d>>2];f[g+4>>2]=f[d+4>>2];f[g+8>>2]=f[d+8>>2];f[g+12>>2]=f[d+12>>2];u=e;return}function og(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;f[a>>2]=2724;b=f[a+20>>2]|0;if(b|0){c=a+24|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=a+8|0;d=f[b>>2]|0;if(!d)return;c=a+12|0;a=f[c>>2]|0;if((a|0)==(d|0))e=d;else{g=a;do{a=g+-4|0;f[c>>2]=a;h=f[a>>2]|0;f[a>>2]=0;if(h|0)Sa[f[(f[h>>2]|0)+4>>2]&127](h);g=f[c>>2]|0}while((g|0)!=(d|0));e=f[b>>2]|0}gn(e);return}function pg(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2344;b=a+84|0;c=a+4|0;d=c+80|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+88>>2]=-1;f[a+92>>2]=-1;b=a+152|0;c=a+96|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));n[b>>2]=$(1.0);b=a+212|0;c=a+156|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+216>>2]=0;f[a+220>>2]=0;f[a+224>>2]=0;Ji(a+232|0);return}function qg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;if(c>>>0>0|(c|0)==0&a>>>0>4294967295){e=d;f=a;g=c;while(1){c=bj(f|0,g|0,10,0)|0;e=e+-1|0;b[e>>0]=c&255|48;c=f;f=Il(f|0,g|0,10,0)|0;if(!(g>>>0>9|(g|0)==9&c>>>0>4294967295))break;else g=I}h=f;i=e}else{h=a;i=d}if(!h)j=i;else{d=h;h=i;while(1){i=h+-1|0;b[i>>0]=(d>>>0)%10|0|48;if(d>>>0<10){j=i;break}else{d=(d>>>0)/10|0;h=i}}}return j|0}function rg(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=a;while(1){d=c+1|0;if(!(Am(b[c>>0]|0)|0))break;else c=d}a=b[c>>0]|0;switch(a<<24>>24|0){case 45:{e=1;f=5;break}case 43:{e=0;f=5;break}default:{g=0;h=c;i=a}}if((f|0)==5){g=e;h=d;i=b[d>>0]|0}if(!(Rm(i<<24>>24)|0))j=0;else{i=0;d=h;while(1){h=(i*10|0)+48-(b[d>>0]|0)|0;d=d+1|0;if(!(Rm(b[d>>0]|0)|0)){j=h;break}else i=h}}return (g|0?j:0-j|0)|0}function sg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;Ah(g,d&1);d=cf(a,c)|0;c=d+11|0;if((b[c>>0]|0)<0){b[f[d>>2]>>0]=0;f[d+4>>2]=0}else{b[d>>0]=0;b[c>>0]=0}ae(d,0);f[d>>2]=f[g>>2];f[d+4>>2]=f[g+4>>2];f[d+8>>2]=f[g+8>>2];u=e;return}function tg(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1676;b=f[a+96>>2]|0;if(b|0)gn(b);b=f[a+84>>2]|0;if(b|0)gn(b);b=f[a+72>>2]|0;if(b|0)gn(b);b=f[a+60>>2]|0;if(b|0)gn(b);f[a>>2]=1256;b=f[a+32>>2]|0;if(!b){gn(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b);gn(a);return}function ug(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=Sd(a,c)|0;if((e|0)==(a+4|0)){g=-1;h=(g|0)==-1;i=(g|0)!=0;j=h?d:i;return j|0}a=e+28|0;if((b[a+11>>0]|0)<0)k=f[a>>2]|0;else k=a;g=rg(k)|0;h=(g|0)==-1;i=(g|0)!=0;j=h?d:i;return j|0}function vg(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1424;b=f[a+96>>2]|0;if(b|0)gn(b);b=f[a+84>>2]|0;if(b|0)gn(b);b=f[a+72>>2]|0;if(b|0)gn(b);b=f[a+60>>2]|0;if(b|0)gn(b);f[a>>2]=1256;b=f[a+32>>2]|0;if(!b){gn(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b);gn(a);return}function wg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0;d=0;while(1){if((h[10732+d>>0]|0)==(a|0)){e=2;break}g=d+1|0;if((g|0)==87){i=10820;j=87;e=5;break}else d=g}if((e|0)==2)if(!d)k=10820;else{i=10820;j=d;e=5}if((e|0)==5)while(1){e=0;d=i;do{a=d;d=d+1|0}while((b[a>>0]|0)!=0);j=j+-1|0;if(!j){k=d;break}else{i=d;e=5}}return Fm(k,f[c+20>>2]|0)|0}function xg(a,b){a=+a;b=b|0;var c=0,d=0,e=0,g=0.0,h=0.0,i=0,j=0.0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;e=Xj(c|0,d|0,52)|0;switch(e&2047){case 0:{if(a!=0.0){g=+xg(a*18446744073709551616.0,b);h=g;i=(f[b>>2]|0)+-64|0}else{h=a;i=0}f[b>>2]=i;j=h;break}case 2047:{j=a;break}default:{f[b>>2]=(e&2047)+-1022;f[s>>2]=c;f[s+4>>2]=d&-2146435073|1071644672;j=+p[s>>3]}}return +j}function yg(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0;e=u;u=u+16|0;d=e;c=dj(32)|0;f[d>>2]=c;f[d+8>>2]=-2147483616;f[d+4>>2]=26;g=c;h=8468;i=g+26|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[c+26>>0]=0;f[a>>2]=-1;Qf(a+4|0,d);if((b[d+11>>0]|0)>=0){u=e;return}gn(f[d>>2]|0);u=e;return}function zg(a){a=a|0;var b=0,c=0;f[a>>2]=1676;b=f[a+96>>2]|0;if(b|0)gn(b);b=f[a+84>>2]|0;if(b|0)gn(b);b=f[a+72>>2]|0;if(b|0)gn(b);b=f[a+60>>2]|0;if(b|0)gn(b);f[a>>2]=1256;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);gn(b);return}function Ag(a){a=a|0;var b=0,c=0;f[a>>2]=1424;b=f[a+96>>2]|0;if(b|0)gn(b);b=f[a+84>>2]|0;if(b|0)gn(b);b=f[a+72>>2]|0;if(b|0)gn(b);b=f[a+60>>2]|0;if(b|0)gn(b);f[a>>2]=1256;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);gn(b);return}function Bg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;f[a>>2]=0;c=a+4|0;f[c>>2]=0;f[a+8>>2]=0;d=b+4|0;e=(f[d>>2]|0)-(f[b>>2]|0)|0;g=e>>2;if(!g)return;if(g>>>0>1073741823)xm(a);h=dj(e)|0;f[c>>2]=h;f[a>>2]=h;f[a+8>>2]=h+(g<<2);g=f[b>>2]|0;b=(f[d>>2]|0)-g|0;if((b|0)<=0)return;be(h|0,g|0,b|0)|0;f[c>>2]=h+(b>>>2<<2);return}function Cg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;a=f[b+4>>2]|0;if(!a){d=0;return d|0}e=f[(f[(f[b+8>>2]|0)+(c<<2)>>2]|0)+60>>2]|0;c=f[a+40>>2]|0;b=f[a+44>>2]|0;if((c|0)==(b|0)){d=0;return d|0}else g=c;while(1){c=f[g>>2]|0;g=g+4|0;if((f[c+40>>2]|0)==(e|0)){d=c;h=5;break}if((g|0)==(b|0)){d=0;h=5;break}}if((h|0)==5)return d|0;return 0}function Dg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=a+8|0;d=f[a>>2]|0;if((f[c>>2]|0)-d>>2>>>0>=b>>>0)return;e=a+4|0;if(b>>>0>1073741823){g=ra(8)|0;al(g,10109);f[g>>2]=3812;va(g|0,904,84)}g=(f[e>>2]|0)-d|0;h=dj(b<<2)|0;if((g|0)>0)be(h|0,d|0,g|0)|0;f[a>>2]=h;f[e>>2]=h+(g>>2<<2);f[c>>2]=h+(b<<2);if(!d)return;gn(d);return}function Eg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=Na[f[(f[a>>2]|0)+24>>2]&127](a)|0;if((c|0)<=0){d=1;return d|0}e=a+36|0;g=a+48|0;a=0;while(1){h=f[(f[e>>2]|0)+(a<<2)>>2]|0;a=a+1|0;if(!(Pa[f[(f[h>>2]|0)+20>>2]&31](h,g,b)|0)){d=0;i=5;break}if((a|0)>=(c|0)){d=1;i=5;break}}if((i|0)==5)return d|0;return 0}function Fg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;switch(c<<24>>24){case 0:{c=dj(20)|0;fk(c);d=c;break}case 1:{c=dj(24)|0;Gk(c);d=c;break}case 2:{c=dj(36)|0;sj(c);d=c;break}case 3:{c=dj(28)|0;yk(c);d=c;break}default:d=0}f[a>>2]=d;return}function Gg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=Na[f[(f[a>>2]|0)+24>>2]&127](a)|0;if((c|0)<=0){d=1;return d|0}e=a+36|0;g=a+48|0;a=0;while(1){h=f[(f[e>>2]|0)+(a<<2)>>2]|0;a=a+1|0;if(!(Pa[f[(f[h>>2]|0)+16>>2]&31](h,g,b)|0)){d=0;i=5;break}if((a|0)>=(c|0)){d=1;i=5;break}}if((i|0)==5)return d|0;return 0}function Hg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=f[b>>2]|0;if(!c){d=0;return d|0}e=a+44|0;g=f[e>>2]|0;if(g>>>0<(f[a+48>>2]|0)>>>0){f[b>>2]=0;f[g>>2]=c;f[e>>2]=(f[e>>2]|0)+4;d=1;return d|0}else{Vd(a+40|0,b);d=1;return d|0}return 0}function Ig(a){a=a|0;var b=0;if(!(f[a+44>>2]|0)){b=0;return b|0}if(!(f[a+48>>2]|0)){b=0;return b|0}if(!(f[a+24>>2]|0)){b=0;return b|0}if(!(f[a+28>>2]|0)){b=0;return b|0}if(!(f[a+32>>2]|0)){b=0;return b|0}if(!(f[a+36>>2]|0)){b=0;return b|0}b=(f[a+72>>2]|0)!=-1;return b|0}function Jg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0;f[c>>2]=2;d=a+4|0;a=c+8|0;e=f[a>>2]|0;g=(f[c+12>>2]|0)-e|0;if(g>>>0<4294967292){Xg(a,g+4|0,0);i=f[a>>2]|0}else i=e;e=i+g|0;g=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[e>>0]=g;b[e+1>>0]=g>>8;b[e+2>>0]=g>>16;b[e+3>>0]=g>>24;return}function Kg(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=2396;b=a+8|0;f[b>>2]=2420;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);gn(c)}f[b>>2]=2440;b=f[a+44>>2]|0;if(b|0)gn(b);b=f[a+32>>2]|0;if(!b){gn(a);return}gn(b);gn(a);return}function Lg(a){a=a|0;var b=0;if(!(f[a+64>>2]|0)){b=0;return b|0}if(!(f[a+68>>2]|0)){b=0;return b|0}if(!(f[a+44>>2]|0)){b=0;return b|0}if(!(f[a+48>>2]|0)){b=0;return b|0}if(!(f[a+52>>2]|0)){b=0;return b|0}if(!(f[a+56>>2]|0)){b=0;return b|0}b=(f[a+92>>2]|0)!=-1;return b|0}function Mg(a){a=a|0;var c=0;if(!a)return;c=a+28|0;if((b[c+11>>0]|0)<0)gn(f[c>>2]|0);Yf(a+12|0,f[a+16>>2]|0);cg(a,f[a+4>>2]|0);gn(a);return}function Ng(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=2464;b=a+8|0;f[b>>2]=2488;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);gn(c)}f[b>>2]=2508;b=f[a+44>>2]|0;if(b|0)gn(b);b=f[a+32>>2]|0;if(!b){gn(a);return}gn(b);gn(a);return}function Og(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0;if(!a)return;c=f[a>>2]|0;if(c|0){d=a+4|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;if((b[e+11>>0]|0)<0){gn(f[e>>2]|0);i=f[d>>2]|0}else i=e;if((i|0)==(c|0))break;else h=i}g=f[a>>2]|0}gn(g)}gn(a);return}function Pg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;Hb(a,b);if((b|0)<=-1)return;c=a+88|0;d=f[c>>2]|0;e=f[a+84>>2]|0;if((d-e>>2|0)<=(b|0))return;a=e+(b<<2)|0;b=a+4|0;e=d-b|0;g=e>>2;if(!g)h=d;else{qi(a|0,b|0,e|0)|0;h=f[c>>2]|0}e=a+(g<<2)|0;if((h|0)==(e|0))return;f[c>>2]=h+(~((h+-4-e|0)>>>2)<<2);return}function Qg(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=2396;b=a+8|0;f[b>>2]=2420;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);gn(c)}f[b>>2]=2440;b=f[a+44>>2]|0;if(b|0)gn(b);b=f[a+32>>2]|0;if(!b)return;gn(b);return}function Rg(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0;a=c+16|0;g=f[a>>2]|0;do if(g){if((g|0)!=(d|0)){h=c+36|0;f[h>>2]=(f[h>>2]|0)+1;f[c+24>>2]=2;b[c+54>>0]=1;break}h=c+24|0;if((f[h>>2]|0)==2)f[h>>2]=e}else{f[a>>2]=d;f[c+24>>2]=e;f[c+36>>2]=1}while(0);return}function Sg(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2776;b=f[a+96>>2]|0;if(b|0){c=a+100|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);gn(b)}b=f[a+84>>2]|0;if(!b){Qd(a);gn(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b);Qd(a);gn(a);return}function Tg(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=2464;b=a+8|0;f[b>>2]=2488;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);gn(c)}f[b>>2]=2508;b=f[a+44>>2]|0;if(b|0)gn(b);b=f[a+32>>2]|0;if(!b)return;gn(b);return}function Ug(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;g=d>>31|((d|0)<0?-1:0)<<1;h=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;i=Wj(e^a|0,f^b|0,e|0,f|0)|0;b=I;a=g^e;e=h^f;return Wj((fc(i,b,Wj(g^c|0,h^d|0,g|0,h|0)|0,I,0)|0)^a|0,I^e|0,a|0,e|0)|0}function Vg(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0;f[a>>2]=b;h=b+16|0;i=f[h+4>>2]|0;j=a+8|0;f[j>>2]=f[h>>2];f[j+4>>2]=i;i=b+24|0;b=f[i+4>>2]|0;j=a+16|0;f[j>>2]=f[i>>2];f[j+4>>2]=b;b=a+40|0;f[b>>2]=c;f[b+4>>2]=d;d=a+48|0;f[d>>2]=e;f[d+4>>2]=g;return}function Wg(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0;c=b[a+12>>0]|0;d=a+8|0;e=f[d>>2]|0;if(e>>>0<4096?(g=a+4|0,i=f[g>>2]|0,(i|0)>0):0){j=f[a>>2]|0;a=i+-1|0;f[g>>2]=a;g=e<<8|(h[j+a>>0]|0);f[d>>2]=g;k=g}else k=e;e=k&255;g=0-c&255;c=X(k>>>8,g)|0;a=e>>>0<g>>>0;f[d>>2]=a?c+e|0:k-g-c|0;return a|0}function Xg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e|0;h=e;e=d;if(g>>>0>=b>>>0){if(g>>>0>b>>>0?(d=h+b|0,(d|0)!=(e|0)):0)f[c>>2]=d}else hf(a,b-g|0);g=a+24|0;a=g;b=Uj(f[a>>2]|0,f[a+4>>2]|0,1,0)|0;a=g;f[a>>2]=b;f[a+4>>2]=I;return}function Yg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;yg(g,a,c,d);d=a+24|0;f[d>>2]=f[g>>2];c=g+4|0;ii(a+28|0,c)|0;if((b[c+11>>0]|0)>=0){u=e;return d|0}gn(f[c>>2]|0);u=e;return d|0}function Zg(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2776;b=f[a+96>>2]|0;if(b|0){c=a+100|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);gn(b)}b=f[a+84>>2]|0;if(!b){Qd(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);gn(b);Qd(a);return}function _g(a){a=a|0;var c=0,d=0,e=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;b[a+24>>0]=1;c=a+68|0;d=a+28|0;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));f[c>>2]=a;c=a+72|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;return}function $g(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2420;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}f[a>>2]=2440;b=f[a+36>>2]|0;if(b|0)gn(b);b=f[a+24>>2]|0;if(!b){gn(a);return}gn(b);gn(a);return}function ah(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;ld(g,a,c,d);d=a+24|0;f[d>>2]=f[g>>2];c=g+4|0;ii(a+28|0,c)|0;if((b[c+11>>0]|0)>=0){u=e;return d|0}gn(f[c>>2]|0);u=e;return d|0}function bh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;if(c?!(Ef(d,a)|0):0){e=0;return e|0}b[a+36>>0]=1;d=a+16|0;c=f[d>>2]|0;g=(f[a>>2]|0)+c|0;h=a+8|0;i=Wj(f[h>>2]|0,f[h+4>>2]|0,c|0,f[d+4>>2]|0)|0;f[a+32>>2]=0;f[a+24>>2]=g;f[a+28>>2]=g+i;e=1;return e|0}function ch(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1732;b=f[a+76>>2]|0;if(b|0)gn(b);f[a>>2]=1256;b=f[a+32>>2]|0;if(!b){gn(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b);gn(a);return}function dh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=u;u=u+256|0;g=f;if((c|0)>(d|0)&(e&73728|0)==0){e=c-d|0;Uf(g|0,b<<24>>24|0,(e>>>0<256?e:256)|0)|0;if(e>>>0>255){b=c-d|0;d=e;do{ml(a,g,256);d=d+-256|0}while(d>>>0>255);h=b&255}else h=e;ml(a,g,h)}u=f;return}function eh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2488;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}f[a>>2]=2508;b=f[a+36>>2]|0;if(b|0)gn(b);b=f[a+24>>2]|0;if(!b){gn(a);return}gn(b);gn(a);return}function fh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0;b=f[a+8>>2]|0;c=f[a+12>>2]|0;if((b|0)==(c|0)){d=1;return d|0}e=a+32|0;a=b;while(1){b=f[a>>2]|0;a=a+4|0;if(!(Oa[f[(f[b>>2]|0)+16>>2]&127](b,f[e>>2]|0)|0)){d=0;g=5;break}if((a|0)==(c|0)){d=1;g=5;break}}if((g|0)==5)return d|0;return 0}function gh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=f[a+8>>2]|0;if((b[e+24>>0]|0)<1){g=0;return g|0}if(!(Zf(e,(f[c+4>>2]|0)-(f[c>>2]|0)>>2)|0)){g=0;return g|0}g=Pa[f[(f[a>>2]|0)+32>>2]&31](a,c,d)|0;return g|0}function hh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1480;b=f[a+76>>2]|0;if(b|0)gn(b);f[a>>2]=1256;b=f[a+32>>2]|0;if(!b){gn(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b);gn(a);return}function ih(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0;if(Cl(a,f[b+8>>2]|0,g)|0)Sf(0,b,c,d,e);else{h=f[a+8>>2]|0;Xa[f[(f[h>>2]|0)+20>>2]&3](h,b,c,d,e,g)}return}function jh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2420;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}f[a>>2]=2440;b=f[a+36>>2]|0;if(b|0)gn(b);b=f[a+24>>2]|0;if(!b)return;gn(b);return}function kh(a,b){a=a|0;b=b|0;var c=0;c=dj(40)|0;f[c>>2]=-1;rj(c+8|0);Ta[f[(f[a>>2]|0)+16>>2]&7](a,c);a=b+88|0;b=f[a>>2]|0;f[a>>2]=c;if(!b)return 1;c=f[b+8>>2]|0;if(c|0){a=b+12|0;if((f[a>>2]|0)!=(c|0))f[a>>2]=c;gn(c)}gn(b);return 1}function lh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=f[a+12>>2]|0;d=f[a+8>>2]|0;a=d;if((c|0)==(d|0)){e=0;return e|0}g=c-d>>2;d=0;while(1){c=f[a+(d<<2)>>2]|0;if((f[c+60>>2]|0)==(b|0)){e=c;h=5;break}d=d+1|0;if(d>>>0>=g>>>0){e=0;h=5;break}}if((h|0)==5)return e|0;return 0}function mh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=f[a+12>>2]|0;d=f[a+8>>2]|0;a=d;if((c|0)==(d|0)){e=-1;return e|0}g=c-d>>2;d=0;while(1){if((f[(f[a+(d<<2)>>2]|0)+60>>2]|0)==(b|0)){e=d;h=5;break}d=d+1|0;if(d>>>0>=g>>>0){e=-1;h=5;break}}if((h|0)==5)return e|0;return 0}function nh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2488;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}f[a>>2]=2508;b=f[a+36>>2]|0;if(b|0)gn(b);b=f[a+24>>2]|0;if(!b)return;gn(b);return}function oh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;a:do if(!d)e=0;else{f=a;g=d;h=c;while(1){i=b[f>>0]|0;j=b[h>>0]|0;if(i<<24>>24!=j<<24>>24)break;g=g+-1|0;if(!g){e=0;break a}else{f=f+1|0;h=h+1|0}}e=(i&255)-(j&255)|0}while(0);return e|0}function ph(a){a=a|0;var b=0,c=0;f[a>>2]=1732;b=f[a+76>>2]|0;if(b|0)gn(b);f[a>>2]=1256;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);gn(b);return}function qh(a){a=a|0;var b=0,c=0;f[a>>2]=2156;b=a+28|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)en(c);f[a>>2]=1196;c=a+20|0;b=f[c>>2]|0;f[c>>2]=0;if(!b){Wf(a);gn(a);return}Sa[f[(f[b>>2]|0)+4>>2]&127](b);Wf(a);gn(a);return}function rh(a){a=a|0;var c=0,d=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;c=0;while(1){if((c|0)==3)break;f[a+(c<<2)>>2]=0;c=c+1|0}if((b[a+11>>0]|0)<0)d=(f[a+8>>2]&2147483647)+-1|0;else d=10;gg(a,d,0);return}function sh(a){a=a|0;var b=0,c=0;f[a>>2]=1480;b=f[a+76>>2]|0;if(b|0)gn(b);f[a>>2]=1256;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);gn(b);return}function th(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1032;b=f[a+16>>2]|0;if(b|0){c=a+20|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}b=f[a+4>>2]|0;if(!b)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(b|0))f[d>>2]=a+(~((a+-4-b|0)>>>2)<<2);gn(b);return}function uh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1788;f[a>>2]=1256;b=f[a+32>>2]|0;if(!b){gn(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b);gn(a);return}function vh(a){a=a|0;var b=0,c=0;f[a>>2]=2156;b=a+28|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)en(c);f[a>>2]=1196;c=a+20|0;b=f[c>>2]|0;f[c>>2]=0;if(!b){Wf(a);return}Sa[f[(f[b>>2]|0)+4>>2]&127](b);Wf(a);return}function wh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if(Cl(a,f[b+8>>2]|0,0)|0)Rg(0,b,c,d);else{e=f[a+8>>2]|0;Va[f[(f[e>>2]|0)+28>>2]&7](e,b,c,d)}return}function xh(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)<0){c=0;return c|0}d=f[a+4>>2]|0;if(((f[d+12>>2]|0)-(f[d+8>>2]|0)>>2|0)<=(b|0)){c=0;return c|0}d=f[(f[a+8>>2]|0)+(f[(f[a+20>>2]|0)+(b<<2)>>2]<<2)>>2]|0;c=Oa[f[(f[d>>2]|0)+32>>2]&127](d,b)|0;return c|0}function yh(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0;d=b[a>>0]|0;e=b[c>>0]|0;if(d<<24>>24==0?1:d<<24>>24!=e<<24>>24){f=e;g=d}else{d=c;c=a;do{c=c+1|0;d=d+1|0;a=b[c>>0]|0;e=b[d>>0]|0}while(!(a<<24>>24==0?1:a<<24>>24!=e<<24>>24));f=e;g=a}return (g&255)-(f&255)|0}function zh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1536;f[a>>2]=1256;b=f[a+32>>2]|0;if(!b){gn(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b);gn(a);return}function Ah(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;rh(d);of(a,d,b);Lk(d);u=c;return}function Bh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;d=u;u=u+32|0;e=d;g=d+20|0;f[e>>2]=f[a+60>>2];f[e+4>>2]=0;f[e+8>>2]=b;f[e+12>>2]=g;f[e+16>>2]=c;if((lk(za(140,e|0)|0)|0)<0){f[g>>2]=-1;h=-1}else h=f[g>>2]|0;u=d;return h|0}function Ch(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)==-1|(b|0)>4){c=0;return c|0}d=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-d|0)<=0){c=0;return c|0}b=f[d>>2]|0;if((b|0)==-1){c=0;return c|0}c=f[(f[a+8>>2]|0)+(b<<2)>>2]|0;return c|0}function Dh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){d=0;return d|0}e=f[c+(b<<2)>>2]|0;if((e|0)<0){d=0;return d|0}d=Fe(f[(f[a+36>>2]|0)+(e<<2)>>2]|0)|0;return d|0}function Eh(a,b){a=a|0;b=b|0;var c=0;Ni(a);f[a>>2]=1136;c=a+36|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;c=f[b>>2]|0;f[b>>2]=0;f[a+60>>2]=c;return}function Fh(a){a=a|0;var b=0,c=0;f[a>>2]=1788;f[a>>2]=1256;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);gn(b);return}function Gh(a){a=a|0;if(!(f[a+60>>2]|0))return 0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+52>>2]|0))return 0;else return (f[a+56>>2]|0)!=0|0;return 0}function Hh(a){a=a|0;var b=0,c=0;f[a>>2]=1536;f[a>>2]=1256;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);gn(b);return}function Ih(a,c){a=a|0;c=c|0;var d=0,e=0;d=a;e=c;c=d+64|0;do{f[d>>2]=f[e>>2];d=d+4|0;e=e+4|0}while((d|0)<(c|0));e=a+64|0;f[a+88>>2]=0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;b[e+20>>0]=0;return}function Jh(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;if((a|0)==0&(c|0)==0)f=d;else{g=d;d=c;c=a;while(1){a=g+-1|0;b[a>>0]=h[10714+(c&15)>>0]|0|e;c=Xj(c|0,d|0,4)|0;d=I;if((c|0)==0&(d|0)==0){f=a;break}else g=a}}return f|0}function Kh(a){a=a|0;var c=0,d=0,e=0;c=a+74|0;d=b[c>>0]|0;b[c>>0]=d+255|d;d=f[a>>2]|0;if(!(d&8)){f[a+8>>2]=0;f[a+4>>2]=0;c=f[a+44>>2]|0;f[a+28>>2]=c;f[a+20>>2]=c;f[a+16>>2]=c+(f[a+48>>2]|0);e=0}else{f[a>>2]=d|32;e=-1}return e|0}function Lh(a,b){a=a|0;b=b|0;var c=0,d=0;c=f[b+88>>2]|0;if(!c){d=0;return d|0}if((f[c>>2]|0)!=2){d=0;return d|0}b=f[c+8>>2]|0;f[a+4>>2]=h[b>>0]|h[b+1>>0]<<8|h[b+2>>0]<<16|h[b+3>>0]<<24;d=1;return d|0}function Mh(a){a=a|0;var b=0;if(!(f[a+44>>2]|0)){b=0;return b|0}if(!(f[a+48>>2]|0)){b=0;return b|0}if(!(f[a+52>>2]|0)){b=0;return b|0}b=(f[a+56>>2]|0)!=0;return b|0}function Nh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0;d=b[a+11>>0]|0;e=d<<24>>24<0;if(e)g=f[a+4>>2]|0;else g=d&255;if(g>>>0<=c>>>0)xm(a);if(e)h=f[a>>2]|0;else h=a;return h+c|0}function Oh(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+44>>2]=c;d=1;return d|0}function Ph(a,b,c){a=a|0;b=b|0;c=c|0;if((b|0)!=0&(c|0)!=0){Kb(a,b,c);return}else{Ob(a,0,0);return}}function Qh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=$(e);f[a+4>>2]=b;nd(a+8|0,c,c+(d<<2)|0);n[a+20>>2]=e;return}function Rh(a,b){a=a|0;b=b|0;var c=0;if(!(Oa[f[(f[a>>2]|0)+36>>2]&127](a,b)|0)){c=0;return c|0}if(!(Oa[f[(f[a>>2]|0)+40>>2]&127](a,b)|0)){c=0;return c|0}c=Na[f[(f[a>>2]|0)+44>>2]&127](a)|0;return c|0}function Sh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;d=f[c>>2]|0;c=a;e=b-a>>2;while(1){if(!e)break;a=(e|0)/2|0;b=c+(a<<2)|0;g=(f[b>>2]|0)>>>0<d>>>0;c=g?b+4|0:c;e=g?e+-1-a|0:a}return c|0}function Th(a){a=a|0;var c=0;f[a>>2]=0;c=a+8|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;b[a+24>>0]=1;f[a+28>>2]=9;c=a+40|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[a+56>>2]=-1;f[a+60>>2]=0;return}function Uh(a,c){a=a|0;c=c|0;var d=0,e=0;a=u;u=u+32|0;d=a;Mf(d,c);c=f[d+16>>2]|0;e=d+4|0;if((b[e+11>>0]|0)>=0){u=a;return c|0}gn(f[e>>2]|0);u=a;return c|0}function Vh(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;if(!(Rm(b[f[a>>2]>>0]|0)|0))c=0;else{d=0;while(1){e=f[a>>2]|0;g=(d*10|0)+-48+(b[e>>0]|0)|0;h=e+1|0;f[a>>2]=h;if(!(Rm(b[h>>0]|0)|0)){c=g;break}else d=g}}return c|0}function Wh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;if(!(Jj(a,c,d)|0)){e=0;return e|0}d=f[a+8>>2]|0;if((b[d+24>>0]|0)!=3){e=0;return e|0}e=(f[d+28>>2]|0)==9;return e|0}function Xh(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+64>>2]=c;d=1;return d|0}function Yh(a){a=a|0;var b=0,c=0;b=f[r>>2]|0;c=b+a|0;if((a|0)>0&(c|0)<(b|0)|(c|0)<0){ea()|0;ya(12);return -1}f[r>>2]=c;if((c|0)>(da()|0)?(ca()|0)==0:0){f[r>>2]=b;ya(12);return -1}return b|0}function Zh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0;if((a|0)==0&(c|0)==0)e=d;else{f=d;d=c;c=a;while(1){a=f+-1|0;b[a>>0]=c&7|48;c=Xj(c|0,d|0,3)|0;d=I;if((c|0)==0&(d|0)==0){e=a;break}else f=a}}return e|0}function _h(a,c){a=a|0;c=c|0;var d=0;if(((c|0)!=0?(f[c+56>>2]|0)==0:0)?(b[c+24>>0]|0)==3:0){f[a+60>>2]=c;d=1}else d=0;return d|0}function $h(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1256;b=f[a+32>>2]|0;if(!b){gn(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b);gn(a);return}function ai(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;if(Cl(a,f[b+8>>2]|0,g)|0)Sf(0,b,c,d,e);return}function bi(a,b,c){a=a|0;b=b|0;c=c|0;return Rb(a,b,c)|0}function ci(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if(!(Jj(a,b,c)|0)){d=0;return d|0}d=(f[(f[(f[(f[b+4>>2]|0)+8>>2]|0)+(c<<2)>>2]|0)+28>>2]|0)==9;return d|0}function di(a){a=a|0;var b=0;switch(a|0){case 11:case 2:case 1:{b=1;break}case 4:case 3:{b=2;break}case 6:case 5:{b=4;break}case 8:case 7:{b=8;break}case 9:{b=4;break}case 10:{b=8;break}default:b=-1}return b|0}function ei(a){a=a|0;var c=0,d=0,e=0;b[a+36>>0]=0;c=Uj(f[a+32>>2]|0,0,7,0)|0;d=Xj(c|0,I|0,3)|0;c=a+16|0;a=c;e=Uj(d|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;a=c;f[a>>2]=e;f[a+4>>2]=I;return}function fi(a){a=a|0;var b=0,c=0,d=0;b=a+60|0;c=a;d=c+60|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=a;b=a+64|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;return}function gi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=(f[a+96>>2]|0)+(b*12|0)|0;pd(c,d,d+12|0);return 1}function hi(){var a=0,b=0;a=dj(40)|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;n[a+16>>2]=$(1.0);b=a+20|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;n[a+36>>2]=$(1.0);return a|0}function ii(a,c){a=a|0;c=c|0;var d=0,e=0;if((a|0)!=(c|0)){d=b[c+11>>0]|0;e=d<<24>>24<0;Kf(a,e?f[c>>2]|0:c,e?f[c+4>>2]|0:d&255)|0}return a|0}function ji(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=a&65535;d=b&65535;e=X(d,c)|0;f=a>>>16;a=(e>>>16)+(X(d,f)|0)|0;d=b>>>16;b=X(d,c)|0;return (I=(a>>>16)+(X(d,f)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|e&65535|0)|0}function ki(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=fg(b)|0;d=dj(c+13|0)|0;f[d>>2]=c;f[d+4>>2]=c;f[d+8>>2]=0;e=am(d)|0;be(e|0,b|0,c+1|0)|0;f[a>>2]=e;return}function li(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)==-1|(b|0)>4){c=-1;return c|0}d=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-d|0)<=0){c=-1;return c|0}c=f[d>>2]|0;return c|0}function mi(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f[b+44>>2]=e;Tb(a,b,c,d,e);return}function ni(a){a=a|0;var b=0,c=0;f[a>>2]=1256;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);gn(b);return}function oi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(Cl(a,f[b+8>>2]|0,0)|0)Rg(0,b,c,d);return}function pi(a){a=a|0;var b=0;f[a>>2]=2724;b=a+4|0;f[a+40>>2]=0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;f[b+24>>2]=0;f[b+28>>2]=0;d[b+32>>1]=0;return}function qi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;if((c|0)<(a|0)&(a|0)<(c+d|0)){e=a;c=c+d|0;a=a+d|0;while((d|0)>0){a=a-1|0;c=c-1|0;d=d-1|0;b[a>>0]=b[c>>0]|0}a=e}else be(a,c,d)|0;return a|0}function ri(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1004;b=f[a+8>>2]|0;if(!b){gn(a);return}c=a+12|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b);gn(a);return}function si(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=u;u=u+16|0;e=d;f[e>>2]=f[c>>2];g=Pa[f[(f[a>>2]|0)+16>>2]&31](a,b,e)|0;if(g)f[c>>2]=f[e>>2];u=d;return g&1|0}function ti(a,b){a=a|0;b=b|0;var c=0;if(b>>>0>=2){c=0;return c|0}f[a+28>>2]=b;c=1;return c|0}function ui(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((b|0)>0)d=0;else return;do{e=f[a+(d<<2)>>2]|0;f[c+(d<<2)>>2]=e<<31>>31^e>>>1;d=d+1|0}while((d|0)!=(b|0));return}function vi(){var a=0,b=0;a=gj()|0;if((a|0?(b=f[a>>2]|0,b|0):0)?(a=b+48|0,(f[a>>2]&-256|0)==1126902528?(f[a+4>>2]|0)==1129074247:0):0)Uk(f[b+12>>2]|0);Uk(om()|0)}function wi(a){a=a|0;var c=0;c=b[w+(a&255)>>0]|0;if((c|0)<8)return c|0;c=b[w+(a>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=b[w+(a>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return (b[w+(a>>>24)>>0]|0)+24|0}function xi(a){a=a|0;var b=0,c=0,d=0;if(!a)return;b=f[a>>2]|0;if(b|0){c=a+4|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);gn(b)}gn(a);return}function yi(a){a=a|0;var b=0,c=0,d=0;if(!a)return;b=f[a>>2]|0;if(b|0){c=a+4|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-2-b|0)>>>1)<<1);gn(b)}gn(a);return}function zi(a,c){a=a|0;c=c|0;var d=0;b[c+84>>0]=1;a=f[c+68>>2]|0;d=c+72|0;c=f[d>>2]|0;if((c|0)==(a|0))return 1;f[d>>2]=c+(~((c+-4-a|0)>>>2)<<2);return 1}function Ai(a){a=a|0;var b=0,c=0;if(Lm(a)|0?(b=gm(f[a>>2]|0)|0,a=b+8|0,c=f[a>>2]|0,f[a>>2]=c+-1,(c+-1|0)<0):0)gn(b);return}function Bi(a){a=a|0;var b=0;f[a>>2]=2440;b=f[a+36>>2]|0;if(b|0)gn(b);b=f[a+24>>2]|0;if(!b){gn(a);return}gn(b);gn(a);return}function Ci(a){a=a|0;var c=0;f[a>>2]=0;c=a+8|0;d[a+38>>1]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;f[c+24>>2]=0;b[c+28>>0]=0;return}function Di(a){a=a|0;var b=0,c=0;f[a>>2]=1196;b=a+20|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);Wf(a);gn(a);return}function Ei(a,b){a=a|0;b=b|0;return Oa[f[(f[a>>2]|0)+48>>2]&127](a,(f[b+4>>2]|0)-(f[b>>2]|0)>>2)|0}function Fi(a){a=a|0;var b=0,c=0;f[a>>2]=1004;b=f[a+8>>2]|0;if(!b)return;c=a+12|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);gn(b);return}function Gi(a){a=a|0;var b=0;f[a>>2]=2508;b=f[a+36>>2]|0;if(b|0)gn(b);b=f[a+24>>2]|0;if(!b){gn(a);return}gn(b);gn(a);return}function Hi(a){a=a|0;f[a>>2]=2528;xf(a+8|0);gn(a);return}function Ii(a,b,c){a=a|0;b=b|0;c=c|0;xb(a,b,c);return}function Ji(a){a=a|0;Ci(a);Ci(a+40|0);Wk(a+80|0);Ci(a+96|0);f[a+136>>2]=0;f[a+140>>2]=0;f[a+144>>2]=0;return}function Ki(a){a=a|0;var b=0,c=0;f[a>>2]=1196;b=a+20|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);Wf(a);return}function Li(a,b,c){a=a|0;b=b|0;c=c|0;return xc(a,b,5,6,c)|0}function Mi(a,b,c){a=a|0;b=b|0;c=c|0;return vc(a,b,3,4,c)|0}function Ni(a){a=a|0;var b=0;f[a>>2]=1032;b=a+4|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;f[b+24>>2]=0;f[b+28>>2]=0;return}function Oi(a,b,c){a=a|0;b=b|0;c=c|0;return Ac(a,b,1,2,c)|0}function Pi(a,b,c){a=a|0;b=b|0;c=c|0;return wc(a,b,3,4,c)|0}function Qi(a,b,c){a=a|0;b=b|0;c=c|0;return yc(a,b,5,6,c)|0}function Ri(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=a+20|0;e=f[d>>2]|0;g=(f[a+16>>2]|0)-e|0;a=g>>>0>c>>>0?c:g;be(e|0,b|0,a|0)|0;f[d>>2]=(f[d>>2]|0)+a;return c|0}function Si(a,b,c){a=a|0;b=b|0;c=c|0;return Bc(a,b,1,2,c)|0}function Ti(a){a=a|0;var b=0;f[a>>2]=2440;b=f[a+36>>2]|0;if(b|0)gn(b);b=f[a+24>>2]|0;if(!b)return;gn(b);return}function Ui(a){a=a|0;f[a>>2]=2528;xf(a+8|0);return}function Vi(){var a=0,b=0;a=dj(24)|0;f[a>>2]=1004;f[a+4>>2]=-1;b=a+8|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return a|0}function Wi(a){a=a|0;var c=0;Th(a);c=a+64|0;f[a+88>>2]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;b[c+20>>0]=0;return}function Xi(a){a=a|0;var b=0,c=0;if(!a)return;b=f[a+8>>2]|0;if(b|0){c=a+12|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;gn(b)}gn(a);return}function Yi(a){a=a|0;var b=0;f[a>>2]=2508;b=f[a+36>>2]|0;if(b|0)gn(b);b=f[a+24>>2]|0;if(!b)return;gn(b);return}function Zi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((f[b+4>>2]|0)==(c|0)?(c=b+28|0,(f[c>>2]|0)!=1):0)f[c>>2]=d;return}function _i(a,b,c,e){a=a|0;b=b|0;c=c|0;e=e|0;f[a>>2]=b;b=a+8|0;f[b>>2]=c;f[b+4>>2]=0;d[a+38>>1]=e;e=a+16|0;f[e>>2]=0;f[e+4>>2]=0;return}function $i(a){a=a|0;var b=0,c=0;if(!a)return;b=f[a>>2]|0;if(b|0){c=a+4|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;gn(b)}gn(a);return}function aj(a){a=a|0;var b=0;Jl(a);f[a+16>>2]=0;f[a+20>>2]=0;f[a+12>>2]=a+16;b=a+24|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return}function bj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e|0;fc(a,b,c,d,g)|0;u=e;return (I=f[g+4>>2]|0,f[g>>2]|0)|0}function cj(a){a=a|0;var b=0;$j(a);f[a>>2]=2776;b=a+84|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;return}function dj(a){a=a|0;var b=0,c=0;b=(a|0)==0?1:a;while(1){a=Ya(b)|0;if(a|0){c=a;break}a=im()|0;if(!a){c=0;break}Ra[a&3]()}return c|0}function ej(a,b,c){a=a|0;b=b|0;c=c|0;f[a+4>>2]=b;f[a+8>>2]=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(c<<2)>>2];f[a+12>>2]=c;return 1}function fj(a){a=a|0;var b=0,c=0,d=0;b=u;u=u+16|0;c=b;d=jn(f[a+60>>2]|0)|0;f[c>>2]=d;d=lk(Ba(6,c|0)|0)|0;u=b;return d|0}function gj(){var a=0,b=0;a=u;u=u+16|0;if(!(Ha(13764,3)|0)){b=Fa(f[3442]|0)|0;u=a;return b|0}else Bj(12902,a);return 0}function hj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=ji(e,a)|0;f=I;return (I=(X(b,a)|0)+(X(d,e)|0)+f|f&0,c|0|0)|0}function ij(a){a=a|0;xf(a);gn(a);return}function jj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Li(b,c,d)|0}function kj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Mi(b,c,d)|0}function lj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return $c(b,c,d)|0}function mj(a){a=a|0;var b=0;b=u;u=u+16|0;Ab(a);if(!(Ia(f[3442]|0,0)|0)){u=b;return}else Bj(13001,b)}function nj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Oi(b,c,d)|0}function oj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Pi(b,c,d)|0}function pj(a,b,c){a=a|0;b=$(b);c=c|0;var d=0,e=La;if((c|0)<1){d=0;return d|0}e=$(b/$(c|0));n[a>>2]=e;d=1;return d|0}function qj(a){a=a|0;f[a>>2]=1988;gn(a);return}function rj(a){a=a|0;var b=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;b=a+16|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return}function sj(a){a=a|0;Gk(a);f[a>>2]=2156;f[a+24>>2]=-1;f[a+28>>2]=0;n[a+32>>2]=$(0.0);return}function tj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Si(b,c,d)|0}function uj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Qi(b,c,d)|0}function vj(a,b,c){a=a|0;b=b|0;c=c|0;f[a>>2]=b;b=a+8|0;f[b>>2]=c;f[b+4>>2]=0;b=a+16|0;f[b>>2]=0;f[b+4>>2]=0;return}function wj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;f[g>>2]=d;d=zf(a,b,c,g)|0;u=e;return d|0}function xj(a){a=a|0;f[a>>2]=2072;gn(a);return}function yj(a){a=a|0;f[a>>2]=1988;return}function zj(a,b,c){a=a|0;b=b|0;c=c|0;return 1}function Aj(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return Qa[a&15](b|0,c|0,d|0,e|0,f|0,g|0)|0}function Bj(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;f[d>>2]=b;b=f[705]|0;ue(b,a,d)|0;jg(10,b)|0;Ca()}function Cj(a){a=a|0;f[a>>2]=2072;return}function Dj(a,b){a=a|0;b=b|0;var c=0;c=f[a+48>>2]|0;return Oa[f[(f[c>>2]|0)+16>>2]&127](c,b)|0}function Ej(a,b,c){a=a|0;b=b|0;c=c|0;return li(b,c)|0}function Fj(a,b){a=a|0;b=b|0;var c=0;c=f[a+48>>2]|0;return Oa[f[(f[c>>2]|0)+12>>2]&127](c,b)|0}function Gj(a,b){a=a|0;b=b|0;var c=0;c=f[a+48>>2]|0;return Oa[f[(f[c>>2]|0)+20>>2]&127](c,b)|0}function Hj(a){a=a|0;var c=0,d=0;c=a+4|0;if((b[c+11>>0]|0)<0){d=f[c>>2]|0;return d|0}else{d=c;return d|0}return 0}function Ij(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Dd(b,c,d)|0}function Jj(a,b,c){a=a|0;b=b|0;c=c|0;return ej(a,b,c)|0}function Kj(){var a=0;a=u;u=u+16|0;if(!(Ga(13768,87)|0)){u=a;return}else Bj(12951,a)}function Lj(a){a=a|0;Nc(a);gn(a);return}function Mj(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;Xa[a&3](b|0,c|0,d|0,e|0,f|0,g|0)}function Nj(a){a=a|0;if(!(f[a+44>>2]|0))return 0;else return Na[f[(f[a>>2]|0)+48>>2]&127](a)|0;return 0}function Oj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return _f(b,c,d)|0}function Pj(a,b,c){a=a|0;b=b|0;c=c|0;if(b|0)Uf(a|0,(Gm(c)|0)&255|0,b|0)|0;return a|0}function Qj(a){a=a|0;return 4}function Rj(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b<<c|(a&(1<<c)-1<<32-c)>>>32-c;return a<<c}I=a<<c-32;return 0}function Sj(a){a=a|0;var c=0;if(!a)return;c=a+4|0;if((b[c+11>>0]|0)<0)gn(f[c>>2]|0);gn(a);return}function Tj(){}function Uj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+c>>>0;return (I=b+d+(e>>>0<a>>>0|0)>>>0,e|0)|0}function Vj(a,b){a=a|0;b=b|0;var c=0;if(!b)c=0;else c=xe(f[b>>2]|0,f[b+4>>2]|0,a)|0;return (c|0?c:a)|0}function Wj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=b-d>>>0;e=b-d-(c>>>0>a>>>0|0)>>>0;return (I=e,a-c>>>0|0)|0}function Xj(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b>>>c;return a>>>c|(b&(1<<c)-1)<<32-c}I=0;return b>>>c-32|0}function Yj(a,b,c){a=a|0;b=b|0;c=c|0;return Yg(a,b,c)|0}function Zj(a){a=a|0;Hc(a);gn(a);return}function _j(a){a=a|0;return 5}function $j(a){a=a|0;var b=0;f[a>>2]=2804;b=a+4|0;a=b+80|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function ak(a){a=a|0;return 6}function bk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return gi(b,c,d)|0}function ck(a,b,c){a=a|0;b=b|0;c=c|0;return Ej(a,b,c)|0}function dk(a){a=a|0;var b=0;b=f[a+48>>2]|0;return Na[f[(f[b>>2]|0)+28>>2]&127](b)|0}function ek(a,b,c){a=a|0;b=b|0;c=c|0;return xd(b,c)|0}function fk(a){a=a|0;f[a>>2]=1088;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=-1;f[a+16>>2]=0;return}function gk(a){a=a|0;var b=0;b=f[a+48>>2]|0;return Na[f[(f[b>>2]|0)+24>>2]&127](b)|0}function hk(a,b){a=a|0;b=b|0;mg(a,b);return}function ik(a){a=a|0;var b=0;b=f[a+48>>2]|0;return Na[f[(f[b>>2]|0)+36>>2]&127](b)|0}function jk(a,b,c){a=a|0;b=b|0;c=c|0;f[a+28>>2]=b;f[a+32>>2]=c;return 1}function kk(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Wa[a&3](b|0,c|0,d|0,e|0,f|0)}function lk(a){a=a|0;var b=0,c=0;if(a>>>0>4294963200){b=on()|0;f[b>>2]=0-a;c=-1}else c=a;return c|0}function mk(a,b,c){a=a|0;b=b|0;c=c|0;return ah(a,b,c)|0}function nk(a,b,c){a=a|0;b=b|0;c=c|0;return nf(a,b,c)|0}function ok(a,b,c){a=a|0;b=b|0;c=c|0;return Cf(a,b,c)|0}function pk(a,b,c){a=a|0;b=b|0;c=c|0;return Ue(a,b,c)|0}function qk(a,b,c){a=a|0;b=b|0;c=c|0;return +(+yf(a,b,c))}function rk(a,b){a=a|0;b=b|0;return Oa[f[(f[a>>2]|0)+12>>2]&127](a,b)|0}function sk(a,b){a=a|0;b=b|0;return Oa[f[(f[a>>2]|0)+56>>2]&127](a,b)|0}function tk(a,b,c){a=a|0;b=b|0;c=c|0;return Cg(a,b,c)|0}function uk(a,b){a=a|0;b=b|0;f[a+4>>2]=b;return 1}function vk(a,b,c){a=a|0;b=b|0;c=c|0;return Nk(b,c)|0}function wk(a,b,c){a=a|0;b=b|0;c=c|0;return Df(a,b,c)|0}function xk(a,b,c){a=a|0;b=b|0;c=c|0;return Af(a,b,c)|0}function yk(a){a=a|0;Gk(a);f[a>>2]=1872;f[a+24>>2]=-1;return}function zk(a,b){a=a|0;b=b|0;f[a+8>>2]=b;f[a+12>>2]=-1;return 1}function Ak(a,b,c){a=a|0;b=b|0;c=c|0;return ie(a,b,c)|0}function Bk(a,b,c){a=a|0;b=b|0;c=c|0;return De(b,c)|0}function Ck(a){a=+a;var b=0;p[s>>3]=a;b=f[s>>2]|0;I=f[s+4>>2]|0;return b|0}function Dk(){var a=0;a=dj(40)|0;f[a>>2]=-1;rj(a+8|0);return a|0}function Ek(){var a=0;a=dj(8)|0;f[a>>2]=976;f[a+4>>2]=-1;return a|0}function Fk(a,b,c){a=a|0;b=b|0;c=c|0;return gf(a,b,c)|0}function Gk(a){a=a|0;fk(a);f[a>>2]=1196;f[a+20>>2]=0;return}function Hk(a,b){a=a|0;b=b|0;hk(a,b);return}function Ik(a){a=a|0;var b=0;if(!a)b=0;else b=(ye(a,848,936,0)|0)!=0&1;return b|0}function Jk(a,b){a=a|0;b=b|0;return $(n[(f[a+8>>2]|0)+(b<<2)>>2])}function Kk(a,b){a=a|0;b=b|0;return Uh(a,b)|0}function Lk(a){a=a|0;if((b[a+11>>0]|0)<0)gn(f[a>>2]|0);return}function Mk(a){a=a|0;if(!a)return;Sa[f[(f[a>>2]|0)+4>>2]&127](a);return}function Nk(a,b){a=a|0;b=b|0;return lh(a,b)|0}function Ok(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Va[a&7](b|0,c|0,d|0,e|0)}function Pk(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)qi(a|0,b|0,c|0)|0;return a|0}function Qk(a,b,c){a=a|0;b=b|0;c=c|0;return bl(b,c)|0}function Rk(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)be(a|0,b|0,c|0)|0;return a|0}function Sk(a,b){a=a|0;b=b|0;return -1}function Tk(a){a=a|0;return 3}function Uk(a){a=a|0;var b=0;b=u;u=u+16|0;Ra[a&3]();Bj(13054,b)}function Vk(a,b){a=a|0;b=b|0;return Pl(a,b)|0}function Wk(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;b[a+12>>0]=0;return}function Xk(a){a=a|0;Ne(a);gn(a);return}function Yk(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;return}function Zk(a){a=a|0;hl(a);f[a>>2]=2284;f[a+48>>2]=0;return}function _k(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Pa[a&31](b|0,c|0,d|0)|0}function $k(a,b,c){a=a|0;b=b|0;c=c|0;vj(a,b,c);return}function al(a,b){a=a|0;b=b|0;f[a>>2]=3792;ki(a+4|0,b);return}function bl(a,b){a=a|0;b=b|0;return f[(f[a+8>>2]|0)+(b<<2)>>2]|0}function cl(a,b){a=a|0;b=b|0;var c=0;if(!a)c=0;else c=vf(a,b,0)|0;return c|0}function dl(a,b){a=a|0;b=b|0;return f[(f[a+4>>2]|0)+(b<<2)>>2]|0}function el(){var a=0;a=dj(64)|0;Th(a);return a|0}function fl(a,b){a=a|0;b=b|0;return $(ll(a,b))}function gl(a){a=a|0;return f[a+8>>2]|0}function hl(a){a=a|0;pi(a);f[a>>2]=2224;f[a+44>>2]=0;return}function il(a){a=a|0;if(!a)return;Bf(a);gn(a);return}function jl(a,b){a=a|0;b=b|0;return Xl(a,b)|0}function kl(a){a=a|0;return b[(f[a+8>>2]|0)+24>>0]|0}function ll(a,b){a=a|0;b=b|0;return $(n[(f[a>>2]|0)+(b<<2)>>2])}function ml(a,b,c){a=a|0;b=b|0;c=c|0;if(!(f[a>>2]&32))Ve(b,c,a)|0;return}function nl(a){a=a|0;return (f[a+8>>2]|0)-(f[a+4>>2]|0)>>2|0}function ol(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Ua[a&15](b|0,c|0,d|0)}function pl(){var a=0;a=dj(96)|0;Wi(a);return a|0}function ql(a){a=a|0;var b=0;b=u;u=u+a|0;u=u+15&-16;return b|0}function rl(a){a=a|0;var b=0;b=(an()|0)+188|0;return wg(a,f[b>>2]|0)|0}function sl(a){a=a|0;return ((f[a+100>>2]|0)-(f[a+96>>2]|0)|0)/12|0|0}function tl(){var a=0;a=dj(16)|0;Yk(a);return a|0}function ul(){var a=0;a=dj(40)|0;Ci(a);return a|0}function vl(a,b){a=a|0;b=b|0;return 1}function wl(a,b){a=a|0;b=b|0;return Fl(a,b)|0}function xl(a,b){a=a|0;b=b|0;return Gl(a,b)|0}function yl(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(3);return 0}function zl(a,b){a=a|0;b=b|0;return Vl(a,b)|0}function Al(){var a=0;a=dj(12)|0;Nl(a);return a|0}function Bl(a){a=a|0;Wf(a);gn(a);return}function Cl(a,b,c){a=a|0;b=b|0;c=c|0;return (a|0)==(b|0)|0}function Dl(a,b){a=a|0;b=b|0;var c=0;c=Sl(a|0)|0;return ((b|0)==0?a:c)|0}function El(a){a=a|0;return (f[a+12>>2]|0)-(f[a+8>>2]|0)>>2|0}function Fl(a,b){a=a|0;b=b|0;return f[(f[a>>2]|0)+(b<<2)>>2]|0}function Gl(a,b){a=a|0;b=b|0;return d[(f[a>>2]|0)+(b<<1)>>1]|0}function Hl(a,b){a=a|0;b=b|0;f[a+4>>2]=b;return}function Il(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return fc(a,b,c,d,0)|0}function Jl(a){a=a|0;f[a+4>>2]=0;f[a+8>>2]=0;f[a>>2]=a+4;return}function Kl(){var a=0;a=dj(84)|0;$j(a);return a|0}function Ll(a){a=a|0;return (f[a+4>>2]|0)-(f[a>>2]|0)>>2|0}function Ml(a){a=a|0;return (f[a+4>>2]|0)-(f[a>>2]|0)>>1|0}function Nl(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;return}function Ol(a){a=a|0;f[a>>2]=3792;Ai(a+4|0);return}function Pl(a,b){a=a|0;b=b|0;return f[b+12>>2]|0}function Ql(a,b,c){a=a|0;b=b|0;c=c|0;return Oa[a&127](b|0,c|0)|0}function Rl(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(10)}function Sl(a){a=a|0;return (a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function Tl(a){a=a|0;hl(a);f[a>>2]=2640;return}function Ul(a,c){a=a|0;c=c|0;b[a>>0]=b[c>>0]|0;return}function Vl(a,c){a=a|0;c=c|0;return b[(f[a>>2]|0)+c>>0]|0}function Wl(a){a=a|0;return (f[a+4>>2]|0)-(f[a>>2]|0)|0}function Xl(a,b){a=a|0;b=b|0;return f[b+4>>2]|0}function Yl(a){a=a|0;return $(n[a+20>>2])}function Zl(a){a=a|0;return f[a+4>>2]|0}function _l(a){a=a|0;if(!a)return;gn(a);return}function $l(a,b){a=a|0;b=b|0;if(!x){x=a;y=b}}function am(a){a=a|0;return a+12|0}function bm(a){a=a|0;return f[a+88>>2]|0}function cm(a,b,c){a=a|0;b=b|0;c=c|0;Ta[a&7](b|0,c|0)}function dm(){var a=0;a=dj(40)|0;aj(a);return a|0}function em(){var a=0;a=dj(108)|0;cj(a);return a|0}function fm(a){a=a|0;return (b[a+32>>0]|0)!=0|0}function gm(a){a=a|0;return a+-12|0}function hm(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;aa(9)}function im(){var a=0;a=f[3443]|0;f[3443]=a+0;return a|0}function jm(a){a=a|0;return Jm(a+4|0)|0}function km(a){a=a|0;return f[a+56>>2]|0}function lm(a){a=a|0;Qd(a);gn(a);return}function mm(a){a=a|0;ln(a);gn(a);return}function nm(a){a=a|0;return b[a+24>>0]|0}function om(){var a=0;a=f[925]|0;f[925]=a+0;return a|0}function pm(a,b){a=a|0;b=b|0;return 0}function qm(a){a=a|0;return f[a+40>>2]|0}function rm(a){a=a|0;return f[a+48>>2]|0}function sm(a,b){a=a|0;b=b|0;return Na[a&127](b|0)|0}function tm(a){a=a|0;return f[a+60>>2]|0}function um(a){a=a|0;return f[a+28>>2]|0}function vm(a){a=a|0;sa(a|0)|0;vi()}function wm(a){a=a|0;Ol(a);gn(a);return}function xm(a){a=a|0;Ca()}function ym(a){a=a|0;n[a>>2]=$(1.0);return}function zm(a,b){a=a|0;b=b|0;u=a;v=b}function Am(a){a=a|0;return ((a|0)==32|(a+-9|0)>>>0<5)&1|0}function Bm(a){a=a|0;return (f[a>>2]|0)==0|0}function Cm(a){a=a|0;return f[a+80>>2]|0}function Dm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;aa(8)}function Em(a,b){a=a|0;b=b|0;Sa[a&127](b|0)}function Fm(a,b){a=a|0;b=b|0;return Vj(a,b)|0}function Gm(a){a=a|0;return a&255|0}function Hm(a){a=a|0;f[a>>2]=0;return}function Im(a,b,c){a=a|0;b=b|0;c=c|0;aa(2);return 0}function Jm(a){a=a|0;return f[a>>2]|0}function Km(a){a=a|0;return 2}function Lm(a){a=a|0;return 1}function Mm(a,b){a=+a;b=b|0;return +(+xg(a,b))}function Nm(){return 3}function Om(a,b,c){a=a|0;b=b|0;c=c|0;aa(7)}function Pm(){return -4}function Qm(){return 4}function Rm(a){a=a|0;return (a+-48|0)>>>0<10|0}function Sm(){return -3}function Tm(){return 1}function Um(){return 2}function Vm(){return -5}function Wm(a,b){a=a|0;b=b|0;aa(1);return 0}function Xm(a){a=a|0;Ea()}function Ym(a){a=a|0;Ra[a&3]()}function Zm(){return -2}function _m(){ua()}function $m(){return -1}function an(){return rn()|0}function bn(a,b){a=a|0;b=b|0;aa(6)}function cn(){return 0}function dn(a){a=a|0;return dj(a)|0}function en(a){a=a|0;gn(a);return}function fn(a){a=a|0;u=a}function gn(a){a=a|0;Ab(a);return}function hn(a){a=a|0;I=a}function jn(a){a=a|0;return a|0}function kn(a){a=a|0;aa(0);return 0}function ln(a){a=a|0;return}function mn(a){a=a|0;return 0}function nn(){return I|0}function on(){return 13696}function pn(){return u|0}function qn(a){a=a|0;aa(5)}function rn(){return 2948}function sn(){aa(4)}
+
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Im,Im,Im,Im];var Qa=[yl,lc,Db,db,uc,Jb,Eb,cb,tc,Ib,Yd,Lb,Mb,yl,yl,yl];var Ra=[sn,_m,uf,Kj];var Sa=[qn,ln,en,Fi,ri,th,Xm,Wf,Bl,Ne,Xk,Ki,Di,ni,Xm,$h,$h,Ag,vg,sh,hh,Hh,zh,ln,en,$h,zg,tg,ph,ch,Fh,uh,ln,en,Di,ln,en,yj,qj,ln,en,Cj,xj,ln,en,vh,qh,og,Xm,Of,Lf,Hc,Zj,Qg,Kg,jh,$g,Ti,Bi,Tg,Ng,nh,eh,Yi,Gi,Ui,Hi,xf,ij,Nc,Lj,eg,ln,en,Xm,Zg,Sg,Qd,lm,ln,mm,ln,ln,mm,Ol,wm,wm,mj,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn,qn];var Ta=[bn,Jg,ud,Pg,Hb,bn,bn,bn];var Ua=[Om,Fg,wb,yb,yb,wb,dg,ng,Zd,Od,Om,Om,Om,Om,Om,Om];var Va=[Dm,Gf,Td,oi,wh,Dm,Dm,Dm];var Wa=[hm,Vf,de,hm];var Xa=[Rl,ai,ih,Rl];return{___cxa_can_catch:si,___cxa_is_pointer_type:Ik,___divdi3:Ug,___muldi3:hj,___udivdi3:Il,___uremdi3:bj,_bitshift64Lshr:Xj,_bitshift64Shl:Rj,_emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0:Ek,_emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1:rk,_emscripten_bind_AttributeOctahedronTransform___destroy___0:Mk,_emscripten_bind_AttributeOctahedronTransform_quantization_bits_0:Zl,_emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0:Vi,_emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1:rk,_emscripten_bind_AttributeQuantizationTransform___destroy___0:Mk,_emscripten_bind_AttributeQuantizationTransform_min_value_1:Jk,_emscripten_bind_AttributeQuantizationTransform_quantization_bits_0:Zl,_emscripten_bind_AttributeQuantizationTransform_range_0:Yl,_emscripten_bind_AttributeTransformData_AttributeTransformData_0:Dk,_emscripten_bind_AttributeTransformData___destroy___0:Xi,_emscripten_bind_AttributeTransformData_transform_type_0:Jm,_emscripten_bind_DecoderBuffer_DecoderBuffer_0:ul,_emscripten_bind_DecoderBuffer_Init_2:$k,_emscripten_bind_DecoderBuffer___destroy___0:_l,_emscripten_bind_Decoder_DecodeBufferToMesh_2:mk,_emscripten_bind_Decoder_DecodeBufferToPointCloud_2:Yj,_emscripten_bind_Decoder_Decoder_0:dm,_emscripten_bind_Decoder_GetAttributeByUniqueId_2:vk,_emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3:lj,_emscripten_bind_Decoder_GetAttributeFloat_3:Oj,_emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3:Ij,_emscripten_bind_Decoder_GetAttributeIdByName_2:Bk,_emscripten_bind_Decoder_GetAttributeId_2:ck,_emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3:oj,_emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3:uj,_emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3:tj,_emscripten_bind_Decoder_GetAttributeIntForAllPoints_3:uj,_emscripten_bind_Decoder_GetAttributeMetadata_2:tk,_emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3:kj,_emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3:jj,_emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3:nj,_emscripten_bind_Decoder_GetAttribute_2:Qk,_emscripten_bind_Decoder_GetEncodedGeometryType_1:Kk,_emscripten_bind_Decoder_GetFaceFromMesh_3:bk,_emscripten_bind_Decoder_GetMetadata_1:jl,_emscripten_bind_Decoder_GetTriangleStripsFromMesh_2:ek,_emscripten_bind_Decoder_SkipAttributeTransform_1:Hk,_emscripten_bind_Decoder___destroy___0:Mg,_emscripten_bind_DracoFloat32Array_DracoFloat32Array_0:Al,_emscripten_bind_DracoFloat32Array_GetValue_1:fl,_emscripten_bind_DracoFloat32Array___destroy___0:xi,_emscripten_bind_DracoFloat32Array_size_0:Ll,_emscripten_bind_DracoInt16Array_DracoInt16Array_0:Al,_emscripten_bind_DracoInt16Array_GetValue_1:xl,_emscripten_bind_DracoInt16Array___destroy___0:yi,_emscripten_bind_DracoInt16Array_size_0:Ml,_emscripten_bind_DracoInt32Array_DracoInt32Array_0:Al,_emscripten_bind_DracoInt32Array_GetValue_1:wl,_emscripten_bind_DracoInt32Array___destroy___0:xi,_emscripten_bind_DracoInt32Array_size_0:Ll,_emscripten_bind_DracoInt8Array_DracoInt8Array_0:Al,_emscripten_bind_DracoInt8Array_GetValue_1:zl,_emscripten_bind_DracoInt8Array___destroy___0:$i,_emscripten_bind_DracoInt8Array_size_0:Wl,_emscripten_bind_DracoUInt16Array_DracoUInt16Array_0:Al,_emscripten_bind_DracoUInt16Array_GetValue_1:xl,_emscripten_bind_DracoUInt16Array___destroy___0:yi,_emscripten_bind_DracoUInt16Array_size_0:Ml,_emscripten_bind_DracoUInt32Array_DracoUInt32Array_0:Al,_emscripten_bind_DracoUInt32Array_GetValue_1:wl,_emscripten_bind_DracoUInt32Array___destroy___0:xi,_emscripten_bind_DracoUInt32Array_size_0:Ll,_emscripten_bind_DracoUInt8Array_DracoUInt8Array_0:Al,_emscripten_bind_DracoUInt8Array_GetValue_1:zl,_emscripten_bind_DracoUInt8Array___destroy___0:$i,_emscripten_bind_DracoUInt8Array_size_0:Wl,_emscripten_bind_GeometryAttribute_GeometryAttribute_0:el,_emscripten_bind_GeometryAttribute___destroy___0:_l,_emscripten_bind_Mesh_Mesh_0:em,_emscripten_bind_Mesh___destroy___0:Mk,_emscripten_bind_Mesh_num_attributes_0:El,_emscripten_bind_Mesh_num_faces_0:sl,_emscripten_bind_Mesh_num_points_0:Cm,_emscripten_bind_MetadataQuerier_GetDoubleEntry_2:qk,_emscripten_bind_MetadataQuerier_GetEntryName_2:Ak,_emscripten_bind_MetadataQuerier_GetIntEntry_2:xk,_emscripten_bind_MetadataQuerier_GetStringEntry_2:pk,_emscripten_bind_MetadataQuerier_HasDoubleEntry_2:ok,_emscripten_bind_MetadataQuerier_HasEntry_2:Fk,_emscripten_bind_MetadataQuerier_HasIntEntry_2:wk,_emscripten_bind_MetadataQuerier_HasStringEntry_2:nk,_emscripten_bind_MetadataQuerier_MetadataQuerier_0:tl,_emscripten_bind_MetadataQuerier_NumEntries_1:Vk,_emscripten_bind_MetadataQuerier___destroy___0:Og,_emscripten_bind_Metadata_Metadata_0:hi,_emscripten_bind_Metadata___destroy___0:il,_emscripten_bind_PointAttribute_GetAttributeTransformData_0:bm,_emscripten_bind_PointAttribute_PointAttribute_0:pl,_emscripten_bind_PointAttribute___destroy___0:hg,_emscripten_bind_PointAttribute_attribute_type_0:km,_emscripten_bind_PointAttribute_byte_offset_0:rm,_emscripten_bind_PointAttribute_byte_stride_0:qm,_emscripten_bind_PointAttribute_data_type_0:um,_emscripten_bind_PointAttribute_normalized_0:fm,_emscripten_bind_PointAttribute_num_components_0:nm,_emscripten_bind_PointAttribute_size_0:Cm,_emscripten_bind_PointAttribute_unique_id_0:tm,_emscripten_bind_PointCloud_PointCloud_0:Kl,_emscripten_bind_PointCloud___destroy___0:Mk,_emscripten_bind_PointCloud_num_attributes_0:El,_emscripten_bind_PointCloud_num_points_0:Cm,_emscripten_bind_Status___destroy___0:Sj,_emscripten_bind_Status_code_0:Jm,_emscripten_bind_Status_error_msg_0:Hj,_emscripten_bind_Status_ok_0:Bm,_emscripten_bind_VoidPtr___destroy___0:_l,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM:$m,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM:cn,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM:Um,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM:Tm,_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE:$m,_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD:cn,_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH:Tm,_emscripten_enum_draco_GeometryAttribute_Type_COLOR:Um,_emscripten_enum_draco_GeometryAttribute_Type_GENERIC:Qm,_emscripten_enum_draco_GeometryAttribute_Type_INVALID:$m,_emscripten_enum_draco_GeometryAttribute_Type_NORMAL:Tm,_emscripten_enum_draco_GeometryAttribute_Type_POSITION:cn,_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD:Nm,_emscripten_enum_draco_StatusCode_ERROR:$m,_emscripten_enum_draco_StatusCode_INVALID_PARAMETER:Sm,_emscripten_enum_draco_StatusCode_IO_ERROR:Zm,_emscripten_enum_draco_StatusCode_OK:cn,_emscripten_enum_draco_StatusCode_UNKNOWN_VERSION:Vm,_emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION:Pm,_emscripten_replace_memory:Ma,_free:Ab,_i64Add:Uj,_i64Subtract:Wj,_llvm_bswap_i32:Sl,_malloc:Ya,_memcpy:be,_memmove:qi,_memset:Uf,_sbrk:Yh,dynCall_ii:sm,dynCall_iii:Ql,dynCall_iiii:_k,dynCall_iiiiiii:Aj,dynCall_v:Ym,dynCall_vi:Em,dynCall_vii:cm,dynCall_viii:ol,dynCall_viiii:Ok,dynCall_viiiii:kk,dynCall_viiiiii:Mj,establishStackSpace:zm,getTempRet0:nn,runPostSets:Tj,setTempRet0:hn,setThrew:$l,stackAlloc:ql,stackRestore:fn,stackSave:pn}})
+
+
+// EMSCRIPTEN_END_ASM
+(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var ___cxa_can_catch=Module["___cxa_can_catch"]=asm["___cxa_can_catch"];var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=asm["___cxa_is_pointer_type"];var ___divdi3=Module["___divdi3"]=asm["___divdi3"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var ___udivdi3=Module["___udivdi3"]=asm["___udivdi3"];var ___uremdi3=Module["___uremdi3"]=asm["___uremdi3"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=Module["_emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0"]=asm["_emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0"];var _emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=Module["_emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1"]=asm["_emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1"];var _emscripten_bind_AttributeOctahedronTransform___destroy___0=Module["_emscripten_bind_AttributeOctahedronTransform___destroy___0"]=asm["_emscripten_bind_AttributeOctahedronTransform___destroy___0"];var _emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=Module["_emscripten_bind_AttributeOctahedronTransform_quantization_bits_0"]=asm["_emscripten_bind_AttributeOctahedronTransform_quantization_bits_0"];var _emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=Module["_emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0"]=asm["_emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0"];var _emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=Module["_emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1"]=asm["_emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1"];var _emscripten_bind_AttributeQuantizationTransform___destroy___0=Module["_emscripten_bind_AttributeQuantizationTransform___destroy___0"]=asm["_emscripten_bind_AttributeQuantizationTransform___destroy___0"];var _emscripten_bind_AttributeQuantizationTransform_min_value_1=Module["_emscripten_bind_AttributeQuantizationTransform_min_value_1"]=asm["_emscripten_bind_AttributeQuantizationTransform_min_value_1"];var _emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=Module["_emscripten_bind_AttributeQuantizationTransform_quantization_bits_0"]=asm["_emscripten_bind_AttributeQuantizationTransform_quantization_bits_0"];var _emscripten_bind_AttributeQuantizationTransform_range_0=Module["_emscripten_bind_AttributeQuantizationTransform_range_0"]=asm["_emscripten_bind_AttributeQuantizationTransform_range_0"];var _emscripten_bind_AttributeTransformData_AttributeTransformData_0=Module["_emscripten_bind_AttributeTransformData_AttributeTransformData_0"]=asm["_emscripten_bind_AttributeTransformData_AttributeTransformData_0"];var _emscripten_bind_AttributeTransformData___destroy___0=Module["_emscripten_bind_AttributeTransformData___destroy___0"]=asm["_emscripten_bind_AttributeTransformData___destroy___0"];var _emscripten_bind_AttributeTransformData_transform_type_0=Module["_emscripten_bind_AttributeTransformData_transform_type_0"]=asm["_emscripten_bind_AttributeTransformData_transform_type_0"];var _emscripten_bind_DecoderBuffer_DecoderBuffer_0=Module["_emscripten_bind_DecoderBuffer_DecoderBuffer_0"]=asm["_emscripten_bind_DecoderBuffer_DecoderBuffer_0"];var _emscripten_bind_DecoderBuffer_Init_2=Module["_emscripten_bind_DecoderBuffer_Init_2"]=asm["_emscripten_bind_DecoderBuffer_Init_2"];var _emscripten_bind_DecoderBuffer___destroy___0=Module["_emscripten_bind_DecoderBuffer___destroy___0"]=asm["_emscripten_bind_DecoderBuffer___destroy___0"];var _emscripten_bind_Decoder_DecodeBufferToMesh_2=Module["_emscripten_bind_Decoder_DecodeBufferToMesh_2"]=asm["_emscripten_bind_Decoder_DecodeBufferToMesh_2"];var _emscripten_bind_Decoder_DecodeBufferToPointCloud_2=Module["_emscripten_bind_Decoder_DecodeBufferToPointCloud_2"]=asm["_emscripten_bind_Decoder_DecodeBufferToPointCloud_2"];var _emscripten_bind_Decoder_Decoder_0=Module["_emscripten_bind_Decoder_Decoder_0"]=asm["_emscripten_bind_Decoder_Decoder_0"];var _emscripten_bind_Decoder_GetAttributeByUniqueId_2=Module["_emscripten_bind_Decoder_GetAttributeByUniqueId_2"]=asm["_emscripten_bind_Decoder_GetAttributeByUniqueId_2"];var _emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeFloat_3=Module["_emscripten_bind_Decoder_GetAttributeFloat_3"]=asm["_emscripten_bind_Decoder_GetAttributeFloat_3"];var _emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=Module["_emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3"]=asm["_emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3"];var _emscripten_bind_Decoder_GetAttributeIdByName_2=Module["_emscripten_bind_Decoder_GetAttributeIdByName_2"]=asm["_emscripten_bind_Decoder_GetAttributeIdByName_2"];var _emscripten_bind_Decoder_GetAttributeId_2=Module["_emscripten_bind_Decoder_GetAttributeId_2"]=asm["_emscripten_bind_Decoder_GetAttributeId_2"];var _emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeIntForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeIntForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeMetadata_2=Module["_emscripten_bind_Decoder_GetAttributeMetadata_2"]=asm["_emscripten_bind_Decoder_GetAttributeMetadata_2"];var _emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttribute_2=Module["_emscripten_bind_Decoder_GetAttribute_2"]=asm["_emscripten_bind_Decoder_GetAttribute_2"];var _emscripten_bind_Decoder_GetEncodedGeometryType_1=Module["_emscripten_bind_Decoder_GetEncodedGeometryType_1"]=asm["_emscripten_bind_Decoder_GetEncodedGeometryType_1"];var _emscripten_bind_Decoder_GetFaceFromMesh_3=Module["_emscripten_bind_Decoder_GetFaceFromMesh_3"]=asm["_emscripten_bind_Decoder_GetFaceFromMesh_3"];var _emscripten_bind_Decoder_GetMetadata_1=Module["_emscripten_bind_Decoder_GetMetadata_1"]=asm["_emscripten_bind_Decoder_GetMetadata_1"];var _emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=Module["_emscripten_bind_Decoder_GetTriangleStripsFromMesh_2"]=asm["_emscripten_bind_Decoder_GetTriangleStripsFromMesh_2"];var _emscripten_bind_Decoder_SkipAttributeTransform_1=Module["_emscripten_bind_Decoder_SkipAttributeTransform_1"]=asm["_emscripten_bind_Decoder_SkipAttributeTransform_1"];var _emscripten_bind_Decoder___destroy___0=Module["_emscripten_bind_Decoder___destroy___0"]=asm["_emscripten_bind_Decoder___destroy___0"];var _emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=Module["_emscripten_bind_DracoFloat32Array_DracoFloat32Array_0"]=asm["_emscripten_bind_DracoFloat32Array_DracoFloat32Array_0"];var _emscripten_bind_DracoFloat32Array_GetValue_1=Module["_emscripten_bind_DracoFloat32Array_GetValue_1"]=asm["_emscripten_bind_DracoFloat32Array_GetValue_1"];var _emscripten_bind_DracoFloat32Array___destroy___0=Module["_emscripten_bind_DracoFloat32Array___destroy___0"]=asm["_emscripten_bind_DracoFloat32Array___destroy___0"];var _emscripten_bind_DracoFloat32Array_size_0=Module["_emscripten_bind_DracoFloat32Array_size_0"]=asm["_emscripten_bind_DracoFloat32Array_size_0"];var _emscripten_bind_DracoInt16Array_DracoInt16Array_0=Module["_emscripten_bind_DracoInt16Array_DracoInt16Array_0"]=asm["_emscripten_bind_DracoInt16Array_DracoInt16Array_0"];var _emscripten_bind_DracoInt16Array_GetValue_1=Module["_emscripten_bind_DracoInt16Array_GetValue_1"]=asm["_emscripten_bind_DracoInt16Array_GetValue_1"];var _emscripten_bind_DracoInt16Array___destroy___0=Module["_emscripten_bind_DracoInt16Array___destroy___0"]=asm["_emscripten_bind_DracoInt16Array___destroy___0"];var _emscripten_bind_DracoInt16Array_size_0=Module["_emscripten_bind_DracoInt16Array_size_0"]=asm["_emscripten_bind_DracoInt16Array_size_0"];var _emscripten_bind_DracoInt32Array_DracoInt32Array_0=Module["_emscripten_bind_DracoInt32Array_DracoInt32Array_0"]=asm["_emscripten_bind_DracoInt32Array_DracoInt32Array_0"];var _emscripten_bind_DracoInt32Array_GetValue_1=Module["_emscripten_bind_DracoInt32Array_GetValue_1"]=asm["_emscripten_bind_DracoInt32Array_GetValue_1"];var _emscripten_bind_DracoInt32Array___destroy___0=Module["_emscripten_bind_DracoInt32Array___destroy___0"]=asm["_emscripten_bind_DracoInt32Array___destroy___0"];var _emscripten_bind_DracoInt32Array_size_0=Module["_emscripten_bind_DracoInt32Array_size_0"]=asm["_emscripten_bind_DracoInt32Array_size_0"];var _emscripten_bind_DracoInt8Array_DracoInt8Array_0=Module["_emscripten_bind_DracoInt8Array_DracoInt8Array_0"]=asm["_emscripten_bind_DracoInt8Array_DracoInt8Array_0"];var _emscripten_bind_DracoInt8Array_GetValue_1=Module["_emscripten_bind_DracoInt8Array_GetValue_1"]=asm["_emscripten_bind_DracoInt8Array_GetValue_1"];var _emscripten_bind_DracoInt8Array___destroy___0=Module["_emscripten_bind_DracoInt8Array___destroy___0"]=asm["_emscripten_bind_DracoInt8Array___destroy___0"];var _emscripten_bind_DracoInt8Array_size_0=Module["_emscripten_bind_DracoInt8Array_size_0"]=asm["_emscripten_bind_DracoInt8Array_size_0"];var _emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=Module["_emscripten_bind_DracoUInt16Array_DracoUInt16Array_0"]=asm["_emscripten_bind_DracoUInt16Array_DracoUInt16Array_0"];var _emscripten_bind_DracoUInt16Array_GetValue_1=Module["_emscripten_bind_DracoUInt16Array_GetValue_1"]=asm["_emscripten_bind_DracoUInt16Array_GetValue_1"];var _emscripten_bind_DracoUInt16Array___destroy___0=Module["_emscripten_bind_DracoUInt16Array___destroy___0"]=asm["_emscripten_bind_DracoUInt16Array___destroy___0"];var _emscripten_bind_DracoUInt16Array_size_0=Module["_emscripten_bind_DracoUInt16Array_size_0"]=asm["_emscripten_bind_DracoUInt16Array_size_0"];var _emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=Module["_emscripten_bind_DracoUInt32Array_DracoUInt32Array_0"]=asm["_emscripten_bind_DracoUInt32Array_DracoUInt32Array_0"];var _emscripten_bind_DracoUInt32Array_GetValue_1=Module["_emscripten_bind_DracoUInt32Array_GetValue_1"]=asm["_emscripten_bind_DracoUInt32Array_GetValue_1"];var _emscripten_bind_DracoUInt32Array___destroy___0=Module["_emscripten_bind_DracoUInt32Array___destroy___0"]=asm["_emscripten_bind_DracoUInt32Array___destroy___0"];var _emscripten_bind_DracoUInt32Array_size_0=Module["_emscripten_bind_DracoUInt32Array_size_0"]=asm["_emscripten_bind_DracoUInt32Array_size_0"];var _emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=Module["_emscripten_bind_DracoUInt8Array_DracoUInt8Array_0"]=asm["_emscripten_bind_DracoUInt8Array_DracoUInt8Array_0"];var _emscripten_bind_DracoUInt8Array_GetValue_1=Module["_emscripten_bind_DracoUInt8Array_GetValue_1"]=asm["_emscripten_bind_DracoUInt8Array_GetValue_1"];var _emscripten_bind_DracoUInt8Array___destroy___0=Module["_emscripten_bind_DracoUInt8Array___destroy___0"]=asm["_emscripten_bind_DracoUInt8Array___destroy___0"];var _emscripten_bind_DracoUInt8Array_size_0=Module["_emscripten_bind_DracoUInt8Array_size_0"]=asm["_emscripten_bind_DracoUInt8Array_size_0"];var _emscripten_bind_GeometryAttribute_GeometryAttribute_0=Module["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"]=asm["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"];var _emscripten_bind_GeometryAttribute___destroy___0=Module["_emscripten_bind_GeometryAttribute___destroy___0"]=asm["_emscripten_bind_GeometryAttribute___destroy___0"];var _emscripten_bind_Mesh_Mesh_0=Module["_emscripten_bind_Mesh_Mesh_0"]=asm["_emscripten_bind_Mesh_Mesh_0"];var _emscripten_bind_Mesh___destroy___0=Module["_emscripten_bind_Mesh___destroy___0"]=asm["_emscripten_bind_Mesh___destroy___0"];var _emscripten_bind_Mesh_num_attributes_0=Module["_emscripten_bind_Mesh_num_attributes_0"]=asm["_emscripten_bind_Mesh_num_attributes_0"];var _emscripten_bind_Mesh_num_faces_0=Module["_emscripten_bind_Mesh_num_faces_0"]=asm["_emscripten_bind_Mesh_num_faces_0"];var _emscripten_bind_Mesh_num_points_0=Module["_emscripten_bind_Mesh_num_points_0"]=asm["_emscripten_bind_Mesh_num_points_0"];var _emscripten_bind_MetadataQuerier_GetDoubleEntry_2=Module["_emscripten_bind_MetadataQuerier_GetDoubleEntry_2"]=asm["_emscripten_bind_MetadataQuerier_GetDoubleEntry_2"];var _emscripten_bind_MetadataQuerier_GetEntryName_2=Module["_emscripten_bind_MetadataQuerier_GetEntryName_2"]=asm["_emscripten_bind_MetadataQuerier_GetEntryName_2"];var _emscripten_bind_MetadataQuerier_GetIntEntry_2=Module["_emscripten_bind_MetadataQuerier_GetIntEntry_2"]=asm["_emscripten_bind_MetadataQuerier_GetIntEntry_2"];var _emscripten_bind_MetadataQuerier_GetStringEntry_2=Module["_emscripten_bind_MetadataQuerier_GetStringEntry_2"]=asm["_emscripten_bind_MetadataQuerier_GetStringEntry_2"];var _emscripten_bind_MetadataQuerier_HasDoubleEntry_2=Module["_emscripten_bind_MetadataQuerier_HasDoubleEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasDoubleEntry_2"];var _emscripten_bind_MetadataQuerier_HasEntry_2=Module["_emscripten_bind_MetadataQuerier_HasEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasEntry_2"];var _emscripten_bind_MetadataQuerier_HasIntEntry_2=Module["_emscripten_bind_MetadataQuerier_HasIntEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasIntEntry_2"];var _emscripten_bind_MetadataQuerier_HasStringEntry_2=Module["_emscripten_bind_MetadataQuerier_HasStringEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasStringEntry_2"];var _emscripten_bind_MetadataQuerier_MetadataQuerier_0=Module["_emscripten_bind_MetadataQuerier_MetadataQuerier_0"]=asm["_emscripten_bind_MetadataQuerier_MetadataQuerier_0"];var _emscripten_bind_MetadataQuerier_NumEntries_1=Module["_emscripten_bind_MetadataQuerier_NumEntries_1"]=asm["_emscripten_bind_MetadataQuerier_NumEntries_1"];var _emscripten_bind_MetadataQuerier___destroy___0=Module["_emscripten_bind_MetadataQuerier___destroy___0"]=asm["_emscripten_bind_MetadataQuerier___destroy___0"];var _emscripten_bind_Metadata_Metadata_0=Module["_emscripten_bind_Metadata_Metadata_0"]=asm["_emscripten_bind_Metadata_Metadata_0"];var _emscripten_bind_Metadata___destroy___0=Module["_emscripten_bind_Metadata___destroy___0"]=asm["_emscripten_bind_Metadata___destroy___0"];var _emscripten_bind_PointAttribute_GetAttributeTransformData_0=Module["_emscripten_bind_PointAttribute_GetAttributeTransformData_0"]=asm["_emscripten_bind_PointAttribute_GetAttributeTransformData_0"];var _emscripten_bind_PointAttribute_PointAttribute_0=Module["_emscripten_bind_PointAttribute_PointAttribute_0"]=asm["_emscripten_bind_PointAttribute_PointAttribute_0"];var _emscripten_bind_PointAttribute___destroy___0=Module["_emscripten_bind_PointAttribute___destroy___0"]=asm["_emscripten_bind_PointAttribute___destroy___0"];var _emscripten_bind_PointAttribute_attribute_type_0=Module["_emscripten_bind_PointAttribute_attribute_type_0"]=asm["_emscripten_bind_PointAttribute_attribute_type_0"];var _emscripten_bind_PointAttribute_byte_offset_0=Module["_emscripten_bind_PointAttribute_byte_offset_0"]=asm["_emscripten_bind_PointAttribute_byte_offset_0"];var _emscripten_bind_PointAttribute_byte_stride_0=Module["_emscripten_bind_PointAttribute_byte_stride_0"]=asm["_emscripten_bind_PointAttribute_byte_stride_0"];var _emscripten_bind_PointAttribute_data_type_0=Module["_emscripten_bind_PointAttribute_data_type_0"]=asm["_emscripten_bind_PointAttribute_data_type_0"];var _emscripten_bind_PointAttribute_normalized_0=Module["_emscripten_bind_PointAttribute_normalized_0"]=asm["_emscripten_bind_PointAttribute_normalized_0"];var _emscripten_bind_PointAttribute_num_components_0=Module["_emscripten_bind_PointAttribute_num_components_0"]=asm["_emscripten_bind_PointAttribute_num_components_0"];var _emscripten_bind_PointAttribute_size_0=Module["_emscripten_bind_PointAttribute_size_0"]=asm["_emscripten_bind_PointAttribute_size_0"];var _emscripten_bind_PointAttribute_unique_id_0=Module["_emscripten_bind_PointAttribute_unique_id_0"]=asm["_emscripten_bind_PointAttribute_unique_id_0"];var _emscripten_bind_PointCloud_PointCloud_0=Module["_emscripten_bind_PointCloud_PointCloud_0"]=asm["_emscripten_bind_PointCloud_PointCloud_0"];var _emscripten_bind_PointCloud___destroy___0=Module["_emscripten_bind_PointCloud___destroy___0"]=asm["_emscripten_bind_PointCloud___destroy___0"];var _emscripten_bind_PointCloud_num_attributes_0=Module["_emscripten_bind_PointCloud_num_attributes_0"]=asm["_emscripten_bind_PointCloud_num_attributes_0"];var _emscripten_bind_PointCloud_num_points_0=Module["_emscripten_bind_PointCloud_num_points_0"]=asm["_emscripten_bind_PointCloud_num_points_0"];var _emscripten_bind_Status___destroy___0=Module["_emscripten_bind_Status___destroy___0"]=asm["_emscripten_bind_Status___destroy___0"];var _emscripten_bind_Status_code_0=Module["_emscripten_bind_Status_code_0"]=asm["_emscripten_bind_Status_code_0"];var _emscripten_bind_Status_error_msg_0=Module["_emscripten_bind_Status_error_msg_0"]=asm["_emscripten_bind_Status_error_msg_0"];var _emscripten_bind_Status_ok_0=Module["_emscripten_bind_Status_ok_0"]=asm["_emscripten_bind_Status_ok_0"];var _emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=asm["_emscripten_bind_VoidPtr___destroy___0"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM"];var _emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=Module["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"]=asm["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"];var _emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=Module["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"]=asm["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"];var _emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=Module["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"]=asm["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"];var _emscripten_enum_draco_GeometryAttribute_Type_COLOR=Module["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"];var _emscripten_enum_draco_GeometryAttribute_Type_GENERIC=Module["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"];var _emscripten_enum_draco_GeometryAttribute_Type_INVALID=Module["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"];var _emscripten_enum_draco_GeometryAttribute_Type_NORMAL=Module["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"];var _emscripten_enum_draco_GeometryAttribute_Type_POSITION=Module["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"];var _emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=Module["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"];var _emscripten_enum_draco_StatusCode_ERROR=Module["_emscripten_enum_draco_StatusCode_ERROR"]=asm["_emscripten_enum_draco_StatusCode_ERROR"];var _emscripten_enum_draco_StatusCode_INVALID_PARAMETER=Module["_emscripten_enum_draco_StatusCode_INVALID_PARAMETER"]=asm["_emscripten_enum_draco_StatusCode_INVALID_PARAMETER"];var _emscripten_enum_draco_StatusCode_IO_ERROR=Module["_emscripten_enum_draco_StatusCode_IO_ERROR"]=asm["_emscripten_enum_draco_StatusCode_IO_ERROR"];var _emscripten_enum_draco_StatusCode_OK=Module["_emscripten_enum_draco_StatusCode_OK"]=asm["_emscripten_enum_draco_StatusCode_OK"];var _emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=Module["_emscripten_enum_draco_StatusCode_UNKNOWN_VERSION"]=asm["_emscripten_enum_draco_StatusCode_UNKNOWN_VERSION"];var _emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=Module["_emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION"]=asm["_emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION"];var _emscripten_replace_memory=Module["_emscripten_replace_memory"]=asm["_emscripten_replace_memory"];var _free=Module["_free"]=asm["_free"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var _malloc=Module["_malloc"]=asm["_malloc"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _memmove=Module["_memmove"]=asm["_memmove"];var _memset=Module["_memset"]=asm["_memset"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var getTempRet0=Module["getTempRet0"]=asm["getTempRet0"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var setTempRet0=Module["setTempRet0"]=asm["setTempRet0"];var setThrew=Module["setThrew"]=asm["setThrew"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var stackSave=Module["stackSave"]=asm["stackSave"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];Module["asm"]=asm;if(memoryInitializer){if(!isDataURI(memoryInitializer)){if(typeof Module["locateFile"]==="function"){memoryInitializer=Module["locateFile"](memoryInitializer)}else if(Module["memoryInitializerPrefixURL"]){memoryInitializer=Module["memoryInitializerPrefixURL"]+memoryInitializer}}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,GLOBAL_BASE)}else{addRunDependency("memory initializer");var applyMemoryInitializer=(function(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,GLOBAL_BASE);if(Module["memoryInitializerRequest"])delete Module["memoryInitializerRequest"].response;removeRunDependency("memory initializer")});function doBrowserLoad(){Module["readAsync"](memoryInitializer,applyMemoryInitializer,(function(){throw"could not load memory initializer "+memoryInitializer}))}var memoryInitializerBytes=tryParseAsDataURI(memoryInitializer);if(memoryInitializerBytes){applyMemoryInitializer(memoryInitializerBytes.buffer)}else if(Module["memoryInitializerRequest"]){function useRequest(){var request=Module["memoryInitializerRequest"];var response=request.response;if(request.status!==200&&request.status!==0){var data=tryParseAsDataURI(Module["memoryInitializerRequestURL"]);if(data){response=data.buffer}else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+request.status+", retrying "+memoryInitializer);doBrowserLoad();return}}applyMemoryInitializer(response)}if(Module["memoryInitializerRequest"].response){setTimeout(useRequest,0)}else{Module["memoryInitializerRequest"].addEventListener("load",useRequest)}}else{doBrowserLoad()}}}Module["then"]=(function(func){if(Module["calledRun"]){func(Module)}else{var old=Module["onRuntimeInitialized"];Module["onRuntimeInitialized"]=(function(){if(old)old();func(Module)})}return Module});function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};function run(args){args=args||Module["arguments"];if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]&&status===0){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["exit"](status)}Module["quit"](status,new ExitStatus(status))}Module["exit"]=exit;function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}Module["noExitRuntime"]=true;run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return(__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw"Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr]}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:(function(){if(ensureCache.needed){for(var i=0;i<ensureCache.temps.length;i++){Module["_free"](ensureCache.temps[i])}ensureCache.temps.length=0;Module["_free"](ensureCache.buffer);ensureCache.buffer=0;ensureCache.size+=ensureCache.needed;ensureCache.needed=0}if(!ensureCache.buffer){ensureCache.size+=128;ensureCache.buffer=Module["_malloc"](ensureCache.size);assert(ensureCache.buffer)}ensureCache.pos=0}),alloc:(function(array,view){assert(ensureCache.buffer);var bytes=view.BYTES_PER_ELEMENT;var len=array.length*bytes;len=len+7&-8;var ret;if(ensureCache.pos+len>=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret)}else{ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len}return ret}),copy:(function(array,view,offset){var offsetShifted=offset;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offsetShifted>>=1;break;case 4:offsetShifted>>=2;break;case 8:offsetShifted>>=3;break}for(var i=0;i<array.length;i++){view[offsetShifted+i]=array[i]}})};function ensureString(value){if(typeof value==="string"){var intArray=intArrayFromString(value);var offset=ensureCache.alloc(intArray,HEAP8);ensureCache.copy(intArray,HEAP8,offset);return offset}return value}function ensureInt8(value){if(typeof value==="object"){var offset=ensureCache.alloc(value,HEAP8);ensureCache.copy(value,HEAP8,offset);return offset}return value}function Status(){throw"cannot construct a Status, no constructor in IDL"}Status.prototype=Object.create(WrapperObject.prototype);Status.prototype.constructor=Status;Status.prototype.__class__=Status;Status.__cache__={};Module["Status"]=Status;Status.prototype["code"]=Status.prototype.code=(function(){var self=this.ptr;return _emscripten_bind_Status_code_0(self)});Status.prototype["ok"]=Status.prototype.ok=(function(){var self=this.ptr;return!!_emscripten_bind_Status_ok_0(self)});Status.prototype["error_msg"]=Status.prototype.error_msg=(function(){var self=this.ptr;return Pointer_stringify(_emscripten_bind_Status_error_msg_0(self))});Status.prototype["__destroy__"]=Status.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_Status___destroy___0(self)});function DracoUInt16Array(){this.ptr=_emscripten_bind_DracoUInt16Array_DracoUInt16Array_0();getCache(DracoUInt16Array)[this.ptr]=this}DracoUInt16Array.prototype=Object.create(WrapperObject.prototype);DracoUInt16Array.prototype.constructor=DracoUInt16Array;DracoUInt16Array.prototype.__class__=DracoUInt16Array;DracoUInt16Array.__cache__={};Module["DracoUInt16Array"]=DracoUInt16Array;DracoUInt16Array.prototype["GetValue"]=DracoUInt16Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoUInt16Array_GetValue_1(self,arg0)});DracoUInt16Array.prototype["size"]=DracoUInt16Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoUInt16Array_size_0(self)});DracoUInt16Array.prototype["__destroy__"]=DracoUInt16Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoUInt16Array___destroy___0(self)});function PointCloud(){this.ptr=_emscripten_bind_PointCloud_PointCloud_0();getCache(PointCloud)[this.ptr]=this}PointCloud.prototype=Object.create(WrapperObject.prototype);PointCloud.prototype.constructor=PointCloud;PointCloud.prototype.__class__=PointCloud;PointCloud.__cache__={};Module["PointCloud"]=PointCloud;PointCloud.prototype["num_attributes"]=PointCloud.prototype.num_attributes=(function(){var self=this.ptr;return _emscripten_bind_PointCloud_num_attributes_0(self)});PointCloud.prototype["num_points"]=PointCloud.prototype.num_points=(function(){var self=this.ptr;return _emscripten_bind_PointCloud_num_points_0(self)});PointCloud.prototype["__destroy__"]=PointCloud.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_PointCloud___destroy___0(self)});function DracoUInt8Array(){this.ptr=_emscripten_bind_DracoUInt8Array_DracoUInt8Array_0();getCache(DracoUInt8Array)[this.ptr]=this}DracoUInt8Array.prototype=Object.create(WrapperObject.prototype);DracoUInt8Array.prototype.constructor=DracoUInt8Array;DracoUInt8Array.prototype.__class__=DracoUInt8Array;DracoUInt8Array.__cache__={};Module["DracoUInt8Array"]=DracoUInt8Array;DracoUInt8Array.prototype["GetValue"]=DracoUInt8Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoUInt8Array_GetValue_1(self,arg0)});DracoUInt8Array.prototype["size"]=DracoUInt8Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoUInt8Array_size_0(self)});DracoUInt8Array.prototype["__destroy__"]=DracoUInt8Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoUInt8Array___destroy___0(self)});function DracoUInt32Array(){this.ptr=_emscripten_bind_DracoUInt32Array_DracoUInt32Array_0();getCache(DracoUInt32Array)[this.ptr]=this}DracoUInt32Array.prototype=Object.create(WrapperObject.prototype);DracoUInt32Array.prototype.constructor=DracoUInt32Array;DracoUInt32Array.prototype.__class__=DracoUInt32Array;DracoUInt32Array.__cache__={};Module["DracoUInt32Array"]=DracoUInt32Array;DracoUInt32Array.prototype["GetValue"]=DracoUInt32Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoUInt32Array_GetValue_1(self,arg0)});DracoUInt32Array.prototype["size"]=DracoUInt32Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoUInt32Array_size_0(self)});DracoUInt32Array.prototype["__destroy__"]=DracoUInt32Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoUInt32Array___destroy___0(self)});function AttributeOctahedronTransform(){this.ptr=_emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0();getCache(AttributeOctahedronTransform)[this.ptr]=this}AttributeOctahedronTransform.prototype=Object.create(WrapperObject.prototype);AttributeOctahedronTransform.prototype.constructor=AttributeOctahedronTransform;AttributeOctahedronTransform.prototype.__class__=AttributeOctahedronTransform;AttributeOctahedronTransform.__cache__={};Module["AttributeOctahedronTransform"]=AttributeOctahedronTransform;AttributeOctahedronTransform.prototype["InitFromAttribute"]=AttributeOctahedronTransform.prototype.InitFromAttribute=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return!!_emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1(self,arg0)});AttributeOctahedronTransform.prototype["quantization_bits"]=AttributeOctahedronTransform.prototype.quantization_bits=(function(){var self=this.ptr;return _emscripten_bind_AttributeOctahedronTransform_quantization_bits_0(self)});AttributeOctahedronTransform.prototype["__destroy__"]=AttributeOctahedronTransform.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_AttributeOctahedronTransform___destroy___0(self)});function PointAttribute(){this.ptr=_emscripten_bind_PointAttribute_PointAttribute_0();getCache(PointAttribute)[this.ptr]=this}PointAttribute.prototype=Object.create(WrapperObject.prototype);PointAttribute.prototype.constructor=PointAttribute;PointAttribute.prototype.__class__=PointAttribute;PointAttribute.__cache__={};Module["PointAttribute"]=PointAttribute;PointAttribute.prototype["size"]=PointAttribute.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_size_0(self)});PointAttribute.prototype["GetAttributeTransformData"]=PointAttribute.prototype.GetAttributeTransformData=(function(){var self=this.ptr;return wrapPointer(_emscripten_bind_PointAttribute_GetAttributeTransformData_0(self),AttributeTransformData)});PointAttribute.prototype["attribute_type"]=PointAttribute.prototype.attribute_type=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_attribute_type_0(self)});PointAttribute.prototype["data_type"]=PointAttribute.prototype.data_type=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_data_type_0(self)});PointAttribute.prototype["num_components"]=PointAttribute.prototype.num_components=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_num_components_0(self)});PointAttribute.prototype["normalized"]=PointAttribute.prototype.normalized=(function(){var self=this.ptr;return!!_emscripten_bind_PointAttribute_normalized_0(self)});PointAttribute.prototype["byte_stride"]=PointAttribute.prototype.byte_stride=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_byte_stride_0(self)});PointAttribute.prototype["byte_offset"]=PointAttribute.prototype.byte_offset=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_byte_offset_0(self)});PointAttribute.prototype["unique_id"]=PointAttribute.prototype.unique_id=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_unique_id_0(self)});PointAttribute.prototype["__destroy__"]=PointAttribute.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_PointAttribute___destroy___0(self)});function AttributeTransformData(){this.ptr=_emscripten_bind_AttributeTransformData_AttributeTransformData_0();getCache(AttributeTransformData)[this.ptr]=this}AttributeTransformData.prototype=Object.create(WrapperObject.prototype);AttributeTransformData.prototype.constructor=AttributeTransformData;AttributeTransformData.prototype.__class__=AttributeTransformData;AttributeTransformData.__cache__={};Module["AttributeTransformData"]=AttributeTransformData;AttributeTransformData.prototype["transform_type"]=AttributeTransformData.prototype.transform_type=(function(){var self=this.ptr;return _emscripten_bind_AttributeTransformData_transform_type_0(self)});AttributeTransformData.prototype["__destroy__"]=AttributeTransformData.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_AttributeTransformData___destroy___0(self)});function AttributeQuantizationTransform(){this.ptr=_emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0();getCache(AttributeQuantizationTransform)[this.ptr]=this}AttributeQuantizationTransform.prototype=Object.create(WrapperObject.prototype);AttributeQuantizationTransform.prototype.constructor=AttributeQuantizationTransform;AttributeQuantizationTransform.prototype.__class__=AttributeQuantizationTransform;AttributeQuantizationTransform.__cache__={};Module["AttributeQuantizationTransform"]=AttributeQuantizationTransform;AttributeQuantizationTransform.prototype["InitFromAttribute"]=AttributeQuantizationTransform.prototype.InitFromAttribute=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return!!_emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1(self,arg0)});AttributeQuantizationTransform.prototype["quantization_bits"]=AttributeQuantizationTransform.prototype.quantization_bits=(function(){var self=this.ptr;return _emscripten_bind_AttributeQuantizationTransform_quantization_bits_0(self)});AttributeQuantizationTransform.prototype["min_value"]=AttributeQuantizationTransform.prototype.min_value=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_AttributeQuantizationTransform_min_value_1(self,arg0)});AttributeQuantizationTransform.prototype["range"]=AttributeQuantizationTransform.prototype.range=(function(){var self=this.ptr;return _emscripten_bind_AttributeQuantizationTransform_range_0(self)});AttributeQuantizationTransform.prototype["__destroy__"]=AttributeQuantizationTransform.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_AttributeQuantizationTransform___destroy___0(self)});function DracoInt8Array(){this.ptr=_emscripten_bind_DracoInt8Array_DracoInt8Array_0();getCache(DracoInt8Array)[this.ptr]=this}DracoInt8Array.prototype=Object.create(WrapperObject.prototype);DracoInt8Array.prototype.constructor=DracoInt8Array;DracoInt8Array.prototype.__class__=DracoInt8Array;DracoInt8Array.__cache__={};Module["DracoInt8Array"]=DracoInt8Array;DracoInt8Array.prototype["GetValue"]=DracoInt8Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoInt8Array_GetValue_1(self,arg0)});DracoInt8Array.prototype["size"]=DracoInt8Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoInt8Array_size_0(self)});DracoInt8Array.prototype["__destroy__"]=DracoInt8Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoInt8Array___destroy___0(self)});function MetadataQuerier(){this.ptr=_emscripten_bind_MetadataQuerier_MetadataQuerier_0();getCache(MetadataQuerier)[this.ptr]=this}MetadataQuerier.prototype=Object.create(WrapperObject.prototype);MetadataQuerier.prototype.constructor=MetadataQuerier;MetadataQuerier.prototype.__class__=MetadataQuerier;MetadataQuerier.__cache__={};Module["MetadataQuerier"]=MetadataQuerier;MetadataQuerier.prototype["HasEntry"]=MetadataQuerier.prototype.HasEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return!!_emscripten_bind_MetadataQuerier_HasEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["HasIntEntry"]=MetadataQuerier.prototype.HasIntEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return!!_emscripten_bind_MetadataQuerier_HasIntEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["GetIntEntry"]=MetadataQuerier.prototype.GetIntEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return _emscripten_bind_MetadataQuerier_GetIntEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["HasDoubleEntry"]=MetadataQuerier.prototype.HasDoubleEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return!!_emscripten_bind_MetadataQuerier_HasDoubleEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["GetDoubleEntry"]=MetadataQuerier.prototype.GetDoubleEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return _emscripten_bind_MetadataQuerier_GetDoubleEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["HasStringEntry"]=MetadataQuerier.prototype.HasStringEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return!!_emscripten_bind_MetadataQuerier_HasStringEntry_2(self,arg0,arg1)});MetadataQuerier.prototype["GetStringEntry"]=MetadataQuerier.prototype.GetStringEntry=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return Pointer_stringify(_emscripten_bind_MetadataQuerier_GetStringEntry_2(self,arg0,arg1))});MetadataQuerier.prototype["NumEntries"]=MetadataQuerier.prototype.NumEntries=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_MetadataQuerier_NumEntries_1(self,arg0)});MetadataQuerier.prototype["GetEntryName"]=MetadataQuerier.prototype.GetEntryName=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return Pointer_stringify(_emscripten_bind_MetadataQuerier_GetEntryName_2(self,arg0,arg1))});MetadataQuerier.prototype["__destroy__"]=MetadataQuerier.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_MetadataQuerier___destroy___0(self)});function DracoInt16Array(){this.ptr=_emscripten_bind_DracoInt16Array_DracoInt16Array_0();getCache(DracoInt16Array)[this.ptr]=this}DracoInt16Array.prototype=Object.create(WrapperObject.prototype);DracoInt16Array.prototype.constructor=DracoInt16Array;DracoInt16Array.prototype.__class__=DracoInt16Array;DracoInt16Array.__cache__={};Module["DracoInt16Array"]=DracoInt16Array;DracoInt16Array.prototype["GetValue"]=DracoInt16Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoInt16Array_GetValue_1(self,arg0)});DracoInt16Array.prototype["size"]=DracoInt16Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoInt16Array_size_0(self)});DracoInt16Array.prototype["__destroy__"]=DracoInt16Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoInt16Array___destroy___0(self)});function DracoFloat32Array(){this.ptr=_emscripten_bind_DracoFloat32Array_DracoFloat32Array_0();getCache(DracoFloat32Array)[this.ptr]=this}DracoFloat32Array.prototype=Object.create(WrapperObject.prototype);DracoFloat32Array.prototype.constructor=DracoFloat32Array;DracoFloat32Array.prototype.__class__=DracoFloat32Array;DracoFloat32Array.__cache__={};Module["DracoFloat32Array"]=DracoFloat32Array;DracoFloat32Array.prototype["GetValue"]=DracoFloat32Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoFloat32Array_GetValue_1(self,arg0)});DracoFloat32Array.prototype["size"]=DracoFloat32Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoFloat32Array_size_0(self)});DracoFloat32Array.prototype["__destroy__"]=DracoFloat32Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoFloat32Array___destroy___0(self)});function GeometryAttribute(){this.ptr=_emscripten_bind_GeometryAttribute_GeometryAttribute_0();getCache(GeometryAttribute)[this.ptr]=this}GeometryAttribute.prototype=Object.create(WrapperObject.prototype);GeometryAttribute.prototype.constructor=GeometryAttribute;GeometryAttribute.prototype.__class__=GeometryAttribute;GeometryAttribute.__cache__={};Module["GeometryAttribute"]=GeometryAttribute;GeometryAttribute.prototype["__destroy__"]=GeometryAttribute.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_GeometryAttribute___destroy___0(self)});function DecoderBuffer(){this.ptr=_emscripten_bind_DecoderBuffer_DecoderBuffer_0();getCache(DecoderBuffer)[this.ptr]=this}DecoderBuffer.prototype=Object.create(WrapperObject.prototype);DecoderBuffer.prototype.constructor=DecoderBuffer;DecoderBuffer.prototype.__class__=DecoderBuffer;DecoderBuffer.__cache__={};Module["DecoderBuffer"]=DecoderBuffer;DecoderBuffer.prototype["Init"]=DecoderBuffer.prototype.Init=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(typeof arg0=="object"){arg0=ensureInt8(arg0)}if(arg1&&typeof arg1==="object")arg1=arg1.ptr;_emscripten_bind_DecoderBuffer_Init_2(self,arg0,arg1)});DecoderBuffer.prototype["__destroy__"]=DecoderBuffer.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DecoderBuffer___destroy___0(self)});function Decoder(){this.ptr=_emscripten_bind_Decoder_Decoder_0();getCache(Decoder)[this.ptr]=this}Decoder.prototype=Object.create(WrapperObject.prototype);Decoder.prototype.constructor=Decoder;Decoder.prototype.__class__=Decoder;Decoder.__cache__={};Module["Decoder"]=Decoder;Decoder.prototype["GetEncodedGeometryType"]=Decoder.prototype.GetEncodedGeometryType=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_Decoder_GetEncodedGeometryType_1(self,arg0)});Decoder.prototype["DecodeBufferToPointCloud"]=Decoder.prototype.DecodeBufferToPointCloud=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return wrapPointer(_emscripten_bind_Decoder_DecodeBufferToPointCloud_2(self,arg0,arg1),Status)});Decoder.prototype["DecodeBufferToMesh"]=Decoder.prototype.DecodeBufferToMesh=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return wrapPointer(_emscripten_bind_Decoder_DecodeBufferToMesh_2(self,arg0,arg1),Status)});Decoder.prototype["GetAttributeId"]=Decoder.prototype.GetAttributeId=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return _emscripten_bind_Decoder_GetAttributeId_2(self,arg0,arg1)});Decoder.prototype["GetAttributeIdByName"]=Decoder.prototype.GetAttributeIdByName=(function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);return _emscripten_bind_Decoder_GetAttributeIdByName_2(self,arg0,arg1)});Decoder.prototype["GetAttributeIdByMetadataEntry"]=Decoder.prototype.GetAttributeIdByMetadataEntry=(function(arg0,arg1,arg2){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);if(arg2&&typeof arg2==="object")arg2=arg2.ptr;else arg2=ensureString(arg2);return _emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttribute"]=Decoder.prototype.GetAttribute=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return wrapPointer(_emscripten_bind_Decoder_GetAttribute_2(self,arg0,arg1),PointAttribute)});Decoder.prototype["GetAttributeByUniqueId"]=Decoder.prototype.GetAttributeByUniqueId=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return wrapPointer(_emscripten_bind_Decoder_GetAttributeByUniqueId_2(self,arg0,arg1),PointAttribute)});Decoder.prototype["GetMetadata"]=Decoder.prototype.GetMetadata=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return wrapPointer(_emscripten_bind_Decoder_GetMetadata_1(self,arg0),Metadata)});Decoder.prototype["GetAttributeMetadata"]=Decoder.prototype.GetAttributeMetadata=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return wrapPointer(_emscripten_bind_Decoder_GetAttributeMetadata_2(self,arg0,arg1),Metadata)});Decoder.prototype["GetFaceFromMesh"]=Decoder.prototype.GetFaceFromMesh=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetFaceFromMesh_3(self,arg0,arg1,arg2)});Decoder.prototype["GetTriangleStripsFromMesh"]=Decoder.prototype.GetTriangleStripsFromMesh=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return _emscripten_bind_Decoder_GetTriangleStripsFromMesh_2(self,arg0,arg1)});Decoder.prototype["GetAttributeFloat"]=Decoder.prototype.GetAttributeFloat=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeFloat_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeFloatForAllPoints"]=Decoder.prototype.GetAttributeFloatForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeIntForAllPoints"]=Decoder.prototype.GetAttributeIntForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeIntForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeInt8ForAllPoints"]=Decoder.prototype.GetAttributeInt8ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeUInt8ForAllPoints"]=Decoder.prototype.GetAttributeUInt8ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeInt16ForAllPoints"]=Decoder.prototype.GetAttributeInt16ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeUInt16ForAllPoints"]=Decoder.prototype.GetAttributeUInt16ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeInt32ForAllPoints"]=Decoder.prototype.GetAttributeInt32ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["GetAttributeUInt32ForAllPoints"]=Decoder.prototype.GetAttributeUInt32ForAllPoints=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3(self,arg0,arg1,arg2)});Decoder.prototype["SkipAttributeTransform"]=Decoder.prototype.SkipAttributeTransform=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_Decoder_SkipAttributeTransform_1(self,arg0)});Decoder.prototype["__destroy__"]=Decoder.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_Decoder___destroy___0(self)});function Mesh(){this.ptr=_emscripten_bind_Mesh_Mesh_0();getCache(Mesh)[this.ptr]=this}Mesh.prototype=Object.create(WrapperObject.prototype);Mesh.prototype.constructor=Mesh;Mesh.prototype.__class__=Mesh;Mesh.__cache__={};Module["Mesh"]=Mesh;Mesh.prototype["num_faces"]=Mesh.prototype.num_faces=(function(){var self=this.ptr;return _emscripten_bind_Mesh_num_faces_0(self)});Mesh.prototype["num_attributes"]=Mesh.prototype.num_attributes=(function(){var self=this.ptr;return _emscripten_bind_Mesh_num_attributes_0(self)});Mesh.prototype["num_points"]=Mesh.prototype.num_points=(function(){var self=this.ptr;return _emscripten_bind_Mesh_num_points_0(self)});Mesh.prototype["__destroy__"]=Mesh.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_Mesh___destroy___0(self)});function VoidPtr(){throw"cannot construct a VoidPtr, no constructor in IDL"}VoidPtr.prototype=Object.create(WrapperObject.prototype);VoidPtr.prototype.constructor=VoidPtr;VoidPtr.prototype.__class__=VoidPtr;VoidPtr.__cache__={};Module["VoidPtr"]=VoidPtr;VoidPtr.prototype["__destroy__"]=VoidPtr.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_VoidPtr___destroy___0(self)});function DracoInt32Array(){this.ptr=_emscripten_bind_DracoInt32Array_DracoInt32Array_0();getCache(DracoInt32Array)[this.ptr]=this}DracoInt32Array.prototype=Object.create(WrapperObject.prototype);DracoInt32Array.prototype.constructor=DracoInt32Array;DracoInt32Array.prototype.__class__=DracoInt32Array;DracoInt32Array.__cache__={};Module["DracoInt32Array"]=DracoInt32Array;DracoInt32Array.prototype["GetValue"]=DracoInt32Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoInt32Array_GetValue_1(self,arg0)});DracoInt32Array.prototype["size"]=DracoInt32Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoInt32Array_size_0(self)});DracoInt32Array.prototype["__destroy__"]=DracoInt32Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoInt32Array___destroy___0(self)});function Metadata(){this.ptr=_emscripten_bind_Metadata_Metadata_0();getCache(Metadata)[this.ptr]=this}Metadata.prototype=Object.create(WrapperObject.prototype);Metadata.prototype.constructor=Metadata;Metadata.prototype.__class__=Metadata;Metadata.__cache__={};Module["Metadata"]=Metadata;Metadata.prototype["__destroy__"]=Metadata.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_Metadata___destroy___0(self)});((function(){function setupEnums(){Module["OK"]=_emscripten_enum_draco_StatusCode_OK();Module["ERROR"]=_emscripten_enum_draco_StatusCode_ERROR();Module["IO_ERROR"]=_emscripten_enum_draco_StatusCode_IO_ERROR();Module["INVALID_PARAMETER"]=_emscripten_enum_draco_StatusCode_INVALID_PARAMETER();Module["UNSUPPORTED_VERSION"]=_emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION();Module["UNKNOWN_VERSION"]=_emscripten_enum_draco_StatusCode_UNKNOWN_VERSION();Module["INVALID_GEOMETRY_TYPE"]=_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE();Module["POINT_CLOUD"]=_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD();Module["TRIANGULAR_MESH"]=_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH();Module["ATTRIBUTE_INVALID_TRANSFORM"]=_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM();Module["ATTRIBUTE_NO_TRANSFORM"]=_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM();Module["ATTRIBUTE_QUANTIZATION_TRANSFORM"]=_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM();Module["ATTRIBUTE_OCTAHEDRON_TRANSFORM"]=_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM();Module["INVALID"]=_emscripten_enum_draco_GeometryAttribute_Type_INVALID();Module["POSITION"]=_emscripten_enum_draco_GeometryAttribute_Type_POSITION();Module["NORMAL"]=_emscripten_enum_draco_GeometryAttribute_Type_NORMAL();Module["COLOR"]=_emscripten_enum_draco_GeometryAttribute_Type_COLOR();Module["TEX_COORD"]=_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD();Module["GENERIC"]=_emscripten_enum_draco_GeometryAttribute_Type_GENERIC()}if(Module["calledRun"])setupEnums();else addOnPreMain(setupEnums)}))();if(typeof Module["onModuleParsed"]==="function"){Module["onModuleParsed"]()}
+
+
+
+
+
+
+ return DracoDecoderModule;
+};
+if (typeof exports === 'object' && typeof module === 'object')
+ module.exports = DracoDecoderModule;
+else if (typeof define === 'function' && define['amd'])
+ define([], function() { return DracoDecoderModule; });
+else if (typeof exports === 'object')
+ exports["DracoDecoderModule"] = DracoDecoderModule;
diff --git a/site/public/assets/js/vendor/draco/draco_decoder_gltf.wasm b/site/public/assets/js/vendor/draco/draco_decoder_gltf.wasm
new file mode 100644
index 00000000..8838b6a2
--- /dev/null
+++ b/site/public/assets/js/vendor/draco/draco_decoder_gltf.wasm
Binary files differ
diff --git a/site/public/assets/js/vendor/draco/draco_encoder.js b/site/public/assets/js/vendor/draco/draco_encoder.js
new file mode 100644
index 00000000..2f21a053
--- /dev/null
+++ b/site/public/assets/js/vendor/draco/draco_encoder.js
@@ -0,0 +1,33 @@
+var DracoEncoderModule = function(DracoEncoderModule) {
+ DracoEncoderModule = DracoEncoderModule || {};
+
+var Module=typeof DracoEncoderModule!=="undefined"?DracoEncoderModule:{};var isRuntimeInitialized=false;var isModuleParsed=false;Module["onRuntimeInitialized"]=(function(){isRuntimeInitialized=true;if(isModuleParsed){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}});Module["onModuleParsed"]=(function(){isModuleParsed=true;if(isRuntimeInitialized){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}});function isVersionSupported(versionString){if(typeof versionString!=="string")return false;const version=versionString.split(".");if(version.length<2||version.length>3)return false;if(version[0]==1&&version[1]>=0&&version[1]<=3)return true;if(version[0]!=0||version[1]>10)return false;return true}Module["isVersionSupported"]=isVersionSupported;var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=(function(status,toThrow){throw toThrow});Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){var nodeFS;var nodePath;Module["read"]=function shell_read(filename,binary){var ret;ret=tryParseAsDataURI(filename);if(!ret){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);ret=nodeFS["readFileSync"](filename)}return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}Module["arguments"]=process["argv"].slice(2);process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));process["on"]("unhandledRejection",(function(reason,p){process["exit"](1)}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){Module["read"]=function shell_read(f){var data=tryParseAsDataURI(f);if(data){return intArrayToString(data)}return read(f)}}Module["readBinary"]=function readBinary(f){var data;data=tryParseAsDataURI(f);if(data){return data}if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=(function(status,toThrow){quit(status)})}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=(function(title){document.title=title})}Module["print"]=typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null;Module["printErr"]=typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||Module["print"];Module.print=Module["print"];Module.printErr=Module["printErr"];for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var STACK_ALIGN=16;function staticAlloc(size){assert(!staticSealed);var ret=STATICTOP;STATICTOP=STATICTOP+size+15&-16;return ret}function dynamicAlloc(size){assert(DYNAMICTOP_PTR);var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;if(end>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){HEAP32[DYNAMICTOP_PTR>>2]=ret;return 0}}return ret}function alignMemory(size,factor){if(!factor)factor=STACK_ALIGN;var ret=size=Math.ceil(size/factor)*factor;return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;Module.printErr(text)}}var jsCallStartIndex=1;var functionPointers=new Array(0);var funcWrappers={};function dynCall(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}var GLOBAL_BASE=8;var ABORT=0;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}var JSfuncs={"stackSave":(function(){stackSave()}),"stackRestore":(function(){stackRestore()}),"arrayToC":(function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};function ccall(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);if(returnType==="string")ret=Pointer_stringify(ret);if(returnType==="boolean")ret=Boolean(ret);if(stack!==0){stackRestore(stack)}return ret}function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var ALLOC_STATIC=2;var ALLOC_NONE=4;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:staticAlloc,stackAlloc,staticAlloc,dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var stop;ptr=ret;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr<stop;ptr+=4){HEAP32[ptr>>2]=0}stop=ret+size;while(ptr<stop){HEAP8[ptr++>>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i<size){var curr=slab[i];type=singleType||types[i];if(type===0){i++;continue}if(type=="i64")type="i32";setValue(ret+i,curr,type);if(previousType!==type){typeSize=getNativeTypeSize(type);previousType=type}i+=typeSize}return ret}function Pointer_stringify(ptr,length){if(length===0||!ptr)return"";var hasUtf=0;var t;var i=0;while(1){t=HEAPU8[ptr+i>>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return UTF8ToString(ptr)}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx){var endPtr=idx;while(u8Array[endPtr])++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}}function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function demangle(func){return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}var WASM_PAGE_SIZE=65536;var ASMJS_PAGE_SIZE=16777216;var MIN_TOTAL_MEMORY=16777216;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBuffer(buf){Module["buffer"]=buffer=buf}function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed;var STACK_BASE,STACKTOP,STACK_MAX;var DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0;staticSealed=false;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}if(!Module["reallocBuffer"])Module["reallocBuffer"]=(function(size){var ret;try{if(ArrayBuffer.transfer){ret=ArrayBuffer.transfer(buffer,size)}else{var oldHEAP8=HEAP8;ret=new ArrayBuffer(size);var temp=new Int8Array(ret);temp.set(oldHEAP8)}}catch(e){return false}var success=_emscripten_replace_memory(ret);if(!success)return false;return ret});function enlargeMemory(){var PAGE_MULTIPLE=Module["usingWasm"]?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE;var LIMIT=2147483648-PAGE_MULTIPLE;if(HEAP32[DYNAMICTOP_PTR>>2]>LIMIT){return false}var OLD_TOTAL_MEMORY=TOTAL_MEMORY;TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);while(TOTAL_MEMORY<HEAP32[DYNAMICTOP_PTR>>2]){if(TOTAL_MEMORY<=536870912){TOTAL_MEMORY=alignUp(2*TOTAL_MEMORY,PAGE_MULTIPLE)}else{TOTAL_MEMORY=Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,PAGE_MULTIPLE),LIMIT)}}var replacement=Module["reallocBuffer"](TOTAL_MEMORY);if(!replacement||replacement.byteLength!=TOTAL_MEMORY){TOTAL_MEMORY=OLD_TOTAL_MEMORY;return false}updateGlobalBuffer(replacement);updateGlobalBufferViews();return true}var byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);byteLength(new ArrayBuffer(4))}catch(e){byteLength=(function(buffer){return buffer.byteLength})}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(TOTAL_MEMORY<TOTAL_STACK)Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")");if(Module["buffer"]){buffer=Module["buffer"]}else{{buffer=new ArrayBuffer(TOTAL_MEMORY)}Module["buffer"]=buffer}updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}HEAP32[0]=1668509029;HEAP16[1]=25459;if(HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPreMain(cb){__ATMAIN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_round=Math.round;var Math_min=Math.min;var Math_max=Math.max;var Math_clz32=Math.clz32;var Math_trunc=Math.trunc;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}STATIC_BASE=GLOBAL_BASE;STATICTOP=STATIC_BASE+20432;__ATINIT__.push();memoryInitializer="data:application/octet-stream;base64,/BwAAGwdAAAkHQAAuh0AACAAAAAAAAAA/BwAAOEdAAAkHQAA/h0AACAAAAAAAAAA/BwAACceAAAkHQAAQx4AADgAAAAAAAAA/BwAAGUeAAAkHQAAih4AADgAAAAAAAAAJB0AAEIrAABQAAAAAAAAACQdAAC6HgAAiAAAAAAAAAAkHQAAEx8AAJgAAAAAAAAAJB0AAGcfAACoAAAAAAAAACQdAACbHwAAuAAAAAAAAAD8HAAAxh8AACQdAADqHwAA0AAAAAAAAAD8HAAAiCAAACQdAAAmIQAA6AAAAAAAAAAkHQAAviEAAIgAAAAAAAAAJB0AAEciAADoAAAAAAAAACQdAADhIgAA6AAAAAAAAAAkHQAAcyMAAOgAAAAAAAAAJB0AABkkAADoAAAAAAAAACQdAAC0JAAA6AAAAAAAAAAkHQAASiUAAFgBAAAAAAAA/BwAAPUlAAAkHQAAoCYAAHABAAAAAAAAJB0AAEUnAACIAAAAAAAAACQdAADbJwAAcAEAAAAAAAAkHQAAgigAAHABAAAAAAAAJB0AACEpAAB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3IATjEwX19jeHhhYml2MTE5X19wb2ludGVyX3R5cGVfaW5mb0UATjEwX19jeHhhYml2MTE3X19wYmFzZV90eXBlX2luZm9F";var tempDoublePtr=STATICTOP;STATICTOP+=16;function ___cxa_allocate_exception(size){return _malloc(size)}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:(function(adjusted){if(!adjusted||EXCEPTIONS.infos[adjusted])return adjusted;for(var ptr in EXCEPTIONS.infos){var info=EXCEPTIONS.infos[ptr];if(info.adjusted===adjusted){return ptr}}return adjusted}),addRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount++}),decRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];assert(info.refcount>0);info.refcount--;if(info.refcount===0&&!info.rethrown){if(info.destructor){Module["dynCall_vi"](info.destructor,ptr)}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}}),clearRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0})};function ___cxa_begin_catch(ptr){var info=EXCEPTIONS.infos[ptr];if(info&&!info.caught){info.caught=true;__ZSt18uncaught_exceptionv.uncaught_exception--}if(info)info.rethrown=false;EXCEPTIONS.caught.push(ptr);EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(ptr));return ptr}function ___cxa_pure_virtual(){ABORT=true;throw"Pure virtual function called!"}function ___resumeException(ptr){if(!EXCEPTIONS.last){EXCEPTIONS.last=ptr}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var thrown=EXCEPTIONS.last;if(!thrown){return(setTempRet0(0),0)|0}var info=EXCEPTIONS.infos[thrown];var throwntype=info.type;if(!throwntype){return(setTempRet0(0),thrown)|0}var typeArray=Array.prototype.slice.call(arguments);var pointer=Module["___cxa_is_pointer_type"](throwntype);if(!___cxa_find_matching_catch.buffer)___cxa_find_matching_catch.buffer=_malloc(4);HEAP32[___cxa_find_matching_catch.buffer>>2]=thrown;thrown=___cxa_find_matching_catch.buffer;for(var i=0;i<typeArray.length;i++){if(typeArray[i]&&Module["___cxa_can_catch"](typeArray[i],throwntype,thrown)){thrown=HEAP32[thrown>>2];info.adjusted=thrown;return(setTempRet0(typeArray[i]),thrown)|0}}thrown=HEAP32[thrown>>2];return(setTempRet0(throwntype),thrown)|0}function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:ptr,type:type,destructor:destructor,refcount:0,caught:false,rethrown:false};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC);function ___gxx_personality_v0(){}var SYSCALLS={varargs:0,get:(function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret}),getStr:(function(){var ret=Pointer_stringify(SYSCALLS.get());return ret}),get64:(function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low}),getZero:(function(){assert(SYSCALLS.get()===0)})};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function flush_NO_FILESYSTEM(){var fflush=Module["_fflush"];if(fflush)fflush(0);var printChar=___syscall146.printChar;if(!printChar)return;var buffers=___syscall146.buffers;if(buffers[1].length)printChar(1,10);if(buffers[2].length)printChar(2,10)}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;if(!___syscall146.buffers){___syscall146.buffers=[null,[],[]];___syscall146.printChar=(function(stream,curr){var buffer=___syscall146.buffers[stream];assert(buffer);if(curr===0||curr===10){(stream===1?Module["print"]:Module["printErr"])(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}})}for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j<len;j++){___syscall146.printChar(stream,HEAPU8[ptr+j])}ret+=len}return ret}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _abort(){Module["abort"]()}var _llvm_ceil_f64=Math_ceil;var _llvm_fabs_f64=Math_abs;var _llvm_floor_f64=Math_floor;function _llvm_trap(){abort("trap!")}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}var PTHREAD_SPECIFIC={};function _pthread_getspecific(key){return PTHREAD_SPECIFIC[key]||0}var PTHREAD_SPECIFIC_NEXT_KEY=1;var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _pthread_key_create(key,destructor){if(key==0){return ERRNO_CODES.EINVAL}HEAP32[key>>2]=PTHREAD_SPECIFIC_NEXT_KEY;PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0;PTHREAD_SPECIFIC_NEXT_KEY++;return 0}function _pthread_once(ptr,func){if(!_pthread_once.seen)_pthread_once.seen={};if(ptr in _pthread_once.seen)return;Module["dynCall_v"](func);_pthread_once.seen[ptr]=1}function _pthread_setspecific(key,value){if(!(key in PTHREAD_SPECIFIC)){return ERRNO_CODES.EINVAL}PTHREAD_SPECIFIC[key]=value;return 0}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}DYNAMICTOP_PTR=staticAlloc(4);STACK_BASE=STACKTOP=alignMemory(STATICTOP);STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;staticSealed=true;var ASSERTIONS=false;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}function intArrayToString(array){var ret=[];for(var i=0;i<array.length;i++){var chr=array[i];if(chr>255){if(ASSERTIONS){assert(false,"Character code "+chr+" ("+String.fromCharCode(chr)+") at offset "+i+" not in 0x00-0xFF.")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var decodeBase64=typeof atob==="function"?atob:(function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i<input.length);return output});function intArrayFromBase64(s){if(typeof ENVIRONMENT_IS_NODE==="boolean"&&ENVIRONMENT_IS_NODE){var buf;try{buf=Buffer.from(s,"base64")}catch(_){buf=new Buffer(s,"base64")}return new Uint8Array(buf.buffer,buf.byteOffset,buf.byteLength)}try{var decoded=decodeBase64(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i<decoded.length;++i){bytes[i]=decoded.charCodeAt(i)}return bytes}catch(_){throw new Error("Converting base64 string to bytes failed.")}}function tryParseAsDataURI(filename){if(!isDataURI(filename)){return}return intArrayFromBase64(filename.slice(dataURIPrefix.length))}function invoke_ii(index,a1){try{return Module["dynCall_ii"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iii(index,a1,a2){try{return Module["dynCall_iii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiii(index,a1,a2,a3){try{return Module["dynCall_iiii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){try{return Module["dynCall_iiiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_v(index){try{Module["dynCall_v"](index)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vi(index,a1){try{Module["dynCall_vi"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vii(index,a1,a2){try{Module["dynCall_vii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viii(index,a1,a2,a3){try{Module["dynCall_viii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiii(index,a1,a2,a3,a4){try{Module["dynCall_viiii"](index,a1,a2,a3,a4)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){try{Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){try{Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}Module.asmGlobalArg={"Math":Math,"Int8Array":Int8Array,"Int16Array":Int16Array,"Int32Array":Int32Array,"Uint8Array":Uint8Array,"Uint16Array":Uint16Array,"Uint32Array":Uint32Array,"Float32Array":Float32Array,"Float64Array":Float64Array,"NaN":NaN,"Infinity":Infinity,"byteLength":byteLength};Module.asmLibraryArg={"abort":abort,"assert":assert,"enlargeMemory":enlargeMemory,"getTotalMemory":getTotalMemory,"abortOnCannotGrowMemory":abortOnCannotGrowMemory,"invoke_ii":invoke_ii,"invoke_iii":invoke_iii,"invoke_iiii":invoke_iiii,"invoke_iiiiiii":invoke_iiiiiii,"invoke_v":invoke_v,"invoke_vi":invoke_vi,"invoke_vii":invoke_vii,"invoke_viii":invoke_viii,"invoke_viiii":invoke_viiii,"invoke_viiiii":invoke_viiiii,"invoke_viiiiii":invoke_viiiiii,"__ZSt18uncaught_exceptionv":__ZSt18uncaught_exceptionv,"___cxa_allocate_exception":___cxa_allocate_exception,"___cxa_begin_catch":___cxa_begin_catch,"___cxa_find_matching_catch":___cxa_find_matching_catch,"___cxa_pure_virtual":___cxa_pure_virtual,"___cxa_throw":___cxa_throw,"___gxx_personality_v0":___gxx_personality_v0,"___resumeException":___resumeException,"___setErrNo":___setErrNo,"___syscall140":___syscall140,"___syscall146":___syscall146,"___syscall6":___syscall6,"_abort":_abort,"_emscripten_memcpy_big":_emscripten_memcpy_big,"_llvm_ceil_f64":_llvm_ceil_f64,"_llvm_fabs_f64":_llvm_fabs_f64,"_llvm_floor_f64":_llvm_floor_f64,"_llvm_trap":_llvm_trap,"_pthread_getspecific":_pthread_getspecific,"_pthread_key_create":_pthread_key_create,"_pthread_once":_pthread_once,"_pthread_setspecific":_pthread_setspecific,"flush_NO_FILESYSTEM":flush_NO_FILESYSTEM,"DYNAMICTOP_PTR":DYNAMICTOP_PTR,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX,"cttz_i8":cttz_i8};// EMSCRIPTEN_START_ASM
+var asm=(/** @suppress {uselessCode} */ function(global,env,buffer) {
+"almost asm";var a=global.Int8Array;var b=new a(buffer);var c=global.Int16Array;var d=new c(buffer);var e=global.Int32Array;var f=new e(buffer);var g=global.Uint8Array;var h=new g(buffer);var i=global.Uint16Array;var j=new i(buffer);var k=global.Uint32Array;var l=new k(buffer);var m=global.Float32Array;var n=new m(buffer);var o=global.Float64Array;var p=new o(buffer);var q=global.byteLength;var r=env.DYNAMICTOP_PTR|0;var s=env.tempDoublePtr|0;var t=env.ABORT|0;var u=env.STACKTOP|0;var v=env.STACK_MAX|0;var w=env.cttz_i8|0;var x=0;var y=0;var z=0;var A=0;var B=global.NaN,C=global.Infinity;var D=0,E=0,F=0,G=0,H=0.0;var I=0;var J=global.Math.floor;var K=global.Math.abs;var L=global.Math.sqrt;var M=global.Math.pow;var N=global.Math.cos;var O=global.Math.sin;var P=global.Math.tan;var Q=global.Math.acos;var R=global.Math.asin;var S=global.Math.atan;var T=global.Math.atan2;var U=global.Math.exp;var V=global.Math.log;var W=global.Math.ceil;var X=global.Math.imul;var Y=global.Math.min;var Z=global.Math.max;var _=global.Math.clz32;var $=global.Math.fround;var aa=env.abort;var ba=env.assert;var ca=env.enlargeMemory;var da=env.getTotalMemory;var ea=env.abortOnCannotGrowMemory;var fa=env.invoke_ii;var ga=env.invoke_iii;var ha=env.invoke_iiii;var ia=env.invoke_iiiiiii;var ja=env.invoke_v;var ka=env.invoke_vi;var la=env.invoke_vii;var ma=env.invoke_viii;var na=env.invoke_viiii;var oa=env.invoke_viiiii;var pa=env.invoke_viiiiii;var qa=env.__ZSt18uncaught_exceptionv;var ra=env.___cxa_allocate_exception;var sa=env.___cxa_begin_catch;var ta=env.___cxa_find_matching_catch;var ua=env.___cxa_pure_virtual;var va=env.___cxa_throw;var wa=env.___gxx_personality_v0;var xa=env.___resumeException;var ya=env.___setErrNo;var za=env.___syscall140;var Aa=env.___syscall146;var Ba=env.___syscall6;var Ca=env._abort;var Da=env._emscripten_memcpy_big;var Ea=env._llvm_ceil_f64;var Fa=env._llvm_fabs_f64;var Ga=env._llvm_floor_f64;var Ha=env._llvm_trap;var Ia=env._pthread_getspecific;var Ja=env._pthread_key_create;var Ka=env._pthread_once;var La=env._pthread_setspecific;var Ma=env.flush_NO_FILESYSTEM;var Na=$(0);const Oa=$(0);function Pa(newBuffer){if(q(newBuffer)&16777215||q(newBuffer)<=16777215||q(newBuffer)>2147483648)return false;b=new a(newBuffer);d=new c(newBuffer);f=new e(newBuffer);h=new g(newBuffer);j=new i(newBuffer);l=new k(newBuffer);n=new m(newBuffer);p=new o(newBuffer);buffer=newBuffer;return true}
+// EMSCRIPTEN_START_FUNCS
+function ae(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;h=u;u=u+16|0;i=h+4|0;j=h;f[a+72>>2]=e;f[a+64>>2]=g;g=rr(e>>>0>1073741823?-1:e<<2)|0;k=a+68|0;l=f[k>>2]|0;f[k>>2]=g;if(l|0)sr(l);l=a+8|0;Oh(l,b,d,e);d=a+56|0;g=f[d>>2]|0;m=f[g+4>>2]|0;n=f[g>>2]|0;o=m-n|0;if((o|0)<=0){u=h;return 1}p=o>>>2;o=a+16|0;q=a+32|0;r=a+12|0;s=a+28|0;t=a+20|0;v=a+24|0;w=p+-1|0;if(m-n>>2>>>0>w>>>0){x=p;y=w;z=n}else{A=g;Fq(A)}while(1){f[j>>2]=f[z+(y<<2)>>2];f[i>>2]=f[j>>2];Dc(a,i,b,y);g=X(y,e)|0;n=b+(g<<2)|0;w=c+(g<<2)|0;g=f[l>>2]|0;if((g|0)>0){p=0;m=f[k>>2]|0;B=g;while(1){if((B|0)>0){g=0;do{C=f[m+(g<<2)>>2]|0;D=f[o>>2]|0;if((C|0)>(D|0)){E=f[q>>2]|0;f[E+(g<<2)>>2]=D;F=E}else{E=f[r>>2]|0;D=f[q>>2]|0;f[D+(g<<2)>>2]=(C|0)<(E|0)?E:C;F=D}g=g+1|0}while((g|0)<(f[l>>2]|0));G=F}else G=f[q>>2]|0;g=(f[n+(p<<2)>>2]|0)-(f[G+(p<<2)>>2]|0)|0;D=w+(p<<2)|0;f[D>>2]=g;if((g|0)>=(f[s>>2]|0)){if((g|0)>(f[v>>2]|0)){H=g-(f[t>>2]|0)|0;I=21}}else{H=(f[t>>2]|0)+g|0;I=21}if((I|0)==21){I=0;f[D>>2]=H}p=p+1|0;B=f[l>>2]|0;if((p|0)>=(B|0))break;else m=G}}if((x|0)<=1){I=5;break}m=f[d>>2]|0;z=f[m>>2]|0;B=y+-1|0;if((f[m+4>>2]|0)-z>>2>>>0<=B>>>0){A=m;I=6;break}else{m=y;y=B;x=m}}if((I|0)==5){u=h;return 1}else if((I|0)==6)Fq(A);return 0}function be(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;h=u;u=u+16|0;i=h+4|0;j=h;f[a+72>>2]=e;f[a+64>>2]=g;g=rr(e>>>0>1073741823?-1:e<<2)|0;k=a+68|0;l=f[k>>2]|0;f[k>>2]=g;if(l|0)sr(l);l=a+8|0;Oh(l,b,d,e);d=a+56|0;g=f[d>>2]|0;m=f[g+4>>2]|0;n=f[g>>2]|0;o=m-n|0;if((o|0)<=0){u=h;return 1}p=o>>>2;o=a+16|0;q=a+32|0;r=a+12|0;s=a+28|0;t=a+20|0;v=a+24|0;w=p+-1|0;if(m-n>>2>>>0>w>>>0){x=p;y=w;z=n}else{A=g;Fq(A)}while(1){f[j>>2]=f[z+(y<<2)>>2];f[i>>2]=f[j>>2];Cc(a,i,b,y);g=X(y,e)|0;n=b+(g<<2)|0;w=c+(g<<2)|0;g=f[l>>2]|0;if((g|0)>0){p=0;m=f[k>>2]|0;B=g;while(1){if((B|0)>0){g=0;do{C=f[m+(g<<2)>>2]|0;D=f[o>>2]|0;if((C|0)>(D|0)){E=f[q>>2]|0;f[E+(g<<2)>>2]=D;F=E}else{E=f[r>>2]|0;D=f[q>>2]|0;f[D+(g<<2)>>2]=(C|0)<(E|0)?E:C;F=D}g=g+1|0}while((g|0)<(f[l>>2]|0));G=F}else G=f[q>>2]|0;g=(f[n+(p<<2)>>2]|0)-(f[G+(p<<2)>>2]|0)|0;D=w+(p<<2)|0;f[D>>2]=g;if((g|0)>=(f[s>>2]|0)){if((g|0)>(f[v>>2]|0)){H=g-(f[t>>2]|0)|0;I=21}}else{H=(f[t>>2]|0)+g|0;I=21}if((I|0)==21){I=0;f[D>>2]=H}p=p+1|0;B=f[l>>2]|0;if((p|0)>=(B|0))break;else m=G}}if((x|0)<=1){I=5;break}m=f[d>>2]|0;z=f[m>>2]|0;B=y+-1|0;if((f[m+4>>2]|0)-z>>2>>>0<=B>>>0){A=m;I=6;break}else{m=y;y=B;x=m}}if((I|0)==5){u=h;return 1}else if((I|0)==6)Fq(A);return 0}function ce(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=Oa,t=Oa,u=Oa,v=0,w=0,x=0,y=0,z=0;c=f[b>>2]|0;b=a+4|0;d=f[b>>2]|0;e=(d|0)==0;a:do if(!e){g=d+-1|0;h=(g&d|0)==0;if(!h)if(c>>>0<d>>>0)i=c;else i=(c>>>0)%(d>>>0)|0;else i=g&c;j=f[(f[a>>2]|0)+(i<<2)>>2]|0;if(!j)k=i;else{if(h){h=j;while(1){l=f[h>>2]|0;if(!l){k=i;break a}m=f[l+4>>2]|0;if(!((m|0)==(c|0)|(m&g|0)==(i|0))){k=i;break a}if((f[l+8>>2]|0)==(c|0)){o=l;break}else h=l}p=o+12|0;return p|0}else q=j;while(1){h=f[q>>2]|0;if(!h){k=i;break a}g=f[h+4>>2]|0;if((g|0)!=(c|0)){if(g>>>0<d>>>0)r=g;else r=(g>>>0)%(d>>>0)|0;if((r|0)!=(i|0)){k=i;break a}}if((f[h+8>>2]|0)==(c|0)){o=h;break}else q=h}p=o+12|0;return p|0}}else k=0;while(0);q=yn(16)|0;f[q+8>>2]=c;f[q+12>>2]=0;f[q+4>>2]=c;f[q>>2]=0;i=a+12|0;s=$(((f[i>>2]|0)+1|0)>>>0);t=$(d>>>0);u=$(n[a+16>>2]);do if(e|$(u*t)<s){r=d<<1|(d>>>0<3|(d+-1&d|0)!=0)&1;j=~~$(W($(s/u)))>>>0;Fi(a,r>>>0<j>>>0?j:r);r=f[b>>2]|0;j=r+-1|0;if(!(j&r)){v=r;w=j&c;break}if(c>>>0<r>>>0){v=r;w=c}else{v=r;w=(c>>>0)%(r>>>0)|0}}else{v=d;w=k}while(0);k=(f[a>>2]|0)+(w<<2)|0;w=f[k>>2]|0;if(!w){d=a+8|0;f[q>>2]=f[d>>2];f[d>>2]=q;f[k>>2]=d;d=f[q>>2]|0;if(d|0){k=f[d+4>>2]|0;d=v+-1|0;if(d&v)if(k>>>0<v>>>0)x=k;else x=(k>>>0)%(v>>>0)|0;else x=k&d;y=(f[a>>2]|0)+(x<<2)|0;z=30}}else{f[q>>2]=f[w>>2];y=w;z=30}if((z|0)==30)f[y>>2]=q;f[i>>2]=(f[i>>2]|0)+1;o=q;p=o+12|0;return p|0}function de(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;c=u;u=u+16|0;d=c+4|0;e=c;f[a+64>>2]=b;g=a+128|0;f[g>>2]=2;h=a+132|0;f[h>>2]=7;i=Qa[f[(f[b>>2]|0)+32>>2]&127](b)|0;b=a+88|0;f[b>>2]=i;j=a+104|0;k=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;i=a+108|0;l=f[i>>2]|0;m=f[j>>2]|0;n=l-m>>2;o=m;p=l;if(k>>>0<=n>>>0)if(k>>>0<n>>>0?(q=o+(k<<2)|0,(q|0)!=(p|0)):0){o=p+(~((p+-4-q|0)>>>2)<<2)|0;f[i>>2]=o;r=o;s=m}else{r=l;s=m}else{Ai(j,k-n|0);r=f[i>>2]|0;s=f[j>>2]|0}if((r|0)!=(s|0)){s=0;do{r=f[b>>2]|0;f[e>>2]=s;f[d>>2]=f[e>>2];n=bh(r,d)|0;r=f[j>>2]|0;f[r+(s<<2)>>2]=n;s=s+1|0}while(s>>>0<(f[i>>2]|0)-r>>2>>>0)}i=a+92|0;s=f[b>>2]|0;j=f[s>>2]|0;d=(f[s+4>>2]|0)-j>>2;e=a+96|0;r=f[e>>2]|0;n=f[i>>2]|0;k=r-n>>2;m=n;n=r;if(d>>>0<=k>>>0)if(d>>>0<k>>>0?(r=m+(d<<2)|0,(r|0)!=(n|0)):0){f[e>>2]=n+(~((n+-4-r|0)>>>2)<<2);t=s;v=j}else{t=s;v=j}else{Ai(i,d-k|0);k=f[b>>2]|0;t=k;v=f[k>>2]|0}k=f[t+4>>2]|0;if((k|0)!=(v|0)){v=f[i>>2]|0;i=f[t>>2]|0;t=k-i>>2;k=0;do{f[v+(k<<2)>>2]=f[i+(k<<2)>>2];k=k+1|0}while(k>>>0<t>>>0)}t=(f[h>>2]|0)-(f[g>>2]|0)+1|0;g=a+136|0;h=a+140|0;a=f[h>>2]|0;k=f[g>>2]|0;i=(a-k|0)/12|0;v=a;if(t>>>0>i>>>0){Kf(g,t-i|0);u=c;return 1}if(t>>>0>=i>>>0){u=c;return 1}i=k+(t*12|0)|0;if((i|0)==(v|0)){u=c;return 1}else w=v;while(1){v=w+-12|0;f[h>>2]=v;t=f[v>>2]|0;if(!t)x=v;else{v=w+-8|0;k=f[v>>2]|0;if((k|0)!=(t|0))f[v>>2]=k+(~((k+-4-t|0)>>>2)<<2);ur(t);x=f[h>>2]|0}if((x|0)==(i|0))break;else w=x}u=c;return 1}function ee(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,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194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0<r>>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0<r>>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Mf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);ur(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);ur(e);u=g;return 1}function ge(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)Fq(h);else{l=yn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;rj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=lo(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Yc(i,n,o-n>>3,e)|0;n=i+16|0;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=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=lo(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Zc(i,n,o-n>>3,e)|0;n=i+16|0;o=jo(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=lo(o|0,I|0,39,0)|0;o=oo(l|0,I|0,3)|0;l=lo(o|0,I|0,8,0)|0;o=lo(l|0,I|0,n|0,0)|0;Ml(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=4194304;if(d){d=c;c=4194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0<r>>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0<r>>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Mf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);ur(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);ur(e);u=g;return 1}function ie(a,c,d,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2]=0;n=i+32|0;f[n>>2]=2097152;if(d){d=c;c=2097152;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0<r>>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0<r>>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<19)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Nf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);ur(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);ur(e);u=g;return 1}function ke(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)Fq(h);else{l=yn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;rj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=lo(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|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]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=32768;if(d){d=c;c=32768;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0<r>>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0<r>>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<13)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Tf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);ur(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);ur(e);u=g;return 1}function oe(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)Fq(h);else{l=yn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;rj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=lo(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));ed(i,n,o-n>>3,e)|0;n=i+16|0;o=jo(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=lo(o|0,I|0,39,0)|0;o=oo(l|0,I|0,3)|0;l=lo(o|0,I|0,8,0)|0;o=lo(l|0,I|0,n|0,0)|0;Ml(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0<r>>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0<r>>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Zf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);ur(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);ur(e);u=g;return 1}function pe(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)Fq(h);else{l=yn(j<<3)|0;f[h>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>>2]=w;if(w>>>0<r>>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Zf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);ur(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);ur(e);u=g;return 1}function re(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)Fq(h);else{l=yn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;rj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=lo(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));hd(i,n,o-n>>3,e)|0;n=i+16|0;o=jo(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=lo(o|0,I|0,39,0)|0;o=oo(l|0,I|0,3)|0;l=lo(o|0,I|0,8,0)|0;o=lo(l|0,I|0,n|0,0)|0;Ml(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0<r>>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0<r>>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Zf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);ur(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);ur(e);u=g;return 1}function se(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)Fq(h);else{l=yn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;rj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=lo(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>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=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0<r>>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Zf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);ur(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);ur(e);u=g;return 1}function ve(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)Fq(h);else{l=yn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;rj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=lo(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));ld(i,n,o-n>>3,e)|0;n=i+16|0;o=jo(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=lo(o|0,I|0,39,0)|0;o=oo(l|0,I|0,3)|0;l=lo(o|0,I|0,8,0)|0;o=l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0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+9|0;i=d+8|0;j=f[(f[a+184>>2]|0)+(c<<2)>>2]&255;b[h>>0]=j;c=a+4|0;k=f[(f[c>>2]|0)+44>>2]|0;l=k+16|0;m=f[l+4>>2]|0;if((m|0)>0|(m|0)==0&(f[l>>2]|0)>>>0>0)n=j;else{f[g>>2]=f[k+4>>2];f[e>>2]=f[g>>2];Ke(k,e,h,h+1|0)|0;n=b[h>>0]|0}a:do if(n<<24>>24>-1){k=a+172|0;j=f[(f[k>>2]|0)+((n<<24>>24)*136|0)>>2]|0;l=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+56|0;m=b[h>>0]|0;o=f[k>>2]|0;k=f[o+(m*136|0)+132>>2]|0;switch(f[(f[(f[l>>2]|0)+84>>2]|0)+(j<<2)>>2]|0){case 0:{p=k;q=7;break a;break}case 1:{if(b[o+(m*136|0)+28>>0]|0){p=k;q=7;break a}break}default:{}}m=f[(f[c>>2]|0)+44>>2]|0;b[i>>0]=1;o=m+16|0;j=f[o+4>>2]|0;if(!((j|0)>0|(j|0)==0&(f[o>>2]|0)>>>0>0)){f[g>>2]=f[m+4>>2];f[e>>2]=f[g>>2];Ke(m,e,i,i+1|0)|0}r=k}else{p=f[a+68>>2]|0;q=7}while(0);if((q|0)==7){q=f[(f[c>>2]|0)+44>>2]|0;b[i>>0]=0;a=q+16|0;h=f[a+4>>2]|0;if(!((h|0)>0|(h|0)==0&(f[a>>2]|0)>>>0>0)){f[g>>2]=f[q+4>>2];f[e>>2]=f[g>>2];Ke(q,e,i,i+1|0)|0}r=p}p=f[(f[c>>2]|0)+44>>2]|0;b[i>>0]=r;r=p+16|0;c=f[r+4>>2]|0;if((c|0)>0|(c|0)==0&(f[r>>2]|0)>>>0>0){u=d;return 1}f[g>>2]=f[p+4>>2];f[e>>2]=f[g>>2];Ke(p,e,i,i+1|0)|0;u=d;return 1}function ye(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;h=u;u=u+16|0;i=h+4|0;j=h;k=a+60|0;f[a+64>>2]=g;g=a+8|0;Oh(g,b,d,e);d=a+56|0;l=f[d>>2]|0;m=f[l+4>>2]|0;n=f[l>>2]|0;o=m-n|0;if((o|0)<=0){u=h;return 1}p=(o>>>2)+-1|0;o=a+68|0;q=a+16|0;r=a+32|0;s=a+12|0;t=a+28|0;v=a+20|0;w=a+24|0;if(m-n>>2>>>0>p>>>0){x=p;y=n}else{z=l;Fq(z)}while(1){f[j>>2]=f[y+(x<<2)>>2];f[i>>2]=f[j>>2];ub(k,i,b,x)|0;l=X(x,e)|0;n=b+(l<<2)|0;p=c+(l<<2)|0;l=f[g>>2]|0;if((l|0)>0){m=0;a=o;A=l;while(1){if((A|0)>0){l=0;do{B=f[a+(l<<2)>>2]|0;C=f[q>>2]|0;if((B|0)>(C|0)){D=f[r>>2]|0;f[D+(l<<2)>>2]=C;E=D}else{D=f[s>>2]|0;C=f[r>>2]|0;f[C+(l<<2)>>2]=(B|0)<(D|0)?D:B;E=C}l=l+1|0}while((l|0)<(f[g>>2]|0));F=E}else F=f[r>>2]|0;l=(f[n+(m<<2)>>2]|0)-(f[F+(m<<2)>>2]|0)|0;C=p+(m<<2)|0;f[C>>2]=l;if((l|0)>=(f[t>>2]|0)){if((l|0)>(f[w>>2]|0)){G=l-(f[v>>2]|0)|0;H=18}}else{G=(f[v>>2]|0)+l|0;H=18}if((H|0)==18){H=0;f[C>>2]=G}m=m+1|0;A=f[g>>2]|0;if((m|0)>=(A|0))break;else a=F}}x=x+-1|0;if((x|0)<=-1){H=3;break}a=f[d>>2]|0;y=f[a>>2]|0;if((f[a+4>>2]|0)-y>>2>>>0<=x>>>0){z=a;H=4;break}}if((H|0)==3){u=h;return 1}else if((H|0)==4)Fq(z);return 0}function ze(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;h=u;u=u+16|0;i=h+4|0;j=h;k=a+60|0;f[a+64>>2]=g;g=a+8|0;Oh(g,b,d,e);d=a+56|0;l=f[d>>2]|0;m=f[l+4>>2]|0;n=f[l>>2]|0;o=m-n|0;if((o|0)<=0){u=h;return 1}p=(o>>>2)+-1|0;o=a+68|0;q=a+16|0;r=a+32|0;s=a+12|0;t=a+28|0;v=a+20|0;w=a+24|0;if(m-n>>2>>>0>p>>>0){x=p;y=n}else{z=l;Fq(z)}while(1){f[j>>2]=f[y+(x<<2)>>2];f[i>>2]=f[j>>2];tb(k,i,b,x)|0;l=X(x,e)|0;n=b+(l<<2)|0;p=c+(l<<2)|0;l=f[g>>2]|0;if((l|0)>0){m=0;a=o;A=l;while(1){if((A|0)>0){l=0;do{B=f[a+(l<<2)>>2]|0;C=f[q>>2]|0;if((B|0)>(C|0)){D=f[r>>2]|0;f[D+(l<<2)>>2]=C;E=D}else{D=f[s>>2]|0;C=f[r>>2]|0;f[C+(l<<2)>>2]=(B|0)<(D|0)?D:B;E=C}l=l+1|0}while((l|0)<(f[g>>2]|0));F=E}else F=f[r>>2]|0;l=(f[n+(m<<2)>>2]|0)-(f[F+(m<<2)>>2]|0)|0;C=p+(m<<2)|0;f[C>>2]=l;if((l|0)>=(f[t>>2]|0)){if((l|0)>(f[w>>2]|0)){G=l-(f[v>>2]|0)|0;H=18}}else{G=(f[v>>2]|0)+l|0;H=18}if((H|0)==18){H=0;f[C>>2]=G}m=m+1|0;A=f[g>>2]|0;if((m|0)>=(A|0))break;else a=F}}x=x+-1|0;if((x|0)<=-1){H=3;break}a=f[d>>2]|0;y=f[a>>2]|0;if((f[a+4>>2]|0)-y>>2>>>0<=x>>>0){z=a;H=4;break}}if((H|0)==3){u=h;return 1}else if((H|0)==4)Fq(z);return 0}function Ae(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+12|0;g=f[e>>2]|0;h=(f[g+4>>2]|0)-(f[g>>2]|0)>>2;if(!h){u=b;return 1}i=a+152|0;j=a+140|0;k=a+144|0;l=a+148|0;a=0;m=g;while(1){f[d>>2]=(a>>>0)/3|0;f[c>>2]=f[d>>2];if(!(bk(m,c)|0)?(g=f[e>>2]|0,(f[(f[g+12>>2]|0)+(a<<2)>>2]|0)==-1):0){n=a+1|0;o=((n>>>0)%3|0|0)==0?a+-2|0:n;if((o|0)==-1)p=-1;else p=f[(f[g>>2]|0)+(o<<2)>>2]|0;o=f[i>>2]|0;if((f[o+(p<<2)>>2]|0)==-1){g=f[k>>2]|0;n=f[l>>2]|0;if((g|0)==(n<<5|0)){if((g+1|0)<0){q=11;break}r=n<<6;n=g+32&-32;ti(j,g>>>0<1073741823?(r>>>0<n>>>0?n:r):2147483647);s=f[k>>2]|0;t=f[i>>2]|0}else{s=g;t=o}f[k>>2]=s+1;o=(f[j>>2]|0)+(s>>>5<<2)|0;f[o>>2]=f[o>>2]&~(1<<(s&31));o=t+(p<<2)|0;if((f[o>>2]|0)==-1){r=a;n=o;while(1){f[n>>2]=g;o=r+1|0;a:do if((r|0)!=-1?(v=((o>>>0)%3|0|0)==0?r+-2|0:o,(v|0)!=-1):0){w=f[e>>2]|0;x=f[w+12>>2]|0;y=v;while(1){v=f[x+(y<<2)>>2]|0;if((v|0)==-1)break;z=v+1|0;A=((z>>>0)%3|0|0)==0?v+-2|0:z;if((A|0)==-1){B=-1;C=-1;break a}else y=A}x=y+1|0;A=((x>>>0)%3|0|0)==0?y+-2|0:x;if((A|0)==-1){B=y;C=-1}else{B=y;C=f[(f[w>>2]|0)+(A<<2)>>2]|0}}else{B=-1;C=-1}while(0);n=t+(C<<2)|0;if((f[n>>2]|0)!=-1)break;else r=B}}}}r=a+1|0;if(r>>>0>=h>>>0){q=3;break}a=r;m=f[e>>2]|0}if((q|0)==3){u=b;return 1}else if((q|0)==11)Fq(j);return 0}function Be(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=u;u=u+32|0;e=d+8|0;g=d;h=a+4|0;i=f[h>>2]|0;if(i>>>0>=b>>>0){f[h>>2]=b;u=d;return}j=a+8|0;k=f[j>>2]|0;l=k<<5;m=b-i|0;if(l>>>0<m>>>0|i>>>0>(l-m|0)>>>0){f[e>>2]=0;n=e+4|0;f[n>>2]=0;o=e+8|0;f[o>>2]=0;if((b|0)<0)Fq(a);p=k<<6;k=b+31&-32;ti(e,l>>>0<1073741823?(p>>>0<k>>>0?k:p):2147483647);p=f[h>>2]|0;f[n>>2]=p+m;k=f[a>>2]|0;l=k;q=f[e>>2]|0;r=(l+(p>>>5<<2)-k<<3)+(p&31)|0;if((r|0)>0){p=r>>>5;pm(q|0,k|0,p<<2|0)|0;k=r&31;r=q+(p<<2)|0;s=r;if(!k){t=0;v=s}else{w=-1>>>(32-k|0);f[r>>2]=f[r>>2]&~w|f[l+(p<<2)>>2]&w;t=k;v=s}}else{t=0;v=q}f[g>>2]=v;f[g+4>>2]=t;t=g;g=f[t>>2]|0;v=f[t+4>>2]|0;t=f[a>>2]|0;f[a>>2]=f[e>>2];f[e>>2]=t;e=f[h>>2]|0;f[h>>2]=f[n>>2];f[n>>2]=e;e=f[j>>2]|0;f[j>>2]=f[o>>2];f[o>>2]=e;if(t|0)ur(t);x=g;y=v}else{v=(f[a>>2]|0)+(i>>>5<<2)|0;f[h>>2]=b;x=v;y=i&31}if(!m){u=d;return}i=(y|0)==0;v=x;if(c){if(i){z=m;A=x;B=v}else{c=32-y|0;b=c>>>0>m>>>0?m:c;f[v>>2]=f[v>>2]|-1>>>(c-b|0)&-1<<y;c=v+4|0;z=m-b|0;A=c;B=c}c=z>>>5;rj(A|0,-1,c<<2|0)|0;A=z&31;z=B+(c<<2)|0;if(!A){u=d;return}f[z>>2]=f[z>>2]|-1>>>(32-A|0);u=d;return}else{if(i){C=m;D=x;E=v}else{x=32-y|0;i=x>>>0>m>>>0?m:x;f[v>>2]=f[v>>2]&~(-1>>>(x-i|0)&-1<<y);y=v+4|0;C=m-i|0;D=y;E=y}y=C>>>5;rj(D|0,0,y<<2|0)|0;D=C&31;C=E+(y<<2)|0;if(!D){u=d;return}f[C>>2]=f[C>>2]&~(-1>>>(32-D|0));u=d;return}}function Ce(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;a=u;u=u+48|0;g=a+36|0;h=a+24|0;i=a+12|0;j=a;if(!c){k=0;u=a;return k|0}f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;l=Gj(d)|0;if(l>>>0>4294967279)Fq(g);if(l>>>0<11){b[g+11>>0]=l;if(!l)m=g;else{n=g;o=7}}else{p=l+16&-16;q=yn(p)|0;f[g>>2]=q;f[g+8>>2]=p|-2147483648;f[g+4>>2]=l;n=q;o=7}if((o|0)==7){eh(n|0,d|0,l|0)|0;m=n}b[m+l>>0]=0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;l=Gj(e)|0;if(l>>>0>4294967279)Fq(h);if(l>>>0<11){b[h+11>>0]=l;if(!l)r=h;else{s=h;o=13}}else{m=l+16&-16;n=yn(m)|0;f[h>>2]=n;f[h+8>>2]=m|-2147483648;f[h+4>>2]=l;s=n;o=13}if((o|0)==13){eh(s|0,e|0,l|0)|0;r=s}b[r+l>>0]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;l=Gj(d)|0;if(l>>>0>4294967279)Fq(i);if(l>>>0<11){b[i+11>>0]=l;if(!l)t=i;else{v=i;o=19}}else{r=l+16&-16;s=yn(r)|0;f[i>>2]=s;f[i+8>>2]=r|-2147483648;f[i+4>>2]=l;v=s;o=19}if((o|0)==19){eh(v|0,d|0,l|0)|0;t=v}b[t+l>>0]=0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;l=Gj(e)|0;if(l>>>0>4294967279)Fq(j);if(l>>>0<11){b[j+11>>0]=l;if(!l)w=j;else{x=j;o=25}}else{t=l+16&-16;v=yn(t)|0;f[j>>2]=v;f[j+8>>2]=t|-2147483648;f[j+4>>2]=l;x=v;o=25}if((o|0)==25){eh(x|0,e|0,l|0)|0;w=x}b[w+l>>0]=0;zn(c,i,j);if((b[j+11>>0]|0)<0)ur(f[j>>2]|0);if((b[i+11>>0]|0)<0)ur(f[i>>2]|0);if((b[h+11>>0]|0)<0)ur(f[h>>2]|0);if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);k=1;u=a;return k|0}function De(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;f[a>>2]=f[c>>2];d=c+4|0;f[a+4>>2]=f[d>>2];e=c+8|0;f[a+8>>2]=f[e>>2];g=c+12|0;f[a+12>>2]=f[g>>2];f[d>>2]=0;f[e>>2]=0;f[g>>2]=0;g=c+16|0;f[a+16>>2]=f[g>>2];e=c+20|0;f[a+20>>2]=f[e>>2];d=c+24|0;f[a+24>>2]=f[d>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;b[a+28>>0]=b[c+28>>0]|0;d=a+32|0;e=c+32|0;f[d>>2]=0;g=a+36|0;f[g>>2]=0;f[a+40>>2]=0;f[d>>2]=f[e>>2];d=c+36|0;f[g>>2]=f[d>>2];g=c+40|0;f[a+40>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;e=a+44|0;d=c+44|0;f[e>>2]=0;g=a+48|0;f[g>>2]=0;f[a+52>>2]=0;f[e>>2]=f[d>>2];e=c+48|0;f[g>>2]=f[e>>2];g=c+52|0;f[a+52>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+56|0;e=c+56|0;f[d>>2]=0;g=a+60|0;f[g>>2]=0;f[a+64>>2]=0;f[d>>2]=f[e>>2];d=c+60|0;f[g>>2]=f[d>>2];g=c+64|0;f[a+64>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;f[a+68>>2]=f[c+68>>2];f[a+72>>2]=f[c+72>>2];e=a+76|0;d=c+76|0;f[e>>2]=0;g=a+80|0;f[g>>2]=0;f[a+84>>2]=0;f[e>>2]=f[d>>2];e=c+80|0;f[g>>2]=f[e>>2];g=c+84|0;f[a+84>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+88|0;e=c+88|0;f[d>>2]=0;g=a+92|0;f[g>>2]=0;f[a+96>>2]=0;f[d>>2]=f[e>>2];d=c+92|0;f[g>>2]=f[d>>2];g=c+96|0;f[a+96>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;b[a+100>>0]=b[c+100>>0]|0;e=a+104|0;d=c+104|0;f[e>>2]=0;g=a+108|0;f[g>>2]=0;f[a+112>>2]=0;f[e>>2]=f[d>>2];e=c+108|0;f[g>>2]=f[e>>2];g=c+112|0;f[a+112>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+116|0;e=c+116|0;f[d>>2]=0;g=a+120|0;f[g>>2]=0;f[a+124>>2]=0;f[d>>2]=f[e>>2];d=c+120|0;f[g>>2]=f[d>>2];g=c+124|0;f[a+124>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;f[a+128>>2]=f[c+128>>2];f[a+132>>2]=f[c+132>>2];return}function Ee(a,c,d,e,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;q=f[i>>2]|0;if((q|0)!=(a|0))f[i>>2]=q+(~((q+-4-a|0)>>>2)<<2);ur(a)}a=g+64|0;q=f[a>>2]|0;f[a>>2]=0;if(q|0){a=f[q>>2]|0;if(a|0){i=q+4|0;if((f[i>>2]|0)!=(a|0))f[i>>2]=a;ur(a)}ur(q)}ur(g);u=h;return}function Fe(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if(((e-h|0)/136|0)>>>0>=c>>>0){i=c;j=h;do{f[j>>2]=-1;Uk(j+4|0);b[j+100>>0]=1;k=j+104|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[k+24>>2]=0;j=(f[g>>2]|0)+136|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=(h-i|0)/136|0;h=j+c|0;if(h>>>0>31580641)Fq(a);k=(e-i|0)/136|0;i=k<<1;e=k>>>0<15790320?(i>>>0<h>>>0?h:i):31580641;do if(e)if(e>>>0>31580641){i=ra(8)|0;op(i,16742);f[i>>2]=7520;va(i|0,1208,126)}else{l=yn(e*136|0)|0;break}else l=0;while(0);i=l+(j*136|0)|0;j=i;h=l+(e*136|0)|0;e=c;c=j;l=i;do{f[l>>2]=-1;Uk(l+4|0);b[l+100>>0]=1;k=l+104|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[k+24>>2]=0;l=c+136|0;c=l;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;l=f[g>>2]|0;if((l|0)==(e|0)){m=j;n=e;o=e}else{k=l;l=j;j=i;do{k=k+-136|0;De(j+-136|0,k);j=l+-136|0;l=j}while((k|0)!=(e|0));m=l;n=f[a>>2]|0;o=f[g>>2]|0}f[a>>2]=m;f[g>>2]=c;f[d>>2]=h;h=n;if((o|0)!=(h|0)){d=o;do{o=f[d+-20>>2]|0;if(o|0){c=d+-16|0;g=f[c>>2]|0;if((g|0)!=(o|0))f[c>>2]=g+(~((g+-4-o|0)>>>2)<<2);ur(o)}o=f[d+-32>>2]|0;if(o|0){g=d+-28|0;c=f[g>>2]|0;if((c|0)!=(o|0))f[g>>2]=c+(~((c+-4-o|0)>>>2)<<2);ur(o)}Ki(d+-132|0);d=d+-136|0}while((d|0)!=(h|0))}if(!n)return;ur(n);return}function Ge(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=f[b>>2]|0;b=a+12|0;d=(c|0)==-1;e=c+1|0;do if(!d){g=((e>>>0)%3|0|0)==0?c+-2|0:e;if(!((c>>>0)%3|0)){h=g;i=c+2|0;break}else{h=g;i=c+-1|0;break}}else{h=-1;i=-1}while(0);e=d?-1:(c>>>0)/3|0;g=a+28|0;j=(f[g>>2]|0)+(e>>>5<<2)|0;f[j>>2]=1<<(e&31)|f[j>>2];j=a+172|0;e=a+176|0;k=a+280|0;if(((!d?(d=f[(f[(f[b>>2]|0)+12>>2]|0)+(c<<2)>>2]|0,(d|0)!=-1):0)?(a=(d>>>0)/3|0,(f[(f[g>>2]|0)+(a>>>5<<2)>>2]&1<<(a&31)|0)==0):0)?(a=f[j>>2]|0,(f[e>>2]|0)!=(a|0)):0){d=c>>>5;l=1<<(c&31);c=0;m=a;do{a=(f[k>>2]|0)+(c<<5)|0;if(!(l&f[(f[m+(c*136|0)+4>>2]|0)+(d<<2)>>2]))ej(a,0);else ej(a,1);c=c+1|0;m=f[j>>2]|0}while(c>>>0<(((f[e>>2]|0)-m|0)/136|0)>>>0)}if((((h|0)!=-1?(m=f[(f[(f[b>>2]|0)+12>>2]|0)+(h<<2)>>2]|0,(m|0)!=-1):0)?(c=(m>>>0)/3|0,(f[(f[g>>2]|0)+(c>>>5<<2)>>2]&1<<(c&31)|0)==0):0)?(c=f[j>>2]|0,(f[e>>2]|0)!=(c|0)):0){m=h>>>5;d=1<<(h&31);h=0;l=c;do{c=(f[k>>2]|0)+(h<<5)|0;if(!(d&f[(f[l+(h*136|0)+4>>2]|0)+(m<<2)>>2]))ej(c,0);else ej(c,1);h=h+1|0;l=f[j>>2]|0}while(h>>>0<(((f[e>>2]|0)-l|0)/136|0)>>>0)}if((i|0)==-1)return 1;l=f[(f[(f[b>>2]|0)+12>>2]|0)+(i<<2)>>2]|0;if((l|0)==-1)return 1;b=(l>>>0)/3|0;if(f[(f[g>>2]|0)+(b>>>5<<2)>>2]&1<<(b&31)|0)return 1;b=f[j>>2]|0;if((f[e>>2]|0)==(b|0))return 1;g=i>>>5;l=1<<(i&31);i=0;h=b;do{b=(f[k>>2]|0)+(i<<5)|0;if(!(l&f[(f[h+(i*136|0)+4>>2]|0)+(g<<2)>>2]))ej(b,0);else ej(b,1);i=i+1|0;h=f[j>>2]|0}while(i>>>0<(((f[e>>2]|0)-h|0)/136|0)>>>0);return 1}function He(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;i=a+4|0;j=a+8|0;$h((f[j>>2]|0)-(f[i>>2]|0)>>2,c)|0;k=f[i>>2]|0;if((f[j>>2]|0)==(k|0)){u=d;return 1}l=a+32|0;a=c+16|0;m=c+4|0;n=h+1|0;o=h+1|0;p=h+1|0;q=h+1|0;r=0;s=k;do{k=f[(f[(f[l>>2]|0)+8>>2]|0)+(f[s+(r<<2)>>2]<<2)>>2]|0;b[h>>0]=f[k+56>>2];t=a;v=f[t>>2]|0;w=f[t+4>>2]|0;if((w|0)>0|(w|0)==0&v>>>0>0){x=w;y=v}else{f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];Ke(c,e,h,q)|0;v=a;x=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))break;s=f[p+4>>2]|0;if(!s){t=q;break a}else p=s}r=f[p>>2]|0;if(!r){t=p;break}else q=p}if((t|0)!=(n|0)?(o|0)>=(f[t+16>>2]|0):0){q=t+20|0;r=Jd(a,j)|0;if((r|0)!=(q|0)){f[h>>2]=f[q>>2];f[i>>2]=t+24;f[g>>2]=f[h>>2];f[e>>2]=f[i>>2];Pc(r,g,e)}v=f[j>>2]|0;w=f[k>>2]|0;x=f[l>>2]|0}else{v=c;w=b;x=m}}else{v=c;w=b;x=m}c=v+1|0;f[j>>2]=c;if((c|0)>=(x-w>>2|0))break;else{b=w;m=x}}u=d;return}function Je(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;i=a+12|0;$h(f[i>>2]|0,c)|0;if(!(f[i>>2]|0)){j=1;u=d;return j|0}k=c+16|0;l=c+4|0;m=h+1|0;n=h+1|0;o=h+1|0;p=0;while(1){q=f[a>>2]|0;r=f[q+(p<<3)>>2]|0;if(r>>>0>63)if(r>>>0>16383)if(r>>>0>4194303){j=0;s=20;break}else{t=2;s=13}else{t=1;s=13}else if(!r){v=p+1|0;w=0;while(1){if(f[q+(v+w<<3)>>2]|0){x=w;break}y=w+1|0;if(y>>>0<63)w=y;else{x=y;break}}b[h>>0]=x<<2|3;w=k;v=f[w+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[w>>2]|0)>>>0>0)){f[g>>2]=f[l>>2];f[e>>2]=f[g>>2];Ke(c,e,h,o)|0}z=x+p|0}else{t=0;s=13}if((s|0)==13){s=0;b[h>>0]=t|r<<2;w=k;v=f[w+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[w>>2]|0)>>>0>0)){f[g>>2]=f[l>>2];f[e>>2]=f[g>>2];Ke(c,e,h,n)|0}if(!t)z=p;else{w=0;do{w=w+1|0;b[h>>0]=r>>>((w<<3)+-2|0);v=k;q=f[v+4>>2]|0;if(!((q|0)>0|(q|0)==0&(f[v>>2]|0)>>>0>0)){f[g>>2]=f[l>>2];f[e>>2]=f[g>>2];Ke(c,e,h,m)|0}}while((w|0)<(t|0));z=p}}p=z+1|0;if(p>>>0>=(f[i>>2]|0)>>>0){j=1;s=20;break}}if((s|0)==20){u=d;return j|0}return 0}function Ke(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;g=f[a>>2]|0;h=g;i=(f[c>>2]|0)-h|0;c=g+i|0;j=e-d|0;if((j|0)<=0){k=c;return k|0}l=a+8|0;m=f[l>>2]|0;n=a+4|0;o=f[n>>2]|0;p=o;if((j|0)<=(m-p|0)){q=p-c|0;if((j|0)>(q|0)){r=d+q|0;if((r|0)==(e|0))s=o;else{t=r;u=o;while(1){b[u>>0]=b[t>>0]|0;t=t+1|0;v=(f[n>>2]|0)+1|0;f[n>>2]=v;if((t|0)==(e|0)){s=v;break}else u=v}}if((q|0)>0){w=r;x=s}else{k=c;return k|0}}else{w=e;x=o}s=x-(c+j)|0;r=c+s|0;if(r>>>0<o>>>0){q=r;r=x;do{b[r>>0]=b[q>>0]|0;q=q+1|0;r=(f[n>>2]|0)+1|0;f[n>>2]=r}while((q|0)!=(o|0))}if(s|0)pm(x+(0-s)|0,c|0,s|0)|0;if((w|0)==(d|0)){k=c;return k|0}else{y=d;z=c}while(1){b[z>>0]=b[y>>0]|0;y=y+1|0;if((y|0)==(w|0)){k=c;break}else z=z+1|0}return k|0}z=p-h+j|0;if((z|0)<0)Fq(a);j=m-h|0;h=j<<1;m=j>>>0<1073741823?(h>>>0<z>>>0?z:h):2147483647;h=c;if(!m)A=0;else A=yn(m)|0;z=A+i|0;i=z;j=A+m|0;if((d|0)==(e|0)){B=i;C=g}else{g=d;d=i;i=z;do{b[i>>0]=b[g>>0]|0;i=d+1|0;d=i;g=g+1|0}while((g|0)!=(e|0));B=d;C=f[a>>2]|0}d=h-C|0;e=z+(0-d)|0;if((d|0)>0)eh(e|0,C|0,d|0)|0;d=(f[n>>2]|0)-h|0;if((d|0)>0){h=B;eh(h|0,c|0,d|0)|0;D=h+d|0;E=f[a>>2]|0}else{D=B;E=C}f[a>>2]=e;f[n>>2]=D;f[l>>2]=j;if(!E){k=z;return k|0}ur(E);k=z;return k|0}function Le(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=u;u=u+16|0;g=e;h=f[(f[c+4>>2]|0)+(d<<2)>>2]|0;d=f[c+28>>2]|0;c=f[(f[(f[d+4>>2]|0)+8>>2]|0)+(h<<2)>>2]|0;switch(f[c+28>>2]|0){case 5:case 6:case 3:case 4:case 1:case 2:{i=yn(40)|0;To(i);j=i;k=j;f[a>>2]=k;u=e;return}case 9:{l=3;break}default:{}}if((l|0)==3){i=f[d+48>>2]|0;d=yn(32)|0;f[g>>2]=d;f[g+8>>2]=-2147483616;f[g+4>>2]=17;m=d;n=14860;o=m+17|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[d+17>>0]=0;d=i+16|0;n=f[d>>2]|0;if(n){p=d;q=n;a:while(1){n=q;while(1){if((f[n+16>>2]|0)>=(h|0))break;r=f[n+4>>2]|0;if(!r){s=p;break a}else n=r}q=f[n>>2]|0;if(!q){s=n;break}else p=n}if(((s|0)!=(d|0)?(h|0)>=(f[s+16>>2]|0):0)?(h=s+20|0,(Hh(h,g)|0)!=0):0)t=Nk(h,g,-1)|0;else l=12}else l=12;if((l|0)==12)t=Nk(i,g,-1)|0;if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);if((t|0)>0)if((f[c+56>>2]|0)==1){c=yn(48)|0;m=c;o=m+48|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(o|0));To(c);f[c>>2]=2608;f[c+40>>2]=1280;f[c+44>>2]=-1;j=c;k=j;f[a>>2]=k;u=e;return}else{c=yn(64)|0;Fm(c);j=c;k=j;f[a>>2]=k;u=e;return}}c=yn(36)|0;Qm(c);j=c;k=j;f[a>>2]=k;u=e;return}function Me(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=(c|0)==(a|0);b[c+12>>0]=d&1;if(d)return;else e=c;while(1){g=e+8|0;h=f[g>>2]|0;c=h+12|0;if(b[c>>0]|0){i=23;break}j=h+8|0;k=f[j>>2]|0;d=f[k>>2]|0;if((d|0)==(h|0)){l=f[k+4>>2]|0;if(!l){i=7;break}m=l+12|0;if(!(b[m>>0]|0))n=m;else{i=7;break}}else{if(!d){i=16;break}m=d+12|0;if(!(b[m>>0]|0))n=m;else{i=16;break}}b[c>>0]=1;c=(k|0)==(a|0);b[k+12>>0]=c&1;b[n>>0]=1;if(c){i=23;break}else e=k}if((i|0)==7){if((f[h>>2]|0)==(e|0)){o=h;p=k}else{n=h+4|0;a=f[n>>2]|0;c=f[a>>2]|0;f[n>>2]=c;if(!c)q=k;else{f[c+8>>2]=h;q=f[j>>2]|0}f[a+8>>2]=q;q=f[j>>2]|0;f[((f[q>>2]|0)==(h|0)?q:q+4|0)>>2]=a;f[a>>2]=h;f[j>>2]=a;o=a;p=f[a+8>>2]|0}b[o+12>>0]=1;b[p+12>>0]=0;o=f[p>>2]|0;a=o+4|0;q=f[a>>2]|0;f[p>>2]=q;if(q|0)f[q+8>>2]=p;q=p+8|0;f[o+8>>2]=f[q>>2];c=f[q>>2]|0;f[((f[c>>2]|0)==(p|0)?c:c+4|0)>>2]=o;f[a>>2]=p;f[q>>2]=o;return}else if((i|0)==16){if((f[h>>2]|0)==(e|0)){o=e+4|0;q=f[o>>2]|0;f[h>>2]=q;if(!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0);sr(g);u=h;return}while(1){k=f[e+(t<<2)>>2]|0;if(c)A=f[(f[o>>2]|0)+(k<<2)>>2]|0;else A=k;k=p;w=f[k>>2]|0;y=f[k+4>>2]|0;k=q;j=f[k>>2]|0;x=In(j|0,f[k+4>>2]|0,A|0,0)|0;k=lo(x|0,I|0,w|0,y|0)|0;eh(g|0,(f[f[d>>2]>>2]|0)+k|0,j|0)|0;j=f[r>>2]|0;B=$(n[i>>2]);k=0;y=v;while(1){C=$(n[g+(k<<2)>>2]);w=~~$(J($($(B*$(C-$(n[j+(k<<2)>>2])))+$(.5))));f[a+(y<<2)>>2]=w;k=k+1|0;if((k|0)==(l|0))break;else y=y+1|0}t=t+1|0;if(t>>>0>=s>>>0)break;else v=v+l|0}sr(g);u=h;return}function Oe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;d=f[b>>2]|0;b=a+12|0;e=(d|0)==-1;do if(e){g=1;h=-1;i=-1}else{j=d+(((d>>>0)%3|0|0)==0?2:-1)|0;if((j|0)!=-1){k=f[(f[b>>2]|0)+12>>2]|0;l=j;while(1){j=f[k+(l<<2)>>2]|0;if((j|0)==-1){m=0;n=l;break}o=j+1|0;l=((o>>>0)%3|0|0)==0?j+-2|0:o;if((l|0)==-1){m=1;n=-1;break}}if(e){g=m;h=-1;i=n;break}else{p=m;q=n}}else{p=1;q=-1}g=p;h=f[(f[f[b>>2]>>2]|0)+(d<<2)>>2]|0;i=q}while(0);if(c){c=(f[a+84>>2]|0)+(h>>>5<<2)|0;f[c>>2]=f[c>>2]|1<<(h&31);r=1}else r=0;c=f[(f[a+152>>2]|0)+(h<<2)>>2]|0;q=(f[a+140>>2]|0)+(c>>>5<<2)|0;f[q>>2]=f[q>>2]|1<<(c&31);if(!g){g=(((i>>>0)%3|0|0)==0?2:-1)+i|0;if((g|0)==-1){s=-1;t=i}else{s=f[(f[f[b>>2]>>2]|0)+(g<<2)>>2]|0;t=i}}else{s=-1;t=-1}if((s|0)==(h|0)){u=r;return u|0}i=f[a+84>>2]|0;a=r;r=s;s=t;while(1){t=i+(r>>>5<<2)|0;f[t>>2]=f[t>>2]|1<<(r&31);t=a+1|0;g=s+1|0;a:do if((s|0)!=-1?(c=((g>>>0)%3|0|0)==0?s+-2|0:g,(c|0)!=-1):0){q=f[b>>2]|0;d=f[q+12>>2]|0;p=c;while(1){c=f[d+(p<<2)>>2]|0;if((c|0)==-1)break;n=c+1|0;m=((n>>>0)%3|0|0)==0?c+-2|0:n;if((m|0)==-1){v=-1;w=-1;break a}else p=m}d=(((p>>>0)%3|0|0)==0?2:-1)+p|0;if((d|0)==-1){v=-1;w=p}else{v=f[(f[q>>2]|0)+(d<<2)>>2]|0;w=p}}else{v=-1;w=-1}while(0);if((v|0)==(h|0)){u=t;break}else{a=t;r=v;s=w}}return u|0}function Pe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;c=a+4|0;d=f[c>>2]|0;e=a+100|0;if(d>>>0<(f[e>>2]|0)>>>0){f[c>>2]=d+1;g=h[d>>0]|0}else g=Pi(a)|0;switch(g|0){case 43:case 45:{d=(g|0)==45&1;i=f[c>>2]|0;if(i>>>0<(f[e>>2]|0)>>>0){f[c>>2]=i+1;j=h[i>>0]|0}else j=Pi(a)|0;if((b|0)!=0&(j+-48|0)>>>0>9?(f[e>>2]|0)!=0:0){f[c>>2]=(f[c>>2]|0)+-1;k=d;l=j}else{k=d;l=j}break}default:{k=0;l=g}}if((l+-48|0)>>>0>9)if(!(f[e>>2]|0)){m=-2147483648;n=0}else{f[c>>2]=(f[c>>2]|0)+-1;m=-2147483648;n=0}else{g=0;j=l;while(1){g=j+-48+(g*10|0)|0;l=f[c>>2]|0;if(l>>>0<(f[e>>2]|0)>>>0){f[c>>2]=l+1;o=h[l>>0]|0}else o=Pi(a)|0;if(!((o+-48|0)>>>0<10&(g|0)<214748364))break;else j=o}j=((g|0)<0)<<31>>31;if((o+-48|0)>>>0<10){l=o;d=g;b=j;while(1){i=In(d|0,b|0,10,0)|0;p=I;q=lo(l|0,((l|0)<0)<<31>>31|0,-48,-1)|0;r=lo(q|0,I|0,i|0,p|0)|0;p=I;i=f[c>>2]|0;if(i>>>0<(f[e>>2]|0)>>>0){f[c>>2]=i+1;s=h[i>>0]|0}else s=Pi(a)|0;if((s+-48|0)>>>0<10&((p|0)<21474836|(p|0)==21474836&r>>>0<2061584302)){l=s;d=r;b=p}else{t=s;u=r;v=p;break}}}else{t=o;u=g;v=j}if((t+-48|0)>>>0<10)do{t=f[c>>2]|0;if(t>>>0<(f[e>>2]|0)>>>0){f[c>>2]=t+1;w=h[t>>0]|0}else w=Pi(a)|0}while((w+-48|0)>>>0<10);if(f[e>>2]|0)f[c>>2]=(f[c>>2]|0)+-1;c=(k|0)!=0;k=no(0,0,u|0,v|0)|0;m=c?I:v;n=c?k:u}I=m;return n|0}function Qe(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=a+1176|0;c=f[b>>2]|0;if(c|0){d=a+1180|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);ur(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}ur(g)}g=a+1164|0;b=f[g>>2]|0;if(b|0){j=a+1168|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);ur(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}ur(l)}l=f[a+1152>>2]|0;if(l|0){g=a+1156|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);ur(l)}l=f[a+1140>>2]|0;if(l|0){m=a+1144|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);ur(l)}l=f[a+1128>>2]|0;if(!l){n=a+1108|0;tl(n);o=a+1088|0;tl(o);p=a+1068|0;tl(p);q=a+1036|0;Ej(q);r=a+12|0;Lh(r);return}g=a+1132|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);ur(l);n=a+1108|0;tl(n);o=a+1088|0;tl(o);p=a+1068|0;tl(p);q=a+1036|0;Ej(q);r=a+12|0;Lh(r);return}function Re(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=u;u=u+16|0;e=d;g=a+4|0;h=f[g>>2]|0;i=f[(f[a>>2]|0)+52>>2]|0;if(!h){if(!(Sa[i&31](a,c,0)|0)){j=0;u=d;return j|0}}else if(!(Sa[i&31](a,c,f[(f[h+4>>2]|0)+80>>2]|0)|0)){j=0;u=d;return j|0}if(!(b[a+28>>0]|0)){j=1;u=d;return j|0}h=f[a+8>>2]|0;i=f[a+32>>2]|0;a=f[h+80>>2]|0;f[e>>2]=0;k=e+4|0;f[k>>2]=0;f[e+8>>2]=0;do if(a)if(a>>>0>1073741823)Fq(e);else{l=a<<2;m=yn(l)|0;f[e>>2]=m;n=m+(a<<2)|0;f[e+8>>2]=n;rj(m|0,0,l|0)|0;f[k>>2]=n;o=m;p=n;q=m;break}else{o=0;p=0;q=0}while(0);e=f[c+4>>2]|0;a=f[c>>2]|0;c=a;a:do if((e|0)!=(a|0)){m=e-a>>2;if(b[h+84>>0]|0){n=0;while(1){f[o+(f[c+(n<<2)>>2]<<2)>>2]=n;n=n+1|0;if(n>>>0>=m>>>0)break a}}n=f[h+68>>2]|0;l=0;do{f[o+(f[n+(f[c+(l<<2)>>2]<<2)>>2]<<2)>>2]=l;l=l+1|0}while(l>>>0<m>>>0)}while(0);c=f[(f[(f[g>>2]|0)+4>>2]|0)+80>>2]|0;b:do if(c|0){g=f[i+68>>2]|0;if(b[h+84>>0]|0){a=0;while(1){f[g+(a<<2)>>2]=f[o+(a<<2)>>2];a=a+1|0;if(a>>>0>=c>>>0)break b}}a=f[h+68>>2]|0;e=0;do{f[g+(e<<2)>>2]=f[o+(f[a+(e<<2)>>2]<<2)>>2];e=e+1|0}while(e>>>0<c>>>0)}while(0);if(o|0){if((p|0)!=(o|0))f[k>>2]=p+(~((p+-4-o|0)>>>2)<<2);ur(q)}j=1;u=d;return j|0}function Se(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;f[a>>2]=0;f[a+8>>2]=b;Mh(a+12|0);Ln(a+1036|0);Mo(a+1068|0);Mo(a+1088|0);Mo(a+1108|0);e=a+1128|0;f[e>>2]=0;g=a+1132|0;f[g>>2]=0;f[a+1136>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)Fq(e);else{i=b<<2;j=yn(i)|0;f[e>>2]=j;k=j+(b<<2)|0;f[a+1136>>2]=k;rj(j|0,0,i|0)|0;f[g>>2]=k;break}while(0);g=a+1140|0;f[g>>2]=0;e=a+1144|0;f[e>>2]=0;f[a+1148>>2]=0;if(!h){k=b<<2;i=yn(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+1148>>2]=g;rj(i|0,0,k|0)|0;f[e>>2]=g}g=a+1152|0;f[g>>2]=0;e=a+1156|0;f[e>>2]=0;f[a+1160>>2]=0;if(!h){k=b<<2;i=yn(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a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[k>>2]=A+(~((A+-4-t|0)>>>2)<<2);B=r}else B=r;else{zh(b,x-y|0,h);B=f[b>>2]|0}v=B;w=B}y=w+(o<<2)|0;x=f[y>>2]|0;s=w;if((x|0)<=1)if((x|0)==0?(f[l>>2]=(f[l>>2]|0)+1,o>>>0>(f[m>>2]|0)>>>0):0){f[m>>2]=o;C=0.0}else C=0.0;else{D=+(x|0);C=+Ug(D)*D}x=(f[y>>2]|0)+1|0;f[y>>2]=x;D=+(x|0);E=+Ug(D)*D-C;p[a>>3]=+p[a>>3]+E;q=q+1|0;if((q|0)==(d|0))break;else{r=v;n=w}}}if(e){f[i>>2]=f[a>>2];f[i+4>>2]=f[a+4>>2];f[i+8>>2]=f[a+8>>2];f[i+12>>2]=f[a+12>>2];f[i+16>>2]=f[a+16>>2];u=g;return}if(!j){u=g;return}j=f[b>>2]|0;b=0;do{a=j+(f[c+(b<<2)>>2]<<2)|0;f[a>>2]=(f[a>>2]|0)+-1;b=b+1|0}while((b|0)!=(d|0));u=g;return}function Ue(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0.0;a:do if(b>>>0<=20)do switch(b|0){case 9:{d=(f[c>>2]|0)+(4-1)&~(4-1);e=f[d>>2]|0;f[c>>2]=d+4;f[a>>2]=e;break a;break}case 10:{e=(f[c>>2]|0)+(4-1)&~(4-1);d=f[e>>2]|0;f[c>>2]=e+4;e=a;f[e>>2]=d;f[e+4>>2]=((d|0)<0)<<31>>31;break a;break}case 11:{d=(f[c>>2]|0)+(4-1)&~(4-1);e=f[d>>2]|0;f[c>>2]=d+4;d=a;f[d>>2]=e;f[d+4>>2]=0;break a;break}case 12:{d=(f[c>>2]|0)+(8-1)&~(8-1);e=d;g=f[e>>2]|0;h=f[e+4>>2]|0;f[c>>2]=d+8;d=a;f[d>>2]=g;f[d+4>>2]=h;break a;break}case 13:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=(d&65535)<<16>>16;d=a;f[d>>2]=h;f[d+4>>2]=((h|0)<0)<<31>>31;break a;break}case 14:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=a;f[h>>2]=d&65535;f[h+4>>2]=0;break a;break}case 15:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=(d&255)<<24>>24;d=a;f[d>>2]=h;f[d+4>>2]=((h|0)<0)<<31>>31;break a;break}case 16:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=a;f[h>>2]=d&255;f[h+4>>2]=0;break a;break}case 17:{h=(f[c>>2]|0)+(8-1)&~(8-1);i=+p[h>>3];f[c>>2]=h+8;p[a>>3]=i;break a;break}case 18:{h=(f[c>>2]|0)+(8-1)&~(8-1);i=+p[h>>3];f[c>>2]=h+8;p[a>>3]=i;break a;break}default:break a}while(0);while(0);return}function Ve(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;c=u;u=u+16|0;d=c+4|0;e=c;g=c+8|0;if(!(Qa[f[(f[a>>2]|0)+32>>2]&127](a)|0)){h=0;u=c;return h|0}i=a+44|0;j=f[i>>2]|0;k=a+8|0;l=a+12|0;m=f[l>>2]|0;n=f[k>>2]|0;b[g>>0]=(m-n|0)>>>2;o=j+16|0;p=f[o+4>>2]|0;if((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0){q=k;r=n;s=m}else{f[e>>2]=f[j+4>>2];f[d>>2]=f[e>>2];Ke(j,d,g,g+1|0)|0;q=k;r=f[k>>2]|0;s=f[l>>2]|0}a:do if((r|0)!=(s|0)){l=a+4|0;k=r;while(1){g=f[k>>2]|0;k=k+4|0;if(!(Sa[f[(f[g>>2]|0)+8>>2]&31](g,a,f[l>>2]|0)|0)){h=0;break}if((k|0)==(s|0))break a}u=c;return h|0}while(0);if(!(xc(a)|0)){h=0;u=c;return h|0}s=a+32|0;r=f[s>>2]|0;k=a+36|0;l=f[k>>2]|0;b:do if((r|0)!=(l|0)){g=r;do{if(!(Ra[f[(f[a>>2]|0)+40>>2]&127](a,f[g>>2]|0)|0)){h=0;t=18;break}g=g+4|0}while((g|0)!=(l|0));if((t|0)==18){u=c;return h|0}g=f[s>>2]|0;d=f[k>>2]|0;if((g|0)!=(d|0)){j=g;while(1){g=f[(f[q>>2]|0)+(f[j>>2]<<2)>>2]|0;j=j+4|0;if(!(Ra[f[(f[g>>2]|0)+12>>2]&127](g,f[i>>2]|0)|0)){h=0;break}if((j|0)==(d|0))break b}u=c;return h|0}}while(0);h=Qa[f[(f[a>>2]|0)+44>>2]&127](a)|0;u=c;return h|0}function We(a,b){a=a|0;b=b|0;nd(a,b);nd(a+32|0,b);nd(a+64|0,b);nd(a+96|0,b);nd(a+128|0,b);nd(a+160|0,b);nd(a+192|0,b);nd(a+224|0,b);nd(a+256|0,b);nd(a+288|0,b);nd(a+320|0,b);nd(a+352|0,b);nd(a+384|0,b);nd(a+416|0,b);nd(a+448|0,b);nd(a+480|0,b);nd(a+512|0,b);nd(a+544|0,b);nd(a+576|0,b);nd(a+608|0,b);nd(a+640|0,b);nd(a+672|0,b);nd(a+704|0,b);nd(a+736|0,b);nd(a+768|0,b);nd(a+800|0,b);nd(a+832|0,b);nd(a+864|0,b);nd(a+896|0,b);nd(a+928|0,b);nd(a+960|0,b);nd(a+992|0,b);nd(a+1024|0,b);return}function Xe(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=u;u=u+64|0;g=e+60|0;h=e;i=yn(80)|0;j=f[c+8>>2]|0;f[i+4>>2]=0;f[i>>2]=3808;k=i+8|0;l=i+12|0;m=l+44|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[k>>2]=3832;n=i+56|0;f[n>>2]=0;f[i+60>>2]=0;f[i+64>>2]=0;f[i+68>>2]=j;f[i+72>>2]=d;o=i+76|0;f[o>>2]=0;p=i;q=f[c+12>>2]|0;r=h+4|0;l=r+4|0;m=l+40|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[h>>2]=3832;l=h+48|0;f[l>>2]=0;m=h+52|0;f[m>>2]=0;f[h+56>>2]=0;s=q;f[r>>2]=s;t=((f[s+4>>2]|0)-(f[q>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;kh(h+24|0,t,g);t=f[r>>2]|0;r=(f[t+28>>2]|0)-(f[t+24>>2]|0)>>2;b[g>>0]=0;kh(h+36|0,r,g);f[h+8>>2]=q;f[h+12>>2]=d;f[h+16>>2]=j;f[h+20>>2]=i;f[o>>2]=c+72;uf(k,h)|0;lg(n,f[l>>2]|0,f[m>>2]|0);f[a>>2]=p;f[h>>2]=3832;p=f[l>>2]|0;if(p|0){l=f[m>>2]|0;if((l|0)!=(p|0))f[m>>2]=l+(~((l+-4-p|0)>>>2)<<2);ur(p)}f[h>>2]=3852;p=f[h+36>>2]|0;if(p|0)ur(p);p=f[h+24>>2]|0;if(!p){u=e;return}ur(p);u=e;return}function Ye(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;c=u;u=u+32|0;d=c;e=a+4|0;g=f[a>>2]|0;h=(f[e>>2]|0)-g>>2;i=h+1|0;if(i>>>0>1073741823)Fq(a);j=a+8|0;k=(f[j>>2]|0)-g|0;g=k>>1;l=k>>2>>>0<536870911?(g>>>0<i>>>0?i:g):1073741823;f[d+12>>2]=0;f[d+16>>2]=a+8;do if(l)if(l>>>0>1073741823){g=ra(8)|0;op(g,16742);f[g>>2]=7520;va(g|0,1208,126)}else{m=yn(l<<2)|0;break}else m=0;while(0);f[d>>2]=m;g=m+(h<<2)|0;h=d+8|0;i=d+4|0;f[i>>2]=g;k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*12|0)+4>>2]=f[c>>2];f[o+(p*12|0)+8>>2]=f[n>>2];p=p+1|0;if(p>>>0>=k>>>0)break a}}p=f[h+68>>2]|0;q=0;do{r=f[p+(f[m+(q*12|0)>>2]<<2)>>2]|0;f[g>>2]=r;s=f[p+(f[m+(q*12|0)+4>>2]<<2)>>2]|0;f[c>>2]=s;t=f[p+(f[m+(q*12|0)+8>>2]<<2)>>2]|0;f[n>>2]=t;f[o+(q*12|0)>>2]=r;f[o+(q*12|0)+4>>2]=s;f[o+(q*12|0)+8>>2]=t;q=q+1|0}while(q>>>0<k>>>0)}while(0);Nj(a,e);a=f[e>>2]|0;if(a|0){e=f[l>>2]|0;if((e|0)!=(a|0))f[l>>2]=e+(~(((e+-12-a|0)>>>0)/12|0)*12|0);ur(a)}u=d;return}function _e(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;f[a>>2]=0;f[a+8>>2]=b;Ln(a+12|0);Mo(a+44|0);Mo(a+64|0);Mo(a+84|0);e=a+104|0;f[e>>2]=0;g=a+108|0;f[g>>2]=0;f[a+112>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)Fq(e);else{i=b<<2;j=yn(i)|0;f[e>>2]=j;k=j+(b<<2)|0;f[a+112>>2]=k;rj(j|0,0,i|0)|0;f[g>>2]=k;break}while(0);g=a+116|0;f[g>>2]=0;e=a+120|0;f[e>>2]=0;f[a+124>>2]=0;if(!h){k=b<<2;i=yn(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+124>>2]=g;rj(i|0,0,k|0)|0;f[e>>2]=g}g=a+128|0;f[g>>2]=0;e=a+132|0;f[e>>2]=0;f[a+136>>2]=0;if(!h){k=b<<2;i=yn(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+136>>2]=g;rj(i|0,0,k|0)|0;f[e>>2]=g}g=b<<5|1;f[d>>2]=0;e=d+4|0;f[e>>2]=0;f[d+8>>2]=0;if(!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yn(k)|0;f[d>>2]=i;j=i+(b<<2)|0;f[d+8>>2]=j;rj(i|0,0,k|0)|0;f[e>>2]=j}rk(a+128|0,g,d);j=f[d>>2]|0;if(j|0){k=f[e>>2]|0;if((k|0)!=(j|0))f[e>>2]=k+(~((k+-4-j|0)>>>2)<<2);ur(j)}f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;if(!h){h=b<<2;k=yn(h)|0;f[d>>2]=k;e=k+(b<<2)|0;f[d+8>>2]=e;rj(k|0,0,h|0)|0;f[j>>2]=e}rk(a+140|0,g,d);g=f[d>>2]|0;if(!g){u=c;return}d=f[j>>2]|0;if((d|0)!=(g|0))f[j>>2]=d+(~((d+-4-g|0)>>>2)<<2);ur(g);u=c;return}function af(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;d=yn(40)|0;e=d+16|0;oj(e,c);oj(d+28|0,c+12|0);c=a+4|0;g=f[c>>2]|0;do if(g){h=b[d+27>>0]|0;i=h<<24>>24<0;j=i?f[d+20>>2]|0:h&255;h=i?f[e>>2]|0:e;i=g;while(1){k=i+16|0;l=b[k+11>>0]|0;m=l<<24>>24<0;n=m?f[i+20>>2]|0:l&255;l=n>>>0<j>>>0?n:j;if((l|0)!=0?(o=dl(h,m?f[k>>2]|0:k,l)|0,(o|0)!=0):0)if((o|0)<0)p=7;else p=9;else if(j>>>0<n>>>0)p=7;else p=9;if((p|0)==7){p=0;n=f[i>>2]|0;if(!n){p=8;break}else q=n}else if((p|0)==9){p=0;r=i+4|0;n=f[r>>2]|0;if(!n){p=11;break}else q=n}i=q}if((p|0)==8){s=i;t=i;break}else if((p|0)==11){s=i;t=r;break}}else{s=c;t=c}while(0);f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=s;f[t>>2]=d;s=f[f[a>>2]>>2]|0;if(!s){u=d;v=a+4|0;w=f[v>>2]|0;Me(w,u);x=a+8|0;y=f[x>>2]|0;z=y+1|0;f[x>>2]=z;return d|0}f[a>>2]=s;u=f[t>>2]|0;v=a+4|0;w=f[v>>2]|0;Me(w,u);x=a+8|0;y=f[x>>2]|0;z=y+1|0;f[x>>2]=z;return d|0}function bf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;d=u;u=u+32|0;h=d+24|0;i=d+16|0;j=d;k=d+8|0;f[a+52>>2]=e;f[a+44>>2]=g;g=rr(e>>>0>1073741823?-1:e<<2)|0;l=a+48|0;m=f[l>>2]|0;f[l>>2]=g;if(m|0)sr(m);m=a+36|0;g=f[m>>2]|0;n=f[g+4>>2]|0;o=f[g>>2]|0;p=n-o|0;if((p|0)<=0){u=d;return 1}q=p>>>2;p=a+8|0;r=i+4|0;s=j+4|0;t=h+4|0;v=q+-1|0;if(n-o>>2>>>0>v>>>0){w=q;x=v;y=o}else{z=g;Fq(z)}while(1){f[k>>2]=f[y+(x<<2)>>2];f[h>>2]=f[k>>2];Bc(a,h,b,x);g=X(x,e)|0;o=b+(g<<2)|0;v=f[l>>2]|0;q=c+(g<<2)|0;g=f[o+4>>2]|0;n=f[v>>2]|0;A=f[v+4>>2]|0;f[i>>2]=f[o>>2];f[r>>2]=g;f[j>>2]=n;f[s>>2]=A;Pd(h,p,i,j);f[q>>2]=f[h>>2];f[q+4>>2]=f[t>>2];if((w|0)<=1){B=5;break}q=f[m>>2]|0;y=f[q>>2]|0;A=x+-1|0;if((f[q+4>>2]|0)-y>>2>>>0<=A>>>0){z=q;B=6;break}else{q=x;x=A;w=q}}if((B|0)==5){u=d;return 1}else if((B|0)==6)Fq(z);return 0}function cf(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=Oa,B=Oa;g=u;u=u+16|0;h=g;i=b[d+24>>0]|0;j=i<<24>>24;Ph(a,c,e,j,0,d,1);k=f[a>>2]|0;a=(f[f[k>>2]>>2]|0)+(f[k+48>>2]|0)|0;k=f[c+4>>2]|0;Lq(h);Ro(h,$(n[c+20>>2]),(1<<k)+-1|0);k=rr(j>>>0>1073741823?-1:j<<2)|0;if(!e){sr(k);u=g;return}l=d+68|0;m=d+48|0;o=d+40|0;p=c+8|0;c=(b[d+84>>0]|0)==0;if(i<<24>>24>0){q=0;r=0}else{i=0;do{if(c)s=f[(f[l>>2]|0)+(i<<2)>>2]|0;else s=i;t=m;v=f[t>>2]|0;w=f[t+4>>2]|0;t=o;x=f[t>>2]|0;y=In(x|0,f[t+4>>2]|0,s|0,0)|0;t=lo(y|0,I|0,v|0,w|0)|0;eh(k|0,(f[f[d>>2]>>2]|0)+t|0,x|0)|0;i=i+1|0}while((i|0)!=(e|0));sr(k);u=g;return}while(1){if(c)z=f[(f[l>>2]|0)+(r<<2)>>2]|0;else z=r;i=m;s=f[i>>2]|0;x=f[i+4>>2]|0;i=o;t=f[i>>2]|0;w=In(t|0,f[i+4>>2]|0,z|0,0)|0;i=lo(w|0,I|0,s|0,x|0)|0;eh(k|0,(f[f[d>>2]>>2]|0)+i|0,t|0)|0;t=f[p>>2]|0;A=$(n[h>>2]);i=0;x=q;while(1){B=$(n[k+(i<<2)>>2]);s=~~$(J($($(A*$(B-$(n[t+(i<<2)>>2])))+$(.5))));f[a+(x<<2)>>2]=s;i=i+1|0;if((i|0)==(j|0))break;else x=x+1|0}r=r+1|0;if((r|0)==(e|0))break;else q=q+j|0}sr(k);u=g;return}function df(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;d=u;u=u+32|0;h=d+24|0;i=d+16|0;j=d;k=d+8|0;f[a+52>>2]=e;f[a+44>>2]=g;g=rr(e>>>0>1073741823?-1:e<<2)|0;l=a+48|0;m=f[l>>2]|0;f[l>>2]=g;if(m|0)sr(m);m=a+36|0;g=f[m>>2]|0;n=f[g+4>>2]|0;o=f[g>>2]|0;p=n-o|0;if((p|0)<=0){u=d;return 1}q=p>>>2;p=a+8|0;r=i+4|0;s=j+4|0;t=h+4|0;v=q+-1|0;if(n-o>>2>>>0>v>>>0){w=q;x=v;y=o}else{z=g;Fq(z)}while(1){f[k>>2]=f[y+(x<<2)>>2];f[h>>2]=f[k>>2];Ac(a,h,b,x);g=X(x,e)|0;o=b+(g<<2)|0;v=f[l>>2]|0;q=c+(g<<2)|0;g=f[o+4>>2]|0;n=f[v>>2]|0;A=f[v+4>>2]|0;f[i>>2]=f[o>>2];f[r>>2]=g;f[j>>2]=n;f[s>>2]=A;Pd(h,p,i,j);f[q>>2]=f[h>>2];f[q+4>>2]=f[t>>2];if((w|0)<=1){B=5;break}q=f[m>>2]|0;y=f[q>>2]|0;A=x+-1|0;if((f[q+4>>2]|0)-y>>2>>>0<=A>>>0){z=q;B=6;break}else{q=x;x=A;w=q}}if((B|0)==5){u=d;return 1}else if((B|0)==6)Fq(z);return 0}function ef(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3916;ui(a+200|0);b=f[a+184>>2]|0;if(b|0){c=a+188|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}jj(a+172|0);b=f[a+152>>2]|0;if(b|0){d=a+156|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+140>>2]|0;if(b|0)ur(b);b=f[a+128>>2]|0;if(b|0){c=b;do{b=c;c=f[c>>2]|0;ur(b)}while((c|0)!=0)}c=a+120|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)ur(b);b=f[a+108>>2]|0;if(b|0){c=a+112|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);ur(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+84>>2]|0;if(b|0)ur(b);b=f[a+72>>2]|0;if(b|0){c=a+76|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+40>>2]|0;if(b|0){c=a+44|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+28>>2]|0;if(b|0)ur(b);b=f[a+16>>2]|0;if(b|0){d=a+20|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=a+12|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;Gi(a);ur(a);return}function ff(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a+140|0;c=f[b>>2]|0;if(c|0){d=a+144|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);ur(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}ur(g)}g=a+128|0;b=f[g>>2]|0;if(b|0){j=a+132|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);ur(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}ur(l)}l=f[a+116>>2]|0;if(l|0){g=a+120|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);ur(l)}l=f[a+104>>2]|0;if(l|0){m=a+108|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);ur(l)}l=f[a+92>>2]|0;if(!l){n=a+72|0;tl(n);o=a+52|0;tl(o);p=a+32|0;tl(p);q=a+12|0;tl(q);return}g=a+96|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);ur(l);n=a+72|0;tl(n);o=a+52|0;tl(o);p=a+32|0;tl(p);q=a+12|0;tl(q);return}function gf(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a+152|0;c=f[b>>2]|0;if(c|0){d=a+156|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);ur(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}ur(g)}g=a+140|0;b=f[g>>2]|0;if(b|0){j=a+144|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);ur(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}ur(l)}l=f[a+128>>2]|0;if(l|0){g=a+132|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);ur(l)}l=f[a+116>>2]|0;if(l|0){m=a+120|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);ur(l)}l=f[a+104>>2]|0;if(!l){n=a+84|0;tl(n);o=a+64|0;tl(o);p=a+44|0;tl(p);q=a+12|0;Ej(q);return}g=a+108|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);ur(l);n=a+84|0;tl(n);o=a+64|0;tl(o);p=a+44|0;tl(p);q=a+12|0;Ej(q);return}function hf(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3656;uj(a+200|0);b=f[a+184>>2]|0;if(b|0){c=a+188|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}jj(a+172|0);b=f[a+152>>2]|0;if(b|0){d=a+156|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+140>>2]|0;if(b|0)ur(b);b=f[a+128>>2]|0;if(b|0){c=b;do{b=c;c=f[c>>2]|0;ur(b)}while((c|0)!=0)}c=a+120|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)ur(b);b=f[a+108>>2]|0;if(b|0){c=a+112|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);ur(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+84>>2]|0;if(b|0)ur(b);b=f[a+72>>2]|0;if(b|0){c=a+76|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+40>>2]|0;if(b|0){c=a+44|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+28>>2]|0;if(b|0)ur(b);b=f[a+16>>2]|0;if(b|0){d=a+20|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=a+12|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;Gi(a);ur(a);return}function jf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+48|0;d=c+44|0;e=c+40|0;g=c+36|0;h=c+32|0;i=c;f[h>>2]=f[a+60>>2];j=b+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)){f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,h,h+4|0)|0}Ln(i);yk(i);if((f[h>>2]|0)>0){k=a+56|0;l=1;m=0;do{n=l;l=(f[(f[k>>2]|0)+(m>>>5<<2)>>2]&1<<(m&31)|0)!=0;ej(i,n^l^1);m=m+1|0}while((m|0)<(f[h>>2]|0))}nd(i,b);f[g>>2]=f[a+12>>2];h=j;m=f[h>>2]|0;l=f[h+4>>2]|0;if((l|0)>0|(l|0)==0&m>>>0>0){o=l;p=m}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;m=j;o=f[m+4>>2]|0;p=f[m>>2]|0}f[g>>2]=f[a+20>>2];if((o|0)>0|(o|0)==0&p>>>0>0){Ej(i);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;Ej(i);u=c;return 1}function kf(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;g=u;u=u+16|0;h=g;if((f[c+56>>2]|0)==-1){i=-1;u=g;return i|0}j=yn(96)|0;Dl(j,c);f[h>>2]=j;j=ph(a,h)|0;c=f[h>>2]|0;f[h>>2]=0;if(c|0){h=c+88|0;k=f[h>>2]|0;f[h>>2]=0;if(k|0){h=f[k+8>>2]|0;if(h|0){l=k+12|0;if((f[l>>2]|0)!=(h|0))f[l>>2]=h;ur(h)}ur(k)}k=f[c+68>>2]|0;if(k|0){h=c+72|0;l=f[h>>2]|0;if((l|0)!=(k|0))f[h>>2]=l+(~((l+-4-k|0)>>>2)<<2);ur(k)}k=c+64|0;l=f[k>>2]|0;f[k>>2]=0;if(l|0){k=f[l>>2]|0;if(k|0){h=l+4|0;if((f[h>>2]|0)!=(k|0))f[h>>2]=k;ur(k)}ur(l)}ur(c)}c=a+8|0;l=(f[c>>2]|0)+(j<<2)|0;k=f[l>>2]|0;do if(!d){h=f[a+80>>2]|0;b[k+84>>0]=0;m=k+68|0;n=k+72|0;o=f[n>>2]|0;p=f[m>>2]|0;q=o-p>>2;r=o;if(h>>>0>q>>>0){zh(m,h-q|0,6484);break}if(h>>>0<q>>>0?(q=p+(h<<2)|0,(q|0)!=(r|0)):0)f[n>>2]=r+(~((r+-4-q|0)>>>2)<<2)}else{b[k+84>>0]=1;q=f[k+68>>2]|0;r=k+72|0;n=f[r>>2]|0;if((n|0)==(q|0))s=k;else{f[r>>2]=n+(~((n+-4-q|0)>>>2)<<2);s=f[l>>2]|0}f[s+80>>2]=f[a+80>>2]}while(0);if(!e){i=j;u=g;return i|0}Aj(f[(f[c>>2]|0)+(j<<2)>>2]|0,e)|0;i=j;u=g;return i|0}function lf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=f[c>>2]|0;c=f[d>>2]|0;e=f[a+4>>2]|0;g=f[d+4>>2]|0;h=e+-1|0;i=(h&e|0)==0;if(!i)if(g>>>0<e>>>0)j=g;else j=(g>>>0)%(e>>>0)|0;else j=h&g;g=(f[a>>2]|0)+(j<<2)|0;k=f[g>>2]|0;while(1){l=f[k>>2]|0;if((l|0)==(d|0))break;else k=l}if((k|0)!=(a+8|0)){l=f[k+4>>2]|0;if(!i)if(l>>>0<e>>>0)m=l;else m=(l>>>0)%(e>>>0)|0;else m=l&h;if((m|0)==(j|0)){n=c;o=21}else o=13}else o=13;do if((o|0)==13){if(c|0){m=f[c+4>>2]|0;if(!i)if(m>>>0<e>>>0)p=m;else p=(m>>>0)%(e>>>0)|0;else p=m&h;if((p|0)==(j|0)){q=c;r=c;o=22;break}}f[g>>2]=0;n=f[d>>2]|0;o=21}while(0);if((o|0)==21){g=n;if(!n)s=g;else{q=n;r=g;o=22}}if((o|0)==22){o=f[q+4>>2]|0;if(!i)if(o>>>0<e>>>0)t=o;else t=(o>>>0)%(e>>>0)|0;else t=o&h;if((t|0)==(j|0))s=r;else{f[(f[a>>2]|0)+(t<<2)>>2]=k;s=f[d>>2]|0}}f[k>>2]=s;f[d>>2]=0;s=a+12|0;f[s>>2]=(f[s>>2]|0)+-1;if(!d)return c|0;s=d+8|0;a=f[d+20>>2]|0;if(a|0){k=d+24|0;if((f[k>>2]|0)!=(a|0))f[k>>2]=a;ur(a)}if((b[s+11>>0]|0)<0)ur(f[s>>2]|0);ur(d);return c|0}function mf(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;b=u;u=u+16|0;c=b+4|0;d=b;f[c>>2]=0;e=c+4|0;f[e>>2]=0;f[c+8>>2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+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{zh(i,h-m|0,3796);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+112|0;a=c+68|0;c=f[o+96>>2]|0;o=0;while(1){h=o*3|0;if((h|0)==-1){q=0;r=12;break}i=f[d>>2]|0;g=f[i+(h<<2)>>2]|0;if((g|0)==-1){q=0;r=12;break}k=f[(f[m>>2]|0)+12>>2]|0;l=f[k+(g<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}g=f[a>>2]|0;f[g+(f[c+(o*12|0)>>2]<<2)>>2]=l;l=h+1|0;if((l|0)==-1){q=0;r=12;break}j=f[i+(l<<2)>>2]|0;if((j|0)==-1){q=0;r=12;break}l=f[k+(j<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+4>>2]<<2)>>2]=l;l=h+2|0;if((l|0)==-1){q=0;r=12;break}h=f[i+(l<<2)>>2]|0;if((h|0)==-1){q=0;r=12;break}l=f[k+(h<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+8>>2]<<2)>>2]=l;o=o+1|0;if(o>>>0>=e>>>0){q=1;r=12;break}}if((r|0)==12)return q|0;return 0}function of(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+48|0;d=c+44|0;e=c+40|0;g=c+36|0;h=c+32|0;i=c;f[h>>2]=f[a+80>>2];j=b+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)){f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,h,h+4|0)|0}Ln(i);yk(i);if((f[h>>2]|0)>0){k=a+76|0;l=1;m=0;do{n=l;l=(f[(f[k>>2]|0)+(m>>>5<<2)>>2]&1<<(m&31)|0)!=0;ej(i,n^l^1);m=m+1|0}while((m|0)<(f[h>>2]|0))}nd(i,b);f[g>>2]=f[a+12>>2];h=j;m=f[h>>2]|0;l=f[h+4>>2]|0;if((l|0)>0|(l|0)==0&m>>>0>0){o=l;p=m}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;m=j;o=f[m+4>>2]|0;p=f[m>>2]|0}f[g>>2]=f[a+16>>2];if((o|0)>0|(o|0)==0&p>>>0>0){Ej(i);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;Ej(i);u=c;return 1}function pf(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;lk(f[a+4>>2]|0,(f[h+28>>2]|0)-(f[h+24>>2]|0)>>2);h=a+96|0;i=f[g>>2]|0;j=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;f[c>>2]=0;i=a+100|0;k=f[i>>2]|0;l=f[h>>2]|0;m=k-l>>2;n=l;l=k;if(j>>>0<=m>>>0){if(j>>>0<m>>>0?(k=n+(j<<2)|0,(k|0)!=(l|0)):0)f[i>>2]=l+(~((l+-4-k|0)>>>2)<<2)}else zh(h,j-m|0,c);m=a+116|0;a=f[m>>2]|0;if(!a){j=f[g>>2]|0;g=(f[j+4>>2]|0)-(f[j>>2]|0)>>2;j=(g>>>0)/3|0;if(g>>>0<=2){o=1;u=b;return o|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(wb(e,c)|0)){o=0;p=15;break}if((g|0)>=(j|0)){o=1;p=15;break}}if((p|0)==15){u=b;return o|0}}else{j=f[a>>2]|0;if((f[a+4>>2]|0)==(j|0)){o=1;u=b;return o|0}a=0;g=j;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(wb(e,c)|0)){o=0;p=15;break}j=f[m>>2]|0;g=f[j>>2]|0;if(a>>>0>=(f[j+4>>2]|0)-g>>2>>>0){o=1;p=15;break}}if((p|0)==15){u=b;return o|0}}return 0}function qf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=f[a+12>>2]|0;e=a+68|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0<m>>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{zh(i,h-m|0,3796);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+72|0;a=c+68|0;c=f[o+96>>2]|0;o=0;while(1){h=o*3|0;if((h|0)==-1){q=0;r=12;break}i=f[d>>2]|0;g=f[i+(h<<2)>>2]|0;if((g|0)==-1){q=0;r=12;break}k=f[(f[m>>2]|0)+12>>2]|0;l=f[k+(g<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}g=f[a>>2]|0;f[g+(f[c+(o*12|0)>>2]<<2)>>2]=l;l=h+1|0;if((l|0)==-1){q=0;r=12;break}j=f[i+(l<<2)>>2]|0;if((j|0)==-1){q=0;r=12;break}l=f[k+(j<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+4>>2]<<2)>>2]=l;l=h+2|0;if((l|0)==-1){q=0;r=12;break}h=f[i+(l<<2)>>2]|0;if((h|0)==-1){q=0;r=12;break}l=f[k+(h<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+8>>2]<<2)>>2]=l;o=o+1|0;if(o>>>0>=e>>>0){q=1;r=12;break}}if((r|0)==12)return q|0;return 0}function rf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=u;u=u+16|0;d=c+12|0;e=c+8|0;g=c+4|0;h=c;if(!b){i=yn(76)|0;j=yn(12)|0;k=f[(f[a+4>>2]|0)+80>>2]|0;f[j+4>>2]=0;f[j>>2]=4160;f[j+8>>2]=k;f[h>>2]=j;Bl(i,h,0);j=i;f[g>>2]=j;i=a+12|0;k=f[i>>2]|0;if(k>>>0<(f[a+16>>2]|0)>>>0){f[g>>2]=0;f[k>>2]=j;f[i>>2]=k+4;l=g}else{Ng(a+8|0,g);l=g}g=f[l>>2]|0;f[l>>2]=0;if(g|0)Va[f[(f[g>>2]|0)+4>>2]&255](g);g=f[h>>2]|0;f[h>>2]=0;if(!g){u=c;return 1}Va[f[(f[g>>2]|0)+4>>2]&255](g);u=c;return 1}g=f[f[a+8>>2]>>2]|0;f[d>>2]=b;a=g+4|0;h=g+8|0;l=f[h>>2]|0;if((l|0)==(f[g+12>>2]|0))Oi(a,d);else{f[l>>2]=b;f[h>>2]=l+4}l=f[d>>2]|0;b=g+16|0;k=g+20|0;g=f[k>>2]|0;i=f[b>>2]|0;j=g-i>>2;m=i;if((l|0)<(j|0)){n=m;o=l}else{i=l+1|0;f[e>>2]=-1;p=g;if(i>>>0<=j>>>0)if(i>>>0<j>>>0?(g=m+(i<<2)|0,(g|0)!=(p|0)):0){f[k>>2]=p+(~((p+-4-g|0)>>>2)<<2);q=l;r=m}else{q=l;r=m}else{zh(b,i-j|0,e);q=f[d>>2]|0;r=f[b>>2]|0}n=r;o=q}f[n+(o<<2)>>2]=((f[h>>2]|0)-(f[a>>2]|0)>>2)+-1;u=c;return 1}function sf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=a+8|0;e=f[d>>2]|0;g=f[a>>2]|0;h=g;do if(e-g>>3>>>0>=b>>>0){i=a+4|0;j=f[i>>2]|0;k=j-g>>3;l=k>>>0<b>>>0;m=l?k:b;n=j;if(m|0){j=m;m=h;while(1){o=c;p=f[o+4>>2]|0;q=m;f[q>>2]=f[o>>2];f[q+4>>2]=p;j=j+-1|0;if(!j)break;else m=m+8|0}}if(!l){m=h+(b<<3)|0;if((m|0)==(n|0))return;else{r=i;s=n+(~((n+-8-m|0)>>>3)<<3)|0;break}}else{m=b-k|0;j=m;p=n;while(1){q=c;o=f[q+4>>2]|0;t=p;f[t>>2]=f[q>>2];f[t+4>>2]=o;j=j+-1|0;if(!j)break;else p=p+8|0}r=i;s=n+(m<<3)|0;break}}else{p=g;if(!g)u=e;else{j=a+4|0;k=f[j>>2]|0;if((k|0)!=(h|0))f[j>>2]=k+(~((k+-8-g|0)>>>3)<<3);ur(p);f[d>>2]=0;f[j>>2]=0;f[a>>2]=0;u=0}if(b>>>0>536870911)Fq(a);j=u>>2;p=u>>3>>>0<268435455?(j>>>0<b>>>0?b:j):536870911;if(p>>>0>536870911)Fq(a);j=yn(p<<3)|0;k=a+4|0;f[k>>2]=j;f[a>>2]=j;f[d>>2]=j+(p<<3);p=b;l=j;while(1){o=c;t=f[o+4>>2]|0;q=l;f[q>>2]=f[o>>2];f[q+4>>2]=t;p=p+-1|0;if(!p)break;else l=l+8|0}r=k;s=j+(b<<3)|0}while(0);f[r>>2]=s;return}function tf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;e=+$(n[b>>2]);g=+K(+e);h=+$(n[b+4>>2]);i=g+ +K(+h);g=+$(n[b+8>>2]);j=i+ +K(+g);b=j>1.0e-06;i=1.0/j;k=f[a+12>>2]|0;j=+(k|0);l=~~+J(+((b?i*e:1.0)*j+.5));m=~~+J(+((b?i*h:0.0)*j+.5));o=(l|0)>-1;p=k-(o?l:0-l|0)-((m|0)>-1?m:0-m|0)|0;l=(p|0)<0;q=(l?((m|0)>0?p:0-p|0):0)+m|0;m=l?0:p;p=(b?i*g:0.0)<0.0?0-m|0:m;do if(!o){if((q|0)<0)r=(p|0)>-1?p:0-p|0;else r=(f[a+8>>2]|0)-((p|0)>-1?p:0-p|0)|0;if((p|0)<0){s=(q|0)>-1?q:0-q|0;t=r;break}else{s=(f[a+8>>2]|0)-((q|0)>-1?q:0-q|0)|0;t=r;break}}else{s=k+p|0;t=k+q|0}while(0);q=(t|0)==0;p=(s|0)==0;r=f[a+8>>2]|0;if(!(s|t)){u=r;v=r;f[c>>2]=u;f[d>>2]=v;return}a=(r|0)==(s|0);if(q&a){u=s;v=s;f[c>>2]=u;f[d>>2]=v;return}o=(r|0)==(t|0);if(p&o){u=t;v=t;f[c>>2]=u;f[d>>2]=v;return}if(q&(k|0)<(s|0)){u=0;v=(k<<1)-s|0;f[c>>2]=u;f[d>>2]=v;return}if(o&(k|0)>(s|0)){u=t;v=(k<<1)-s|0;f[c>>2]=u;f[d>>2]=v;return}if(a&(k|0)>(t|0)){u=(k<<1)-t|0;v=s;f[c>>2]=u;f[d>>2]=v;return}if(!p){u=t;v=s;f[c>>2]=u;f[d>>2]=v;return}u=(k|0)<(t|0)?(k<<1)-t|0:t;v=0;f[c>>2]=u;f[d>>2]=v;return}function uf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=a+4|0;d=b+4|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];f[c+16>>2]=f[d+16>>2];d=a+24|0;c=b+24|0;if((a|0)==(b|0))return a|0;e=b+28|0;g=f[e>>2]|0;if(!g)h=0;else{i=a+32|0;do if(g>>>0>f[i>>2]<<5>>>0){j=f[d>>2]|0;if(!j)k=g;else{ur(j);f[d>>2]=0;f[i>>2]=0;f[a+28>>2]=0;k=f[e>>2]|0}if((k|0)<0)Fq(d);else{j=((k+-1|0)>>>5)+1|0;l=yn(j<<2)|0;f[d>>2]=l;f[a+28>>2]=0;f[i>>2]=j;m=f[e>>2]|0;n=l;break}}else{m=g;n=f[d>>2]|0}while(0);pm(n|0,f[c>>2]|0,((m+-1|0)>>>5<<2)+4|0)|0;h=f[e>>2]|0}f[a+28>>2]=h;h=a+36|0;e=b+36|0;m=b+40|0;b=f[m>>2]|0;if(!b)o=0;else{c=a+44|0;do if(b>>>0>f[c>>2]<<5>>>0){n=f[h>>2]|0;if(!n)p=b;else{ur(n);f[h>>2]=0;f[c>>2]=0;f[a+40>>2]=0;p=f[m>>2]|0}if((p|0)<0)Fq(h);else{n=((p+-1|0)>>>5)+1|0;d=yn(n<<2)|0;f[h>>2]=d;f[a+40>>2]=0;f[c>>2]=n;q=f[m>>2]|0;r=d;break}}else{q=b;r=f[h>>2]|0}while(0);pm(r|0,f[e>>2]|0,((q+-1|0)>>>5<<2)+4|0)|0;o=f[m>>2]|0}f[a+40>>2]=o;return a|0}function vf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],Ke(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];Ke(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;Dg(d);m=a+1068|0;Wm(m);k=a+1088|0;Wm(k);l=a+1108|0;Wm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];ib(a,i,h);We(d,e);Bg(m,e);Bg(k,e);Bg(l,e);u=g;return 1}function wf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],Ke(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];Ke(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;Dg(d);m=a+1068|0;Wm(m);k=a+1088|0;Wm(k);l=a+1108|0;Wm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];kb(a,i,h);We(d,e);Bg(m,e);Bg(k,e);Bg(l,e);u=g;return 1}function xf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;c=u;u=u+32|0;d=c;e=a+8|0;g=f[e>>2]|0;h=a+4|0;i=f[h>>2]|0;j=i;if(g-i>>2>>>0>=b>>>0){rj(i|0,0,b<<2|0)|0;f[h>>2]=i+(b<<2);u=c;return}k=f[a>>2]|0;l=i-k>>2;m=l+b|0;n=k;if(m>>>0>1073741823)Fq(a);o=g-k|0;p=o>>1;q=o>>2>>>0<536870911?(p>>>0<m>>>0?m:p):1073741823;f[d+12>>2]=0;f[d+16>>2]=a+8;do if(q)if(q>>>0>1073741823){p=ra(8)|0;op(p,16742);f[p>>2]=7520;va(p|0,1208,126)}else{r=yn(q<<2)|0;break}else r=0;while(0);f[d>>2]=r;p=r+(l<<2)|0;l=d+8|0;m=d+4|0;f[m>>2]=p;o=r+(q<<2)|0;q=d+12|0;f[q>>2]=o;r=p+(b<<2)|0;rj(p|0,0,b<<2|0)|0;f[l>>2]=r;if((j|0)==(n|0)){s=p;t=q;v=l;w=k;x=r;y=i;z=o;A=g}else{g=j;j=p;do{g=g+-4|0;p=f[g>>2]|0;f[g>>2]=0;f[j+-4>>2]=p;j=(f[m>>2]|0)+-4|0;f[m>>2]=j}while((g|0)!=(n|0));s=j;t=q;v=l;w=f[a>>2]|0;x=f[l>>2]|0;y=f[h>>2]|0;z=f[q>>2]|0;A=f[e>>2]|0}f[a>>2]=s;f[m>>2]=w;f[h>>2]=x;f[v>>2]=y;f[e>>2]=z;f[t>>2]=A;f[d>>2]=w;ii(d);u=c;return}function yf(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=u;u=u+16|0;h=d;i=f[a+124>>2]|0;if(!i){u=d;return}j=i+-1|0;k=(j&i|0)==0;if(!k)if(i>>>0>g>>>0)l=g;else l=(g>>>0)%(i>>>0)|0;else l=j&g;m=f[(f[a+120>>2]|0)+(l<<2)>>2]|0;if(!m){u=d;return}n=f[m>>2]|0;if(!n){u=d;return}a:do if(k){m=n;while(1){o=f[m+4>>2]|0;p=(o|0)==(g|0);if(!(p|(o&j|0)==(l|0))){q=24;break}if(p?(f[m+8>>2]|0)==(g|0):0){r=m;break a}m=f[m>>2]|0;if(!m){q=24;break}}if((q|0)==24){u=d;return}}else{m=n;while(1){p=f[m+4>>2]|0;if((p|0)==(g|0)){if((f[m+8>>2]|0)==(g|0)){r=m;break a}}else{if(p>>>0<i>>>0)s=p;else s=(p>>>0)%(i>>>0)|0;if((s|0)!=(l|0)){q=24;break}}m=f[m>>2]|0;if(!m){q=24;break}}if((q|0)==24){u=d;return}}while(0);q=f[r+12>>2]|0;if((q|0)==-1){u=d;return}f[h>>2]=q;f[h+4>>2]=c;b[h+8>>0]=e&1;e=a+112|0;c=f[e>>2]|0;if((c|0)==(f[a+116>>2]|0))wi(a+108|0,h);else{f[c>>2]=f[h>>2];f[c+4>>2]=f[h+4>>2];f[c+8>>2]=f[h+8>>2];f[e>>2]=(f[e>>2]|0)+12}u=d;return}function zf(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=d[b>>1]|0;e=d[b+2>>1]|0;g=d[b+4>>1]|0;h=d[b+6>>1]|0;b=((((c^318)&65535)+239^e&65535)+239^g&65535)+239^h&65535;i=f[a+4>>2]|0;if(!i){j=0;return j|0}k=i+-1|0;l=(k&i|0)==0;if(!l)if(b>>>0<i>>>0)m=b;else m=(b>>>0)%(i>>>0)|0;else m=b&k;n=f[(f[a>>2]|0)+(m<<2)>>2]|0;if(!n){j=0;return j|0}a=f[n>>2]|0;if(!a){j=0;return j|0}if(l){l=a;while(1){n=f[l+4>>2]|0;o=(n|0)==(b|0);if(!(o|(n&k|0)==(m|0))){j=0;p=25;break}if((((o?(o=l+8|0,(d[o>>1]|0)==c<<16>>16):0)?(d[o+2>>1]|0)==e<<16>>16:0)?(d[l+12>>1]|0)==g<<16>>16:0)?(d[o+6>>1]|0)==h<<16>>16:0){j=l;p=25;break}l=f[l>>2]|0;if(!l){j=0;p=25;break}}if((p|0)==25)return j|0}else q=a;while(1){a=f[q+4>>2]|0;if((a|0)==(b|0)){l=q+8|0;if((((d[l>>1]|0)==c<<16>>16?(d[l+2>>1]|0)==e<<16>>16:0)?(d[q+12>>1]|0)==g<<16>>16:0)?(d[l+6>>1]|0)==h<<16>>16:0){j=q;p=25;break}}else{if(a>>>0<i>>>0)r=a;else r=(a>>>0)%(i>>>0)|0;if((r|0)!=(m|0)){j=0;p=25;break}}q=f[q>>2]|0;if(!q){j=0;p=25;break}}if((p|0)==25)return j|0;return 0}function Af(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],Ke(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];Ke(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;Wm(d);m=a+32|0;Wm(m);k=a+52|0;Wm(k);l=a+72|0;Wm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];hb(a,i,h);Bg(d,e);Bg(m,e);Bg(k,e);Bg(l,e);u=g;return 1}function Bf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],Ke(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];Ke(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;yk(d);m=a+44|0;Wm(m);k=a+64|0;Wm(k);l=a+84|0;Wm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];lb(a,i,h);nd(d,e);Bg(m,e);Bg(k,e);Bg(l,e);u=g;return 1}function Cf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;a=u;u=u+16|0;e=a+4|0;g=a;h=a+8|0;i=d+11|0;j=b[i>>0]|0;k=j<<24>>24<0;if(k){l=f[d+4>>2]|0;if(l>>>0>255){m=0;u=a;return m|0}else n=l}else n=j&255;if(!n){b[h>>0]=0;n=c+16|0;l=f[n+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[n>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Ke(c,e,h,h+1|0)|0}m=1;u=a;return m|0}n=d+4|0;l=f[n>>2]|0;b[h>>0]=k?l:j&255;k=c+16|0;o=k;p=f[o>>2]|0;q=f[o+4>>2]|0;if((q|0)>0|(q|0)==0&p>>>0>0){r=j;s=q;t=p;v=l}else{f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Ke(c,e,h,h+1|0)|0;h=k;r=b[i>>0]|0;s=f[h+4>>2]|0;t=f[h>>2]|0;v=f[n>>2]|0}n=r<<24>>24<0;h=n?f[d>>2]|0:d;if(!((s|0)>0|(s|0)==0&t>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Ke(c,e,h,h+(n?v:r&255)|0)|0}m=1;u=a;return m|0}function Df(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=a+4|0;d=f[a>>2]|0;e=((f[c>>2]|0)-d|0)/24|0;g=e+1|0;if(g>>>0>178956970)Fq(a);h=a+8|0;i=((f[h>>2]|0)-d|0)/24|0;d=i<<1;j=i>>>0<89478485?(d>>>0<g>>>0?g:d):178956970;do if(j)if(j>>>0>178956970){d=ra(8)|0;op(d,16742);f[d>>2]=7520;va(d|0,1208,126)}else{k=yn(j*24|0)|0;break}else k=0;while(0);d=k+(e*24|0)|0;g=d;i=k+(j*24|0)|0;f[d>>2]=1308;f[k+(e*24|0)+4>>2]=f[b+4>>2];kk(k+(e*24|0)+8|0,b+8|0);f[k+(e*24|0)+20>>2]=f[b+20>>2];b=d+24|0;e=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(e|0)){l=g;m=e;n=e}else{j=k;k=g;g=d;do{f[g+-24>>2]=1308;f[g+-20>>2]=f[j+-20>>2];d=g+-16|0;o=j+-16|0;f[d>>2]=0;p=g+-12|0;f[p>>2]=0;f[g+-8>>2]=0;f[d>>2]=f[o>>2];d=j+-12|0;f[p>>2]=f[d>>2];p=j+-8|0;f[g+-8>>2]=f[p>>2];f[p>>2]=0;f[d>>2]=0;f[o>>2]=0;f[g+-4>>2]=f[j+-4>>2];j=j+-24|0;g=k+-24|0;k=g}while((j|0)!=(e|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=b;f[h>>2]=i;i=m;if((n|0)!=(i|0)){h=n;do{h=h+-24|0;Va[f[f[h>>2]>>2]&255](h)}while((h|0)!=(i|0))}if(!m)return;ur(m);return}function Ef(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b[c>>0]|0;e=b[c+1>>0]|0;g=b[c+2>>0]|0;h=b[c+3>>0]|0;c=(((d&255^318)+239^e&255)+239^g&255)+239^h&255;i=f[a+4>>2]|0;if(!i){j=0;return j|0}k=i+-1|0;l=(k&i|0)==0;if(!l)if(c>>>0<i>>>0)m=c;else m=(c>>>0)%(i>>>0)|0;else m=c&k;n=f[(f[a>>2]|0)+(m<<2)>>2]|0;if(!n){j=0;return j|0}a=f[n>>2]|0;if(!a){j=0;return j|0}if(l){l=a;while(1){n=f[l+4>>2]|0;o=(n|0)==(c|0);if(!(o|(n&k|0)==(m|0))){j=0;p=25;break}if((((o?(o=l+8|0,(b[o>>0]|0)==d<<24>>24):0)?(b[o+1>>0]|0)==e<<24>>24:0)?(b[o+2>>0]|0)==g<<24>>24:0)?(b[o+3>>0]|0)==h<<24>>24:0){j=l;p=25;break}l=f[l>>2]|0;if(!l){j=0;p=25;break}}if((p|0)==25)return j|0}else q=a;while(1){a=f[q+4>>2]|0;if((a|0)==(c|0)){l=q+8|0;if((((b[l>>0]|0)==d<<24>>24?(b[l+1>>0]|0)==e<<24>>24:0)?(b[l+2>>0]|0)==g<<24>>24:0)?(b[l+3>>0]|0)==h<<24>>24:0){j=q;p=25;break}}else{if(a>>>0<i>>>0)r=a;else r=(a>>>0)%(i>>>0)|0;if((r|0)!=(m|0)){j=0;p=25;break}}q=f[q>>2]|0;if(!q){j=0;p=25;break}}if((p|0)==25)return j|0;return 0}function Ff(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;d=u;u=u+32|0;h=d+24|0;i=d+16|0;j=d;k=d+8|0;l=a+40|0;f[a+44>>2]=g;g=a+36|0;m=f[g>>2]|0;n=f[m+4>>2]|0;o=f[m>>2]|0;p=n-o|0;if((p|0)<=0){u=d;return 1}q=(p>>>2)+-1|0;p=a+8|0;r=a+48|0;s=a+52|0;a=i+4|0;t=j+4|0;v=h+4|0;if(n-o>>2>>>0>q>>>0){w=q;x=o}else{y=m;Fq(y)}while(1){f[k>>2]=f[x+(w<<2)>>2];f[h>>2]=f[k>>2];ub(l,h,b,w)|0;m=X(w,e)|0;o=b+(m<<2)|0;q=c+(m<<2)|0;m=f[o+4>>2]|0;n=f[r>>2]|0;z=f[s>>2]|0;f[i>>2]=f[o>>2];f[a>>2]=m;f[j>>2]=n;f[t>>2]=z;Pd(h,p,i,j);f[q>>2]=f[h>>2];f[q+4>>2]=f[v>>2];w=w+-1|0;if((w|0)<=-1){A=3;break}q=f[g>>2]|0;x=f[q>>2]|0;if((f[q+4>>2]|0)-x>>2>>>0<=w>>>0){y=q;A=4;break}}if((A|0)==3){u=d;return 1}else if((A|0)==4)Fq(y);return 0}function Gf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=u;u=u+32|0;i=h;j=h+16|0;k=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;do if((c+-1|0)>>>0<6&(Qa[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1){l=Qa[f[(f[b>>2]|0)+52>>2]&127](b)|0;m=Ra[f[(f[b>>2]|0)+60>>2]&127](b,d)|0;if((l|0)==0|(m|0)==0){f[a>>2]=0;u=h;return}n=Ra[f[(f[b>>2]|0)+56>>2]&127](b,d)|0;if(!n){f[i>>2]=f[b+56>>2];f[i+4>>2]=l;f[i+12>>2]=m;f[i+8>>2]=m+12;Ed(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}else{f[i>>2]=f[b+56>>2];f[i+4>>2]=n;f[i+12>>2]=m;f[i+8>>2]=m+12;Cd(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}}while(0);f[a>>2]=0;u=h;return}function Hf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;d=u;u=u+32|0;h=d+24|0;i=d+16|0;j=d;k=d+8|0;l=a+40|0;f[a+44>>2]=g;g=a+36|0;m=f[g>>2]|0;n=f[m+4>>2]|0;o=f[m>>2]|0;p=n-o|0;if((p|0)<=0){u=d;return 1}q=(p>>>2)+-1|0;p=a+8|0;r=a+48|0;s=a+52|0;a=i+4|0;t=j+4|0;v=h+4|0;if(n-o>>2>>>0>q>>>0){w=q;x=o}else{y=m;Fq(y)}while(1){f[k>>2]=f[x+(w<<2)>>2];f[h>>2]=f[k>>2];tb(l,h,b,w)|0;m=X(w,e)|0;o=b+(m<<2)|0;q=c+(m<<2)|0;m=f[o+4>>2]|0;n=f[r>>2]|0;z=f[s>>2]|0;f[i>>2]=f[o>>2];f[a>>2]=m;f[j>>2]=n;f[t>>2]=z;Pd(h,p,i,j);f[q>>2]=f[h>>2];f[q+4>>2]=f[v>>2];w=w+-1|0;if((w|0)<=-1){A=3;break}q=f[g>>2]|0;x=f[q>>2]|0;if((f[q+4>>2]|0)-x>>2>>>0<=w>>>0){y=q;A=4;break}}if((A|0)==3){u=d;return 1}else if((A|0)==4)Fq(y);return 0}function If(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=f[b>>2]|0;b=f[c>>2]|0;e=b-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;k=b;if(e>>>0<=h-i>>2>>>0){l=a+4|0;m=(f[l>>2]|0)-i>>2;n=e>>>0>m>>>0;o=n?d+(m<<2)|0:b;b=o-d|0;m=b>>2;if(m|0)pm(i|0,d|0,b|0)|0;b=j+(m<<2)|0;if(!n){n=f[l>>2]|0;if((n|0)==(b|0))return;f[l>>2]=n+(~((n+-4-b|0)>>>2)<<2);return}b=f[c>>2]|0;c=o;if((b|0)==(c|0))return;n=f[l>>2]|0;m=b+-4-o|0;o=c;c=n;while(1){f[c>>2]=f[o>>2];o=o+4|0;if((o|0)==(b|0))break;else c=c+4|0}f[l>>2]=n+((m>>>2)+1<<2);return}m=i;if(!i)p=h;else{h=a+4|0;n=f[h>>2]|0;if((n|0)!=(j|0))f[h>>2]=n+(~((n+-4-i|0)>>>2)<<2);ur(m);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;p=0}if(e>>>0>1073741823)Fq(a);h=p>>1;m=p>>2>>>0<536870911?(h>>>0<e>>>0?e:h):1073741823;if(m>>>0>1073741823)Fq(a);h=yn(m<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(m<<2);m=d;if((k|0)==(m|0))return;g=k+-4-d|0;d=m;m=h;while(1){f[m>>2]=f[d>>2];d=d+4|0;if((d|0)==(k|0))break;else m=m+4|0}f[e>>2]=h+((g>>>2)+1<<2);return}function Jf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=u;u=u+112|0;g=e+100|0;h=e;i=yn(120)|0;j=f[c+8>>2]|0;f[i+4>>2]=0;f[i>>2]=3872;k=i+8|0;l=i+12|0;m=l+44|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[k>>2]=3896;l=i+56|0;m=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[i+96>>2]=0;f[i+100>>2]=0;f[i+104>>2]=0;f[i+108>>2]=j;f[i+112>>2]=d;k=i+116|0;f[k>>2]=0;n=i;o=f[c+12>>2]|0;p=h+4|0;l=p+4|0;m=l+40|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[h>>2]=3896;l=h+48|0;m=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[h+88>>2]=0;f[h+92>>2]=0;f[h+96>>2]=0;l=o;f[p>>2]=l;m=((f[l+4>>2]|0)-(f[o>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;kh(h+24|0,m,g);m=f[p>>2]|0;p=(f[m+28>>2]|0)-(f[m+24>>2]|0)>>2;b[g>>0]=0;kh(h+36|0,p,g);f[h+8>>2]=o;f[h+12>>2]=d;f[h+16>>2]=j;f[h+20>>2]=i;f[k>>2]=c+72;uh(i,h);f[a>>2]=n;Si(h);u=e;return}function Kf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(((d-g|0)/12|0)>>>0>=b>>>0){rj(g|0,0,b*12|0)|0;f[e>>2]=h+(b*12|0);return}i=f[a>>2]|0;j=(g-i|0)/12|0;g=j+b|0;k=i;if(g>>>0>357913941)Fq(a);l=(d-i|0)/12|0;d=l<<1;m=l>>>0<178956970?(d>>>0<g>>>0?g:d):357913941;do if(m)if(m>>>0>357913941){d=ra(8)|0;op(d,16742);f[d>>2]=7520;va(d|0,1208,126)}else{n=yn(m*12|0)|0;break}else n=0;while(0);d=n+(j*12|0)|0;j=d;g=n+(m*12|0)|0;rj(d|0,0,b*12|0)|0;m=d+(b*12|0)|0;if((h|0)==(k|0)){o=j;p=i;q=h}else{i=h;h=j;j=d;do{d=j+-12|0;b=i;i=i+-12|0;f[d>>2]=0;n=j+-8|0;f[n>>2]=0;f[j+-4>>2]=0;f[d>>2]=f[i>>2];d=b+-8|0;f[n>>2]=f[d>>2];n=b+-4|0;f[j+-4>>2]=f[n>>2];f[n>>2]=0;f[d>>2]=0;f[i>>2]=0;j=h+-12|0;h=j}while((i|0)!=(k|0));o=h;p=f[a>>2]|0;q=f[e>>2]|0}f[a>>2]=o;f[e>>2]=m;f[c>>2]=g;g=p;if((q|0)!=(g|0)){c=q;do{q=c;c=c+-12|0;m=f[c>>2]|0;if(m|0){e=q+-8|0;q=f[e>>2]|0;if((q|0)!=(m|0))f[e>>2]=q+(~((q+-4-m|0)>>>2)<<2);ur(m)}}while((c|0)!=(g|0))}if(!p)return;ur(p);return}function Lf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=f[a+12>>2]|0;e=a+68|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0<m>>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{zh(i,h-m|0,3796);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+72|0;a=c+68|0;c=f[o+96>>2]|0;o=f[d+28>>2]|0;d=0;while(1){h=d*3|0;i=f[o+(h<<2)>>2]|0;if((i|0)==-1){q=0;r=11;break}g=f[(f[m>>2]|0)+12>>2]|0;k=f[g+(i<<2)>>2]|0;if(k>>>0>=p>>>0){q=0;r=11;break}i=f[a>>2]|0;f[i+(f[c+(d*12|0)>>2]<<2)>>2]=k;k=f[o+(h+1<<2)>>2]|0;if((k|0)==-1){q=0;r=11;break}l=f[g+(k<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=11;break}f[i+(f[c+(d*12|0)+4>>2]<<2)>>2]=l;l=f[o+(h+2<<2)>>2]|0;if((l|0)==-1){q=0;r=11;break}h=f[g+(l<<2)>>2]|0;if(h>>>0>=p>>>0){q=0;r=11;break}f[i+(f[c+(d*12|0)+8>>2]<<2)>>2]=h;d=d+1|0;if(d>>>0>=e>>>0){q=1;r=11;break}}if((r|0)==11)return q|0;return 0}function Mf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-4194304|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-4177920|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+4194304|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1077936128|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Wn(e);th(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;pm(h+a|0,h|0,o|0)|0;eh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=lo(a|0,0,o|0,k|0)|0;k=lo(h|0,I|0,g|0,j|0)|0;Ml(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)ur(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;ur(c);u=d;return}function Nf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-2097152|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-2080768|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+6291456|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1075838976|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Wn(e);th(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;pm(h+a|0,h|0,o|0)|0;eh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=lo(a|0,0,o|0,k|0)|0;k=lo(h|0,I|0,g|0,j|0)|0;Ml(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)ur(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;ur(c);u=d;return}function Of(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-1048576|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1032192|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+7340032|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1074790400|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Wn(e);th(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;pm(h+a|0,h|0,o|0)|0;eh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=lo(a|0,0,o|0,k|0)|0;k=lo(h|0,I|0,g|0,j|0)|0;Ml(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)ur(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;ur(c);u=d;return}function Pf(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;a=u;u=u+96|0;j=a;if(!c){k=-1;u=a;return k|0}dn(j);Jj(j,d,0,g&255,i,0,g<<1,0,0,0);i=kf(c,j,1,e)|0;d=f[(f[c+8>>2]|0)+(i<<2)>>2]|0;if(e|0){l=d+84|0;m=d+68|0;n=d+40|0;o=d+64|0;d=0;do{if(!(b[l>>0]|0))p=f[(f[m>>2]|0)+(d<<2)>>2]|0;else p=d;q=h+((X(d,g)|0)<<1)|0;r=n;s=f[r>>2]|0;t=In(s|0,f[r+4>>2]|0,p|0,0)|0;eh((f[f[o>>2]>>2]|0)+t|0,q|0,s|0)|0;d=d+1|0}while((d|0)!=(e|0))}d=c+80|0;c=f[d>>2]|0;if(c)if((c|0)==(e|0))v=10;else w=-1;else{f[d>>2]=e;v=10}if((v|0)==10)w=i;i=j+88|0;v=f[i>>2]|0;f[i>>2]=0;if(v|0){i=f[v+8>>2]|0;if(i|0){e=v+12|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;ur(i)}ur(v)}v=f[j+68>>2]|0;if(v|0){i=j+72|0;e=f[i>>2]|0;if((e|0)!=(v|0))f[i>>2]=e+(~((e+-4-v|0)>>>2)<<2);ur(v)}v=j+64|0;j=f[v>>2]|0;f[v>>2]=0;if(j|0){v=f[j>>2]|0;if(v|0){e=j+4|0;if((f[e>>2]|0)!=(v|0))f[e>>2]=v;ur(v)}ur(j)}k=w;u=a;return k|0}function Qf(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;a=u;u=u+96|0;j=a;if(!c){k=-1;u=a;return k|0}dn(j);Jj(j,d,0,g&255,i,0,g<<2,0,0,0);i=kf(c,j,1,e)|0;d=f[(f[c+8>>2]|0)+(i<<2)>>2]|0;if(e|0){l=d+84|0;m=d+68|0;n=d+40|0;o=d+64|0;d=0;do{if(!(b[l>>0]|0))p=f[(f[m>>2]|0)+(d<<2)>>2]|0;else p=d;q=h+((X(d,g)|0)<<2)|0;r=n;s=f[r>>2]|0;t=In(s|0,f[r+4>>2]|0,p|0,0)|0;eh((f[f[o>>2]>>2]|0)+t|0,q|0,s|0)|0;d=d+1|0}while((d|0)!=(e|0))}d=c+80|0;c=f[d>>2]|0;if(c)if((c|0)==(e|0))v=10;else w=-1;else{f[d>>2]=e;v=10}if((v|0)==10)w=i;i=j+88|0;v=f[i>>2]|0;f[i>>2]=0;if(v|0){i=f[v+8>>2]|0;if(i|0){e=v+12|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;ur(i)}ur(v)}v=f[j+68>>2]|0;if(v|0){i=j+72|0;e=f[i>>2]|0;if((e|0)!=(v|0))f[i>>2]=e+(~((e+-4-v|0)>>>2)<<2);ur(v)}v=j+64|0;j=f[v>>2]|0;f[v>>2]=0;if(j|0){v=f[j>>2]|0;if(v|0){e=j+4|0;if((f[e>>2]|0)!=(v|0))f[e>>2]=v;ur(v)}ur(j)}k=w;u=a;return k|0}function Rf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-262144|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-245760|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+8126464|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1074003968|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Wn(e);th(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;pm(h+a|0,h|0,o|0)|0;eh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=lo(a|0,0,o|0,k|0)|0;k=lo(h|0,I|0,g|0,j|0)|0;Ml(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)ur(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;ur(c);u=d;return}function Sf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-131072|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-114688|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+8257536|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1073872896|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Wn(e);th(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;pm(h+a|0,h|0,o|0)|0;eh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=lo(a|0,0,o|0,k|0)|0;k=lo(h|0,I|0,g|0,j|0)|0;Ml(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)ur(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;ur(c);u=d;return}function Tf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-32768|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-16384|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+8355840|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1073774592|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Wn(e);th(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;pm(h+a|0,h|0,o|0)|0;eh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=lo(a|0,0,o|0,k|0)|0;k=lo(h|0,I|0,g|0,j|0)|0;Ml(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)ur(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;ur(c);u=d;return}function Uf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=f[b>>2]|0;d=f[b+4>>2]|0;e=f[b+8>>2]|0;g=f[b+12>>2]|0;b=(((c^318)+239^d)+239^e)+239^g;h=f[a+4>>2]|0;if(!h){i=0;return i|0}j=h+-1|0;k=(j&h|0)==0;if(!k)if(b>>>0<h>>>0)l=b;else l=(b>>>0)%(h>>>0)|0;else l=b&j;m=f[(f[a>>2]|0)+(l<<2)>>2]|0;if(!m){i=0;return i|0}a=f[m>>2]|0;if(!a){i=0;return i|0}if(k){k=a;while(1){m=f[k+4>>2]|0;n=(m|0)==(b|0);if(!(n|(m&j|0)==(l|0))){i=0;o=25;break}if((((n?(f[k+8>>2]|0)==(c|0):0)?(f[k+12>>2]|0)==(d|0):0)?(f[k+16>>2]|0)==(e|0):0)?(f[k+20>>2]|0)==(g|0):0){i=k;o=25;break}k=f[k>>2]|0;if(!k){i=0;o=25;break}}if((o|0)==25)return i|0}else p=a;while(1){a=f[p+4>>2]|0;if((a|0)==(b|0)){if((((f[p+8>>2]|0)==(c|0)?(f[p+12>>2]|0)==(d|0):0)?(f[p+16>>2]|0)==(e|0):0)?(f[p+20>>2]|0)==(g|0):0){i=p;o=25;break}}else{if(a>>>0<h>>>0)q=a;else q=(a>>>0)%(h>>>0)|0;if((q|0)!=(l|0)){i=0;o=25;break}}p=f[p>>2]|0;if(!p){i=0;o=25;break}}if((o|0)==25)return i|0;return 0}function Vf(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;a=u;u=u+96|0;j=a;if(!c){k=-1;u=a;return k|0}dn(j);Jj(j,d,0,g&255,i,0,g,0,0,0);i=kf(c,j,1,e)|0;d=f[(f[c+8>>2]|0)+(i<<2)>>2]|0;if(e|0){l=d+84|0;m=d+68|0;n=d+40|0;o=d+64|0;d=0;do{if(!(b[l>>0]|0))p=f[(f[m>>2]|0)+(d<<2)>>2]|0;else p=d;q=h+(X(d,g)|0)|0;r=n;s=f[r>>2]|0;t=In(s|0,f[r+4>>2]|0,p|0,0)|0;eh((f[f[o>>2]>>2]|0)+t|0,q|0,s|0)|0;d=d+1|0}while((d|0)!=(e|0))}d=c+80|0;c=f[d>>2]|0;if(c)if((c|0)==(e|0))v=10;else w=-1;else{f[d>>2]=e;v=10}if((v|0)==10)w=i;i=j+88|0;v=f[i>>2]|0;f[i>>2]=0;if(v|0){i=f[v+8>>2]|0;if(i|0){e=v+12|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;ur(i)}ur(v)}v=f[j+68>>2]|0;if(v|0){i=j+72|0;e=f[i>>2]|0;if((e|0)!=(v|0))f[i>>2]=e+(~((e+-4-v|0)>>>2)<<2);ur(v)}v=j+64|0;j=f[v>>2]|0;f[v>>2]=0;if(j|0){v=f[j>>2]|0;if(v|0){e=j+4|0;if((f[e>>2]|0)!=(v|0))f[e>>2]=v;ur(v)}ur(j)}k=w;u=a;return k|0}function Wf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=u;u=u+32|0;i=h;j=h+16|0;k=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;do if((c+-1|0)>>>0<6&(Qa[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1){l=Qa[f[(f[b>>2]|0)+52>>2]&127](b)|0;m=Ra[f[(f[b>>2]|0)+60>>2]&127](b,d)|0;if((l|0)==0|(m|0)==0){f[a>>2]=0;u=h;return}n=Ra[f[(f[b>>2]|0)+56>>2]&127](b,d)|0;if(!n){f[i>>2]=f[b+56>>2];f[i+4>>2]=l;f[i+12>>2]=m;f[i+8>>2]=m+12;sd(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}else{f[i>>2]=f[b+56>>2];f[i+4>>2]=n;f[i+12>>2]=m;f[i+8>>2]=m+12;rd(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}}while(0);f[a>>2]=0;u=h;return}function Xf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=f[d>>2]|0;g=f[d+4>>2]|0;if((e|0)==(g|0)){h=0;i=a+12|0;j=a+8|0}else{d=f[c>>2]|0;c=a+8|0;k=a+12|0;a=0;l=e;while(1){e=f[l>>2]|0;m=f[d+(e<<2)>>2]|0;if(m>>>0<a>>>0)n=a;else{o=f[c>>2]|0;p=(f[k>>2]|0)-o|0;q=o;if((p|0)>0){o=p>>>2;p=0;do{r=f[q+(p<<2)>>2]|0;s=f[r+68>>2]|0;if(!(b[r+84>>0]|0))t=f[s+(e<<2)>>2]|0;else t=e;f[s+(m<<2)>>2]=t;p=p+1|0}while((p|0)<(o|0))}n=m+1|0}l=l+4|0;if((l|0)==(g|0)){h=n;i=k;j=c;break}else a=n}}n=f[i>>2]|0;a=f[j>>2]|0;if((n-a|0)>0){u=0;v=a;w=n}else return;while(1){n=f[v+(u<<2)>>2]|0;b[n+84>>0]=0;a=n+68|0;c=n+72|0;n=f[c>>2]|0;k=f[a>>2]|0;g=n-k>>2;l=k;k=n;if(h>>>0<=g>>>0)if(h>>>0<g>>>0?(n=l+(h<<2)|0,(n|0)!=(k|0)):0){f[c>>2]=k+(~((k+-4-n|0)>>>2)<<2);x=v;y=w}else{x=v;y=w}else{zh(a,h-g|0,6484);x=f[j>>2]|0;y=f[i>>2]|0}u=u+1|0;if((u|0)>=(y-x>>2|0))break;else{v=x;w=y}}return}function Yf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b;e=c-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;if(e>>>0<=h-i>>2>>>0){k=a+4|0;l=(f[k>>2]|0)-i>>2;m=e>>>0>l>>>0;n=b+(l<<2)|0;l=m?n:c;o=l;p=o-d|0;q=p>>2;if(q|0)pm(i|0,b|0,p|0)|0;p=j+(q<<2)|0;if(!m){m=f[k>>2]|0;if((m|0)==(p|0))return;f[k>>2]=m+(~((m+-4-p|0)>>>2)<<2);return}if((l|0)==(c|0))return;l=f[k>>2]|0;p=((c+-4-o|0)>>>2)+1|0;o=n;n=l;while(1){f[n>>2]=f[o>>2];o=o+4|0;if((o|0)==(c|0))break;else n=n+4|0}f[k>>2]=l+(p<<2);return}p=i;if(!i)r=h;else{h=a+4|0;l=f[h>>2]|0;if((l|0)!=(j|0))f[h>>2]=l+(~((l+-4-i|0)>>>2)<<2);ur(p);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;r=0}if(e>>>0>1073741823)Fq(a);h=r>>1;p=r>>2>>>0<536870911?(h>>>0<e>>>0?e:h):1073741823;if(p>>>0>1073741823)Fq(a);h=yn(p<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(p<<2);if((b|0)==(c|0))return;p=((c+-4-d|0)>>>2)+1|0;d=b;b=h;while(1){f[b>>2]=f[d>>2];d=d+4|0;if((d|0)==(c|0))break;else b=b+4|0}f[e>>2]=h+(p<<2);return}function Zf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-16384|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;b[m>>0]=j;b[m+1>>0]=j>>>8;n=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;o=j+8372224|0;b[m>>0]=o;b[m+1>>0]=o>>>8;b[m+2>>0]=o>>>16;n=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;o=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+-1073758208|0;b[o>>0]=m;b[o+1>>0]=m>>>8;b[o+2>>0]=m>>>16;b[o+3>>0]=m>>>24;n=(f[l>>2]|0)+4|0;break}else{n=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;n=(f[l>>2]|0)+1|0}while(0);k=((n|0)<0)<<31>>31;Wn(e);th(n,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;pm(h+a|0,h|0,n|0)|0;eh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=lo(a|0,0,n|0,k|0)|0;k=lo(h|0,I|0,g|0,j|0)|0;Ml(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)ur(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;ur(c);u=d;return}function _f(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b;e=c-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;if(e>>>0<=h-i>>2>>>0){k=a+4|0;l=(f[k>>2]|0)-i>>2;m=e>>>0>l>>>0;n=b+(l<<2)|0;l=m?n:c;o=l;p=o-d|0;q=p>>2;if(q|0)pm(i|0,b|0,p|0)|0;p=j+(q<<2)|0;if(!m){m=f[k>>2]|0;if((m|0)==(p|0))return;f[k>>2]=m+(~((m+-4-p|0)>>>2)<<2);return}if((l|0)==(c|0))return;l=f[k>>2]|0;p=c+-4-o|0;o=n;n=l;while(1){f[n>>2]=f[o>>2];o=o+4|0;if((o|0)==(c|0))break;else n=n+4|0}f[k>>2]=l+((p>>>2)+1<<2);return}p=i;if(!i)r=h;else{h=a+4|0;l=f[h>>2]|0;if((l|0)!=(j|0))f[h>>2]=l+(~((l+-4-i|0)>>>2)<<2);ur(p);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;r=0}if(e>>>0>1073741823)Fq(a);h=r>>1;p=r>>2>>>0<536870911?(h>>>0<e>>>0?e:h):1073741823;if(p>>>0>1073741823)Fq(a);h=yn(p<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(p<<2);if((b|0)==(c|0))return;p=c+-4-d|0;d=b;b=h;while(1){f[b>>2]=f[d>>2];d=d+4|0;if((d|0)==(c|0))break;else b=b+4|0}f[e>>2]=h+((p>>>2)+1<<2);return}function $f(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0;g=u;u=u+80|0;h=g;i=g+64|0;Sl(h);j=f[(f[a+8>>2]|0)+56>>2]|0;k=X(dm(5)|0,d)|0;Jj(h,j,0,d&255,5,0,k,((k|0)<0)<<31>>31,0,0);k=yn(96)|0;Dl(k,h);Aj(k,c)|0;f[i>>2]=k;fj(a,i);k=f[i>>2]|0;f[i>>2]=0;if(k|0){i=k+88|0;c=f[i>>2]|0;f[i>>2]=0;if(c|0){i=f[c+8>>2]|0;if(i|0){h=c+12|0;if((f[h>>2]|0)!=(i|0))f[h>>2]=i;ur(i)}ur(c)}c=f[k+68>>2]|0;if(c|0){i=k+72|0;h=f[i>>2]|0;if((h|0)!=(c|0))f[i>>2]=h+(~((h+-4-c|0)>>>2)<<2);ur(c)}c=k+64|0;h=f[c>>2]|0;f[c>>2]=0;if(h|0){c=f[h>>2]|0;if(c|0){i=h+4|0;if((f[i>>2]|0)!=(c|0))f[i>>2]=c;ur(c)}ur(h)}ur(k)}if(!e){u=g;return}k=f[a+32>>2]|0;b[k+84>>0]=0;a=k+68|0;h=k+72|0;k=f[h>>2]|0;c=f[a>>2]|0;i=k-c>>2;d=k;if(i>>>0<e>>>0){zh(a,e-i|0,1644);u=g;return}if(i>>>0<=e>>>0){u=g;return}i=c+(e<<2)|0;if((i|0)==(d|0)){u=g;return}f[h>>2]=d+(~((d+-4-i|0)>>>2)<<2);u=g;return}function ag(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;c=u;u=u+16|0;d=c+4|0;e=c;g=a+4|0;h=f[g>>2]|0;i=a+8|0;j=f[i>>2]|0;if((j|0)==(h|0))k=h;else{l=j+(~((j+-4-h|0)>>>2)<<2)|0;f[i>>2]=l;k=l}l=a+16|0;h=f[l>>2]|0;j=a+20|0;m=f[j>>2]|0;n=h;if((m|0)!=(h|0))f[j>>2]=m+(~((m+-4-n|0)>>>2)<<2);m=f[b>>2]|0;h=f[b+4>>2]|0;if((m|0)==(h|0)){u=c;return}b=a+12|0;a=m;m=k;k=n;while(1){n=f[a>>2]|0;f[d>>2]=n;if((m|0)==(f[b>>2]|0)){Oi(g,d);o=f[l>>2]|0}else{f[m>>2]=n;f[i>>2]=m+4;o=k}n=f[d>>2]|0;p=f[j>>2]|0;q=p-o>>2;r=o;if((n|0)<(q|0)){s=r;t=n;v=o}else{w=n+1|0;f[e>>2]=-1;x=p;if(w>>>0<=q>>>0)if(w>>>0<q>>>0?(p=r+(w<<2)|0,(p|0)!=(x|0)):0){f[j>>2]=x+(~((x+-4-p|0)>>>2)<<2);y=n;z=r;A=o}else{y=n;z=r;A=o}else{zh(l,w-q|0,e);q=f[l>>2]|0;y=f[d>>2]|0;z=q;A=q}s=z;t=y;v=A}m=f[i>>2]|0;f[s+(t<<2)>>2]=(m-(f[g>>2]|0)>>2)+-1;a=a+4|0;if((a|0)==(h|0))break;else k=v}u=c;return}function bg(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=d[b>>1]|0;e=d[b+2>>1]|0;g=d[b+4>>1]|0;b=(((c^318)&65535)+239^e&65535)+239^g&65535;h=f[a+4>>2]|0;if(!h){i=0;return i|0}j=h+-1|0;k=(j&h|0)==0;if(!k)if(b>>>0<h>>>0)l=b;else l=(b>>>0)%(h>>>0)|0;else l=b&j;m=f[(f[a>>2]|0)+(l<<2)>>2]|0;if(!m){i=0;return i|0}a=f[m>>2]|0;if(!a){i=0;return i|0}if(k){k=a;while(1){m=f[k+4>>2]|0;n=(m|0)==(b|0);if(!(n|(m&j|0)==(l|0))){i=0;o=23;break}if(((n?(n=k+8|0,(d[n>>1]|0)==c<<16>>16):0)?(d[n+2>>1]|0)==e<<16>>16:0)?(d[k+12>>1]|0)==g<<16>>16:0){i=k;o=23;break}k=f[k>>2]|0;if(!k){i=0;o=23;break}}if((o|0)==23)return i|0}else p=a;while(1){a=f[p+4>>2]|0;if((a|0)==(b|0)){k=p+8|0;if(((d[k>>1]|0)==c<<16>>16?(d[k+2>>1]|0)==e<<16>>16:0)?(d[p+12>>1]|0)==g<<16>>16:0){i=p;o=23;break}}else{if(a>>>0<h>>>0)q=a;else q=(a>>>0)%(h>>>0)|0;if((q|0)!=(l|0)){i=0;o=23;break}}p=f[p>>2]|0;if(!p){i=0;o=23;break}}if((o|0)==23)return i|0;return 0}function cg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=u;u=u+32|0;d=c;e=a+16|0;g=e;h=f[g>>2]|0;i=f[g+4>>2]|0;if(!((i|0)>0|(i|0)==0&h>>>0>0)){u=c;return}g=lo(f[(f[a+12>>2]|0)+4>>2]|0,0,7,0)|0;j=oo(g|0,I|0,3)|0;g=I;if(!(b[a+24>>0]|0)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>24;j=j+1|0;k=f[i>>2]|0}while(j>>>0<(f[c>>2]|0)-k>>2>>>0)}k=a+20|0;a=f[e>>2]|0;c=(f[g>>2]|0)-a|0;if(c>>>0<4294967292){Rk(e,c+4|0,0);o=f[e>>2]|0;p=o+c|0;q=h[k>>0]|h[k+1>>0]<<8|h[k+2>>0]<<16|h[k+3>>0]<<24;b[p>>0]=q;b[p+1>>0]=q>>8;b[p+2>>0]=q>>16;b[p+3>>0]=q>>24;return}else{o=a;p=o+c|0;q=h[k>>0]|h[k+1>>0]<<8|h[k+2>>0]<<16|h[k+3>>0]<<24;b[p>>0]=q;b[p+1>>0]=q>>8;b[p+2>>0]=q>>16;b[p+3>>0]=q>>24;return}}function fg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+8|0;e=f[d>>2]|0;g=f[a>>2]|0;h=g;do if(e-g>>2>>>0>=b>>>0){i=a+4|0;j=f[i>>2]|0;k=j-g>>2;l=k>>>0<b>>>0;m=l?k:b;n=j;if(m|0){j=m;m=h;while(1){f[m>>2]=f[c>>2];j=j+-1|0;if(!j)break;else m=m+4|0}}if(!l){m=h+(b<<2)|0;if((m|0)==(n|0))return;else{o=i;p=n+(~((n+-4-m|0)>>>2)<<2)|0;break}}else{m=b-k|0;j=m;q=n;while(1){f[q>>2]=f[c>>2];j=j+-1|0;if(!j)break;else q=q+4|0}o=i;p=n+(m<<2)|0;break}}else{q=g;if(!g)r=e;else{j=a+4|0;k=f[j>>2]|0;if((k|0)!=(h|0))f[j>>2]=k+(~((k+-4-g|0)>>>2)<<2);ur(q);f[d>>2]=0;f[j>>2]=0;f[a>>2]=0;r=0}if(b>>>0>1073741823)Fq(a);j=r>>1;q=r>>2>>>0<536870911?(j>>>0<b>>>0?b:j):1073741823;if(q>>>0>1073741823)Fq(a);j=yn(q<<2)|0;k=a+4|0;f[k>>2]=j;f[a>>2]=j;f[d>>2]=j+(q<<2);q=b;l=j;while(1){f[l>>2]=f[c>>2];q=q+-1|0;if(!q)break;else l=l+4|0}o=k;p=j+(b<<2)|0}while(0);f[o>>2]=p;return}function gg(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=dh(a,b,c,d,g)|0;i=f[e>>2]|0;j=f[d>>2]|0;k=f[g>>2]|0;g=f[k>>2]|0;l=(f[k+4>>2]|0)-g>>3;if(l>>>0<=i>>>0)Fq(k);m=g;if(l>>>0<=j>>>0)Fq(k);if((f[m+(i<<3)>>2]|0)>>>0>=(f[m+(j<<3)>>2]|0)>>>0){n=h;return n|0}f[d>>2]=i;f[e>>2]=j;j=f[d>>2]|0;e=f[c>>2]|0;if(l>>>0<=j>>>0)Fq(k);if(l>>>0<=e>>>0)Fq(k);if((f[m+(j<<3)>>2]|0)>>>0>=(f[m+(e<<3)>>2]|0)>>>0){n=h+1|0;return n|0}f[c>>2]=j;f[d>>2]=e;e=f[c>>2]|0;d=f[b>>2]|0;if(l>>>0<=e>>>0)Fq(k);if(l>>>0<=d>>>0)Fq(k);if((f[m+(e<<3)>>2]|0)>>>0>=(f[m+(d<<3)>>2]|0)>>>0){n=h+2|0;return n|0}f[b>>2]=e;f[c>>2]=d;d=f[b>>2]|0;c=f[a>>2]|0;if(l>>>0<=d>>>0)Fq(k);if(l>>>0<=c>>>0)Fq(k);if((f[m+(d<<3)>>2]|0)>>>0>=(f[m+(c<<3)>>2]|0)>>>0){n=h+3|0;return n|0}f[a>>2]=d;f[b>>2]=c;n=h+4|0;return n|0}function hg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=b[c>>0]|0;e=b[c+1>>0]|0;g=b[c+2>>0]|0;c=((d&255^318)+239^e&255)+239^g&255;h=f[a+4>>2]|0;if(!h){i=0;return i|0}j=h+-1|0;k=(j&h|0)==0;if(!k)if(c>>>0<h>>>0)l=c;else l=(c>>>0)%(h>>>0)|0;else l=c&j;m=f[(f[a>>2]|0)+(l<<2)>>2]|0;if(!m){i=0;return i|0}a=f[m>>2]|0;if(!a){i=0;return i|0}if(k){k=a;while(1){m=f[k+4>>2]|0;n=(m|0)==(c|0);if(!(n|(m&j|0)==(l|0))){i=0;o=23;break}if(((n?(n=k+8|0,(b[n>>0]|0)==d<<24>>24):0)?(b[n+1>>0]|0)==e<<24>>24:0)?(b[n+2>>0]|0)==g<<24>>24:0){i=k;o=23;break}k=f[k>>2]|0;if(!k){i=0;o=23;break}}if((o|0)==23)return i|0}else p=a;while(1){a=f[p+4>>2]|0;if((a|0)==(c|0)){k=p+8|0;if(((b[k>>0]|0)==d<<24>>24?(b[k+1>>0]|0)==e<<24>>24:0)?(b[k+2>>0]|0)==g<<24>>24:0){i=p;o=23;break}}else{if(a>>>0<h>>>0)q=a;else q=(a>>>0)%(h>>>0)|0;if((q|0)!=(l|0)){i=0;o=23;break}}p=f[p>>2]|0;if(!p){i=0;o=23;break}}if((o|0)==23)return i|0;return 0}function ig(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=u;u=u+16|0;c=b;d=a+36|0;e=a+4|0;g=a+8|0;h=(f[g>>2]|0)-(f[e>>2]|0)>>2;i=a+40|0;j=f[i>>2]|0;k=f[d>>2]|0;l=j-k>>2;m=k;k=j;if(h>>>0<=l>>>0){if(h>>>0<l>>>0?(j=m+(h<<2)|0,(j|0)!=(k|0)):0){m=k;do{k=m+-4|0;f[i>>2]=k;n=f[k>>2]|0;f[k>>2]=0;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&255](n);m=f[i>>2]|0}while((m|0)!=(j|0))}}else Cg(d,h-l|0);if((f[g>>2]|0)==(f[e>>2]|0)){o=1;u=b;return o|0}l=a+52|0;h=a+48|0;j=0;while(1){Xa[f[(f[a>>2]|0)+56>>2]&15](c,a,j);m=(f[d>>2]|0)+(j<<2)|0;i=f[c>>2]|0;f[c>>2]=0;n=f[m>>2]|0;f[m>>2]=i;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&255](n);n=f[c>>2]|0;f[c>>2]=0;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&255](n);n=f[(f[d>>2]|0)+(j<<2)>>2]|0;if(!n){o=0;p=19;break}if(j>>>0<(f[l>>2]|0)>>>0?f[(f[h>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0:0)gq(n);j=j+1|0;if(j>>>0>=(f[g>>2]|0)-(f[e>>2]|0)>>2>>>0){o=1;p=19;break}}if((p|0)==19){u=b;return o|0}return 0}function jg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d+4|0;g=d;$h(f[c+12>>2]|0,b)|0;h=f[c+8>>2]|0;a:do if(h|0){i=b+16|0;j=b+4|0;k=h;while(1){l=k;if(!(Cf(0,b,l+8|0)|0)){m=0;break}n=l+20|0;o=(f[l+24>>2]|0)-(f[n>>2]|0)|0;$h(o,b)|0;l=f[n>>2]|0;n=i;p=f[n+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[n>>2]|0)>>>0>0)){f[g>>2]=f[j>>2];f[e>>2]=f[g>>2];Ke(b,e,l,l+o|0)|0}k=f[k>>2]|0;if(!k)break a}u=d;return m|0}while(0);$h(f[c+32>>2]|0,b)|0;e=f[c+28>>2]|0;if(!e){m=1;u=d;return m|0}else q=e;while(1){e=q;if(!(Cf(0,b,e+8|0)|0)){m=0;r=10;break}jg(a,b,f[e+20>>2]|0)|0;q=f[q>>2]|0;if(!q){m=1;r=10;break}}if((r|0)==10){u=d;return m|0}return 0}function kg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;h=a+8|0;i=a+12|0;j=f[h>>2]|0;if((f[i>>2]|0)==(j|0)){k=yn(76)|0;Jn(k,b);l=k;f[g>>2]=l;k=f[i>>2]|0;if(k>>>0<(f[a+16>>2]|0)>>>0){f[g>>2]=0;f[k>>2]=l;f[i>>2]=k+4;m=g}else{Ng(h,g);m=g}g=f[m>>2]|0;f[m>>2]=0;if(!g){u=c;return 1}Va[f[(f[g>>2]|0)+4>>2]&255](g);u=c;return 1}g=f[j>>2]|0;f[d>>2]=b;j=g+4|0;m=g+8|0;h=f[m>>2]|0;if((h|0)==(f[g+12>>2]|0))Oi(j,d);else{f[h>>2]=b;f[m>>2]=h+4}h=f[d>>2]|0;b=g+16|0;k=g+20|0;g=f[k>>2]|0;i=f[b>>2]|0;l=g-i>>2;a=i;if((h|0)<(l|0)){n=a;o=h}else{i=h+1|0;f[e>>2]=-1;p=g;if(i>>>0<=l>>>0)if(i>>>0<l>>>0?(g=a+(i<<2)|0,(g|0)!=(p|0)):0){f[k>>2]=p+(~((p+-4-g|0)>>>2)<<2);q=h;r=a}else{q=h;r=a}else{zh(b,i-l|0,e);q=f[d>>2]|0;r=f[b>>2]|0}n=r;o=q}f[n+(o<<2)>>2]=((f[m>>2]|0)-(f[j>>2]|0)>>2)+-1;u=c;return 1}function lg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=c;e=b;g=d-e|0;h=g>>2;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0>j-k>>2>>>0){m=k;if(!k)n=j;else{j=a+4|0;o=f[j>>2]|0;if((o|0)!=(l|0))f[j>>2]=o+(~((o+-4-k|0)>>>2)<<2);ur(m);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;n=0}if(h>>>0>1073741823)Fq(a);j=n>>1;m=n>>2>>>0<536870911?(j>>>0<h>>>0?h:j):1073741823;if(m>>>0>1073741823)Fq(a);j=yn(m<<2)|0;n=a+4|0;f[n>>2]=j;f[a>>2]=j;f[i>>2]=j+(m<<2);if((g|0)<=0)return;eh(j|0,b|0,g|0)|0;f[n>>2]=j+(g>>>2<<2);return}g=a+4|0;a=f[g>>2]|0;j=a-k>>2;k=h>>>0>j>>>0;h=k?b+(j<<2)|0:c;c=a;j=a;if((h|0)==(b|0))p=l;else{a=h+-4-e|0;e=b;b=l;while(1){f[b>>2]=f[e>>2];e=e+4|0;if((e|0)==(h|0))break;else b=b+4|0}p=l+((a>>>2)+1<<2)|0}if(k){k=d-h|0;if((k|0)<=0)return;eh(j|0,h|0,k|0)|0;f[g>>2]=(f[g>>2]|0)+(k>>>2<<2);return}else{if((p|0)==(c|0))return;f[g>>2]=c+(~((c+-4-p|0)>>>2)<<2);return}}function mg(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0;g=u;u=u+96|0;h=g+40|0;i=g;_m(h,d);Ie(i,c,d);Ih(h,i);Dj(i+24|0,f[i+28>>2]|0);Oj(i+12|0,f[i+16>>2]|0);Dj(i,f[i+4>>2]|0);bj(a,h,e);if(!(f[a>>2]|0)){e=a+4|0;if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);f[c+40>>2]=f[h+40>>2];f[c+44>>2]=f[h+44>>2];f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}f[h>>2]=3544;Dj(h+28|0,f[h+32>>2]|0);Oj(h+16|0,f[h+20>>2]|0);Dj(h+4|0,f[h+8>>2]|0);u=g;return}function ng(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=f[b>>2]|0;d=f[b+4>>2]|0;e=f[b+8>>2]|0;b=((c^318)+239^d)+239^e;g=f[a+4>>2]|0;if(!g){h=0;return h|0}i=g+-1|0;j=(i&g|0)==0;if(!j)if(b>>>0<g>>>0)k=b;else k=(b>>>0)%(g>>>0)|0;else k=b&i;l=f[(f[a>>2]|0)+(k<<2)>>2]|0;if(!l){h=0;return h|0}a=f[l>>2]|0;if(!a){h=0;return h|0}if(j){j=a;while(1){l=f[j+4>>2]|0;m=(l|0)==(b|0);if(!(m|(l&i|0)==(k|0))){h=0;n=23;break}if(((m?(f[j+8>>2]|0)==(c|0):0)?(f[j+12>>2]|0)==(d|0):0)?(f[j+16>>2]|0)==(e|0):0){h=j;n=23;break}j=f[j>>2]|0;if(!j){h=0;n=23;break}}if((n|0)==23)return h|0}else o=a;while(1){a=f[o+4>>2]|0;if((a|0)==(b|0)){if(((f[o+8>>2]|0)==(c|0)?(f[o+12>>2]|0)==(d|0):0)?(f[o+16>>2]|0)==(e|0):0){h=o;n=23;break}}else{if(a>>>0<g>>>0)p=a;else p=(a>>>0)%(g>>>0)|0;if((p|0)!=(k|0)){h=0;n=23;break}}o=f[o>>2]|0;if(!o){h=0;n=23;break}}if((n|0)==23)return h|0;return 0}function og(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=u;u=u+16|0;g=e;if(!(xh(a,c,d)|0)){h=0;u=e;return h|0}if((b[(f[a+8>>2]|0)+24>>0]|0)!=3){h=0;u=e;return h|0}i=f[c+48>>2]|0;c=yn(32)|0;f[g>>2]=c;f[g+8>>2]=-2147483616;f[g+4>>2]=17;j=c;k=14860;l=j+17|0;do{b[j>>0]=b[k>>0]|0;j=j+1|0;k=k+1|0}while((j|0)<(l|0));b[c+17>>0]=0;c=i+16|0;k=f[c>>2]|0;if(k){j=c;l=k;a:while(1){k=l;while(1){if((f[k+16>>2]|0)>=(d|0))break;m=f[k+4>>2]|0;if(!m){n=j;break a}else k=m}l=f[k>>2]|0;if(!l){n=k;break}else j=k}if(((n|0)!=(c|0)?(f[n+16>>2]|0)<=(d|0):0)?(d=n+20|0,(Hh(d,g)|0)!=0):0)o=Nk(d,g,-1)|0;else p=12}else p=12;if((p|0)==12)o=Nk(i,g,-1)|0;if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);if((o|0)<1){h=0;u=e;return h|0}Mp(a+40|0,o);h=1;u=e;return h|0}function pg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=c;g=d-e|0;h=a+8|0;i=f[h>>2]|0;j=f[a>>2]|0;k=j;if(g>>>0>(i-j|0)>>>0){if(!j)l=i;else{i=a+4|0;if((f[i>>2]|0)!=(k|0))f[i>>2]=k;ur(k);f[h>>2]=0;f[i>>2]=0;f[a>>2]=0;l=0}if((g|0)<0)Fq(a);i=l<<1;m=l>>>0<1073741823?(i>>>0<g>>>0?g:i):2147483647;if((m|0)<0)Fq(a);i=yn(m)|0;l=a+4|0;f[l>>2]=i;f[a>>2]=i;f[h>>2]=i+m;if((c|0)==(d|0))return;else{n=c;o=i}do{b[o>>0]=b[n>>0]|0;n=n+1|0;o=(f[l>>2]|0)+1|0;f[l>>2]=o}while((n|0)!=(d|0));return}n=a+4|0;a=(f[n>>2]|0)-j|0;j=g>>>0>a>>>0;g=c+a|0;a=j?g:d;if((a|0)==(c|0))p=k;else{o=c;c=k;while(1){b[c>>0]=b[o>>0]|0;o=o+1|0;if((o|0)==(a|0))break;else c=c+1|0}p=k+(a-e)|0}if(!j){if((f[n>>2]|0)==(p|0))return;f[n>>2]=p;return}if((a|0)==(d|0))return;a=g;g=f[n>>2]|0;do{b[g>>0]=b[a>>0]|0;a=a+1|0;g=(f[n>>2]|0)+1|0;f[n>>2]=g}while((a|0)!=(d|0));return}function qg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=c>>>1&1431655765|c<<1&-1431655766;c=d>>>2&858993459|d<<2&-858993460;d=c>>>4&252645135|c<<4&-252645136;c=d>>>8&16711935|d<<8&-16711936;d=32-b|0;e=(c>>>16|c<<16)>>>d;c=e-(e>>>1&1431655765)|0;g=(c>>>2&858993459)+(c&858993459)|0;c=(X((g>>>4)+g&252645135,16843009)|0)>>>24;g=b-c|0;h=f[a>>2]|0;i=h;j=lo(f[i>>2]|0,f[i+4>>2]|0,g|0,((g|0)<0)<<31>>31|0)|0;g=h;f[g>>2]=j;f[g+4>>2]=I;g=h+8|0;h=g;j=lo(f[h>>2]|0,f[h+4>>2]|0,c|0,0)|0;c=g;f[c>>2]=j;f[c+4>>2]=I;c=a+28|0;j=f[c>>2]|0;g=32-j|0;h=a+24|0;do if((g|0)>=(b|0)){i=-1>>>d<<j;k=f[h>>2]&~i|i&e<<j;f[h>>2]=k;i=j+b|0;f[c>>2]=i;if((i|0)!=32)return;i=a+16|0;l=f[i>>2]|0;if((l|0)==(f[a+20>>2]|0)){Oi(a+12|0,h);m=0;n=0;break}else{f[l>>2]=k;f[i>>2]=l+4;m=0;n=0;break}}else{l=-1>>>j<<j;i=f[h>>2]&~l|l&e<<j;f[h>>2]=i;l=a+16|0;k=f[l>>2]|0;if((k|0)==(f[a+20>>2]|0))Oi(a+12|0,h);else{f[k>>2]=i;f[l>>2]=k+4}k=b-g|0;m=k;n=-1>>>(32-k|0)&e>>>g}while(0);f[h>>2]=n;f[c>>2]=m;return}function rg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=c&255;g=(d|0)!=0;a:do if(g&(a&3|0)!=0){h=c&255;i=a;j=d;while(1){if((b[i>>0]|0)==h<<24>>24){k=i;l=j;m=6;break a}n=i+1|0;o=j+-1|0;p=(o|0)!=0;if(p&(n&3|0)!=0){i=n;j=o}else{q=n;r=o;s=p;m=5;break}}}else{q=a;r=d;s=g;m=5}while(0);if((m|0)==5)if(s){k=q;l=r;m=6}else{t=q;u=0}b:do if((m|0)==6){q=c&255;if((b[k>>0]|0)==q<<24>>24){t=k;u=l}else{r=X(e,16843009)|0;c:do if(l>>>0>3){s=k;g=l;while(1){d=f[s>>2]^r;if((d&-2139062144^-2139062144)&d+-16843009|0)break;d=s+4|0;a=g+-4|0;if(a>>>0>3){s=d;g=a}else{v=d;w=a;m=11;break c}}x=s;y=g}else{v=k;w=l;m=11}while(0);if((m|0)==11)if(!w){t=v;u=0;break}else{x=v;y=w}while(1){if((b[x>>0]|0)==q<<24>>24){t=x;u=y;break b}r=x+1|0;y=y+-1|0;if(!y){t=r;u=0;break}else x=r}}}while(0);return (u|0?t:0)|0}function sg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=e;do if((d|0)==(e|0)){h=a+8|0;i=f[h>>2]|0;j=a+12|0;k=f[j>>2]|0;l=k;if(i>>>0<k>>>0){k=i;m=((l-k>>2)+1|0)/2|0;n=i+(m<<2)|0;o=k-d|0;k=o>>2;p=n+(0-k<<2)|0;if(!k){q=n;r=i}else{pm(p|0,d|0,o|0)|0;q=p;r=f[h>>2]|0}f[c>>2]=q;f[h>>2]=r+(m<<2);s=q;break}m=l-g>>1;l=(m|0)==0?1:m;if(l>>>0>1073741823){m=ra(8)|0;op(m,16742);f[m>>2]=7520;va(m|0,1208,126)}m=yn(l<<2)|0;p=m;o=m+((l+3|0)>>>2<<2)|0;n=o;k=m+(l<<2)|0;if((d|0)==(i|0)){t=n;u=d}else{l=o;m=n;v=d;do{f[l>>2]=f[v>>2];l=m+4|0;m=l;v=v+4|0}while((v|0)!=(i|0));t=m;u=f[a>>2]|0}f[a>>2]=p;f[c>>2]=n;f[h>>2]=t;f[j>>2]=k;if(!u)s=o;else{ur(u);s=f[c>>2]|0}}else s=d;while(0);f[s+-4>>2]=f[b>>2];f[c>>2]=(f[c>>2]|0)+-4;return}function tg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=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f[s>>2]>>2]|0)+m|0,x|0)|0;x=o;m=f[x+4>>2]|0;if((m|0)>0|(m|0)==0&(f[x>>2]|0)>>>0>0){z=r;A=a}else{f[h>>2]=f[p>>2];f[g>>2]=f[h>>2];Ke(d,g,k,q)|0;z=f[c>>2]|0;A=f[l>>2]|0}x=j+1|0;if(x>>>0>=A-z>>2>>>0)break;m=f[i>>2]|0;j=x;r=z;n=m;s=m;a=A}sr(k);u=e;return 1}function vg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=(f[b>>2]|0)*3|0;if((d|0)==-1){e=0;g=-1;f[c>>2]=g;return e|0}b=f[a+12>>2]|0;h=f[b+12>>2]|0;if((f[h+(d<<2)>>2]|0)==-1){e=0;g=d;f[c>>2]=g;return e|0}i=f[b>>2]|0;b=f[a+152>>2]|0;if((f[b+(f[i+(d<<2)>>2]<<2)>>2]|0)==-1){a=d+1|0;j=((a>>>0)%3|0|0)==0?d+-2|0:a;if((j|0)==-1){e=0;g=-1;f[c>>2]=g;return e|0}if((f[h+(j<<2)>>2]|0)==-1){e=0;g=j;f[c>>2]=g;return e|0}if((f[b+(f[i+(j<<2)>>2]<<2)>>2]|0)==-1){a=j+1|0;k=((a>>>0)%3|0|0)==0?j+-2|0:a;if((k|0)==-1){e=0;g=-1;f[c>>2]=g;return e|0}if((f[h+(k<<2)>>2]|0)==-1){e=0;g=k;f[c>>2]=g;return e|0}if((f[b+(f[i+(k<<2)>>2]<<2)>>2]|0)==-1){i=k+1|0;e=1;g=((i>>>0)%3|0|0)==0?k+-2|0:i;f[c>>2]=g;return e|0}else l=k}else l=j}else l=d;while(1){d=(((l>>>0)%3|0|0)==0?2:-1)+l|0;if((d|0)==-1)break;j=f[h+(d<<2)>>2]|0;if((j|0)==-1)break;d=j+(((j>>>0)%3|0|0)==0?2:-1)|0;if((d|0)==-1)break;else l=d}e=0;g=(((l>>>0)%3|0|0)==0?2:-1)+l|0;f[c>>2]=g;return e|0}function wg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=a+4|0;g=f[e>>2]|0;if(!g){f[c>>2]=e;h=e;return h|0}e=b[d+11>>0]|0;i=e<<24>>24<0;j=i?f[d+4>>2]|0:e&255;e=i?f[d>>2]|0:d;d=a+4|0;a=g;while(1){g=a+16|0;i=b[g+11>>0]|0;k=i<<24>>24<0;l=k?f[a+20>>2]|0:i&255;i=l>>>0<j>>>0;m=i?l:j;if((m|0)!=0?(n=dl(e,k?f[g>>2]|0:g,m)|0,(n|0)!=0):0)if((n|0)<0)o=8;else o=10;else if(j>>>0<l>>>0)o=8;else o=10;if((o|0)==8){o=0;n=f[a>>2]|0;if(!n){o=9;break}else{p=a;q=n}}else if((o|0)==10){o=0;n=j>>>0<l>>>0?j:l;if((n|0)!=0?(l=dl(k?f[g>>2]|0:g,e,n)|0,(l|0)!=0):0){if((l|0)>=0){o=16;break}}else o=12;if((o|0)==12?(o=0,!i):0){o=16;break}r=a+4|0;i=f[r>>2]|0;if(!i){o=15;break}else{p=r;q=i}}d=p;a=q}if((o|0)==9){f[c>>2]=a;h=a;return h|0}else if((o|0)==15){f[c>>2]=a;h=r;return h|0}else if((o|0)==16){f[c>>2]=a;h=d;return h|0}return 0}function xg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;d=u;u=u+32|0;e=d+24|0;g=d+16|0;h=d+8|0;i=d;j=a+4|0;k=f[j>>2]|0;l=f[b>>2]|0;m=f[b+4>>2]|0;b=f[c>>2]|0;n=f[c+4>>2]|0;c=b-l<<3;f[j>>2]=k-m+n+c;j=(f[a>>2]|0)+(k>>>5<<2)|0;a=k&31;k=j;if((m|0)!=(a|0)){f[e>>2]=l;f[e+4>>2]=m;f[g>>2]=b;f[g+4>>2]=n;f[h>>2]=k;f[h+4>>2]=a;we(i,e,g,h);u=d;return}h=n-m+c|0;c=l;if((h|0)>0){if(!m){o=h;p=j;q=0;r=l;s=c}else{l=32-m|0;n=(h|0)<(l|0)?h:l;g=-1>>>(l-n|0)&-1<<m;f[j>>2]=f[j>>2]&~g|f[c>>2]&g;g=n+m|0;l=c+4|0;o=h-n|0;p=j+(g>>>5<<2)|0;q=g&31;r=l;s=l}l=(o|0)/32|0;pm(p|0,r|0,l<<2|0)|0;r=o-(l<<5)|0;o=p+(l<<2)|0;p=o;if((r|0)>0){g=-1>>>(32-r|0);f[o>>2]=f[o>>2]&~g|f[s+(l<<2)>>2]&g;t=r;v=p}else{t=q;v=p}}else{t=m;v=k}f[i>>2]=v;f[i+4>>2]=t;u=d;return}function yg(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=u;u=u+16|0;h=g;i=c+4|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;j=yn(16)|0;f[h>>2]=j;f[h+8>>2]=-2147483632;f[h+4>>2]=15;k=j;l=14844;m=k+15|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[j+15>>0]=0;j=Nk(i,h,-1)|0;if((b[h+11>>0]|0)<0)ur(f[h>>2]|0);switch(j|0){case -1:{if((ki(i)|0)==10)n=6;else n=5;break}case 1:{n=5;break}default:n=6}if((n|0)==5){j=yn(68)|0;lp(j);o=j}else if((n|0)==6){n=yn(64)|0;Zp(n);o=n}Oo(o,d);Ad(a,o,i,e);if(f[a>>2]|0){p=f[o>>2]|0;q=p+4|0;r=f[q>>2]|0;Va[r&255](o);u=g;return}e=a+4|0;if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);f[c+40>>2]=f[o+52>>2];f[c+44>>2]=f[o+60>>2];f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;p=f[o>>2]|0;q=p+4|0;r=f[q>>2]|0;Va[r&255](o);u=g;return}function zg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;c=a+8|0;d=f[c>>2]|0;e=a+12|0;g=f[e>>2]|0;h=g;do if((d|0)==(g|0)){i=a+4|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(j>>>0>k>>>0){m=j;n=((m-l>>2)+1|0)/-2|0;o=j+(n<<2)|0;p=d-m|0;m=p>>2;if(!m)q=j;else{pm(o|0,j|0,p|0)|0;q=f[i>>2]|0}p=o+(m<<2)|0;f[c>>2]=p;f[i>>2]=q+(n<<2);r=p;break}p=h-l>>1;l=(p|0)==0?1:p;if(l>>>0>1073741823){p=ra(8)|0;op(p,16742);f[p>>2]=7520;va(p|0,1208,126)}p=yn(l<<2)|0;n=p;m=p+(l>>>2<<2)|0;o=m;s=p+(l<<2)|0;if((j|0)==(d|0)){t=o;u=k}else{k=m;m=o;l=j;do{f[k>>2]=f[l>>2];k=m+4|0;m=k;l=l+4|0}while((l|0)!=(d|0));t=m;u=f[a>>2]|0}f[a>>2]=n;f[i>>2]=o;f[c>>2]=t;f[e>>2]=s;if(!u)r=t;else{ur(u);r=f[c>>2]|0}}else r=d;while(0);f[r>>2]=f[b>>2];f[c>>2]=(f[c>>2]|0)+4;return}function Ag(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;lk(f[a+4>>2]|0,(f[h+56>>2]|0)-(f[h+52>>2]|0)>>2);h=a+76|0;a=f[h>>2]|0;if(!a){i=f[(f[g>>2]|0)+64>>2]|0;g=(f[i+4>>2]|0)-(f[i>>2]|0)>>2;i=(g>>>0)/3|0;if(g>>>0<=2){j=1;u=b;return j|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(Ub(e,c)|0)){j=0;k=10;break}if((g|0)>=(i|0)){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}else{i=f[a>>2]|0;if((f[a+4>>2]|0)==(i|0)){j=1;u=b;return j|0}a=0;g=i;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(Ub(e,c)|0)){j=0;k=10;break}i=f[h>>2]|0;g=f[i>>2]|0;if(a>>>0>=(f[i+4>>2]|0)-g>>2>>>0){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}return 0}function Bg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;h=a+12|0;i=a+4|0;j=f[i>>2]|0;if((j|0)==(f[a+8>>2]|0)){Oi(a,h);k=f[i>>2]|0}else{f[j>>2]=f[h>>2];l=j+4|0;f[i>>2]=l;k=l}l=f[a>>2]|0;f[g>>2]=k-l;k=b+16|0;j=k;m=f[j+4>>2]|0;if(!((m|0)>0|(m|0)==0&(f[j>>2]|0)>>>0>0)){f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;j=f[a>>2]|0;m=f[g>>2]|0;g=k;k=f[g+4>>2]|0;if((k|0)>0|(k|0)==0&(f[g>>2]|0)>>>0>0){n=j;o=e}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,j,j+m|0)|0;n=f[a>>2]|0;o=e}}else{n=l;o=e}e=f[i>>2]|0;if((e|0)==(n|0)){f[h>>2]=0;p=a+16|0;f[p>>2]=0;u=c;return}f[i>>2]=e+(~((e+-4-n|0)>>>2)<<2);f[h>>2]=0;p=a+16|0;f[p>>2]=0;u=c;return}function Cg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(d-g>>2>>>0>=b>>>0){rj(g|0,0,b<<2|0)|0;f[e>>2]=g+(b<<2);return}i=f[a>>2]|0;j=g-i>>2;g=j+b|0;k=i;if(g>>>0>1073741823)Fq(a);l=d-i|0;d=l>>1;m=l>>2>>>0<536870911?(d>>>0<g>>>0?g:d):1073741823;do if(m)if(m>>>0>1073741823){d=ra(8)|0;op(d,16742);f[d>>2]=7520;va(d|0,1208,126)}else{n=yn(m<<2)|0;break}else n=0;while(0);d=n+(j<<2)|0;rj(d|0,0,b<<2|0)|0;b=d;j=n+(m<<2)|0;m=n+(g<<2)|0;if((h|0)==(k|0)){o=b;p=i;q=h}else{i=h;h=b;b=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[b+-4>>2]=d;b=h+-4|0;h=b}while((i|0)!=(k|0));o=h;p=f[a>>2]|0;q=f[e>>2]|0}f[a>>2]=o;f[e>>2]=m;f[c>>2]=j;j=p;if((q|0)!=(j|0)){c=q;do{c=c+-4|0;q=f[c>>2]|0;f[c>>2]=0;if(q|0)Va[f[(f[q>>2]|0)+4>>2]&255](q)}while((c|0)!=(j|0))}if(!p)return;ur(p);return}function Dg(a){a=a|0;yk(a);yk(a+32|0);yk(a+64|0);yk(a+96|0);yk(a+128|0);yk(a+160|0);yk(a+192|0);yk(a+224|0);yk(a+256|0);yk(a+288|0);yk(a+320|0);yk(a+352|0);yk(a+384|0);yk(a+416|0);yk(a+448|0);yk(a+480|0);yk(a+512|0);yk(a+544|0);yk(a+576|0);yk(a+608|0);yk(a+640|0);yk(a+672|0);yk(a+704|0);yk(a+736|0);yk(a+768|0);yk(a+800|0);yk(a+832|0);yk(a+864|0);yk(a+896|0);yk(a+928|0);yk(a+960|0);yk(a+992|0);yk(a+1024|0);return}function Eg(a,c,d,e,g,h){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=$(h);var i=0,j=0,k=0,l=0,m=0,n=0;i=u;u=u+16|0;j=i;k=i+4|0;f[j>>2]=c;c=a+4|0;a=yn(32)|0;f[k>>2]=a;f[k+8>>2]=-2147483616;f[k+4>>2]=17;l=a;m=14860;n=l+17|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[a+17>>0]=0;Zj(Jd(c,j)|0,k,d);if((b[k+11>>0]|0)<0)ur(f[k>>2]|0);d=yn(32)|0;f[k>>2]=d;f[k+8>>2]=-2147483616;f[k+4>>2]=19;l=d;m=14933;n=l+19|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[d+19>>0]=0;qi(Jd(c,j)|0,k,g,e);if((b[k+11>>0]|0)<0)ur(f[k>>2]|0);e=yn(32)|0;f[k>>2]=e;f[k+8>>2]=-2147483616;f[k+4>>2]=18;l=e;m=14953;n=l+18|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[e+18>>0]=0;Wj(Jd(c,j)|0,k,h);if((b[k+11>>0]|0)>=0){u=i;return}ur(f[k>>2]|0);u=i;return}function Fg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=c;e=b;g=d-e|0;h=g>>2;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0<=j-k>>2>>>0){m=a+4|0;n=(f[m>>2]|0)-k>>2;o=h>>>0>n>>>0;p=o?b+(n<<2)|0:c;c=p;n=c-e|0;e=n>>2;if(e|0)pm(k|0,b|0,n|0)|0;n=l+(e<<2)|0;if(o){o=d-c|0;if((o|0)<=0)return;eh(f[m>>2]|0,p|0,o|0)|0;f[m>>2]=(f[m>>2]|0)+(o>>>2<<2);return}else{o=f[m>>2]|0;if((o|0)==(n|0))return;f[m>>2]=o+(~((o+-4-n|0)>>>2)<<2);return}}n=k;if(!k)q=j;else{j=a+4|0;o=f[j>>2]|0;if((o|0)!=(l|0))f[j>>2]=o+(~((o+-4-k|0)>>>2)<<2);ur(n);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;q=0}if(h>>>0>1073741823)Fq(a);j=q>>1;n=q>>2>>>0<536870911?(j>>>0<h>>>0?h:j):1073741823;if(n>>>0>1073741823)Fq(a);j=yn(n<<2)|0;h=a+4|0;f[h>>2]=j;f[a>>2]=j;f[i>>2]=j+(n<<2);if((g|0)<=0)return;eh(j|0,b|0,g|0)|0;f[h>>2]=j+(g>>>2<<2);return}function Gg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0,v=0.0;e=u;u=u+16|0;g=e;h=c+1|0;f[g>>2]=0;i=g+4|0;f[i>>2]=0;f[g+8>>2]=0;do if(h)if(h>>>0>1073741823)Fq(g);else{j=yn(h<<2)|0;f[g>>2]=j;k=j+(h<<2)|0;f[g+8>>2]=k;rj(j|0,0,(c<<2)+4|0)|0;f[i>>2]=k;l=j;m=k;n=j;break}else{l=0;m=0;n=0}while(0);if((b|0)>0){g=0;do{j=l+(f[a+(g<<2)>>2]<<2)|0;f[j>>2]=(f[j>>2]|0)+1;g=g+1|0}while((g|0)!=(b|0))}o=+(b|0);if((c|0)<0){p=0;q=0.0}else{c=0;r=0.0;b=0;while(1){g=f[l+(b<<2)>>2]|0;s=+(g|0);if((g|0)>0){t=c+1|0;v=r+ +Ug(s/o)*s}else{t=c;v=r}b=b+1|0;if((b|0)==(h|0)){p=t;q=v;break}else{c=t;r=v}}}if(d|0)f[d>>2]=p;v=-q;p=~~v>>>0;d=+K(v)>=1.0?(v>0.0?~~+Y(+J(v/4294967296.0),4294967295.0)>>>0:~~+W((v-+(~~v>>>0))/4294967296.0)>>>0):0;if(!l){I=d;u=e;return p|0}if((m|0)!=(l|0))f[i>>2]=m+(~((m+-4-l|0)>>>2)<<2);ur(n);I=d;u=e;return p|0}function Hg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;lk(f[a+4>>2]|0,(f[h+28>>2]|0)-(f[h+24>>2]|0)>>2);h=a+76|0;a=f[h>>2]|0;if(!a){i=f[g>>2]|0;g=(f[i+4>>2]|0)-(f[i>>2]|0)>>2;i=(g>>>0)/3|0;if(g>>>0<=2){j=1;u=b;return j|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(Xb(e,c)|0)){j=0;k=10;break}if((g|0)>=(i|0)){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}else{i=f[a>>2]|0;if((f[a+4>>2]|0)==(i|0)){j=1;u=b;return j|0}a=0;g=i;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(Xb(e,c)|0)){j=0;k=10;break}i=f[h>>2]|0;g=f[i>>2]|0;if(a>>>0>=(f[i+4>>2]|0)-g>>2>>>0){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}return 0}function Ig(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=u;u=u+16|0;g=e+4|0;h=e;i=yn(32)|0;f[a>>2]=i;f[a+4>>2]=c+4;c=a+8|0;b[c>>0]=0;f[i+16>>2]=f[d>>2];a=i+20|0;f[i+24>>2]=0;f[i+28>>2]=0;j=i+24|0;f[a>>2]=j;i=f[d+4>>2]|0;k=d+8|0;if((i|0)==(k|0)){b[c>>0]=1;u=e;return}d=j;j=i;while(1){i=j+16|0;f[h>>2]=d;f[g>>2]=f[h>>2];jh(a,g,i,i)|0;i=f[j+4>>2]|0;if(!i){l=j+8|0;m=f[l>>2]|0;if((f[m>>2]|0)==(j|0))n=m;else{m=l;do{l=f[m>>2]|0;m=l+8|0;o=f[m>>2]|0}while((f[o>>2]|0)!=(l|0));n=o}}else{m=i;while(1){o=f[m>>2]|0;if(!o)break;else m=o}n=m}if((n|0)==(k|0))break;else j=n}b[c>>0]=1;u=e;return}function Jg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;f[e>>2]=b;g=a+8|0;if(((f[a+12>>2]|0)-(f[g>>2]|0)>>2|0)<=(b|0))yh(g,b+1|0);h=f[(f[c>>2]|0)+56>>2]|0;do if((h|0)<5){i=a+20+(h*12|0)+4|0;j=f[i>>2]|0;if((j|0)==(f[a+20+(h*12|0)+8>>2]|0)){Oi(a+20+(h*12|0)|0,e);break}else{f[j>>2]=b;f[i>>2]=j+4;break}}while(0);b=f[c>>2]|0;h=f[e>>2]|0;f[b+60>>2]=h;e=(f[g>>2]|0)+(h<<2)|0;f[c>>2]=0;c=f[e>>2]|0;f[e>>2]=b;if(!c){u=d;return}b=c+88|0;e=f[b>>2]|0;f[b>>2]=0;if(e|0){b=f[e+8>>2]|0;if(b|0){h=e+12|0;if((f[h>>2]|0)!=(b|0))f[h>>2]=b;ur(b)}ur(e)}e=f[c+68>>2]|0;if(e|0){b=c+72|0;h=f[b>>2]|0;if((h|0)!=(e|0))f[b>>2]=h+(~((h+-4-e|0)>>>2)<<2);ur(e)}e=c+64|0;h=f[e>>2]|0;f[e>>2]=0;if(h|0){e=f[h>>2]|0;if(e|0){b=h+4|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;ur(e)}ur(h)}ur(c);u=d;return}function Kg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;d=u;u=u+48|0;e=d+16|0;g=d;h=d+32|0;i=a+28|0;j=f[i>>2]|0;f[h>>2]=j;k=a+20|0;l=(f[k>>2]|0)-j|0;f[h+4>>2]=l;f[h+8>>2]=b;f[h+12>>2]=c;b=l+c|0;l=a+60|0;f[g>>2]=f[l>>2];f[g+4>>2]=h;f[g+8>>2]=2;j=Ko(Aa(146,g|0)|0)|0;a:do if((b|0)!=(j|0)){g=2;m=b;n=h;o=j;while(1){if((o|0)<0)break;m=m-o|0;p=f[n+4>>2]|0;q=o>>>0>p>>>0;r=q?n+8|0:n;s=g+(q<<31>>31)|0;t=o-(q?p:0)|0;f[r>>2]=(f[r>>2]|0)+t;p=r+4|0;f[p>>2]=(f[p>>2]|0)-t;f[e>>2]=f[l>>2];f[e+4>>2]=r;f[e+8>>2]=s;o=Ko(Aa(146,e|0)|0)|0;if((m|0)==(o|0)){v=3;break a}else{g=s;n=r}}f[a+16>>2]=0;f[i>>2]=0;f[k>>2]=0;f[a>>2]=f[a>>2]|32;if((g|0)==2)w=0;else w=c-(f[n+4>>2]|0)|0}else v=3;while(0);if((v|0)==3){v=f[a+44>>2]|0;f[a+16>>2]=v+(f[a+48>>2]|0);a=v;f[i>>2]=a;f[k>>2]=a;w=c}u=d;return w|0}function Lg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=6456;b=f[a+68>>2]|0;if(b|0){c=a+72|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+56>>2]|0;if(b|0){d=a+60|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+44>>2]|0;if(b|0){c=a+48|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+32>>2]|0;if(b|0){d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+20>>2]|0;if(b|0){c=a+24|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}ei(a+8|0);b=a+4|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;b=a+40|0;d=f[b>>2]|0;if(d|0){c=a+44|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[c>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0){aj(i);ur(i)}h=f[c>>2]|0}while((h|0)!=(d|0));g=f[b>>2]|0}ur(g)}aj(a);ur(a);return}function Mg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a+12|0;d=f[a>>2]|0;e=a+8|0;g=f[e>>2]|0;h=(g|0)==-1;if(!(b[c>>0]|0)){do if(((!h?(i=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(i|0)!=-1):0)?(f[(f[d>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)==0:0)?(j=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(i<<2)>>2]|0,(j|0)!=-1):0)if(!((j>>>0)%3|0)){k=j+2|0;break}else{k=j+-1|0;break}else k=-1;while(0);f[e>>2]=k;return}k=g+1|0;if(((!h?(h=((k>>>0)%3|0|0)==0?g+-2|0:k,(h|0)!=-1):0)?(f[(f[d>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0)==0:0)?(k=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(h<<2)>>2]|0,h=k+1|0,(k|0)!=-1):0){g=((h>>>0)%3|0|0)==0?k+-2|0:h;f[e>>2]=g;if((g|0)!=-1){if((g|0)!=(f[a+4>>2]|0))return;f[e>>2]=-1;return}}else f[e>>2]=-1;g=f[a+4>>2]|0;do if((((g|0)!=-1?(a=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(a|0)!=-1):0)?(f[(f[d>>2]|0)+(a>>>5<<2)>>2]&1<<(a&31)|0)==0:0)?(h=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(a<<2)>>2]|0,(h|0)!=-1):0)if(!((h>>>0)%3|0)){l=h+2|0;break}else{l=h+-1|0;break}else l=-1;while(0);f[e>>2]=l;b[c>>0]=0;return}function Ng(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d>>2;g=e+1|0;if(g>>>0>1073741823)Fq(a);h=a+8|0;i=(f[h>>2]|0)-d|0;d=i>>1;j=i>>2>>>0<536870911?(d>>>0<g>>>0?g:d):1073741823;do if(j)if(j>>>0>1073741823){d=ra(8)|0;op(d,16742);f[d>>2]=7520;va(d|0,1208,126)}else{k=yn(j<<2)|0;break}else k=0;while(0);d=k+(e<<2)|0;e=d;g=k+(j<<2)|0;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;j=d+4|0;b=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(b|0)){l=e;m=b;n=b}else{i=k;k=e;e=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[e+-4>>2]=d;e=k+-4|0;k=e}while((i|0)!=(b|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=j;f[h>>2]=g;g=m;if((n|0)!=(g|0)){h=n;do{h=h+-4|0;n=f[h>>2]|0;f[h>>2]=0;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&255](n)}while((h|0)!=(g|0))}if(!m)return;ur(m);return}function Og(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;a=f[d>>2]|0;do if(a|0){e=b[c+11>>0]|0;g=e<<24>>24<0;h=g?f[c+4>>2]|0:e&255;e=g?f[c>>2]|0:c;g=d;i=a;a:while(1){j=i;while(1){k=j+16|0;l=b[k+11>>0]|0;m=l<<24>>24<0;n=m?f[j+20>>2]|0:l&255;l=h>>>0<n>>>0?h:n;if((l|0)!=0?(o=dl(m?f[k>>2]|0:k,e,l)|0,(o|0)!=0):0){if((o|0)>=0)break}else p=6;if((p|0)==6?(p=0,n>>>0>=h>>>0):0)break;n=f[j+4>>2]|0;if(!n){q=g;break a}else j=n}i=f[j>>2]|0;if(!i){q=j;break}else g=j}if((q|0)!=(d|0)){g=q+16|0;i=b[g+11>>0]|0;n=i<<24>>24<0;o=n?f[q+20>>2]|0:i&255;i=o>>>0<h>>>0?o:h;if(i|0?(l=dl(e,n?f[g>>2]|0:g,i)|0,l|0):0){if((l|0)<0)break;else r=q;return r|0}if(h>>>0>=o>>>0){r=q;return r|0}}}while(0);r=d;return r|0}function Pg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if(((e-h|0)/12|0)>>>0>=b>>>0){i=b;j=h;do{f[j>>2]=f[c>>2];f[j+4>>2]=f[c+4>>2];f[j+8>>2]=f[c+8>>2];j=(f[g>>2]|0)+12|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=(h-i|0)/12|0;h=j+b|0;if(h>>>0>357913941)Fq(a);k=(e-i|0)/12|0;i=k<<1;e=k>>>0<178956970?(i>>>0<h>>>0?h:i):357913941;do if(e)if(e>>>0>357913941){i=ra(8)|0;op(i,16742);f[i>>2]=7520;va(i|0,1208,126)}else{l=yn(e*12|0)|0;break}else l=0;while(0);i=l+(j*12|0)|0;j=l+(e*12|0)|0;e=b;b=i;l=i;do{f[b>>2]=f[c>>2];f[b+4>>2]=f[c+4>>2];f[b+8>>2]=f[c+8>>2];b=l+12|0;l=b;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;b=(f[g>>2]|0)-e|0;c=i+(((b|0)/-12|0)*12|0)|0;if((b|0)>0)eh(c|0,e|0,b|0)|0;f[a>>2]=c;f[g>>2]=l;f[d>>2]=j;if(!e)return;ur(e);return}function Qg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d>>2;g=e+1|0;if(g>>>0>1073741823)Fq(a);h=a+8|0;i=(f[h>>2]|0)-d|0;d=i>>1;j=i>>2>>>0<536870911?(d>>>0<g>>>0?g:d):1073741823;do if(j)if(j>>>0>1073741823){d=ra(8)|0;op(d,16742);f[d>>2]=7520;va(d|0,1208,126)}else{k=yn(j<<2)|0;break}else k=0;while(0);d=k+(e<<2)|0;e=d;g=k+(j<<2)|0;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;j=d+4|0;b=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(b|0)){l=e;m=b;n=b}else{i=k;k=e;e=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[e+-4>>2]=d;e=k+-4|0;k=e}while((i|0)!=(b|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=j;f[h>>2]=g;g=m;if((n|0)!=(g|0)){h=n;do{h=h+-4|0;n=f[h>>2]|0;f[h>>2]=0;if(n|0){aj(n);ur(n)}}while((h|0)!=(g|0))}if(!m)return;ur(m);return}function Rg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=f[b>>2]|0;g=f[a>>2]|0;h=f[d>>2]|0;d=f[h>>2]|0;i=(f[h+4>>2]|0)-d>>3;if(i>>>0<=e>>>0)Fq(h);j=d;if(i>>>0<=g>>>0)Fq(h);d=f[j+(e<<3)>>2]|0;k=f[c>>2]|0;if(i>>>0<=k>>>0)Fq(h);l=j+(g<<3)|0;m=(f[j+(k<<3)>>2]|0)>>>0<d>>>0;if(d>>>0<(f[l>>2]|0)>>>0){if(m){f[a>>2]=k;f[c>>2]=g;n=1;return n|0}f[a>>2]=e;f[b>>2]=g;d=f[c>>2]|0;if(i>>>0<=d>>>0)Fq(h);if((f[j+(d<<3)>>2]|0)>>>0>=(f[l>>2]|0)>>>0){n=1;return n|0}f[b>>2]=d;f[c>>2]=g;n=2;return n|0}if(!m){n=0;return n|0}f[b>>2]=k;f[c>>2]=e;e=f[b>>2]|0;c=f[a>>2]|0;if(i>>>0<=e>>>0)Fq(h);if(i>>>0<=c>>>0)Fq(h);if((f[j+(e<<3)>>2]|0)>>>0>=(f[j+(c<<3)>>2]|0)>>>0){n=1;return n|0}f[a>>2]=e;f[b>>2]=c;n=2;return n|0}function Sg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0;e=u;u=u+96|0;g=e+40|0;h=e;Vm(g,c);Ie(h,b,c);Ih(g,h);Dj(h+24|0,f[h+28>>2]|0);Oj(h+12|0,f[h+16>>2]|0);Dj(h,f[h+4>>2]|0);bj(a,g,d);f[g>>2]=3544;Dj(g+28|0,f[g+32>>2]|0);Oj(g+16|0,f[g+20>>2]|0);Dj(g+4|0,f[g+8>>2]|0);u=e;return}function Tg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;a=u;u=u+16|0;e=a;if(!b){g=0;u=a;return g|0}h=b+96|0;i=b+100|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;b=f[i>>2]|0;j=f[h>>2]|0;k=(b-j|0)/12|0;l=j;j=b;if(k>>>0>=c>>>0){if(k>>>0>c>>>0?(b=l+(c*12|0)|0,(b|0)!=(j|0)):0)f[i>>2]=j+(~(((j+-12-b|0)>>>0)/12|0)*12|0);if(!c){g=1;u=a;return g|0}}else Pg(h,c-k|0,e);k=0;b=f[h>>2]|0;while(1){j=k*3|0;l=f[d+(j<<2)>>2]|0;m=f[d+(j+1<<2)>>2]|0;n=f[d+(j+2<<2)>>2]|0;j=((f[i>>2]|0)-b|0)/12|0;o=k;k=k+1|0;if(o>>>0<j>>>0){p=b;q=b}else{f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;Pg(h,k-j|0,e);j=f[h>>2]|0;p=j;q=j}f[p+(o*12|0)>>2]=l;f[p+(o*12|0)+4>>2]=m;f[p+(o*12|0)+8>>2]=n;if((k|0)==(c|0)){g=1;break}else b=q}u=a;return g|0}function Ug(a){a=+a;var b=0,c=0,d=0,e=0.0,g=0,h=0,i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,q=0.0,r=0.0,t=0.0;p[s>>3]=a;b=f[s>>2]|0;c=f[s+4>>2]|0;d=(c|0)<0;do if(d|c>>>0<1048576){if((b|0)==0&(c&2147483647|0)==0){e=-1.0/(a*a);break}if(d){e=(a-a)/0.0;break}else{p[s>>3]=a*18014398509481984.0;g=f[s+4>>2]|0;h=-1077;i=g;j=f[s>>2]|0;k=g;l=9;break}}else if(c>>>0<=2146435071)if((b|0)==0&0==0&(c|0)==1072693248)e=0.0;else{h=-1023;i=c;j=b;k=c;l=9}else e=a;while(0);if((l|0)==9){l=i+614242|0;f[s>>2]=j;f[s+4>>2]=(l&1048575)+1072079006;a=+p[s>>3]+-1.0;m=a*a*.5;n=a/(a+2.0);o=n*n;q=o*o;p[s>>3]=a-m;j=f[s+4>>2]|0;f[s>>2]=0;f[s+4>>2]=j;r=+p[s>>3];t=a-r-m+n*(m+(q*(q*(q*.15313837699209373+.22222198432149784)+.3999999999940942)+o*(q*(q*(q*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)));q=r*1.4426950407214463;o=+(h+(l>>>20)|0);m=q+o;e=m+(q+(o-m)+(t*1.4426950407214463+(t+r)*1.6751713164886512e-10))}return +e}function Vg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d;g=yn(32)|0;f[e>>2]=g;f[e+8>>2]=-2147483616;f[e+4>>2]=17;h=g;i=14732;j=h+17|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[g+17>>0]=0;g=c+16|0;i=f[g>>2]|0;if(i){h=g;j=i;a:while(1){i=j;while(1){if((f[i+16>>2]|0)>=(a|0))break;k=f[i+4>>2]|0;if(!k){l=h;break a}else i=k}j=f[i>>2]|0;if(!j){l=i;break}else h=i}if(((l|0)!=(g|0)?(f[l+16>>2]|0)<=(a|0):0)?(a=l+20|0,(Hh(a,e)|0)!=0):0)m=a;else n=10}else n=10;if((n|0)==10)m=c;c=Nk(m,e,-1)|0;if((b[e+11>>0]|0)>=0){o=(c|0)==-1;p=c>>>0>6;q=p?-2:c;r=o?-1:q;u=d;return r|0}ur(f[e>>2]|0);o=(c|0)==-1;p=c>>>0>6;q=p?-2:c;r=o?-1:q;u=d;return r|0}function Wg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;d=u;u=u+16|0;e=d;g=f[c>>2]|0;f[c>>2]=0;f[e>>2]=g;Jg(a,b,e);g=f[e>>2]|0;f[e>>2]=0;if(g|0){e=g+88|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0){e=f[c+8>>2]|0;if(e|0){h=c+12|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;ur(e)}ur(c)}c=f[g+68>>2]|0;if(c|0){e=g+72|0;h=f[e>>2]|0;if((h|0)!=(c|0))f[e>>2]=h+(~((h+-4-c|0)>>>2)<<2);ur(c)}c=g+64|0;h=f[c>>2]|0;f[c>>2]=0;if(h|0){c=f[h>>2]|0;if(c|0){e=h+4|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;ur(c)}ur(h)}ur(g)}g=a+84|0;h=a+88|0;a=f[h>>2]|0;c=f[g>>2]|0;e=a-c>>2;if((e|0)>(b|0)){u=d;return}i=b+1|0;b=a;if(i>>>0>e>>>0){Ch(g,i-e|0);u=d;return}if(i>>>0>=e>>>0){u=d;return}e=c+(i<<2)|0;if((e|0)==(b|0)){u=d;return}f[h>>2]=b+(~((b+-4-e|0)>>>2)<<2);u=d;return}function Xg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;g=a+4|0;f[g>>2]=c;f[a+8>>2]=f[c+56>>2];h=f[a+184>>2]|0;i=a+188|0;j=f[i>>2]|0;if((j|0)!=(h|0))f[i>>2]=j+(~((j+-4-h|0)>>>2)<<2);h=f[c+48>>2]|0;c=yn(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=16054;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(Hh(h,e)|0)==0;if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);h=f[(f[g>>2]|0)+48>>2]|0;if(c){c=(ki(h)|0)>5&1;b[a+352>>0]=c;u=d;return 1}c=yn(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=16054;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(_j(h,e,0)|0)&1;b[a+352>>0]=c;if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);u=d;return 1}function Yg(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0;c=a+108|0;d=(f[a+112>>2]|0)-(f[c>>2]|0)|0;e=(d|0)/12|0;g=a+4|0;$h(e,f[(f[g>>2]|0)+44>>2]|0)|0;if(!d)return 1;d=0;a=0;while(1){i=f[c>>2]|0;j=i+(d*12|0)+4|0;$h((f[j>>2]|0)-a|0,f[(f[g>>2]|0)+44>>2]|0)|0;$h((f[j>>2]|0)-(f[i+(d*12|0)>>2]|0)|0,f[(f[g>>2]|0)+44>>2]|0)|0;d=d+1|0;if(d>>>0>=e>>>0)break;else a=f[j>>2]|0}xi(f[(f[g>>2]|0)+44>>2]|0,e,0,0)|0;a=0;do{d=f[(f[g>>2]|0)+44>>2]|0;j=d+16|0;i=f[j+4>>2]|0;if((i|0)>0|(i|0)==0&(f[j>>2]|0)>>>0>0){j=f[d+12>>2]|0;d=j+4|0;i=f[d>>2]|0;k=b[(f[c>>2]|0)+(a*12|0)+8>>0]&1;l=i>>>3;m=i&7;i=(f[j>>2]|0)+l|0;b[i>>0]=(1<<m^255)&(h[i>>0]|0);i=(f[j>>2]|0)+l|0;b[i>>0]=k<<m|(h[i>>0]|0);f[d>>2]=(f[d>>2]|0)+1}a=a+1|0}while(a>>>0<e>>>0);cg(f[(f[g>>2]|0)+44>>2]|0);return 1}function Zg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;g=a+4|0;f[g>>2]=c;f[a+8>>2]=f[c+56>>2];h=f[a+184>>2]|0;i=a+188|0;j=f[i>>2]|0;if((j|0)!=(h|0))f[i>>2]=j+(~((j+-4-h|0)>>>2)<<2);h=f[c+48>>2]|0;c=yn(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=16054;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(Hh(h,e)|0)==0;if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);h=f[(f[g>>2]|0)+48>>2]|0;if(c){c=(ki(h)|0)>5&1;b[a+288>>0]=c;u=d;return 1}c=yn(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=16054;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(_j(h,e,0)|0)&1;b[a+288>>0]=c;if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);u=d;return 1}function _g(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=u;u=u+32|0;h=g+16|0;i=g+8|0;j=g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]=d+(~(((d+-12-a|0)>>>0)/12|0)*12|0);ur(a);u=c;return}function ah(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;if(c>>>0>4294967279)Fq(a);d=a+11|0;e=b[d>>0]|0;g=e<<24>>24<0;if(g){h=f[a+4>>2]|0;i=(f[a+8>>2]&2147483647)+-1|0}else{h=e&255;i=10}j=h>>>0>c>>>0?h:c;c=j>>>0<11;k=c?10:(j+16&-16)+-1|0;do if((k|0)!=(i|0)){do if(c){j=f[a>>2]|0;if(g){l=0;m=j;n=a;o=13}else{cp(a,j,(e&255)+1|0)|0;ur(j);o=16}}else{j=k+1|0;p=yn(j)|0;if(g){l=1;m=f[a>>2]|0;n=p;o=13;break}else{cp(p,a,(e&255)+1|0)|0;q=p;r=j;s=a+4|0;o=15;break}}while(0);if((o|0)==13){j=a+4|0;cp(n,m,(f[j>>2]|0)+1|0)|0;ur(m);if(l){q=n;r=k+1|0;s=j;o=15}else o=16}if((o|0)==15){f[a+8>>2]=r|-2147483648;f[s>>2]=h;f[a>>2]=q;break}else if((o|0)==16){b[d>>0]=h;break}}while(0);return}function bh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=f[b>>2]|0;if((c|0)==-1){d=-1;return d|0}b=f[(f[a+24>>2]|0)+(c<<2)>>2]|0;if((b|0)==-1){d=0;return d|0}c=a+12|0;a=0;e=0;g=b;a:while(1){b:do if(e){h=a+1|0;i=(((g>>>0)%3|0|0)==0?2:-1)+g|0;if((i|0)==-1){d=h;j=15;break a}k=f[(f[c>>2]|0)+(i<<2)>>2]|0;if((k|0)==-1){d=h;j=15;break a}if(!((k>>>0)%3|0)){l=k+2|0;m=h;break}else{l=k+-1|0;m=h;break}}else{h=a;k=g;while(1){i=h+1|0;n=k+1|0;o=((n>>>0)%3|0|0)==0?k+-2|0:n;if((o|0)==-1){l=b;m=i;break b}n=f[(f[c>>2]|0)+(o<<2)>>2]|0;o=n+1|0;if((n|0)==-1){l=b;m=i;break b}k=((o>>>0)%3|0|0)==0?n+-2|0:o;if((k|0)==-1){l=b;m=i;break b}if((k|0)==(b|0)){d=i;j=15;break a}else h=i}}while(0);if((l|0)==-1){d=m;j=15;break}else{a=m;e=1;g=l}}if((j|0)==15)return d|0;return 0}function ch(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=a+8|0;Rg(a,a+4|0,d,c)|0;e=a+12|0;if((e|0)==(b|0))return;g=f[c>>2]|0;c=f[g>>2]|0;h=(f[g+4>>2]|0)-c>>3;i=c;c=e;e=d;a:while(1){d=f[c>>2]|0;j=f[e>>2]|0;if(h>>>0<=d>>>0){k=5;break}if(h>>>0<=j>>>0){k=7;break}l=i+(d<<3)|0;if((f[l>>2]|0)>>>0<(f[i+(j<<3)>>2]|0)>>>0){m=e;n=c;o=j;while(1){f[n>>2]=o;if((m|0)==(a|0)){p=a;break}j=m+-4|0;o=f[j>>2]|0;if(h>>>0<=o>>>0){k=11;break a}if((f[l>>2]|0)>>>0>=(f[i+(o<<3)>>2]|0)>>>0){p=m;break}else{q=m;m=j;n=q}}f[p>>2]=d}n=c+4|0;if((n|0)==(b|0)){k=3;break}else{m=c;c=n;e=m}}if((k|0)==3)return;else if((k|0)==5)Fq(g);else if((k|0)==7)Fq(g);else if((k|0)==11)Fq(g)}function dh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=Rg(a,b,c,e)|0;h=f[d>>2]|0;i=f[c>>2]|0;j=f[e>>2]|0;e=f[j>>2]|0;k=(f[j+4>>2]|0)-e>>3;if(k>>>0<=h>>>0)Fq(j);l=e;if(k>>>0<=i>>>0)Fq(j);if((f[l+(h<<3)>>2]|0)>>>0>=(f[l+(i<<3)>>2]|0)>>>0){m=g;return m|0}f[c>>2]=h;f[d>>2]=i;i=f[c>>2]|0;d=f[b>>2]|0;if(k>>>0<=i>>>0)Fq(j);if(k>>>0<=d>>>0)Fq(j);if((f[l+(i<<3)>>2]|0)>>>0>=(f[l+(d<<3)>>2]|0)>>>0){m=g+1|0;return m|0}f[b>>2]=i;f[c>>2]=d;d=f[b>>2]|0;c=f[a>>2]|0;if(k>>>0<=d>>>0)Fq(j);if(k>>>0<=c>>>0)Fq(j);if((f[l+(d<<3)>>2]|0)>>>0>=(f[l+(c<<3)>>2]|0)>>>0){m=g+2|0;return m|0}f[a>>2]=d;f[b>>2]=c;m=g+3|0;return m|0}function eh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0;if((d|0)>=8192)return Da(a|0,c|0,d|0)|0;e=a|0;g=a+d|0;if((a&3)==(c&3)){while(a&3){if(!d)return e|0;b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0;d=d-1|0}h=g&-4|0;d=h-64|0;while((a|0)<=(d|0)){f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];f[a+12>>2]=f[c+12>>2];f[a+16>>2]=f[c+16>>2];f[a+20>>2]=f[c+20>>2];f[a+24>>2]=f[c+24>>2];f[a+28>>2]=f[c+28>>2];f[a+32>>2]=f[c+32>>2];f[a+36>>2]=f[c+36>>2];f[a+40>>2]=f[c+40>>2];f[a+44>>2]=f[c+44>>2];f[a+48>>2]=f[c+48>>2];f[a+52>>2]=f[c+52>>2];f[a+56>>2]=f[c+56>>2];f[a+60>>2]=f[c+60>>2];a=a+64|0;c=c+64|0}while((a|0)<(h|0)){f[a>>2]=f[c>>2];a=a+4|0;c=c+4|0}}else{h=g-4|0;while((a|0)<(h|0)){b[a>>0]=b[c>>0]|0;b[a+1>>0]=b[c+1>>0]|0;b[a+2>>0]=b[c+2>>0]|0;b[a+3>>0]=b[c+3>>0]|0;a=a+4|0;c=c+4|0}}while((a|0)<(g|0)){b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0}return e|0}function fh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;c=u;u=u+16|0;d=c+4|0;e=c;f[a>>2]=1344;g=a+4|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;f[g+16>>2]=0;f[g+20>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;f[d>>2]=b;b=a+4|0;g=a+8|0;Oi(b,d);h=f[d>>2]|0;i=a+20|0;j=f[i>>2]|0;k=a+16|0;a=f[k>>2]|0;l=j-a>>2;m=a;if((h|0)<(l|0)){n=m;o=h;p=f[g>>2]|0;q=f[b>>2]|0;r=p-q|0;s=r>>2;t=s+-1|0;v=n+(o<<2)|0;f[v>>2]=t;u=c;return}a=h+1|0;f[e>>2]=-1;w=j;if(a>>>0<=l>>>0)if(a>>>0<l>>>0?(j=m+(a<<2)|0,(j|0)!=(w|0)):0){f[i>>2]=w+(~((w+-4-j|0)>>>2)<<2);x=h;y=m}else{x=h;y=m}else{zh(k,a-l|0,e);x=f[d>>2]|0;y=f[k>>2]|0}n=y;o=x;p=f[g>>2]|0;q=f[b>>2]|0;r=p-q|0;s=r>>2;t=s+-1|0;v=n+(o<<2)|0;f[v>>2]=t;u=c;return}function gh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=a+4|0;c=f[b>>2]|0;d=(f[c+12>>2]|0)-(f[c+8>>2]|0)|0;c=d>>2;a:do if((d|0)>0){e=0;while(1){if(!(Ra[f[(f[a>>2]|0)+36>>2]&127](a,e)|0)){g=0;break}e=e+1|0;h=f[b>>2]|0;i=(f[h+12>>2]|0)-(f[h+8>>2]|0)>>2;if((e|0)>=(i|0)){j=i;break a}}return g|0}else j=c;while(0);c=a+20|0;b=a+24|0;d=f[b>>2]|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[d+2>>0]<<16|h[d+3>>0]<<24;if((k|0)>=(i|0)){s=c;break}else q=c}}else s=j;f[a+20>>2]=s;e=1;return e|0}function ih(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;do if(!(Jp(a,f[c+8>>2]|0,g)|0)){if(!(Jp(a,f[c>>2]|0,g)|0)){h=f[a+8>>2]|0;Za[f[(f[h>>2]|0)+24>>2]&3](h,c,d,e,g);break}if((f[c+16>>2]|0)!=(d|0)?(h=c+20|0,(f[h>>2]|0)!=(d|0)):0){f[c+32>>2]=e;i=c+44|0;if((f[i>>2]|0)==4)break;j=c+52|0;b[j>>0]=0;k=c+53|0;b[k>>0]=0;l=f[a+8>>2]|0;_a[f[(f[l>>2]|0)+20>>2]&3](l,c,d,d,1,g);if(b[k>>0]|0)if(!(b[j>>0]|0)){m=3;n=11}else o=3;else{m=4;n=11}if((n|0)==11){f[h>>2]=d;h=c+40|0;f[h>>2]=(f[h>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0){b[c+54>>0]=1;o=m}else o=m}f[i>>2]=o;break}if((e|0)==1)f[c+32>>2]=1}else gn(0,c,d,e);while(0);return}function jh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e+12|0;h=e+8|0;i=e;f[i>>2]=f[b>>2];f[g>>2]=f[i>>2];i=Md(a,g,h,e+4|0,c)|0;c=f[i>>2]|0;if(c|0){j=c;u=e;return j|0}c=yn(40)|0;oj(c+16|0,d);oj(c+28|0,d+12|0);d=f[h>>2]|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=d;f[i>>2]=c;d=f[f[a>>2]>>2]|0;if(!d)k=c;else{f[a>>2]=d;k=f[i>>2]|0}Me(f[a+4>>2]|0,k);k=a+8|0;f[k>>2]=(f[k>>2]|0)+1;j=c;u=e;return j|0}function kh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=0;if(!c){u=e;return}i=a+8|0;j=f[i>>2]|0;k=j<<5;if(k>>>0<c>>>0){f[g>>2]=0;l=g+4|0;f[l>>2]=0;m=g+8|0;f[m>>2]=0;if((c|0)<0)Fq(a);n=j<<6;j=c+31&-32;ti(g,k>>>0<1073741823?(n>>>0<j>>>0?j:n):2147483647);n=f[a>>2]|0;f[a>>2]=f[g>>2];f[g>>2]=n;g=f[h>>2]|0;f[h>>2]=c;f[l>>2]=g;g=f[i>>2]|0;f[i>>2]=f[m>>2];f[m>>2]=g;if(n|0)ur(n);o=a}else{f[h>>2]=c;o=a}a=f[o>>2]|0;o=a;h=a;a=c>>>5;n=a<<2;if(!(b[d>>0]|0)){rj(h|0,0,n|0)|0;d=c&31;g=o+(a<<2)|0;if(!d){u=e;return}f[g>>2]=f[g>>2]&~(-1>>>(32-d|0));u=e;return}else{rj(h|0,-1,n|0)|0;n=c&31;c=o+(a<<2)|0;if(!n){u=e;return}f[c>>2]=f[c>>2]|-1>>>(32-n|0);u=e;return}}function lh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+20>>2];if((l|0)>0|(l|0)==0&m>>>0>0){n=a+88|0;nd(n,b);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;n=a+88|0;nd(n,b);u=c;return 1}function mh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+16>>2];if((l|0)>0|(l|0)==0&m>>>0>0){n=a+108|0;nd(n,b);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;n=a+108|0;nd(n,b);u=c;return 1}function nh(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=a+32|0;d=f[a+64>>2]|0;e=(Qa[f[(f[d>>2]|0)+40>>2]&127](d)|0)+56|0;d=f[e>>2]|0;xi(c,(((f[d+100>>2]|0)-(f[d+96>>2]|0)|0)/12|0)*3|0,0,1)|0;d=a+68|0;e=f[d>>2]|0;g=(f[a+72>>2]|0)-e|0;if((g|0)<=0){cg(c);return}i=a+48|0;j=a+44|0;a=(g>>>2)+-1|0;g=e;while(1){e=f[g+(a<<2)>>2]|0;k=f[3700+(e<<2)>>2]|0;l=i;m=f[l+4>>2]|0;if((m|0)>0|(m|0)==0&(f[l>>2]|0)>>>0>0?(l=f[j>>2]|0,171>>>e&1|0):0){m=l+4|0;n=0;o=f[m>>2]|0;do{p=o>>>3;q=o&7;r=(f[l>>2]|0)+p|0;b[r>>0]=(1<<q^255)&(h[r>>0]|0);r=(f[l>>2]|0)+p|0;b[r>>0]=(e>>>n&1)<<q|(h[r>>0]|0);o=(f[m>>2]|0)+1|0;f[m>>2]=o;n=n+1|0}while((n|0)!=(k|0))}k=a+-1|0;if((k|0)<=-1)break;a=k;g=f[d>>2]|0}cg(c);return}function oh(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+48|0;h=g;i=g+32|0;if(!c){j=0;u=g;return j|0}Wn(h);do if((lm(c,0)|0)!=-1){if(d){if(!(Qa[f[(f[c>>2]|0)+16>>2]&127](c)|0)){k=0;break}Va[f[(f[c>>2]|0)+20>>2]&255](c)}Sg(i,a,c,h);l=(f[i>>2]|0)==0;m=i+4|0;if((b[m+11>>0]|0)<0)ur(f[m>>2]|0);if(l){l=f[h>>2]|0;m=h+4|0;pg(e,l,l+((f[m>>2]|0)-l)|0);k=(f[m>>2]|0)-(f[h>>2]|0)|0}else k=0}else k=0;while(0);e=h+12|0;i=f[e>>2]|0;f[e>>2]=0;if(i|0)ur(i);i=f[h>>2]|0;if(i|0){e=h+4|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;ur(i)}j=k;u=g;return j|0}function ph(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=u;u=u+16|0;d=c;e=f[(f[a>>2]|0)+8>>2]|0;g=a+8|0;h=a+12|0;i=(f[h>>2]|0)-(f[g>>2]|0)>>2;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;Xa[e&15](a,i,d);i=f[d>>2]|0;f[d>>2]=0;if(!i){k=f[h>>2]|0;l=f[g>>2]|0;m=k-l|0;n=m>>2;o=n+-1|0;u=c;return o|0}d=i+88|0;a=f[d>>2]|0;f[d>>2]=0;if(a|0){d=f[a+8>>2]|0;if(d|0){e=a+12|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;ur(d)}ur(a)}a=f[i+68>>2]|0;if(a|0){d=i+72|0;e=f[d>>2]|0;if((e|0)!=(a|0))f[d>>2]=e+(~((e+-4-a|0)>>>2)<<2);ur(a)}a=i+64|0;e=f[a>>2]|0;f[a>>2]=0;if(e|0){a=f[e>>2]|0;if(a|0){d=e+4|0;if((f[d>>2]|0)!=(a|0))f[d>>2]=a;ur(a)}ur(e)}ur(i);k=f[h>>2]|0;l=f[g>>2]|0;m=k-l|0;n=m>>2;o=n+-1|0;u=c;return o|0}function qh(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if(b[a+352>>0]|0)return 1;c=a+8|0;d=f[c>>2]|0;e=(f[d+12>>2]|0)-(f[d+8>>2]|0)|0;d=e>>2;g=a+172|0;Ei(g,d+-1|0);if(!((d|0)!=1&(e|0)>0))return 1;e=a+12|0;a=0;h=0;while(1){i=f[(f[(f[c>>2]|0)+8>>2]|0)+(a<<2)>>2]|0;if(!(f[i+56>>2]|0))j=h;else{k=f[g>>2]|0;f[k+(h*136|0)>>2]=a;l=f[k+(h*136|0)+104>>2]|0;m=k+(h*136|0)+108|0;n=f[m>>2]|0;if((n|0)!=(l|0))f[m>>2]=n+(~((n+-4-l|0)>>>2)<<2);l=f[e>>2]|0;lk(k+(h*136|0)+104|0,(f[l+4>>2]|0)-(f[l>>2]|0)>>2);l=f[g>>2]|0;f[l+(h*136|0)+128>>2]=0;Gc(l+(h*136|0)+4|0,f[c>>2]|0,f[e>>2]|0,i)|0;j=h+1|0}a=a+1|0;if((a|0)>=(d|0))break;else h=j}return 1}function rh(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if(b[a+288>>0]|0)return 1;c=a+8|0;d=f[c>>2]|0;e=(f[d+12>>2]|0)-(f[d+8>>2]|0)|0;d=e>>2;g=a+172|0;Ei(g,d+-1|0);if(!((d|0)!=1&(e|0)>0))return 1;e=a+12|0;a=0;h=0;while(1){i=f[(f[(f[c>>2]|0)+8>>2]|0)+(a<<2)>>2]|0;if(!(f[i+56>>2]|0))j=h;else{k=f[g>>2]|0;f[k+(h*136|0)>>2]=a;l=f[k+(h*136|0)+104>>2]|0;m=k+(h*136|0)+108|0;n=f[m>>2]|0;if((n|0)!=(l|0))f[m>>2]=n+(~((n+-4-l|0)>>>2)<<2);l=f[e>>2]|0;lk(k+(h*136|0)+104|0,(f[l+4>>2]|0)-(f[l>>2]|0)>>2);l=f[g>>2]|0;f[l+(h*136|0)+128>>2]=0;Gc(l+(h*136|0)+4|0,f[c>>2]|0,f[e>>2]|0,i)|0;j=h+1|0}a=a+1|0;if((a|0)>=(d|0))break;else h=j}return 1}function sh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;if(d-g>>3>>>0>=b>>>0){h=b;i=g;do{j=i;f[j>>2]=0;f[j+4>>2]=0;i=(f[e>>2]|0)+8|0;f[e>>2]=i;h=h+-1|0}while((h|0)!=0);return}h=f[a>>2]|0;i=g-h>>3;g=i+b|0;if(g>>>0>536870911)Fq(a);j=d-h|0;h=j>>2;d=j>>3>>>0<268435455?(h>>>0<g>>>0?g:h):536870911;do if(d)if(d>>>0>536870911){h=ra(8)|0;op(h,16742);f[h>>2]=7520;va(h|0,1208,126)}else{k=yn(d<<3)|0;break}else k=0;while(0);h=k+(i<<3)|0;i=k+(d<<3)|0;d=b;b=h;k=h;do{g=b;f[g>>2]=0;f[g+4>>2]=0;b=k+8|0;k=b;d=d+-1|0}while((d|0)!=0);d=f[a>>2]|0;b=(f[e>>2]|0)-d|0;g=h+(0-(b>>3)<<3)|0;if((b|0)>0)eh(g|0,d|0,b|0)|0;f[a>>2]=g;f[e>>2]=k;f[c>>2]=i;if(!d)return;ur(d);return}function th(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=u;u=u+16|0;g=e+4|0;h=e;i=e+8|0;j=a&255;b[i>>0]=j&127;do if(c>>>0>0|(c|0)==0&a>>>0>127){b[i>>0]=j|-128;k=d+16|0;l=f[k+4>>2]|0;if((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0){m=0;break}else{f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Ke(d,g,i,i+1|0)|0;k=oo(a|0,c|0,7)|0;m=th(k,I,d)|0;break}}else{k=d+16|0;l=f[k+4>>2]|0;if((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0){m=0;break}f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Ke(d,g,i,i+1|0)|0;n=1;u=e;return n|0}while(0);n=m;u=e;return n|0}function uh(a,b){a=a|0;b=b|0;var c=0;c=a+8|0;uf(c,b)|0;if((c|0)==(b|0)){f[a+92>>2]=f[b+84>>2];return}else{lg(a+56|0,f[b+48>>2]|0,f[b+52>>2]|0);lg(a+68|0,f[b+60>>2]|0,f[b+64>>2]|0);lg(a+80|0,f[b+72>>2]|0,f[b+76>>2]|0);f[a+92>>2]=f[b+84>>2];Fg(a+96|0,f[b+88>>2]|0,f[b+92>>2]|0);return}}function vh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0;g=f[(f[(f[d+4>>2]|0)+8>>2]|0)+(c<<2)>>2]|0;if((b|0)==-1)h=Wi(c,d)|0;else h=b;if((h|0)==-2)i=0;else{do if((Qa[f[(f[d>>2]|0)+8>>2]&127](d)|0)==1){Wf(a,d,h,c,e,514);if(!(f[a>>2]|0)){f[a>>2]=0;break}else return}while(0);c=yn(44)|0;f[c>>2]=1656;f[c+4>>2]=g;g=c+8|0;f[g>>2]=f[e>>2];f[g+4>>2]=f[e+4>>2];f[g+8>>2]=f[e+8>>2];f[g+12>>2]=f[e+12>>2];f[g+16>>2]=f[e+16>>2];f[g+20>>2]=f[e+20>>2];kk(c+32|0,e+24|0);f[c>>2]=1712;i=c}f[a>>2]=i;return}function wh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=u;u=u+224|0;g=e+120|0;h=e+80|0;i=e;j=e+136|0;k=h;l=k+40|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(l|0));f[g>>2]=f[d>>2];if((qb(0,c,g,i,h)|0)<0)m=-1;else{if((f[a+76>>2]|0)>-1)n=zr(a)|0;else n=0;d=f[a>>2]|0;k=d&32;if((b[a+74>>0]|0)<1)f[a>>2]=d&-33;d=a+48|0;if(!(f[d>>2]|0)){l=a+44|0;o=f[l>>2]|0;f[l>>2]=j;p=a+28|0;f[p>>2]=j;q=a+20|0;f[q>>2]=j;f[d>>2]=80;r=a+16|0;f[r>>2]=j+80;j=qb(a,c,g,i,h)|0;if(!o)s=j;else{Sa[f[a+36>>2]&31](a,0,0)|0;t=(f[q>>2]|0)==0?-1:j;f[l>>2]=o;f[d>>2]=0;f[r>>2]=0;f[p>>2]=0;f[q>>2]=0;s=t}}else s=qb(a,c,g,i,h)|0;h=f[a>>2]|0;f[a>>2]=h|k;if(n|0)yr(a);m=(h&32|0)==0?s:-1}u=e;return m|0}function xh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;d=u;u=u+16|0;e=d;if(!(An(a,b,c)|0)){g=0;u=d;return g|0}if((Qa[f[(f[a>>2]|0)+32>>2]&127](a)|0)<<24>>24==1?((f[(f[a+8>>2]|0)+28>>2]|0)+-1|0)>>>0>=6:0){g=0;u=d;return g|0}h=Vg(c,f[b+48>>2]|0)|0;Xa[f[(f[a>>2]|0)+48>>2]&15](e,a,h);h=a+36|0;b=f[e>>2]|0;f[e>>2]=0;c=f[h>>2]|0;f[h>>2]=b;if(!c){f[e>>2]=0;i=b}else{Va[f[(f[c>>2]|0)+4>>2]&255](c);c=f[e>>2]|0;f[e>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&255](c);i=f[h>>2]|0}if(!i){g=1;u=d;return g|0}if(Ra[f[(f[a>>2]|0)+36>>2]&127](a,i)|0){g=1;u=d;return g|0}i=f[h>>2]|0;f[h>>2]=0;if(!i){g=1;u=d;return g|0}Va[f[(f[i>>2]|0)+4>>2]&255](i);g=1;u=d;return g|0}function yh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e>>2;h=d;if(g>>>0<b>>>0){xf(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+(b<<2)|0;if((g|0)==(h|0))return;else i=h;do{h=i+-4|0;f[c>>2]=h;b=f[h>>2]|0;f[h>>2]=0;if(b|0){h=b+88|0;e=f[h>>2]|0;f[h>>2]=0;if(e|0){h=f[e+8>>2]|0;if(h|0){a=e+12|0;if((f[a>>2]|0)!=(h|0))f[a>>2]=h;ur(h)}ur(e)}e=f[b+68>>2]|0;if(e|0){h=b+72|0;a=f[h>>2]|0;if((a|0)!=(e|0))f[h>>2]=a+(~((a+-4-e|0)>>>2)<<2);ur(e)}e=b+64|0;a=f[e>>2]|0;f[e>>2]=0;if(a|0){e=f[a>>2]|0;if(e|0){h=a+4|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;ur(e)}ur(a)}ur(b)}i=f[c>>2]|0}while((i|0)!=(g|0));return}function zh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;i=h;if(e-h>>2>>>0>=b>>>0){j=b;k=i;while(1){f[k>>2]=f[c>>2];j=j+-1|0;if(!j)break;else k=k+4|0}f[g>>2]=i+(b<<2);return}i=f[a>>2]|0;k=h-i|0;h=k>>2;j=h+b|0;if(j>>>0>1073741823)Fq(a);l=e-i|0;e=l>>1;m=l>>2>>>0<536870911?(e>>>0<j>>>0?j:e):1073741823;do if(m)if(m>>>0>1073741823){e=ra(8)|0;op(e,16742);f[e>>2]=7520;va(e|0,1208,126)}else{e=yn(m<<2)|0;n=e;o=e;break}else{n=0;o=0}while(0);e=n+(h<<2)|0;h=n+(m<<2)|0;m=b;j=e;while(1){f[j>>2]=f[c>>2];m=m+-1|0;if(!m)break;else j=j+4|0}if((k|0)>0)eh(o|0,i|0,k|0)|0;f[a>>2]=n;f[g>>2]=e+(b<<2);f[d>>2]=h;if(!i)return;ur(i);return}function Ah(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=(f[a>>2]|0)+1794895138|0;g=Kp(f[a+8>>2]|0,e)|0;h=Kp(f[a+12>>2]|0,e)|0;i=Kp(f[a+16>>2]|0,e)|0;a:do if((g>>>0<c>>>2>>>0?(j=c-(g<<2)|0,h>>>0<j>>>0&i>>>0<j>>>0):0)?((i|h)&3|0)==0:0){j=h>>>2;k=i>>>2;l=0;m=g;while(1){n=m>>>1;o=l+n|0;p=o<<1;q=p+j|0;r=Kp(f[a+(q<<2)>>2]|0,e)|0;s=Kp(f[a+(q+1<<2)>>2]|0,e)|0;if(!(s>>>0<c>>>0&r>>>0<(c-s|0)>>>0)){t=0;break a}if(b[a+(s+r)>>0]|0){t=0;break a}r=rl(d,a+s|0)|0;if(!r)break;s=(r|0)<0;if((m|0)==1){t=0;break a}else{l=s?l:o;m=s?n:m-n|0}}m=p+k|0;l=Kp(f[a+(m<<2)>>2]|0,e)|0;j=Kp(f[a+(m+1<<2)>>2]|0,e)|0;if(j>>>0<c>>>0&l>>>0<(c-j|0)>>>0)t=(b[a+(j+l)>>0]|0)==0?a+j|0:0;else t=0}else t=0;while(0);return t|0}function Bh(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h=u;u=u+64|0;i=h;j=f[a>>2]|0;k=a+(f[j+-8>>2]|0)|0;l=f[j+-4>>2]|0;f[i>>2]=e;f[i+4>>2]=a;f[i+8>>2]=c;f[i+12>>2]=g;g=i+16|0;c=i+20|0;a=i+24|0;j=i+28|0;m=i+32|0;n=i+40|0;o=g;p=o+36|0;do{f[o>>2]=0;o=o+4|0}while((o|0)<(p|0));d[g+36>>1]=0;b[g+38>>0]=0;a:do if(Jp(l,e,0)|0){f[i+48>>2]=1;_a[f[(f[l>>2]|0)+20>>2]&3](l,i,k,k,1,0);q=(f[a>>2]|0)==1?k:0}else{Za[f[(f[l>>2]|0)+24>>2]&3](l,i,k,1,0);switch(f[i+36>>2]|0){case 0:{q=(f[n>>2]|0)==1&(f[j>>2]|0)==1&(f[m>>2]|0)==1?f[c>>2]|0:0;break a;break}case 1:break;default:{q=0;break a}}if((f[a>>2]|0)!=1?!((f[n>>2]|0)==0&(f[j>>2]|0)==1&(f[m>>2]|0)==1):0){q=0;break}q=f[g>>2]|0}while(0);u=h;return q|0}function Ch(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(d-g>>2>>>0>=b>>>0){i=b;j=h;while(1){f[j>>2]=1;i=i+-1|0;if(!i)break;else j=j+4|0}f[e>>2]=h+(b<<2);return}h=f[a>>2]|0;j=g-h|0;g=j>>2;i=g+b|0;if(i>>>0>1073741823)Fq(a);k=d-h|0;d=k>>1;l=k>>2>>>0<536870911?(d>>>0<i>>>0?i:d):1073741823;do if(l)if(l>>>0>1073741823){d=ra(8)|0;op(d,16742);f[d>>2]=7520;va(d|0,1208,126)}else{d=yn(l<<2)|0;m=d;n=d;break}else{m=0;n=0}while(0);d=m+(g<<2)|0;g=m+(l<<2)|0;l=b;i=d;while(1){f[i>>2]=1;l=l+-1|0;if(!l)break;else i=i+4|0}if((j|0)>0)eh(n|0,h|0,j|0)|0;f[a>>2]=m;f[e>>2]=d+(b<<2);f[c>>2]=g;if(!h)return;ur(h);return}function Dh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;if(!c){g=0;u=d;return g|0}h=a+84|0;i=f[h>>2]|0;j=a+88|0;k=f[j>>2]|0;if((k|0)!=(i|0))f[j>>2]=k+(~((k+-4-i|0)>>>2)<<2);f[h>>2]=0;f[j>>2]=0;f[a+92>>2]=0;if(i|0)ur(i);i=a+72|0;j=f[i>>2]|0;h=a+76|0;if((f[h>>2]|0)!=(j|0))f[h>>2]=j;f[i>>2]=0;f[h>>2]=0;f[a+80>>2]=0;if(j|0)ur(j);j=c+4|0;h=(f[j>>2]|0)-(f[c>>2]|0)>>2;b[e>>0]=0;kh(a,h,e);h=c+24|0;i=c+28|0;k=(f[i>>2]|0)-(f[h>>2]|0)>>2;b[e>>0]=0;kh(a+12|0,k,e);fg(a+28|0,(f[j>>2]|0)-(f[c>>2]|0)>>2,6444);lk(a+52|0,(f[i>>2]|0)-(f[h>>2]|0)>>2);lk(a+40|0,(f[i>>2]|0)-(f[h>>2]|0)>>2);f[a+64>>2]=c;b[a+24>>0]=1;g=1;u=d;return g|0}function Eh(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a+12|0;d=f[a>>2]|0;e=a+8|0;g=f[e>>2]|0;h=(g|0)==-1;if(!(b[c>>0]|0)){do if((!h?(i=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(i|0)!=-1):0)?(j=f[(f[d+12>>2]|0)+(i<<2)>>2]|0,(j|0)!=-1):0)if(!((j>>>0)%3|0)){k=j+2|0;break}else{k=j+-1|0;break}else k=-1;while(0);f[e>>2]=k;return}k=g+1|0;if((!h?(h=((k>>>0)%3|0|0)==0?g+-2|0:k,(h|0)!=-1):0)?(k=f[(f[d+12>>2]|0)+(h<<2)>>2]|0,h=k+1|0,(k|0)!=-1):0){g=((h>>>0)%3|0|0)==0?k+-2|0:h;f[e>>2]=g;if((g|0)!=-1){if((g|0)!=(f[a+4>>2]|0))return;f[e>>2]=-1;return}}else f[e>>2]=-1;g=f[a+4>>2]|0;do if(((g|0)!=-1?(a=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(a|0)!=-1):0)?(h=f[(f[d+12>>2]|0)+(a<<2)>>2]|0,(h|0)!=-1):0)if(!((h>>>0)%3|0)){l=h+2|0;break}else{l=h+-1|0;break}else l=-1;while(0);f[e>>2]=l;b[c>>0]=0;return}function Fh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Ud(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+20>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;Ud(a,e);return}function Gh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+48|0;g=e;h=e+32|0;i=a+4|0;j=f[i>>2]|0;if(!j){k=0;u=e;return k|0}do if(c)if(Qa[f[(f[j>>2]|0)+16>>2]&127](j)|0){l=f[i>>2]|0;Va[f[(f[l>>2]|0)+20>>2]&255](l);break}else{k=0;u=e;return k|0}while(0);Wn(g);bj(h,f[a>>2]|0,g);a=(f[h>>2]|0)==0;i=h+4|0;if((b[i+11>>0]|0)<0)ur(f[i>>2]|0);if(a){a=f[g>>2]|0;i=g+4|0;pg(d,a,a+((f[i>>2]|0)-a)|0);m=(f[i>>2]|0)-(f[g>>2]|0)|0}else m=0;i=g+12|0;a=f[i>>2]|0;f[i>>2]=0;if(a|0)ur(a);a=f[g>>2]|0;if(a|0){i=g+4|0;if((f[i>>2]|0)!=(a|0))f[i>>2]=a;ur(a)}k=m;u=e;return k|0}function Hh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=f[a+4>>2]|0;if(!d){e=0;return e|0}a=b[c+11>>0]|0;g=a<<24>>24<0;h=g?f[c+4>>2]|0:a&255;a=g?f[c>>2]|0:c;c=d;while(1){d=c+16|0;g=b[d+11>>0]|0;i=g<<24>>24<0;j=i?f[c+20>>2]|0:g&255;g=j>>>0<h>>>0;k=g?j:h;if((k|0)!=0?(l=dl(a,i?f[d>>2]|0:d,k)|0,(l|0)!=0):0)if((l|0)<0)m=7;else m=8;else if(h>>>0<j>>>0)m=7;else m=8;if((m|0)==7){m=0;n=c}else if((m|0)==8){m=0;l=h>>>0<j>>>0?h:j;if((l|0)!=0?(j=dl(i?f[d>>2]|0:d,a,l)|0,(j|0)!=0):0){if((j|0)>=0){e=1;m=14;break}}else m=10;if((m|0)==10?(m=0,!g):0){e=1;m=14;break}n=c+4|0}c=f[n>>2]|0;if(!c){e=0;m=14;break}}if((m|0)==14)return e|0;return 0}function Ih(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=u;u=u+16|0;d=c+12|0;e=c+8|0;g=c+4|0;h=c;i=a+4|0;j=(i|0)==(b|0);if(!j){f[g>>2]=f[b>>2];f[h>>2]=b+4;f[e>>2]=f[g>>2];f[d>>2]=f[h>>2];Pc(i,e,d)}if(!j){f[g>>2]=f[b+12>>2];f[h>>2]=b+16;f[e>>2]=f[g>>2];f[d>>2]=f[h>>2];Hc(a+16|0,e,d)}if(j){u=c;return}f[g>>2]=f[b+24>>2];f[h>>2]=b+28;f[e>>2]=f[g>>2];f[d>>2]=f[h>>2];Pc(a+28|0,e,d);u=c;return}function Jh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=u;u=u+16|0;g=e+4|0;h=e;i=f[a+8>>2]|0;j=i+24|0;k=b[j>>0]|0;l=c+4|0;$f(a,(f[l>>2]|0)-(f[c>>2]|0)>>2,k,d);d=f[a+32>>2]|0;a=(f[f[d>>2]>>2]|0)+(f[d+48>>2]|0)|0;d=f[c>>2]|0;c=f[l>>2]|0;if((d|0)==(c|0)){m=1;u=e;return m|0}l=i+84|0;n=i+68|0;o=0;p=d;while(1){d=f[p>>2]|0;if(!(b[l>>0]|0))q=f[(f[n>>2]|0)+(d<<2)>>2]|0;else q=d;f[h>>2]=q;d=b[j>>0]|0;f[g>>2]=f[h>>2];if(!(Qb(i,g,d,a+(o<<2)|0)|0)){m=0;r=7;break}p=p+4|0;if((p|0)==(c|0)){m=1;r=7;break}else o=o+k|0}if((r|0)==7){u=e;return m|0}return 0}function Kh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=1520;b=a+72|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&255](c);c=f[a+60>>2]|0;if(c|0){b=a+64|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);ur(c)}c=f[a+48>>2]|0;if(c|0)ur(c);c=a+36|0;d=f[c>>2]|0;if(d|0){b=a+40|0;e=f[b>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[b>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0)Va[f[(f[i>>2]|0)+4>>2]&255](i);h=f[b>>2]|0}while((h|0)!=(d|0));g=f[c>>2]|0}ur(g)}f[a>>2]=1344;g=f[a+16>>2]|0;if(g|0){c=a+20|0;d=f[c>>2]|0;if((d|0)!=(g|0))f[c>>2]=d+(~((d+-4-g|0)>>>2)<<2);ur(g)}g=f[a+4>>2]|0;if(!g)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(g|0))f[d>>2]=a+(~((a+-4-g|0)>>>2)<<2);ur(g);return}function Lh(a){a=a|0;Ej(a+992|0);Ej(a+960|0);Ej(a+928|0);Ej(a+896|0);Ej(a+864|0);Ej(a+832|0);Ej(a+800|0);Ej(a+768|0);Ej(a+736|0);Ej(a+704|0);Ej(a+672|0);Ej(a+640|0);Ej(a+608|0);Ej(a+576|0);Ej(a+544|0);Ej(a+512|0);Ej(a+480|0);Ej(a+448|0);Ej(a+416|0);Ej(a+384|0);Ej(a+352|0);Ej(a+320|0);Ej(a+288|0);Ej(a+256|0);Ej(a+224|0);Ej(a+192|0);Ej(a+160|0);Ej(a+128|0);Ej(a+96|0);Ej(a+64|0);Ej(a+32|0);Ej(a);return}function Mh(a){a=a|0;Ln(a);Ln(a+32|0);Ln(a+64|0);Ln(a+96|0);Ln(a+128|0);Ln(a+160|0);Ln(a+192|0);Ln(a+224|0);Ln(a+256|0);Ln(a+288|0);Ln(a+320|0);Ln(a+352|0);Ln(a+384|0);Ln(a+416|0);Ln(a+448|0);Ln(a+480|0);Ln(a+512|0);Ln(a+544|0);Ln(a+576|0);Ln(a+608|0);Ln(a+640|0);Ln(a+672|0);Ln(a+704|0);Ln(a+736|0);Ln(a+768|0);Ln(a+800|0);Ln(a+832|0);Ln(a+864|0);Ln(a+896|0);Ln(a+928|0);Ln(a+960|0);Ln(a+992|0);return}function Nh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;a=u;u=u+16|0;e=a;if((c|0)<0|((b|0)==0|(d|0)==0)){g=0;u=a;return g|0}h=f[b+8>>2]|0;if(((f[b+12>>2]|0)-h>>2|0)<=(c|0)){g=0;u=a;return g|0}i=b+4|0;if(!(f[i>>2]|0)){j=yn(52)|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;n[j+16>>2]=$(1.0);k=j+20|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;n[j+36>>2]=$(1.0);f[j+40>>2]=0;f[j+44>>2]=0;f[j+48>>2]=0;f[b+4>>2]=j}j=f[(f[h+(c<<2)>>2]|0)+60>>2]|0;c=yn(44)|0;Vb(c,d);f[c+40>>2]=j;j=f[i>>2]|0;f[e>>2]=c;sk(j,e)|0;j=f[e>>2]|0;f[e>>2]=0;if(!j){g=1;u=a;return g|0}aj(j);ur(j);g=1;u=a;return g|0}function Oh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f[a>>2]=d;e=a+24|0;g=a+28|0;h=f[g>>2]|0;i=f[e>>2]|0;j=h-i>>2;k=i;i=h;if(j>>>0>=d>>>0){if(j>>>0>d>>>0?(h=k+(d<<2)|0,(h|0)!=(i|0)):0)f[g>>2]=i+(~((i+-4-h|0)>>>2)<<2)}else Ai(e,d-j|0);if(!c)return;j=f[b>>2]|0;if((c|0)>1){d=j;e=j;h=1;while(1){i=f[b+(h<<2)>>2]|0;g=(i|0)<(e|0);k=g?i:e;l=g?d:(i|0)>(d|0)?i:d;h=h+1|0;if((h|0)==(c|0)){m=l;n=k;break}else{d=l;e=k}}}else{m=j;n=j}f[a+4>>2]=n;f[a+8>>2]=m;j=no(m|0,((m|0)<0)<<31>>31|0,n|0,((n|0)<0)<<31>>31|0)|0;n=I;if(!(n>>>0<0|(n|0)==0&j>>>0<2147483647))return;n=j+1|0;f[a+12>>2]=n;j=(n|0)/2|0;m=a+16|0;f[m>>2]=j;f[a+20>>2]=0-j;if(n&1|0)return;f[m>>2]=j+-1;return}function Ph(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0;c=u;u=u+64|0;j=c;k=i?6:5;Sl(j);i=f[h+56>>2]|0;h=X(dm(k)|0,e)|0;Jj(j,i,0,e&255,k,0,h,((h|0)<0)<<31>>31,0,0);h=yn(96)|0;Dl(h,j);f[a>>2]=h;Aj(h,d)|0;d=h+84|0;if(!g){b[d>>0]=1;a=f[h+68>>2]|0;j=h+72|0;k=f[j>>2]|0;if((k|0)==(a|0)){u=c;return}f[j>>2]=k+(~((k+-4-a|0)>>>2)<<2);u=c;return}b[d>>0]=0;d=h+68|0;a=h+72|0;h=f[a>>2]|0;k=f[d>>2]|0;j=h-k>>2;e=h;if(j>>>0<g>>>0){zh(d,g-j|0,1328);u=c;return}if(j>>>0<=g>>>0){u=c;return}j=k+(g<<2)|0;if((j|0)==(e|0)){u=c;return}f[a>>2]=e+(~((e+-4-j|0)>>>2)<<2);u=c;return}function Qh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){td(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;td(a,e);return}function Rh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){xd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;xd(a,e);return}function Sh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Hd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;Hd(a,e);return}function Th(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Qd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;Qd(a,e);return}function Uh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){vd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;vd(a,e);return}function Vh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Bd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;Bd(a,e);return}function Wh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Ld(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;Ld(a,e);return}function Xh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){ud(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;ud(a,e);return}function Yh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){yd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;yd(a,e);return}function Zh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Id(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;Id(a,e);return}function _h(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Rd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;Rd(a,e);return}function $h(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;b[h>>0]=a&127;do if(a>>>0>127){b[h>>0]=a|128;i=c+16|0;j=f[i+4>>2]|0;if((j|0)>0|(j|0)==0&(f[i>>2]|0)>>>0>0){k=0;break}else{f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Ke(c,e,h,h+1|0)|0;k=$h(a>>>7,c)|0;break}}else{i=c+16|0;j=f[i+4>>2]|0;if((j|0)>0|(j|0)==0&(f[i>>2]|0)>>>0>0){k=0;break}f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Ke(c,e,h,h+1|0)|0;l=1;u=d;return l|0}while(0);l=k;u=d;return l|0}function ai(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=u;u=u+16|0;e=d;Ne(e,a+40|0,f[a+8>>2]|0,b,c);fj(a,e);a=f[e>>2]|0;f[e>>2]=0;if(!a){u=d;return 1}e=a+88|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0){e=f[c+8>>2]|0;if(e|0){b=c+12|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;ur(e)}ur(c)}c=f[a+68>>2]|0;if(c|0){e=a+72|0;b=f[e>>2]|0;if((b|0)!=(c|0))f[e>>2]=b+(~((b+-4-c|0)>>>2)<<2);ur(c)}c=a+64|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0){c=f[b>>2]|0;if(c|0){e=b+4|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;ur(c)}ur(b)}ur(a);u=d;return 1}function bi(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Dd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;Dd(a,e);return}function ci(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;e=u;u=u+48|0;g=e;h=e+32|0;if(!c){i=0;u=e;return i|0}Wn(g);if((lm(c,0)|0)!=-1?Qa[f[(f[c>>2]|0)+16>>2]&127](c)|0:0){Va[f[(f[c>>2]|0)+20>>2]&255](c);mg(h,a,c,g);c=(f[h>>2]|0)==0;a=h+4|0;if((b[a+11>>0]|0)<0)ur(f[a>>2]|0);if(c){c=f[g>>2]|0;a=g+4|0;pg(d,c,c+((f[a>>2]|0)-c)|0);j=(f[a>>2]|0)-(f[g>>2]|0)|0}else j=0}else j=0;a=g+12|0;c=f[a>>2]|0;f[a>>2]=0;if(c|0)ur(c);c=f[g>>2]|0;if(c|0){a=g+4|0;if((f[a>>2]|0)!=(c|0))f[a>>2]=c;ur(c)}i=j;u=e;return i|0}
+function vc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;e=u;u=u+32|0;g=e+16|0;h=e+12|0;i=e+8|0;j=e+4|0;k=e;switch(f[c+28>>2]|0){case 9:{l=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=l;f[g>>2]=f[h>>2];m=fc(a,c,g)|0;break}case 2:{f[i>>2]=l;f[g>>2]=f[i>>2];m=Yb(a,c,g)|0;break}case 3:{f[j>>2]=l;f[g>>2]=f[j>>2];m=uc(a,c,g)|0;break}case 4:{f[k>>2]=l;f[g>>2]=f[k>>2];m=kc(a,c,g)|0;break}default:m=0}n=m;break}case 1:{m=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=m;f[g>>2]=f[h>>2];o=ec(a,c,g)|0;break}case 2:{f[i>>2]=m;f[g>>2]=f[i>>2];o=Zb(a,c,g)|0;break}case 3:{f[j>>2]=m;f[g>>2]=f[j>>2];o=sc(a,c,g)|0;break}case 4:{f[k>>2]=m;f[g>>2]=f[k>>2];o=jc(a,c,g)|0;break}default:o=0}n=o;break}case 11:case 2:{o=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=o;f[g>>2]=f[h>>2];p=ec(a,c,g)|0;break}case 2:{f[i>>2]=o;f[g>>2]=f[i>>2];p=Zb(a,c,g)|0;break}case 3:{f[j>>2]=o;f[g>>2]=f[j>>2];p=sc(a,c,g)|0;break}case 4:{f[k>>2]=o;f[g>>2]=f[k>>2];p=jc(a,c,g)|0;break}default:p=0}n=p;break}case 4:{p=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=p;f[g>>2]=f[h>>2];q=cc(a,c,g)|0;break}case 2:{f[i>>2]=p;f[g>>2]=f[i>>2];q=Wb(a,c,g)|0;break}case 3:{f[j>>2]=p;f[g>>2]=f[j>>2];q=lc(a,c,g)|0;break}case 4:{f[k>>2]=p;f[g>>2]=f[k>>2];q=hc(a,c,g)|0;break}default:q=0}n=q;break}case 3:{q=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=q;f[g>>2]=f[h>>2];r=cc(a,c,g)|0;break}case 2:{f[i>>2]=q;f[g>>2]=f[i>>2];r=Wb(a,c,g)|0;break}case 3:{f[j>>2]=q;f[g>>2]=f[j>>2];r=lc(a,c,g)|0;break}case 4:{f[k>>2]=q;f[g>>2]=f[k>>2];r=hc(a,c,g)|0;break}default:r=0}n=r;break}case 6:{r=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=r;f[g>>2]=f[h>>2];s=fc(a,c,g)|0;break}case 2:{f[i>>2]=r;f[g>>2]=f[i>>2];s=Yb(a,c,g)|0;break}case 3:{f[j>>2]=r;f[g>>2]=f[j>>2];s=uc(a,c,g)|0;break}case 4:{f[k>>2]=r;f[g>>2]=f[k>>2];s=kc(a,c,g)|0;break}default:s=0}n=s;break}case 5:{s=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=s;f[g>>2]=f[h>>2];t=fc(a,c,g)|0;break}case 2:{f[i>>2]=s;f[g>>2]=f[i>>2];t=Yb(a,c,g)|0;break}case 3:{f[j>>2]=s;f[g>>2]=f[j>>2];t=uc(a,c,g)|0;break}case 4:{f[k>>2]=s;f[g>>2]=f[k>>2];t=kc(a,c,g)|0;break}default:t=0}n=t;break}default:{v=-1;u=e;return v|0}}v=(n|0)==0?-1:n;u=e;return v|0}function wc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;e=u;u=u+32|0;g=e+16|0;h=e+12|0;i=e+29|0;j=e;k=e+28|0;if(!(f[(f[a+8>>2]|0)+80>>2]|0)){l=1;u=e;return l|0}b[i>>0]=-2;m=a+36|0;n=f[m>>2]|0;if(n)if(Ra[f[(f[a>>2]|0)+40>>2]&127](a,n)|0){n=f[m>>2]|0;o=(Qa[f[(f[n>>2]|0)+8>>2]&127](n)|0)&255;b[i>>0]=o;p=5}else q=0;else p=5;if((p|0)==5){o=d+16|0;n=o;r=f[n+4>>2]|0;if(!((r|0)>0|(r|0)==0&(f[n>>2]|0)>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Ke(d,g,i,i+1|0)|0}i=f[m>>2]|0;if(i|0?(n=(Qa[f[(f[i>>2]|0)+36>>2]&127](i)|0)&255,b[j>>0]=n,n=o,i=f[n+4>>2]|0,!((i|0)>0|(i|0)==0&(f[n>>2]|0)>>>0>0)):0){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Ke(d,g,j,j+1|0)|0}n=f[a+32>>2]|0;i=b[n+24>>0]|0;r=X(f[n+80>>2]|0,i)|0;s=(f[f[n>>2]>>2]|0)+(f[n+48>>2]|0)|0;f[j>>2]=0;n=j+4|0;f[n>>2]=0;f[j+8>>2]=0;t=(r|0)==0;do if(!t)if(r>>>0>1073741823)Fq(j);else{v=r<<2;w=yn(v)|0;f[j>>2]=w;x=w+(r<<2)|0;f[j+8>>2]=x;rj(w|0,0,v|0)|0;f[n>>2]=x;y=w;break}else y=0;while(0);w=f[m>>2]|0;do if(w){Ta[f[(f[w>>2]|0)+44>>2]&31](w,s,y,r,i,f[c>>2]|0)|0;x=f[m>>2]|0;if(!x){z=s;A=f[j>>2]|0;p=20;break}if(!(Qa[f[(f[x>>2]|0)+32>>2]&127](x)|0)){x=f[j>>2]|0;z=f[m>>2]|0?x:s;A=x;p=20}}else{z=s;A=y;p=20}while(0);if((p|0)==20)Em(z,r,A);A=a+4|0;a=f[A>>2]|0;do if(a){z=f[a+48>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;y=yn(48)|0;f[g>>2]=y;f[g+8>>2]=-2147483600;f[g+4>>2]=34;s=y;w=11039;x=s+34|0;do{b[s>>0]=b[w>>0]|0;s=s+1|0;w=w+1|0}while((s|0)<(x|0));b[y+34>>0]=0;w=_j(z,g,1)|0;if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);if(!w){if(!t){w=f[j>>2]|0;s=0;x=0;do{x=f[w+(s<<2)>>2]|x;s=s+1|0}while((s|0)!=(r|0));if(x)B=((_(x|0)|0)>>>3^3)+1|0;else B=1}else B=1;b[k>>0]=0;s=o;w=f[s>>2]|0;z=f[s+4>>2]|0;if((z|0)>0|(z|0)==0&w>>>0>0){C=z;D=w}else{f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Ke(d,g,k,k+1|0)|0;w=o;C=f[w+4>>2]|0;D=f[w>>2]|0}b[k>>0]=B;if(!((C|0)>0|(C|0)==0&D>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Ke(d,g,k,k+1|0)|0}if((B|0)==(dm(5)|0)){w=f[j>>2]|0;z=o;s=f[z+4>>2]|0;if(!((s|0)>0|(s|0)==0&(f[z>>2]|0)>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Ke(d,g,w,w+(r<<2)|0)|0}p=48;break}if(t)p=48;else{w=d+4|0;z=0;do{s=(f[j>>2]|0)+(z<<2)|0;y=o;v=f[y+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[y>>2]|0)>>>0>0)){f[h>>2]=f[w>>2];f[g>>2]=f[h>>2];Ke(d,g,s,s+B|0)|0}z=z+1|0}while(z>>>0<r>>>0);p=48}}else p=27}else p=27;while(0);if((p|0)==27){b[k>>0]=1;r=o;o=f[r+4>>2]|0;if(!((o|0)>0|(o|0)==0&(f[r>>2]|0)>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Ke(d,g,k,k+1|0)|0}Pp(g);k=f[A>>2]|0;if(k|0)$j(g,10-(ki(f[k+48>>2]|0)|0)|0)|0;k=Mc(f[j>>2]|0,X((f[c+4>>2]|0)-(f[c>>2]|0)>>2,i)|0,i,g,d)|0;Dj(g,f[g+4>>2]|0);if(k)p=48;else E=0}if((p|0)==48){p=f[m>>2]|0;if(!p)E=1;else{Ra[f[(f[p>>2]|0)+40>>2]&127](p,d)|0;E=1}}d=f[j>>2]|0;if(d|0){j=f[n>>2]|0;if((j|0)!=(d|0))f[n>>2]=j+(~((j+-4-d|0)>>>2)<<2);ur(d)}q=E}l=q;u=e;return l|0}function xc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0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(d,l-z|0);R=0}while(1){if((R|0)<(l|0)){S=0;T=0;U=R}else break;while(1){z=f[(f[h>>2]|0)+(A<<2)>>2]|0;I=f[(f[z+4>>2]|0)+(S<<2)>>2]|0;M=S>>>5;y=1<<(S&31);if(!(f[(f[e>>2]|0)+(M<<2)>>2]&y)){w=0;x=1;H=z;while(1){if((w|0)>=(Ra[f[(f[H>>2]|0)+24>>2]&127](H,I)|0)){V=x;break}z=f[(f[h>>2]|0)+(A<<2)>>2]|0;F=Sa[f[(f[z>>2]|0)+28>>2]&31](z,I,w)|0;z=(f[(f[e>>2]|0)+(F>>>5<<2)>>2]&1<<(F&31)|0)!=0;F=x&z;if(!z){V=F;break}w=w+1|0;x=F;H=f[(f[h>>2]|0)+(A<<2)>>2]|0}if(V){f[(f[d>>2]|0)+(U<<2)>>2]=S;H=(f[e>>2]|0)+(M<<2)|0;f[H>>2]=f[H>>2]|y;W=1;X=U+1|0}else{W=T;X=U}}else{W=T;X=U}S=S+1|0;if((S|0)>=(l|0))break;else{T=W;U=X}}if(W|(X|0)>=(l|0))R=X;else{O=0;break a}}ag(f[(f[h>>2]|0)+(A<<2)>>2]|0,d);P=f[h>>2]|0;Q=f[i>>2]|0}a=a+1|0;if(a>>>0>=Q-P>>2>>>0){O=1;break}else{L=P;K=P;J=Q}}}while(0);Q=f[e>>2]|0;if(Q|0)ur(Q);Q=f[d>>2]|0;if(Q|0){d=f[B>>2]|0;if((d|0)!=(Q|0))f[B>>2]=d+(~((d+-4-Q|0)>>>2)<<2);ur(Q)}N=O}O=f[c>>2]|0;if(!O){u=b;return N|0}ur(O);u=b;return N|0}function yc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!a)return;b=a+-8|0;c=f[4966]|0;d=f[a+-4>>2]|0;a=d&-8;e=b+a|0;do if(!(d&1)){g=f[b>>2]|0;if(!(d&3))return;h=b+(0-g)|0;i=g+a|0;if(h>>>0<c>>>0)return;if((f[4967]|0)==(h|0)){j=e+4|0;k=f[j>>2]|0;if((k&3|0)!=3){l=h;m=i;n=h;break}f[4964]=i;f[j>>2]=k&-2;f[h+4>>2]=i|1;f[h+i>>2]=i;return}k=g>>>3;if(g>>>0<256){g=f[h+8>>2]|0;j=f[h+12>>2]|0;if((j|0)==(g|0)){f[4962]=f[4962]&~(1<<k);l=h;m=i;n=h;break}else{f[g+12>>2]=j;f[j+8>>2]=g;l=h;m=i;n=h;break}}g=f[h+24>>2]|0;j=f[h+12>>2]|0;do if((j|0)==(h|0)){k=h+16|0;o=k+4|0;p=f[o>>2]|0;if(!p){q=f[k>>2]|0;if(!q){r=0;break}else{s=q;t=k}}else{s=p;t=o}while(1){o=s+20|0;p=f[o>>2]|0;if(p|0){s=p;t=o;continue}o=s+16|0;p=f[o>>2]|0;if(!p)break;else{s=p;t=o}}f[t>>2]=0;r=s}else{o=f[h+8>>2]|0;f[o+12>>2]=j;f[j+8>>2]=o;r=j}while(0);if(g){j=f[h+28>>2]|0;o=20152+(j<<2)|0;if((f[o>>2]|0)==(h|0)){f[o>>2]=r;if(!r){f[4963]=f[4963]&~(1<<j);l=h;m=i;n=h;break}}else{f[g+16+(((f[g+16>>2]|0)!=(h|0)&1)<<2)>>2]=r;if(!r){l=h;m=i;n=h;break}}f[r+24>>2]=g;j=h+16|0;o=f[j>>2]|0;if(o|0){f[r+16>>2]=o;f[o+24>>2]=r}o=f[j+4>>2]|0;if(o){f[r+20>>2]=o;f[o+24>>2]=r;l=h;m=i;n=h}else{l=h;m=i;n=h}}else{l=h;m=i;n=h}}else{l=b;m=a;n=b}while(0);if(n>>>0>=e>>>0)return;b=e+4|0;a=f[b>>2]|0;if(!(a&1))return;if(!(a&2)){if((f[4968]|0)==(e|0)){r=(f[4965]|0)+m|0;f[4965]=r;f[4968]=l;f[l+4>>2]=r|1;if((l|0)!=(f[4967]|0))return;f[4967]=0;f[4964]=0;return}if((f[4967]|0)==(e|0)){r=(f[4964]|0)+m|0;f[4964]=r;f[4967]=n;f[l+4>>2]=r|1;f[n+r>>2]=r;return}r=(a&-8)+m|0;s=a>>>3;do if(a>>>0<256){t=f[e+8>>2]|0;c=f[e+12>>2]|0;if((c|0)==(t|0)){f[4962]=f[4962]&~(1<<s);break}else{f[t+12>>2]=c;f[c+8>>2]=t;break}}else{t=f[e+24>>2]|0;c=f[e+12>>2]|0;do if((c|0)==(e|0)){d=e+16|0;o=d+4|0;j=f[o>>2]|0;if(!j){p=f[d>>2]|0;if(!p){u=0;break}else{v=p;w=d}}else{v=j;w=o}while(1){o=v+20|0;j=f[o>>2]|0;if(j|0){v=j;w=o;continue}o=v+16|0;j=f[o>>2]|0;if(!j)break;else{v=j;w=o}}f[w>>2]=0;u=v}else{o=f[e+8>>2]|0;f[o+12>>2]=c;f[c+8>>2]=o;u=c}while(0);if(t|0){c=f[e+28>>2]|0;h=20152+(c<<2)|0;if((f[h>>2]|0)==(e|0)){f[h>>2]=u;if(!u){f[4963]=f[4963]&~(1<<c);break}}else{f[t+16+(((f[t+16>>2]|0)!=(e|0)&1)<<2)>>2]=u;if(!u)break}f[u+24>>2]=t;c=e+16|0;h=f[c>>2]|0;if(h|0){f[u+16>>2]=h;f[h+24>>2]=u}h=f[c+4>>2]|0;if(h|0){f[u+20>>2]=h;f[h+24>>2]=u}}}while(0);f[l+4>>2]=r|1;f[n+r>>2]=r;if((l|0)==(f[4967]|0)){f[4964]=r;return}else x=r}else{f[b>>2]=a&-2;f[l+4>>2]=m|1;f[n+m>>2]=m;x=m}m=x>>>3;if(x>>>0<256){n=19888+(m<<1<<2)|0;a=f[4962]|0;b=1<<m;if(!(a&b)){f[4962]=a|b;y=n;z=n+8|0}else{b=n+8|0;y=f[b>>2]|0;z=b}f[z>>2]=l;f[y+12>>2]=l;f[l+8>>2]=y;f[l+12>>2]=n;return}n=x>>>8;if(n)if(x>>>0>16777215)A=31;else{y=(n+1048320|0)>>>16&8;z=n<<y;n=(z+520192|0)>>>16&4;b=z<<n;z=(b+245760|0)>>>16&2;a=14-(n|y|z)+(b<<z>>>15)|0;A=x>>>(a+7|0)&1|a<<1}else A=0;a=20152+(A<<2)|0;f[l+28>>2]=A;f[l+20>>2]=0;f[l+16>>2]=0;z=f[4963]|0;b=1<<A;do if(z&b){y=x<<((A|0)==31?0:25-(A>>>1)|0);n=f[a>>2]|0;while(1){if((f[n+4>>2]&-8|0)==(x|0)){B=73;break}C=n+16+(y>>>31<<2)|0;m=f[C>>2]|0;if(!m){B=72;break}else{y=y<<1;n=m}}if((B|0)==72){f[C>>2]=l;f[l+24>>2]=n;f[l+12>>2]=l;f[l+8>>2]=l;break}else if((B|0)==73){y=n+8|0;t=f[y>>2]|0;f[t+12>>2]=l;f[y>>2]=l;f[l+8>>2]=t;f[l+12>>2]=n;f[l+24>>2]=0;break}}else{f[4963]=z|b;f[a>>2]=l;f[l+24>>2]=a;f[l+12>>2]=l;f[l+8>>2]=l}while(0);l=(f[4970]|0)+-1|0;f[4970]=l;if(!l)D=20304;else return;while(1){l=f[D>>2]|0;if(!l)break;else D=l+8|0}f[4970]=-1;return}function zc(a){a=a|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;c=u;u=u+32|0;e=c+4|0;g=c;h=c+16|0;i=a+56|0;j=f[i>>2]|0;k=(f[j+100>>2]|0)-(f[j+96>>2]|0)|0;j=(k|0)/12|0;l=a+44|0;$h(j,f[l>>2]|0)|0;$h(f[(f[i>>2]|0)+80>>2]|0,f[l>>2]|0)|0;m=f[a+48>>2]|0;n=yn(32)|0;f[e>>2]=n;f[e+8>>2]=-2147483616;f[e+4>>2]=21;o=n;p=16331;q=o+21|0;do{b[o>>0]=b[p>>0]|0;o=o+1|0;p=p+1|0}while((o|0)<(q|0));b[n+21>>0]=0;n=_j(m,e,0)|0;if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);m=f[l>>2]|0;if(n){b[h>>0]=0;n=m+16|0;p=f[n+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[n>>2]|0)>>>0>0)){f[g>>2]=f[m+4>>2];f[e>>2]=f[g>>2];Ke(m,e,h,h+1|0)|0}mf(a)|0;u=c;return 1}b[h>>0]=1;a=m+16|0;n=f[a+4>>2]|0;if(!((n|0)>0|(n|0)==0&(f[a>>2]|0)>>>0>0)){f[g>>2]=f[m+4>>2];f[e>>2]=f[g>>2];Ke(m,e,h,h+1|0)|0}m=f[i>>2]|0;a=f[m+80>>2]|0;if(a>>>0<256){if(!k){u=c;return 1}n=h+1|0;p=h+1|0;o=h+1|0;q=0;r=m;while(1){s=f[r+96>>2]|0;t=f[l>>2]|0;b[h>>0]=f[s+(q*12|0)>>2];v=t+16|0;w=f[v>>2]|0;x=f[v+4>>2]|0;if((x|0)>0|(x|0)==0&w>>>0>0){y=w;z=t;A=x}else{f[g>>2]=f[t+4>>2];f[e>>2]=f[g>>2];Ke(t,e,h,o)|0;t=f[l>>2]|0;x=t+16|0;y=f[x>>2]|0;z=t;A=f[x+4>>2]|0}b[h>>0]=f[s+(q*12|0)+4>>2];if((A|0)>0|(A|0)==0&y>>>0>0){B=A;C=y;D=z}else{f[g>>2]=f[z+4>>2];f[e>>2]=f[g>>2];Ke(z,e,h,p)|0;x=f[l>>2]|0;t=x+16|0;B=f[t+4>>2]|0;C=f[t>>2]|0;D=x}b[h>>0]=f[s+(q*12|0)+8>>2];if(!((B|0)>0|(B|0)==0&C>>>0>0)){f[g>>2]=f[D+4>>2];f[e>>2]=f[g>>2];Ke(D,e,h,n)|0}s=q+1|0;if(s>>>0>=j>>>0)break;q=s;r=f[i>>2]|0}u=c;return 1}if(a>>>0<65536){if(!k){u=c;return 1}r=h+2|0;q=h+2|0;n=h+2|0;D=0;C=m;while(1){B=f[C+96>>2]|0;p=f[l>>2]|0;d[h>>1]=f[B+(D*12|0)>>2];z=p+16|0;y=f[z>>2]|0;A=f[z+4>>2]|0;if((A|0)>0|(A|0)==0&y>>>0>0){E=A;F=y;G=p}else{f[g>>2]=f[p+4>>2];f[e>>2]=f[g>>2];Ke(p,e,h,n)|0;p=f[l>>2]|0;y=p+16|0;E=f[y+4>>2]|0;F=f[y>>2]|0;G=p}d[h>>1]=f[B+(D*12|0)+4>>2];if((E|0)>0|(E|0)==0&F>>>0>0){H=E;I=F;J=G}else{f[g>>2]=f[G+4>>2];f[e>>2]=f[g>>2];Ke(G,e,h,q)|0;p=f[l>>2]|0;y=p+16|0;H=f[y+4>>2]|0;I=f[y>>2]|0;J=p}d[h>>1]=f[B+(D*12|0)+8>>2];if(!((H|0)>0|(H|0)==0&I>>>0>0)){f[g>>2]=f[J+4>>2];f[e>>2]=f[g>>2];Ke(J,e,h,r)|0}B=D+1|0;if(B>>>0>=j>>>0)break;D=B;C=f[i>>2]|0}u=c;return 1}C=(k|0)!=0;if(a>>>0<2097152){if(C){K=0;L=m}else{u=c;return 1}while(1){a=f[L+96>>2]|0;$h(f[a+(K*12|0)>>2]|0,f[l>>2]|0)|0;$h(f[a+(K*12|0)+4>>2]|0,f[l>>2]|0)|0;$h(f[a+(K*12|0)+8>>2]|0,f[l>>2]|0)|0;a=K+1|0;if(a>>>0>=j>>>0)break;K=a;L=f[i>>2]|0}u=c;return 1}if(!C){u=c;return 1}C=0;L=m;while(1){m=(f[L+96>>2]|0)+(C*12|0)|0;K=f[l>>2]|0;a=K+16|0;k=f[a+4>>2]|0;if(!((k|0)>0|(k|0)==0&(f[a>>2]|0)>>>0>0)){f[g>>2]=f[K+4>>2];f[e>>2]=f[g>>2];Ke(K,e,m,m+12|0)|0}m=C+1|0;if(m>>>0>=j>>>0)break;C=m;L=f[i>>2]|0}u=c;return 1}function Ac(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,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+(j<<2)>>2]|0);H=$(f[d+(j+1<<2)>>2]|0);y=$(v-O);M=$(H-x);E=$(v-N);v=$(H-w);j=$($($(y*y)+$(0.0))+$(M*M))<$($($(E*E)+$(0.0))+$(v*v));d=a+56|0;e=a+60|0;r=f[e>>2]|0;k=f[a+64>>2]|0;l=(r|0)==(k<<5|0);if(j){do if(l)if((r+1|0)<0)Fq(d);else{j=k<<6;B=r+32&-32;ti(d,r>>>0<1073741823?(j>>>0<B>>>0?B:j):2147483647);P=f[e>>2]|0;break}else P=r;while(0);f[e>>2]=P+1;j=(f[d>>2]|0)+(P>>>5<<2)|0;f[j>>2]=f[j>>2]|1<<(P&31);Q=O;R=x}else{do if(l)if((r+1|0)<0)Fq(d);else{P=k<<6;j=r+32&-32;ti(d,r>>>0<1073741823?(P>>>0<j>>>0?j:P):2147483647);S=f[e>>2]|0;break}else S=r;while(0);f[e>>2]=S+1;e=(f[d>>2]|0)+(S>>>5<<2)|0;f[e>>2]=f[e>>2]&~(1<<(S&31));Q=N;R=w}S=~~+J(+(+Q+.5));e=f[a+48>>2]|0;f[e>>2]=S;S=~~+J(+(+R+.5));f[e+4>>2]=S;u=g;return}function Bc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=Oa,v=Oa,w=Oa,x=Oa,y=0,z=0,A=0,B=Oa,C=Oa,D=Oa,E=Oa,F=Oa,G=Oa,H=Oa,I=Oa,K=Oa,M=Oa,N=Oa,O=0,P=Oa,Q=Oa,R=0;g=u;u=u+48|0;h=g+40|0;i=g+36|0;j=g+24|0;k=g+12|0;l=g;m=a+28|0;o=f[c>>2]|0;c=o+1|0;do if((o|0)!=-1){p=((c>>>0)%3|0|0)==0?o+-2|0:c;if(!((o>>>0)%3|0)){q=o+2|0;r=p;break}else{q=o+-1|0;r=p;break}}else{q=-1;r=-1}while(0);o=f[(f[m>>2]|0)+28>>2]|0;m=f[o+(r<<2)>>2]|0;r=f[o+(q<<2)>>2]|0;q=f[a+32>>2]|0;o=f[q>>2]|0;c=(f[q+4>>2]|0)-o>>2;if(c>>>0<=m>>>0)Fq(q);p=o;o=f[p+(m<<2)>>2]|0;if(c>>>0<=r>>>0)Fq(q);q=f[p+(r<<2)>>2]|0;r=(o|0)<(e|0);if(!(r&(q|0)<(e|0))){do if(r)s=o;else{if((e|0)>0){s=e+-1|0;break}p=a+52|0;if((f[p>>2]|0)<=0){u=g;return}c=f[a+48>>2]|0;m=0;do{f[c+(m<<2)>>2]=0;m=m+1|0}while((m|0)<(f[p>>2]|0));u=g;return}while(0);r=a+52|0;p=f[r>>2]|0;m=X(p,s)|0;if((p|0)<=0){u=g;return}p=f[a+48>>2]|0;s=0;do{f[p+(s<<2)>>2]=f[d+(s+m<<2)>>2];s=s+1|0}while((s|0)<(f[r>>2]|0));u=g;return}r=a+52|0;s=f[r>>2]|0;m=X(s,o)|0;t=$(f[d+(m<<2)>>2]|0);v=$(f[d+(m+1<<2)>>2]|0);m=X(s,q)|0;w=$(f[d+(m<<2)>>2]|0);x=$(f[d+(m+1<<2)>>2]|0);if(!(w!=t|x!=v)){m=f[a+48>>2]|0;f[m>>2]=~~w;f[m+4>>2]=~~x;u=g;return}m=a+44|0;s=f[(f[m>>2]|0)+(e<<2)>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;p=a+40|0;c=f[p>>2]|0;if(!(b[c+84>>0]|0))y=f[(f[c+68>>2]|0)+(s<<2)>>2]|0;else y=s;f[i>>2]=y;y=b[c+24>>0]|0;f[h>>2]=f[i>>2];mb(c,h,y,j)|0;y=f[(f[m>>2]|0)+(o<<2)>>2]|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;o=f[p>>2]|0;if(!(b[o+84>>0]|0))z=f[(f[o+68>>2]|0)+(y<<2)>>2]|0;else z=y;f[i>>2]=z;z=b[o+24>>0]|0;f[h>>2]=f[i>>2];mb(o,h,z,k)|0;z=f[(f[m>>2]|0)+(q<<2)>>2]|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;q=f[p>>2]|0;if(!(b[q+84>>0]|0))A=f[(f[q+68>>2]|0)+(z<<2)>>2]|0;else A=z;f[i>>2]=A;A=b[q+24>>0]|0;f[h>>2]=f[i>>2];mb(q,h,A,l)|0;B=$(n[l>>2]);C=$(n[k>>2]);D=$(B-C);B=$(n[l+4>>2]);E=$(n[k+4>>2]);F=$(B-E);B=$(n[l+8>>2]);G=$(n[k+8>>2]);H=$(B-G);B=$($(n[j>>2])-C);C=$($(n[j+4>>2])-E);E=$($(n[j+8>>2])-G);G=$($($($(D*D)+$(0.0))+$(F*F))+$(H*H));if(G>$(0.0)){I=$($($($($(D*B)+$(0.0))+$(F*C))+$(H*E))/G);K=$(B-$(D*I));D=$(C-$(F*I));F=$(E-$(H*I));M=I;N=$(L($($($(F*F)+$($(D*D)+$($(K*K)+$(0.0))))/G)))}else{M=$(0.0);N=$(0.0)}G=$(w-t);w=$(x-v);x=$($(G*M)+t);t=$(G*N);G=$($(w*M)+v);v=$(w*N);N=$(x-v);w=$(G+t);M=$(x+v);v=$(G-t);j=X(f[r>>2]|0,e)|0;t=$(f[d+(j<<2)>>2]|0);G=$(f[d+(j+1<<2)>>2]|0);x=$(t-N);K=$(G-w);D=$(t-M);t=$(G-v);j=$($($(x*x)+$(0.0))+$(K*K))<$($($(D*D)+$(0.0))+$(t*t));d=a+56|0;e=a+60|0;r=f[e>>2]|0;k=f[a+64>>2]|0;l=(r|0)==(k<<5|0);if(j){do if(l)if((r+1|0)<0)Fq(d);else{j=k<<6;A=r+32&-32;ti(d,r>>>0<1073741823?(j>>>0<A>>>0?A:j):2147483647);O=f[e>>2]|0;break}else O=r;while(0);f[e>>2]=O+1;j=(f[d>>2]|0)+(O>>>5<<2)|0;f[j>>2]=f[j>>2]|1<<(O&31);P=N;Q=w}else{do if(l)if((r+1|0)<0)Fq(d);else{O=k<<6;j=r+32&-32;ti(d,r>>>0<1073741823?(O>>>0<j>>>0?j:O):2147483647);R=f[e>>2]|0;break}else R=r;while(0);f[e>>2]=R+1;e=(f[d>>2]|0)+(R>>>5<<2)|0;f[e>>2]=f[e>>2]&~(1<<(R&31));P=M;Q=v}R=~~+J(+(+P+.5));e=f[a+48>>2]|0;f[e>>2]=R;R=~~+J(+(+Q+.5));f[e+4>>2]=R;u=g;return}function Cc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=Oa,w=Oa,x=Oa,y=Oa,z=0,A=0,B=0,C=Oa,D=Oa,E=Oa,F=Oa,G=Oa,H=Oa,I=Oa,K=Oa,M=Oa,N=Oa,O=Oa,P=0,Q=Oa,R=Oa,S=0;g=u;u=u+48|0;h=g+40|0;i=g+36|0;j=g+24|0;k=g+12|0;l=g;m=a+48|0;o=f[c>>2]|0;c=o+1|0;if((o|0)!=-1){p=((c>>>0)%3|0|0)==0?o+-2|0:c;c=o+(((o>>>0)%3|0|0)==0?2:-1)|0;if((p|0)==-1)q=-1;else q=f[(f[f[m>>2]>>2]|0)+(p<<2)>>2]|0;if((c|0)==-1){r=-1;s=q}else{r=f[(f[f[m>>2]>>2]|0)+(c<<2)>>2]|0;s=q}}else{r=-1;s=-1}q=f[a+52>>2]|0;c=f[q>>2]|0;m=(f[q+4>>2]|0)-c>>2;if(m>>>0<=s>>>0)Fq(q);p=c;c=f[p+(s<<2)>>2]|0;if(m>>>0<=r>>>0)Fq(q);q=f[p+(r<<2)>>2]|0;r=(c|0)<(e|0);if(!(r&(q|0)<(e|0))){do if(r)t=c;else{if((e|0)>0){t=e+-1|0;break}p=a+72|0;if((f[p>>2]|0)<=0){u=g;return}m=f[a+68>>2]|0;s=0;do{f[m+(s<<2)>>2]=0;s=s+1|0}while((s|0)<(f[p>>2]|0));u=g;return}while(0);r=a+72|0;p=f[r>>2]|0;s=X(p,t)|0;if((p|0)<=0){u=g;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.0)){K=$($($($($(E*C)+$(0.0))+$(G*D))+$(I*F))/H);M=$(C-$(E*K));E=$(D-$(G*K));G=$(F-$(I*K));N=K;O=$(L($($($(G*G)+$($(E*E)+$($(M*M)+$(0.0))))/H)))}else{N=$(0.0);O=$(0.0)}H=$(x-v);x=$(y-w);y=$($(H*N)+v);v=$(H*O);H=$($(x*N)+w);w=$(x*O);O=$(y-w);x=$(H+v);N=$(y+w);w=$(H-v);j=X(f[r>>2]|0,e)|0;v=$(f[d+(j<<2)>>2]|0);H=$(f[d+(j+1<<2)>>2]|0);y=$(v-O);M=$(H-x);E=$(v-N);v=$(H-w);j=$($($(y*y)+$(0.0))+$(M*M))<$($($(E*E)+$(0.0))+$(v*v));d=a+76|0;e=a+80|0;r=f[e>>2]|0;k=f[a+84>>2]|0;l=(r|0)==(k<<5|0);if(j){do if(l)if((r+1|0)<0)Fq(d);else{j=k<<6;B=r+32&-32;ti(d,r>>>0<1073741823?(j>>>0<B>>>0?B:j):2147483647);P=f[e>>2]|0;break}else P=r;while(0);f[e>>2]=P+1;j=(f[d>>2]|0)+(P>>>5<<2)|0;f[j>>2]=f[j>>2]|1<<(P&31);Q=O;R=x}else{do if(l)if((r+1|0)<0)Fq(d);else{P=k<<6;j=r+32&-32;ti(d,r>>>0<1073741823?(P>>>0<j>>>0?j:P):2147483647);S=f[e>>2]|0;break}else S=r;while(0);f[e>>2]=S+1;e=(f[d>>2]|0)+(S>>>5<<2)|0;f[e>>2]=f[e>>2]&~(1<<(S&31));Q=N;R=w}S=~~+J(+(+Q+.5));e=f[a+68>>2]|0;f[e>>2]=S;S=~~+J(+(+R+.5));f[e+4>>2]=S;u=g;return}function Dc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=Oa,v=Oa,w=Oa,x=Oa,y=0,z=0,A=0,B=Oa,C=Oa,D=Oa,E=Oa,F=Oa,G=Oa,H=Oa,I=Oa,K=Oa,M=Oa,N=Oa,O=0,P=Oa,Q=Oa,R=0;g=u;u=u+48|0;h=g+40|0;i=g+36|0;j=g+24|0;k=g+12|0;l=g;m=a+48|0;o=f[c>>2]|0;c=o+1|0;do if((o|0)!=-1){p=((c>>>0)%3|0|0)==0?o+-2|0:c;if(!((o>>>0)%3|0)){q=o+2|0;r=p;break}else{q=o+-1|0;r=p;break}}else{q=-1;r=-1}while(0);o=f[(f[m>>2]|0)+28>>2]|0;m=f[o+(r<<2)>>2]|0;r=f[o+(q<<2)>>2]|0;q=f[a+52>>2]|0;o=f[q>>2]|0;c=(f[q+4>>2]|0)-o>>2;if(c>>>0<=m>>>0)Fq(q);p=o;o=f[p+(m<<2)>>2]|0;if(c>>>0<=r>>>0)Fq(q);q=f[p+(r<<2)>>2]|0;r=(o|0)<(e|0);if(!(r&(q|0)<(e|0))){do if(r)s=o;else{if((e|0)>0){s=e+-1|0;break}p=a+72|0;if((f[p>>2]|0)<=0){u=g;return}c=f[a+68>>2]|0;m=0;do{f[c+(m<<2)>>2]=0;m=m+1|0}while((m|0)<(f[p>>2]|0));u=g;return}while(0);r=a+72|0;p=f[r>>2]|0;m=X(p,s)|0;if((p|0)<=0){u=g;return}p=f[a+68>>2]|0;s=0;do{f[p+(s<<2)>>2]=f[d+(s+m<<2)>>2];s=s+1|0}while((s|0)<(f[r>>2]|0));u=g;return}r=a+72|0;s=f[r>>2]|0;m=X(s,o)|0;t=$(f[d+(m<<2)>>2]|0);v=$(f[d+(m+1<<2)>>2]|0);m=X(s,q)|0;w=$(f[d+(m<<2)>>2]|0);x=$(f[d+(m+1<<2)>>2]|0);if(!(w!=t|x!=v)){m=f[a+68>>2]|0;f[m>>2]=~~w;f[m+4>>2]=~~x;u=g;return}m=a+64|0;s=f[(f[m>>2]|0)+(e<<2)>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;p=a+60|0;c=f[p>>2]|0;if(!(b[c+84>>0]|0))y=f[(f[c+68>>2]|0)+(s<<2)>>2]|0;else y=s;f[i>>2]=y;y=b[c+24>>0]|0;f[h>>2]=f[i>>2];mb(c,h,y,j)|0;y=f[(f[m>>2]|0)+(o<<2)>>2]|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;o=f[p>>2]|0;if(!(b[o+84>>0]|0))z=f[(f[o+68>>2]|0)+(y<<2)>>2]|0;else z=y;f[i>>2]=z;z=b[o+24>>0]|0;f[h>>2]=f[i>>2];mb(o,h,z,k)|0;z=f[(f[m>>2]|0)+(q<<2)>>2]|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;q=f[p>>2]|0;if(!(b[q+84>>0]|0))A=f[(f[q+68>>2]|0)+(z<<2)>>2]|0;else A=z;f[i>>2]=A;A=b[q+24>>0]|0;f[h>>2]=f[i>>2];mb(q,h,A,l)|0;B=$(n[l>>2]);C=$(n[k>>2]);D=$(B-C);B=$(n[l+4>>2]);E=$(n[k+4>>2]);F=$(B-E);B=$(n[l+8>>2]);G=$(n[k+8>>2]);H=$(B-G);B=$($(n[j>>2])-C);C=$($(n[j+4>>2])-E);E=$($(n[j+8>>2])-G);G=$($($($(D*D)+$(0.0))+$(F*F))+$(H*H));if(G>$(0.0)){I=$($($($($(D*B)+$(0.0))+$(F*C))+$(H*E))/G);K=$(B-$(D*I));D=$(C-$(F*I));F=$(E-$(H*I));M=I;N=$(L($($($(F*F)+$($(D*D)+$($(K*K)+$(0.0))))/G)))}else{M=$(0.0);N=$(0.0)}G=$(w-t);w=$(x-v);x=$($(G*M)+t);t=$(G*N);G=$($(w*M)+v);v=$(w*N);N=$(x-v);w=$(G+t);M=$(x+v);v=$(G-t);j=X(f[r>>2]|0,e)|0;t=$(f[d+(j<<2)>>2]|0);G=$(f[d+(j+1<<2)>>2]|0);x=$(t-N);K=$(G-w);D=$(t-M);t=$(G-v);j=$($($(x*x)+$(0.0))+$(K*K))<$($($(D*D)+$(0.0))+$(t*t));d=a+76|0;e=a+80|0;r=f[e>>2]|0;k=f[a+84>>2]|0;l=(r|0)==(k<<5|0);if(j){do if(l)if((r+1|0)<0)Fq(d);else{j=k<<6;A=r+32&-32;ti(d,r>>>0<1073741823?(j>>>0<A>>>0?A:j):2147483647);O=f[e>>2]|0;break}else O=r;while(0);f[e>>2]=O+1;j=(f[d>>2]|0)+(O>>>5<<2)|0;f[j>>2]=f[j>>2]|1<<(O&31);P=N;Q=w}else{do if(l)if((r+1|0)<0)Fq(d);else{O=k<<6;j=r+32&-32;ti(d,r>>>0<1073741823?(O>>>0<j>>>0?j:O):2147483647);R=f[e>>2]|0;break}else R=r;while(0);f[e>>2]=R+1;e=(f[d>>2]|0)+(R>>>5<<2)|0;f[e>>2]=f[e>>2]&~(1<<(R&31));P=M;Q=v}R=~~+J(+(+P+.5));e=f[a+68>>2]|0;f[e>>2]=R;R=~~+J(+(+Q+.5));f[e+4>>2]=R;u=g;return}function Ec(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=Oa,F=Oa,G=Oa,H=0,I=0,J=0,K=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;e=i;j=i;while(1){k=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;e=(X(k>>>24^k,1540483477)|0)^(X(e,1540483477)|0);j=j+-4|0;if(j>>>0<=3)break;else d=d+4|0}d=i+-4|0;j=d&-4;l=d-j|0;m=g+(j+4)|0;o=e}else{l=i;m=g;o=i}switch(l|0){case 3:{p=h[m+2>>0]<<16^o;q=6;break}case 2:{p=o;q=6;break}case 1:{r=o;q=7;break}default:s=o}if((q|0)==6){r=h[m+1>>0]<<8^p;q=7}if((q|0)==7)s=X(r^h[m>>0],1540483477)|0;m=X(s>>>13^s,1540483477)|0;s=m>>>15^m;m=a+4|0;r=f[m>>2]|0;p=(r|0)==0;a:do if(!p){o=r+-1|0;l=(o&r|0)==0;if(!l)if(s>>>0<r>>>0)t=s;else t=(s>>>0)%(r>>>0)|0;else t=s&o;e=f[(f[a>>2]|0)+(t<<2)>>2]|0;if((e|0)!=0?(j=f[e>>2]|0,(j|0)!=0):0){e=(i|0)==0;if(l){if(e){l=j;while(1){d=f[l+4>>2]|0;if(!((d|0)==(s|0)|(d&o|0)==(t|0))){u=t;break a}d=b[l+8+11>>0]|0;if(!((d<<24>>24<0?f[l+12>>2]|0:d&255)|0)){v=l;break}l=f[l>>2]|0;if(!l){u=t;break a}}w=v+20|0;return w|0}else x=j;b:while(1){l=f[x+4>>2]|0;if(!((l|0)==(s|0)|(l&o|0)==(t|0))){u=t;break a}l=x+8|0;d=b[l+11>>0]|0;k=d<<24>>24<0;y=d&255;do if(((k?f[x+12>>2]|0:y)|0)==(i|0)){d=f[l>>2]|0;if(k)if(!(dl(d,g,i)|0)){v=x;q=63;break b}else break;if((b[g>>0]|0)==(d&255)<<24>>24){d=l;z=y;A=g;do{z=z+-1|0;d=d+1|0;if(!z){v=x;q=63;break b}A=A+1|0}while((b[d>>0]|0)==(b[A>>0]|0))}}while(0);x=f[x>>2]|0;if(!x){u=t;break a}}if((q|0)==63){w=v+20|0;return w|0}}if(e){o=j;while(1){y=f[o+4>>2]|0;if((y|0)!=(s|0)){if(y>>>0<r>>>0)B=y;else B=(y>>>0)%(r>>>0)|0;if((B|0)!=(t|0)){u=t;break a}}y=b[o+8+11>>0]|0;if(!((y<<24>>24<0?f[o+12>>2]|0:y&255)|0)){v=o;break}o=f[o>>2]|0;if(!o){u=t;break a}}w=v+20|0;return w|0}else C=j;c:while(1){o=f[C+4>>2]|0;if((o|0)!=(s|0)){if(o>>>0<r>>>0)D=o;else D=(o>>>0)%(r>>>0)|0;if((D|0)!=(t|0)){u=t;break a}}o=C+8|0;e=b[o+11>>0]|0;y=e<<24>>24<0;l=e&255;do if(((y?f[C+12>>2]|0:l)|0)==(i|0)){e=f[o>>2]|0;if(y)if(!(dl(e,g,i)|0)){v=C;q=63;break c}else break;if((b[g>>0]|0)==(e&255)<<24>>24){e=o;k=l;A=g;do{k=k+-1|0;e=e+1|0;if(!k){v=C;q=63;break c}A=A+1|0}while((b[e>>0]|0)==(b[A>>0]|0))}}while(0);C=f[C>>2]|0;if(!C){u=t;break a}}if((q|0)==63){w=v+20|0;return w|0}}else u=t}else u=0;while(0);t=yn(24)|0;oj(t+8|0,c);f[t+20>>2]=0;f[t+4>>2]=s;f[t>>2]=0;c=a+12|0;E=$(((f[c>>2]|0)+1|0)>>>0);F=$(r>>>0);G=$(n[a+16>>2]);do if(p|$(G*F)<E){C=r<<1|(r>>>0<3|(r+-1&r|0)!=0)&1;g=~~$(W($(E/G)))>>>0;bi(a,C>>>0<g>>>0?g:C);C=f[m>>2]|0;g=C+-1|0;if(!(g&C)){H=C;I=g&s;break}if(s>>>0<C>>>0){H=C;I=s}else{H=C;I=(s>>>0)%(C>>>0)|0}}else{H=r;I=u}while(0);u=(f[a>>2]|0)+(I<<2)|0;I=f[u>>2]|0;if(!I){r=a+8|0;f[t>>2]=f[r>>2];f[r>>2]=t;f[u>>2]=r;r=f[t>>2]|0;if(r|0){u=f[r+4>>2]|0;r=H+-1|0;if(r&H)if(u>>>0<H>>>0)J=u;else J=(u>>>0)%(H>>>0)|0;else J=u&r;K=(f[a>>2]|0)+(J<<2)|0;q=61}}else{f[t>>2]=f[I>>2];K=I;q=61}if((q|0)==61)f[K>>2]=t;f[c>>2]=(f[c>>2]|0)+1;v=t;w=v+20|0;return w|0}function Fc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0.0,H=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0,Q=0.0,R=0.0,S=0,T=0.0,U=0,V=0,W=0,X=0.0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0.0,da=0,ea=0.0;g=a+4|0;i=f[g>>2]|0;j=a+100|0;if(i>>>0<(f[j>>2]|0)>>>0){f[g>>2]=i+1;k=h[i>>0]|0;l=0}else{k=Pi(a)|0;l=0}a:while(1){switch(k|0){case 46:{m=8;break a;break}case 48:break;default:{n=0;o=0;p=1.0;q=0.0;r=0;s=k;t=l;u=0;v=0;w=0;x=0;break a}}i=f[g>>2]|0;if(i>>>0<(f[j>>2]|0)>>>0){f[g>>2]=i+1;k=h[i>>0]|0;l=1;continue}else{k=Pi(a)|0;l=1;continue}}if((m|0)==8){k=f[g>>2]|0;if(k>>>0<(f[j>>2]|0)>>>0){f[g>>2]=k+1;y=h[k>>0]|0}else y=Pi(a)|0;if((y|0)==48){k=0;i=0;while(1){z=f[g>>2]|0;if(z>>>0<(f[j>>2]|0)>>>0){f[g>>2]=z+1;A=h[z>>0]|0}else A=Pi(a)|0;z=lo(k|0,i|0,-1,-1)|0;B=I;if((A|0)==48){k=z;i=B}else{n=1;o=0;p=1.0;q=0.0;r=0;s=A;t=1;u=0;v=0;w=z;x=B;break}}}else{n=1;o=0;p=1.0;q=0.0;r=0;s=y;t=l;u=0;v=0;w=0;x=0}}while(1){l=s+-48|0;y=s|32;if(l>>>0>=10){A=(s|0)==46;if(!(A|(y+-97|0)>>>0<6)){C=s;break}if(A)if(!n){D=1;E=o;F=p;G=q;H=r;J=t;K=v;L=u;M=v;N=u}else{C=46;break}else m=20}else m=20;if((m|0)==20){m=0;A=(s|0)>57?y+-87|0:l;do if(!((u|0)<0|(u|0)==0&v>>>0<8))if((u|0)<0|(u|0)==0&v>>>0<14){O=p*.0625;P=o;Q=O;R=q+O*+(A|0);S=r;break}else{l=(o|0)!=0|(A|0)==0;P=l?o:1;Q=p;R=l?q:q+p*.5;S=r;break}else{P=o;Q=p;R=q;S=A+(r<<4)|0}while(0);A=lo(v|0,u|0,1,0)|0;D=n;E=P;F=Q;G=R;H=S;J=1;K=w;L=x;M=A;N=I}A=f[g>>2]|0;if(A>>>0<(f[j>>2]|0)>>>0){f[g>>2]=A+1;n=D;o=E;p=F;q=G;r=H;s=h[A>>0]|0;t=J;u=N;v=M;w=K;x=L;continue}else{n=D;o=E;p=F;q=G;r=H;s=Pi(a)|0;t=J;u=N;v=M;w=K;x=L;continue}}do if(!t){L=(f[j>>2]|0)==0;if(!L)f[g>>2]=(f[g>>2]|0)+-1;if(e){if(!L)f[g>>2]=(f[g>>2]|0)+-1;if(!((n|0)==0|L))f[g>>2]=(f[g>>2]|0)+-1}else kn(a,0);T=+(d|0)*0.0}else{L=(n|0)==0;K=L?v:w;M=L?u:x;if((u|0)<0|(u|0)==0&v>>>0<8){L=r;N=v;J=u;while(1){s=L<<4;H=N;N=lo(N|0,J|0,1,0)|0;if(!((J|0)<0|(J|0)==0&H>>>0<7)){U=s;break}else{L=s;J=I}}}else U=r;if((C|32|0)==112){J=Pe(a,e)|0;L=I;if((J|0)==0&(L|0)==-2147483648){if(!e){kn(a,0);T=0.0;break}if(!(f[j>>2]|0)){V=0;W=0}else{f[g>>2]=(f[g>>2]|0)+-1;V=0;W=0}}else{V=J;W=L}}else if(!(f[j>>2]|0)){V=0;W=0}else{f[g>>2]=(f[g>>2]|0)+-1;V=0;W=0}L=jo(K|0,M|0,2)|0;J=lo(L|0,I|0,-32,-1)|0;L=lo(J|0,I|0,V|0,W|0)|0;J=I;if(!U){T=+(d|0)*0.0;break}N=0-c|0;s=((N|0)<0)<<31>>31;if((J|0)>(s|0)|(J|0)==(s|0)&L>>>0>N>>>0){N=Br()|0;f[N>>2]=34;T=+(d|0)*1797693134862315708145274.0e284*1797693134862315708145274.0e284;break}N=c+-106|0;s=((N|0)<0)<<31>>31;if((J|0)<(s|0)|(J|0)==(s|0)&L>>>0<N>>>0){N=Br()|0;f[N>>2]=34;T=+(d|0)*2.2250738585072014e-308*2.2250738585072014e-308;break}if((U|0)>-1){G=q;N=U;s=L;H=J;while(1){E=!(G>=.5);o=N<<1|(E^1)&1;F=G+(E?G:G+-1.0);E=lo(s|0,H|0,-1,-1)|0;D=I;if((o|0)>-1){G=F;N=o;s=E;H=D}else{X=F;Y=o;Z=E;_=D;break}}}else{X=q;Y=U;Z=L;_=J}H=((b|0)<0)<<31>>31;s=no(32,0,c|0,((c|0)<0)<<31>>31|0)|0;N=lo(s|0,I|0,Z|0,_|0)|0;s=I;if((s|0)<(H|0)|(s|0)==(H|0)&N>>>0<b>>>0)if((N|0)>0){$=N;m=59}else{aa=0;ba=84;m=61}else{$=b;m=59}if((m|0)==59)if(($|0)<53){aa=$;ba=84-$|0;m=61}else{ca=0.0;da=$;ea=+(d|0)}if((m|0)==61){G=+(d|0);ca=+Zq(+gk(1.0,ba),G);da=aa;ea=G}N=(Y&1|0)==0&(X!=0.0&(da|0)<32);G=(N?0.0:X)*ea+(ca+ea*+((Y+(N&1)|0)>>>0))-ca;if(!(G!=0.0)){N=Br()|0;f[N>>2]=34}T=+_q(G,Z)}while(0);return +T}function Gc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;g=u;u=u+16|0;h=g+4|0;i=g;if(!(Dh(a,d)|0)){j=0;u=g;return j|0}d=a+84|0;k=f[d>>2]|0;l=a+88|0;m=f[l>>2]|0;if((m|0)!=(k|0))f[l>>2]=m+(~((m+-4-k|0)>>>2)<<2);f[d>>2]=0;f[l>>2]=0;f[a+92>>2]=0;if(k|0)ur(k);k=a+72|0;l=f[k>>2]|0;d=a+76|0;if((f[d>>2]|0)!=(l|0))f[d>>2]=l;f[k>>2]=0;f[d>>2]=0;f[a+80>>2]=0;if(l|0)ur(l);l=a+64|0;d=f[l>>2]|0;if((f[d+4>>2]|0)!=(f[d>>2]|0)){k=a+12|0;m=e+84|0;n=e+68|0;o=c+96|0;p=a+24|0;q=0;r=d;do{f[i>>2]=(q>>>0)/3|0;f[h>>2]=f[i>>2];d=bk(r,h)|0;r=f[l>>2]|0;do if(!d){s=f[(f[r+12>>2]|0)+(q<<2)>>2]|0;if((s|0)==-1){t=(f[a>>2]|0)+(q>>>5<<2)|0;f[t>>2]=f[t>>2]|1<<(q&31);t=q+1|0;v=((t>>>0)%3|0|0)==0?q+-2|0:t;if((v|0)==-1)w=-1;else w=f[(f[r>>2]|0)+(v<<2)>>2]|0;v=(f[k>>2]|0)+(w>>>5<<2)|0;f[v>>2]=f[v>>2]|1<<(w&31);v=(((q>>>0)%3|0|0)==0?2:-1)+q|0;if((v|0)==-1)x=-1;else x=f[(f[r>>2]|0)+(v<<2)>>2]|0;v=(f[k>>2]|0)+(x>>>5<<2)|0;f[v>>2]=f[v>>2]|1<<(x&31);break}if(s>>>0>=q>>>0){v=q+1|0;t=((v>>>0)%3|0|0)==0?q+-2|0:v;y=s+(((s>>>0)%3|0|0)==0?2:-1)|0;z=(t|0)==-1;if(!(b[m>>0]|0)){if(z)A=-1;else A=f[(f[o>>2]|0)+(((t|0)/3|0)*12|0)+(((t|0)%3|0)<<2)>>2]|0;B=(y|0)==-1;if(B)C=-1;else C=f[(f[o>>2]|0)+(((y|0)/3|0)*12|0)+(((y|0)%3|0)<<2)>>2]|0;D=f[n>>2]|0;if((f[D+(A<<2)>>2]|0)==(f[D+(C<<2)>>2]|0)){E=t+1|0;if(z)F=-1;else F=((E>>>0)%3|0|0)==0?t+-2|0:E;do if(!B)if(!((y>>>0)%3|0)){G=y+2|0;break}else{G=y+-1|0;break}else G=-1;while(0);if((F|0)==-1)H=-1;else H=f[(f[o>>2]|0)+(((F|0)/3|0)*12|0)+(((F|0)%3|0)<<2)>>2]|0;if((G|0)==-1)I=-1;else I=f[(f[o>>2]|0)+(((G|0)/3|0)*12|0)+(((G|0)%3|0)<<2)>>2]|0;if((f[D+(H<<2)>>2]|0)==(f[D+(I<<2)>>2]|0))break}}else{if(z)J=-1;else J=f[(f[o>>2]|0)+(((t|0)/3|0)*12|0)+(((t|0)%3|0)<<2)>>2]|0;B=(y|0)==-1;if(B)K=-1;else K=f[(f[o>>2]|0)+(((y|0)/3|0)*12|0)+(((y|0)%3|0)<<2)>>2]|0;if((J|0)==(K|0)){E=t+1|0;if(z)L=-1;else L=((E>>>0)%3|0|0)==0?t+-2|0:E;do if(!B)if(!((y>>>0)%3|0)){M=y+2|0;break}else{M=y+-1|0;break}else M=-1;while(0);if((L|0)==-1)N=-1;else N=f[(f[o>>2]|0)+(((L|0)/3|0)*12|0)+(((L|0)%3|0)<<2)>>2]|0;if((M|0)==-1)O=-1;else O=f[(f[o>>2]|0)+(((M|0)/3|0)*12|0)+(((M|0)%3|0)<<2)>>2]|0;if((N|0)==(O|0))break}}b[p>>0]=0;y=f[a>>2]|0;B=y+(q>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(q&31);B=y+(s>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(s&31);B=((v>>>0)%3|0|0)==0?q+-2|0:v;if((B|0)==-1)P=-1;else P=f[(f[r>>2]|0)+(B<<2)>>2]|0;B=(f[k>>2]|0)+(P>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(P&31);B=(((q>>>0)%3|0|0)==0?2:-1)+q|0;if((B|0)==-1)Q=-1;else Q=f[(f[r>>2]|0)+(B<<2)>>2]|0;B=(f[k>>2]|0)+(Q>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(Q&31);B=s+1|0;y=((B>>>0)%3|0|0)==0?s+-2|0:B;if((y|0)==-1)R=-1;else R=f[(f[r>>2]|0)+(y<<2)>>2]|0;y=(f[k>>2]|0)+(R>>>5<<2)|0;f[y>>2]=f[y>>2]|1<<(R&31);y=(((s>>>0)%3|0|0)==0?2:-1)+s|0;if((y|0)==-1)S=-1;else S=f[(f[r>>2]|0)+(y<<2)>>2]|0;y=(f[k>>2]|0)+(S>>>5<<2)|0;f[y>>2]=f[y>>2]|1<<(S&31)}}while(0);q=q+1|0}while(q>>>0<(f[r+4>>2]|0)-(f[r>>2]|0)>>2>>>0)}if((c|0)!=0&(e|0)!=0){Sc(a,c,e);j=1;u=g;return j|0}else{od(a,0,0);j=1;u=g;return j|0}return 0}function Hc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;d=u;u=u+32|0;e=d+12|0;g=d+8|0;h=d+4|0;i=d;j=a+8|0;a:do if(f[j>>2]|0?(k=f[a>>2]|0,l=a+4|0,f[a>>2]=l,f[(f[l>>2]|0)+8>>2]=0,f[l>>2]=0,f[j>>2]=0,m=f[k+4>>2]|0,n=(m|0)==0?k:m,n|0):0){m=a+4|0;k=n;n=f[b>>2]|0;while(1){if((n|0)==(f[c>>2]|0))break;o=k+16|0;f[o>>2]=f[n+16>>2];if((k|0)!=(n|0)){f[h>>2]=f[n+20>>2];f[i>>2]=n+24;f[g>>2]=f[h>>2];f[e>>2]=f[i>>2];Pc(k+20|0,g,e)}p=k+8|0;q=f[p>>2]|0;do if(q){r=f[q>>2]|0;if((r|0)==(k|0)){f[q>>2]=0;s=f[q+4>>2]|0;if(!s){t=q;break}else v=s;while(1){s=f[v>>2]|0;if(s|0){v=s;continue}s=f[v+4>>2]|0;if(!s)break;else v=s}t=v;break}else{f[q+4>>2]=0;if(!r){t=q;break}else w=r;while(1){s=f[w>>2]|0;if(s|0){w=s;continue}s=f[w+4>>2]|0;if(!s)break;else w=s}t=w;break}}else t=0;while(0);q=f[l>>2]|0;do if(q){r=f[o>>2]|0;s=q;while(1){if((r|0)<(f[s+16>>2]|0)){x=f[s>>2]|0;if(!x){y=22;break}else z=x}else{A=s+4|0;x=f[A>>2]|0;if(!x){y=25;break}else z=x}s=z}if((y|0)==22){y=0;B=s;C=s;break}else if((y|0)==25){y=0;B=s;C=A;break}}else{B=l;C=l}while(0);f[k>>2]=0;f[k+4>>2]=0;f[p>>2]=B;f[C>>2]=k;q=f[f[a>>2]>>2]|0;if(!q)D=k;else{f[a>>2]=q;D=f[C>>2]|0}Me(f[m>>2]|0,D);f[j>>2]=(f[j>>2]|0)+1;q=f[n+4>>2]|0;if(!q){o=n+8|0;r=f[o>>2]|0;if((f[r>>2]|0)==(n|0))E=r;else{r=o;do{o=f[r>>2]|0;r=o+8|0;x=f[r>>2]|0}while((f[x>>2]|0)!=(o|0));E=x}}else{r=q;while(1){p=f[r>>2]|0;if(!p)break;else r=p}E=r}f[b>>2]=E;if(!t)break a;else{k=t;n=E}}n=f[k+8>>2]|0;if(!n)F=k;else{m=n;while(1){n=f[m+8>>2]|0;if(!n)break;else m=n}F=m}Oj(a,F)}while(0);F=f[b>>2]|0;E=f[c>>2]|0;if((F|0)==(E|0)){u=d;return}c=a+4|0;t=a+4|0;D=F;while(1){Ig(e,a,D+16|0);F=f[c>>2]|0;do if(F){C=f[e>>2]|0;B=f[C+16>>2]|0;A=F;while(1){if((B|0)<(f[A+16>>2]|0)){z=f[A>>2]|0;if(!z){y=43;break}else G=z}else{H=A+4|0;z=f[H>>2]|0;if(!z){y=46;break}else G=z}A=G}if((y|0)==43){y=0;I=A;J=A;K=C;break}else if((y|0)==46){y=0;I=A;J=H;K=C;break}}else{I=c;J=c;K=f[e>>2]|0}while(0);f[K>>2]=0;f[K+4>>2]=0;f[K+8>>2]=I;f[J>>2]=K;F=f[f[a>>2]>>2]|0;if(!F)L=K;else{f[a>>2]=F;L=f[J>>2]|0}Me(f[t>>2]|0,L);f[j>>2]=(f[j>>2]|0)+1;F=f[D+4>>2]|0;if(!F){m=D+8|0;B=f[m>>2]|0;if((f[B>>2]|0)==(D|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|0;if((E|0)>=(A|0))break;else y=L}}}else N=16}else N=16;if((N|0)==16?(N=0,y=b+(z<<2)|0,A=c+(z<<2)|0,E=f[g>>2]|0,(E|0)>0):0){B=0;D=b+((X(x+-2|0,e)|0)<<2)|0;I=E;while(1){if((I|0)>0){E=0;do{C=f[D+(E<<2)>>2]|0;H=f[n>>2]|0;if((C|0)>(H|0)){J=f[o>>2]|0;f[J+(E<<2)>>2]=H;O=J}else{J=f[p>>2]|0;H=f[o>>2]|0;f[H+(E<<2)>>2]=(C|0)<(J|0)?J:C;O=H}E=E+1|0}while((E|0)<(f[g>>2]|0));P=O}else P=f[o>>2]|0;E=(f[y+(B<<2)>>2]|0)-(f[P+(B<<2)>>2]|0)|0;H=A+(B<<2)|0;f[H>>2]=E;if((E|0)>=(f[q>>2]|0)){if((E|0)>(f[s>>2]|0)){Q=E-(f[r>>2]|0)|0;N=29}}else{Q=(f[r>>2]|0)+E|0;N=29}if((N|0)==29){N=0;f[H>>2]=Q}B=B+1|0;I=f[g>>2]|0;if((B|0)>=(I|0))break;else D=P}}if((x|0)<=2)break a}Fq(i)}while(0);if((e|0)>0)rj(h|0,0,e<<2|0)|0;e=f[g>>2]|0;if((e|0)<=0){sr(h);return 1}i=a+16|0;P=a+32|0;Q=a+12|0;O=a+28|0;L=a+20|0;M=a+24|0;a=0;K=h;G=e;while(1){if((G|0)>0){e=0;do{F=f[K+(e<<2)>>2]|0;d=f[i>>2]|0;if((F|0)>(d|0)){l=f[P>>2]|0;f[l+(e<<2)>>2]=d;R=l}else{l=f[Q>>2]|0;d=f[P>>2]|0;f[d+(e<<2)>>2]=(F|0)<(l|0)?l:F;R=d}e=e+1|0}while((e|0)<(f[g>>2]|0));S=R}else S=f[P>>2]|0;e=(f[b+(a<<2)>>2]|0)-(f[S+(a<<2)>>2]|0)|0;d=c+(a<<2)|0;f[d>>2]=e;if((e|0)>=(f[O>>2]|0)){if((e|0)>(f[M>>2]|0)){T=e-(f[L>>2]|0)|0;N=56}}else{T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0;if((F|0)>=(C|0))break;else z=K}}}else M=13;if((M|0)==13?(M=0,z=b+(A<<2)|0,C=c+(A<<2)|0,F=f[g>>2]|0,(F|0)>0):0){B=0;E=b+((X(y+-2|0,e)|0)<<2)|0;H=F;while(1){if((H|0)>0){F=0;do{D=f[E+(F<<2)>>2]|0;G=f[n>>2]|0;if((D|0)>(G|0)){I=f[o>>2]|0;f[I+(F<<2)>>2]=G;N=I}else{I=f[p>>2]|0;G=f[o>>2]|0;f[G+(F<<2)>>2]=(D|0)<(I|0)?I:D;N=G}F=F+1|0}while((F|0)<(f[g>>2]|0));O=N}else O=f[o>>2]|0;F=(f[z+(B<<2)>>2]|0)-(f[O+(B<<2)>>2]|0)|0;G=C+(B<<2)|0;f[G>>2]=F;if((F|0)>=(f[q>>2]|0)){if((F|0)>(f[s>>2]|0)){P=F-(f[r>>2]|0)|0;M=26}}else{P=(f[r>>2]|0)+F|0;M=26}if((M|0)==26){M=0;f[G>>2]=P}B=B+1|0;H=f[g>>2]|0;if((B|0)>=(H|0))break;else E=O}}if((y|0)<=2)break a}Fq(i)}while(0);if((e|0)>0)rj(h|0,0,e<<2|0)|0;e=f[g>>2]|0;if((e|0)<=0){sr(h);return 1}i=a+16|0;O=a+32|0;P=a+12|0;N=a+28|0;K=a+20|0;L=a+24|0;a=0;J=h;d=e;while(1){if((d|0)>0){e=0;do{l=f[J+(e<<2)>>2]|0;j=f[i>>2]|0;if((l|0)>(j|0)){k=f[O>>2]|0;f[k+(e<<2)>>2]=j;Q=k}else{k=f[P>>2]|0;j=f[O>>2]|0;f[j+(e<<2)>>2]=(l|0)<(k|0)?k:l;Q=j}e=e+1|0}while((e|0)<(f[g>>2]|0));R=Q}else R=f[O>>2]|0;e=(f[b+(a<<2)>>2]|0)-(f[R+(a<<2)>>2]|0)|0;j=c+(a<<2)|0;f[j>>2]=e;if((e|0)>=(f[N>>2]|0)){if((e|0)>(f[L>>2]|0)){S=e-(f[K>>2]|0)|0;M=53}}else{S=(f[K>>2]|0)+e|0;M=53}if((M|0)==53){M=0;f[j>>2]=S}a=a+1|0;d=f[g>>2]|0;if((a|0)>=(d|0))break;else J=R}sr(h);return 1}function Mc(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;h=u;u=u+48|0;i=h+28|0;j=h+24|0;k=h;l=h+12|0;m=h+40|0;if((c|0)<0){n=0;u=h;return n|0}if(!c){n=1;u=h;return n|0}o=(d|0)>1;p=o?d:1;f[k>>2]=0;d=k+4|0;f[d>>2]=0;f[k+8>>2]=0;lk(k,c);q=k+8|0;if(o){o=0;r=0;while(1){s=1;t=f[a+(r<<2)>>2]|0;do{v=f[a+(s+r<<2)>>2]|0;t=t>>>0<v>>>0?v:t;s=s+1|0}while((s|0)!=(p|0));s=(_(t|0)|0)^31;v=t>>>0>o>>>0?t:o;w=(t|0)==0?1:s+1|0;f[i>>2]=w;s=f[d>>2]|0;if(s>>>0<(f[q>>2]|0)>>>0){f[s>>2]=w;f[d>>2]=s+4}else Oi(k,i);r=r+p|0;if((r|0)>=(c|0)){x=v;break}else o=v}}else{o=0;r=0;while(1){v=f[a+(o<<2)>>2]|0;s=(_(v|0)|0)^31;w=v>>>0>r>>>0?v:r;y=(v|0)==0?1:s+1|0;f[i>>2]=y;s=f[d>>2]|0;if(s>>>0<(f[q>>2]|0)>>>0){f[s>>2]=y;f[d>>2]=s+4}else Oi(k,i);o=o+p|0;if((o|0)>=(c|0)){x=w;break}else r=w}}f[l>>2]=0;r=l+4|0;f[r>>2]=0;f[l+8>>2]=0;o=f[k>>2]|0;q=(f[d>>2]|0)-o|0;w=q>>2;if(w){if(w>>>0>1073741823)Fq(l);s=yn(q)|0;f[r>>2]=s;f[l>>2]=s;f[l+8>>2]=s+(w<<2);w=s;if((q|0)>0){y=s+(q>>>2<<2)|0;eh(s|0,o|0,q|0)|0;f[r>>2]=y;q=y-w>>2;if((y|0)==(s|0)){z=q;A=s;B=0;C=0}else{y=0;o=0;v=0;while(1){D=lo(o|0,v|0,f[s+(y<<2)>>2]|0,0)|0;E=I;y=y+1|0;if(y>>>0>=q>>>0){z=q;A=s;B=D;C=E;break}else{o=D;v=E}}}}else{F=w;G=18}}else{F=0;G=18}if((G|0)==18){z=0;A=F;B=0;C=0}F=Gg(A,z,32,i)|0;z=I;A=f[i>>2]<<3;w=jo(A|0,((A|0)<0)<<31>>31|0,1)|0;A=I;v=In(B|0,C|0,p|0,0)|0;C=lo(F|0,z|0,v|0,I|0)|0;v=lo(C|0,I|0,w|0,A|0)|0;A=I;w=f[l>>2]|0;if(w|0){l=f[r>>2]|0;if((l|0)!=(w|0))f[r>>2]=l+(~((l+-4-w|0)>>>2)<<2);ur(w)}w=Gg(a,c,x,i)|0;l=f[i>>2]|0;r=((x-l|0)/64|0)+l<<3;C=l<<3;z=lo(w|0,I|0,C|0,((C|0)<0)<<31>>31|0)|0;C=lo(z|0,I|0,r|0,((r|0)<0)<<31>>31|0)|0;r=I;z=(_((x>>>0>1?x:1)|0)|0)^30;if(e){f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;w=yn(32)|0;f[i>>2]=w;f[i+8>>2]=-2147483616;f[i+4>>2]=22;F=w;B=14972;o=F+22|0;do{b[F>>0]=b[B>>0]|0;F=F+1|0;B=B+1|0}while((F|0)<(o|0));b[w+22>>0]=0;w=(Hh(e,i)|0)==0;if((b[i+11>>0]|0)<0)ur(f[i>>2]|0);if(!w){f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;w=yn(32)|0;f[i>>2]=w;f[i+8>>2]=-2147483616;f[i+4>>2]=22;F=w;B=14972;o=F+22|0;do{b[F>>0]=b[B>>0]|0;F=F+1|0;B=B+1|0}while((F|0)<(o|0));b[w+22>>0]=0;w=Sk(e,i)|0;if((b[i+11>>0]|0)<0)ur(f[i>>2]|0);H=w}else G=32}else G=32;if((G|0)==32)H=z>>>0<18&((A|0)>(r|0)|(A|0)==(r|0)&v>>>0>=C>>>0)&1;b[m>>0]=H;C=g+16|0;v=f[C+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[C>>2]|0)>>>0>0)){f[j>>2]=f[g+4>>2];f[i>>2]=f[j>>2];Ke(g,i,m,m+1|0)|0}switch(H|0){case 0:{J=wd(a,c,p,k,g)|0;break}case 1:{J=Vc(a,c,x,l,e,g)|0;break}default:J=0}g=f[k>>2]|0;if(g|0){k=f[d>>2]|0;if((k|0)!=(g|0))f[d>>2]=k+(~((k+-4-g|0)>>>2)<<2);ur(g)}n=J;u=h;return n|0}function Nc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;if((b|0)<0)return;c=a+12|0;d=f[c>>2]|0;e=f[a+8>>2]|0;g=e;h=d;if(d-e>>2>>>0<=b>>>0)return;e=g+(b<<2)|0;d=f[(f[e>>2]|0)+56>>2]|0;i=f[(f[g+(b<<2)>>2]|0)+60>>2]|0;g=e+4|0;if((g|0)!=(h|0)){j=g;g=e;do{k=f[j>>2]|0;f[j>>2]=0;l=f[g>>2]|0;f[g>>2]=k;if(l|0){k=l+88|0;m=f[k>>2]|0;f[k>>2]=0;if(m|0){k=f[m+8>>2]|0;if(k|0){n=m+12|0;if((f[n>>2]|0)!=(k|0))f[n>>2]=k;ur(k)}ur(m)}m=f[l+68>>2]|0;if(m|0){k=l+72|0;n=f[k>>2]|0;if((n|0)!=(m|0))f[k>>2]=n+(~((n+-4-m|0)>>>2)<<2);ur(m)}m=l+64|0;n=f[m>>2]|0;f[m>>2]=0;if(n|0){m=f[n>>2]|0;if(m|0){k=n+4|0;if((f[k>>2]|0)!=(m|0))f[k>>2]=m;ur(m)}ur(n)}ur(l)}j=j+4|0;g=g+4|0}while((j|0)!=(h|0));j=f[c>>2]|0;if((j|0)!=(g|0)){o=g;p=j;q=24}}else{o=e;p=h;q=24}if((q|0)==24){q=p;do{p=q+-4|0;f[c>>2]=p;h=f[p>>2]|0;f[p>>2]=0;if(h|0){p=h+88|0;e=f[p>>2]|0;f[p>>2]=0;if(e|0){p=f[e+8>>2]|0;if(p|0){j=e+12|0;if((f[j>>2]|0)!=(p|0))f[j>>2]=p;ur(p)}ur(e)}e=f[h+68>>2]|0;if(e|0){p=h+72|0;j=f[p>>2]|0;if((j|0)!=(e|0))f[p>>2]=j+(~((j+-4-e|0)>>>2)<<2);ur(e)}e=h+64|0;j=f[e>>2]|0;f[e>>2]=0;if(j|0){e=f[j>>2]|0;if(e|0){p=j+4|0;if((f[p>>2]|0)!=(e|0))f[p>>2]=e;ur(e)}ur(j)}ur(h)}q=f[c>>2]|0}while((q|0)!=(o|0))}o=f[a+4>>2]|0;a:do if(o|0){q=o+44|0;c=f[q>>2]|0;h=f[o+40>>2]|0;while(1){if((h|0)==(c|0))break a;r=h+4|0;if((f[(f[h>>2]|0)+40>>2]|0)==(i|0))break;else h=r}if((r|0)!=(c|0)){j=r;e=h;do{p=f[j>>2]|0;f[j>>2]=0;g=f[e>>2]|0;f[e>>2]=p;if(g|0){aj(g);ur(g)}j=j+4|0;e=e+4|0}while((j|0)!=(c|0));j=f[q>>2]|0;if((j|0)==(e|0))break;else{s=e;t=j}}else{s=h;t=c}j=t;do{g=j+-4|0;f[q>>2]=g;p=f[g>>2]|0;f[g>>2]=0;if(p|0){aj(p);ur(p)}j=f[q>>2]|0}while((j|0)!=(s|0))}while(0);b:do if((d|0)<5){s=f[a+20+(d*12|0)>>2]|0;t=a+20+(d*12|0)+4|0;r=f[t>>2]|0;i=r;c:do if((s|0)==(r|0))u=s;else{o=s;while(1){if((f[o>>2]|0)==(b|0)){u=o;break c}o=o+4|0;if((o|0)==(r|0))break b}}while(0);if((u|0)!=(r|0)){s=u+4|0;o=i-s|0;j=o>>2;if(!j)v=r;else{pm(u|0,s|0,o|0)|0;v=f[t>>2]|0}o=u+(j<<2)|0;if((v|0)!=(o|0))f[t>>2]=v+(~((v+-4-o|0)>>>2)<<2)}}while(0);v=f[a+24>>2]|0;u=f[a+20>>2]|0;d=u;if((v|0)!=(u|0)){o=v-u>>2;u=0;do{v=d+(u<<2)|0;j=f[v>>2]|0;if((j|0)>(b|0))f[v>>2]=j+-1;u=u+1|0}while(u>>>0<o>>>0)}o=f[a+36>>2]|0;u=f[a+32>>2]|0;d=u;if((o|0)!=(u|0)){j=o-u>>2;u=0;do{o=d+(u<<2)|0;v=f[o>>2]|0;if((v|0)>(b|0))f[o>>2]=v+-1;u=u+1|0}while(u>>>0<j>>>0)}j=f[a+48>>2]|0;u=f[a+44>>2]|0;d=u;if((j|0)!=(u|0)){v=j-u>>2;u=0;do{j=d+(u<<2)|0;o=f[j>>2]|0;if((o|0)>(b|0))f[j>>2]=o+-1;u=u+1|0}while(u>>>0<v>>>0)}v=f[a+60>>2]|0;u=f[a+56>>2]|0;d=u;if((v|0)!=(u|0)){o=v-u>>2;u=0;do{v=d+(u<<2)|0;j=f[v>>2]|0;if((j|0)>(b|0))f[v>>2]=j+-1;u=u+1|0}while(u>>>0<o>>>0)}o=f[a+72>>2]|0;u=f[a+68>>2]|0;a=u;if((o|0)==(u|0))return;d=o-u>>2;u=0;do{o=a+(u<<2)|0;j=f[o>>2]|0;if((j|0)>(b|0))f[o>>2]=j+-1;u=u+1|0}while(u>>>0<d>>>0);return}function Oc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;d=u;u=u+32|0;e=d+16|0;g=d;h=c+4|0;i=f[(f[h>>2]|0)+48>>2]|0;j=c+12|0;c=f[j>>2]|0;k=yn(32)|0;f[e>>2]=k;f[e+8>>2]=-2147483616;f[e+4>>2]=17;l=k;m=14860;n=l+17|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[k+17>>0]=0;k=i+16|0;o=f[k>>2]|0;if(o){p=k;q=o;a:while(1){o=q;while(1){if((f[o+16>>2]|0)>=(c|0))break;r=f[o+4>>2]|0;if(!r){s=p;break a}else o=r}q=f[o>>2]|0;if(!q){s=o;break}else p=o}if(((s|0)!=(k|0)?(c|0)>=(f[s+16>>2]|0):0)?(c=s+20|0,(Hh(c,e)|0)!=0):0)t=Nk(c,e,-1)|0;else v=10}else v=10;if((v|0)==10)t=Nk(i,e,-1)|0;if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);i=(1<<t)+-1|0;f[e>>2]=-1;f[e+4>>2]=-1;f[e+8>>2]=-1;f[e+12>>2]=-1;if(i&1|0?(t=(_(i|0)|0)^31,(t+-1|0)>>>0<=28):0){f[e>>2]=t+1;i=2<<t;f[e+4>>2]=i+-1;t=i+-2|0;f[e+8>>2]=t;f[e+12>>2]=(t|0)/2|0}t=Wi(f[j>>2]|0,f[h>>2]|0)|0;i=f[(f[h>>2]|0)+48>>2]|0;c=f[j>>2]|0;s=yn(32)|0;f[g>>2]=s;f[g+8>>2]=-2147483616;f[g+4>>2]=17;l=s;m=14732;n=l+17|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[s+17>>0]=0;s=i+16|0;m=f[s>>2]|0;if(m){l=s;n=m;b:while(1){m=n;while(1){if((f[m+16>>2]|0)>=(c|0))break;k=f[m+4>>2]|0;if(!k){w=l;break b}else m=k}n=f[m>>2]|0;if(!n){w=m;break}else l=m}if(((w|0)!=(s|0)?(c|0)>=(f[w+16>>2]|0):0)?(c=w+20|0,(Hh(c,g)|0)!=0):0)x=Nk(c,g,t)|0;else v=25}else v=25;if((v|0)==25)x=Nk(i,g,t)|0;if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);switch(x|0){case 6:{x=f[j>>2]|0;t=f[h>>2]|0;i=f[(f[(f[t+4>>2]|0)+8>>2]|0)+(x<<2)>>2]|0;do if((Qa[f[(f[t>>2]|0)+8>>2]&127](t)|0)==1){Gf(g,t,6,x,e,514);c=f[g>>2]|0;if(!c){f[g>>2]=0;y=g;v=34;break}else{z=g;A=c;break}}else{y=g;v=34}while(0);if((v|0)==34){x=yn(24)|0;f[x+4>>2]=i;i=x+8|0;f[i>>2]=f[e>>2];f[i+4>>2]=f[e+4>>2];f[i+8>>2]=f[e+8>>2];f[i+12>>2]=f[e+12>>2];f[x>>2]=2672;i=x;f[g>>2]=i;z=y;A=i}f[a>>2]=A;f[z>>2]=0;u=d;return}case 0:{z=f[j>>2]|0;j=f[h>>2]|0;h=f[(f[(f[j+4>>2]|0)+8>>2]|0)+(z<<2)>>2]|0;do if((Qa[f[(f[j>>2]|0)+8>>2]&127](j)|0)==1){Gf(g,j,0,z,e,514);A=f[g>>2]|0;if(!A){f[g>>2]=0;B=g;v=41;break}else{C=g;D=A;break}}else{B=g;v=41}while(0);if((v|0)==41){v=yn(24)|0;f[v+4>>2]=h;h=v+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[v>>2]=2672;e=v;f[g>>2]=e;C=B;D=e}f[a>>2]=D;f[C>>2]=0;u=d;return}default:{f[a>>2]=0;u=d;return}}}function Pc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;e=a+8|0;a:do if(f[e>>2]|0?(g=f[a>>2]|0,h=a+4|0,f[a>>2]=h,f[(f[h>>2]|0)+8>>2]=0,f[h>>2]=0,f[e>>2]=0,i=f[g+4>>2]|0,j=(i|0)==0?g:i,j|0):0){i=a+4|0;g=j;j=f[c>>2]|0;while(1){if((j|0)==(f[d>>2]|0))break;k=g+16|0;im(k,j+16|0)|0;im(g+28|0,j+28|0)|0;l=g+8|0;m=f[l>>2]|0;do if(m){n=f[m>>2]|0;if((n|0)==(g|0)){f[m>>2]=0;o=f[m+4>>2]|0;if(!o){p=m;break}else q=o;while(1){o=f[q>>2]|0;if(o|0){q=o;continue}o=f[q+4>>2]|0;if(!o)break;else q=o}p=q;break}else{f[m+4>>2]=0;if(!n){p=m;break}else r=n;while(1){o=f[r>>2]|0;if(o|0){r=o;continue}o=f[r+4>>2]|0;if(!o)break;else r=o}p=r;break}}else p=0;while(0);m=f[h>>2]|0;do if(m){n=b[k+11>>0]|0;o=n<<24>>24<0;s=o?f[g+20>>2]|0:n&255;n=o?f[k>>2]|0:k;o=m;while(1){t=o+16|0;u=b[t+11>>0]|0;v=u<<24>>24<0;w=v?f[o+20>>2]|0:u&255;u=w>>>0<s>>>0?w:s;if((u|0)!=0?(x=dl(n,v?f[t>>2]|0:t,u)|0,(x|0)!=0):0)if((x|0)<0)y=22;else y=24;else if(s>>>0<w>>>0)y=22;else y=24;if((y|0)==22){y=0;w=f[o>>2]|0;if(!w){y=23;break}else z=w}else if((y|0)==24){y=0;A=o+4|0;w=f[A>>2]|0;if(!w){y=26;break}else z=w}o=z}if((y|0)==23){y=0;B=o;C=o;break}else if((y|0)==26){y=0;B=A;C=o;break}}else{B=h;C=h}while(0);f[g>>2]=0;f[g+4>>2]=0;f[l>>2]=C;f[B>>2]=g;m=f[f[a>>2]>>2]|0;if(!m)D=g;else{f[a>>2]=m;D=f[B>>2]|0}Me(f[i>>2]|0,D);f[e>>2]=(f[e>>2]|0)+1;m=f[j+4>>2]|0;if(!m){k=j+8|0;s=f[k>>2]|0;if((f[s>>2]|0)==(j|0))E=s;else{s=k;do{k=f[s>>2]|0;s=k+8|0;n=f[s>>2]|0}while((f[n>>2]|0)!=(k|0));E=n}}else{s=m;while(1){l=f[s>>2]|0;if(!l)break;else s=l}E=s}f[c>>2]=E;if(!p)break a;else{g=p;j=E}}j=f[g+8>>2]|0;if(!j)F=g;else{i=j;while(1){j=f[i+8>>2]|0;if(!j)break;else i=j}F=i}Dj(a,F)}while(0);F=f[c>>2]|0;E=f[d>>2]|0;if((F|0)==(E|0))return;else G=F;while(1){af(a,G+16|0)|0;F=f[G+4>>2]|0;if(!F){d=G+8|0;p=f[d>>2]|0;if((f[p>>2]|0)==(G|0))H=p;else{p=d;do{d=f[p>>2]|0;p=d+8|0;e=f[p>>2]|0}while((f[e>>2]|0)!=(d|0));H=e}}else{p=F;while(1){i=f[p>>2]|0;if(!i)break;else p=i}H=p}f[c>>2]=H;if((H|0)==(E|0))break;else G=H}return}function Qc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;g=u;u=u+16|0;h=g;i=c+4|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;j=yn(16)|0;f[h>>2]=j;f[h+8>>2]=-2147483632;f[h+4>>2]=15;k=j;l=14844;m=k+15|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[j+15>>0]=0;j=Nk(i,h,-1)|0;if((b[h+11>>0]|0)<0)ur(f[h>>2]|0);switch(j|0){case 0:{n=yn(56)|0;k=n;m=k+56|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(m|0));Tn(n);o=4304;p=n;break}case -1:{if((ki(i)|0)==10){n=yn(56)|0;k=n;m=k+56|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(m|0));Tn(n);o=4304;p=n}else q=6;break}default:q=6}a:do if((q|0)==6){n=d+8|0;r=d+12|0;s=f[r>>2]|0;t=f[n>>2]|0;b:do if((s-t|0)>0){v=h+8|0;w=h+4|0;x=c+20|0;y=h+11|0;z=0;A=t;B=s;c:while(1){C=f[(f[A+(z<<2)>>2]|0)+28>>2]|0;switch(C|0){case 9:{q=12;break}case 6:case 5:case 4:case 2:{D=A;E=B;break}default:{if((C|2|0)!=3)break c;if((C|0)==9)q=12;else{D=A;E=B}}}if((q|0)==12){q=0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;C=yn(32)|0;f[h>>2]=C;f[v>>2]=-2147483616;f[w>>2]=17;k=C;l=14860;m=k+17|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[C+17>>0]=0;F=f[x>>2]|0;if(F){G=x;H=F;d:while(1){F=H;while(1){if((f[F+16>>2]|0)>=0)break;I=f[F+4>>2]|0;if(!I){J=G;break d}else F=I}H=f[F>>2]|0;if(!H){J=F;break}else G=F}if(((J|0)!=(x|0)?(f[J+16>>2]|0)<=0:0)?(G=J+20|0,(Hh(G,h)|0)!=0):0)K=Nk(G,h,-1)|0;else q=21}else q=21;if((q|0)==21){q=0;K=Nk(i,h,-1)|0}if((b[y>>0]|0)<0)ur(f[h>>2]|0);if((K|0)<1)break;D=f[n>>2]|0;E=f[r>>2]|0}z=z+1|0;if((z|0)>=(E-D>>2|0))break b;else{A=D;B=E}}if((j|0)!=1){B=yn(56)|0;k=B;m=k+56|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(m|0));Tn(B);o=4304;p=B;break a}f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;A=yn(32)|0;f[h>>2]=A;f[h+8>>2]=-2147483616;f[h+4>>2]=24;k=A;l=14878;m=k+24|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[A+24>>0]=0;f[a>>2]=-1;oj(a+4|0,h);if((b[h+11>>0]|0)<0)ur(f[h>>2]|0);u=g;return}while(0);r=yn(56)|0;k=r;m=k+56|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(m|0));Tn(r);o=4244;p=r}while(0);f[p>>2]=o;Mp(p,d);Ad(a,p,i,e);if(!(f[a>>2]|0)){e=a+4|0;if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);f[c+40>>2]=f[p+52>>2];f[c+44>>2]=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}Va[f[(f[p>>2]|0)+4>>2]&255](p);u=g;return}function Rc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;b=u;u=u+32|0;c=b+4|0;d=b;e=a+16|0;g=f[e>>2]|0;if(g>>>0>112){f[e>>2]=g+-113;g=a+4|0;e=f[g>>2]|0;h=f[e>>2]|0;i=e+4|0;f[g>>2]=i;e=a+8|0;j=f[e>>2]|0;k=a+12|0;l=f[k>>2]|0;m=l;do if((j|0)==(l|0)){n=f[a>>2]|0;o=n;if(i>>>0>n>>>0){p=i;q=((p-o>>2)+1|0)/-2|0;r=i+(q<<2)|0;s=j-p|0;p=s>>2;if(!p)t=i;else{pm(r|0,i|0,s|0)|0;t=f[g>>2]|0}s=r+(p<<2)|0;f[e>>2]=s;f[g>>2]=t+(q<<2);v=s;break}s=m-o>>1;o=(s|0)==0?1:s;if(o>>>0>1073741823){s=ra(8)|0;op(s,16742);f[s>>2]=7520;va(s|0,1208,126)}s=yn(o<<2)|0;q=s;p=s+(o>>>2<<2)|0;r=p;w=s+(o<<2)|0;if((i|0)==(j|0)){x=r;y=n}else{n=p;p=r;o=i;do{f[n>>2]=f[o>>2];n=p+4|0;p=n;o=o+4|0}while((o|0)!=(j|0));x=p;y=f[a>>2]|0}f[a>>2]=q;f[g>>2]=r;f[e>>2]=x;f[k>>2]=w;if(!y)v=x;else{ur(y);v=f[e>>2]|0}}else v=j;while(0);f[v>>2]=h;f[e>>2]=(f[e>>2]|0)+4;u=b;return}e=a+8|0;h=f[e>>2]|0;v=a+4|0;j=h-(f[v>>2]|0)|0;y=a+12|0;x=f[y>>2]|0;k=x-(f[a>>2]|0)|0;if(j>>>0>=k>>>0){g=k>>1;k=(g|0)==0?1:g;f[c+12>>2]=0;f[c+16>>2]=a+12;if(k>>>0>1073741823){g=ra(8)|0;op(g,16742);f[g>>2]=7520;va(g|0,1208,126)}g=yn(k<<2)|0;f[c>>2]=g;i=g+(j>>2<<2)|0;j=c+8|0;f[j>>2]=i;m=c+4|0;f[m>>2]=i;i=c+12|0;f[i>>2]=g+(k<<2);k=yn(4068)|0;f[d>>2]=k;zg(c,d);d=f[e>>2]|0;while(1){z=f[v>>2]|0;if((d|0)==(z|0))break;k=d+-4|0;sg(c,k);d=k}k=z;z=f[a>>2]|0;f[a>>2]=f[c>>2];f[c>>2]=z;f[v>>2]=f[m>>2];f[m>>2]=k;m=f[e>>2]|0;f[e>>2]=f[j>>2];f[j>>2]=m;g=f[y>>2]|0;f[y>>2]=f[i>>2];f[i>>2]=g;g=m;if((d|0)!=(g|0))f[j>>2]=g+(~((g+-4-k|0)>>>2)<<2);if(z|0)ur(z);u=b;return}if((x|0)!=(h|0)){h=yn(4068)|0;f[c>>2]=h;zg(a,c);u=b;return}h=yn(4068)|0;f[c>>2]=h;sg(a,c);c=f[v>>2]|0;h=f[c>>2]|0;x=c+4|0;f[v>>2]=x;c=f[e>>2]|0;z=f[y>>2]|0;k=z;do if((c|0)==(z|0)){g=f[a>>2]|0;j=g;if(x>>>0>g>>>0){d=x;m=((d-j>>2)+1|0)/-2|0;i=x+(m<<2)|0;t=c-d|0;d=t>>2;if(!d)A=x;else{pm(i|0,x|0,t|0)|0;A=f[v>>2]|0}t=i+(d<<2)|0;f[e>>2]=t;f[v>>2]=A+(m<<2);B=t;break}t=k-j>>1;j=(t|0)==0?1:t;if(j>>>0>1073741823){t=ra(8)|0;op(t,16742);f[t>>2]=7520;va(t|0,1208,126)}t=yn(j<<2)|0;m=t;d=t+(j>>>2<<2)|0;i=d;l=t+(j<<2)|0;if((x|0)==(c|0)){C=i;D=g}else{g=d;d=i;j=x;do{f[g>>2]=f[j>>2];g=d+4|0;d=g;j=j+4|0}while((j|0)!=(c|0));C=d;D=f[a>>2]|0}f[a>>2]=m;f[v>>2]=i;f[e>>2]=C;f[y>>2]=l;if(!D)B=C;else{ur(D);B=f[e>>2]|0}}else B=c;while(0);f[B>>2]=h;f[e>>2]=(f[e>>2]|0)+4;u=b;return}function Sc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;e=u;u=u+16|0;g=e+8|0;h=e+4|0;i=e;j=a+64|0;k=f[j>>2]|0;if((f[k+28>>2]|0)==(f[k+24>>2]|0)){u=e;return}l=c+96|0;c=a+52|0;m=d+84|0;n=d+68|0;d=a+56|0;o=a+60|0;p=a+12|0;q=a+28|0;r=a+40|0;s=a+44|0;t=a+48|0;v=0;w=0;x=k;while(1){k=f[(f[x+24>>2]|0)+(w<<2)>>2]|0;if((k|0)==-1){y=v;z=x}else{A=v+1|0;B=f[(f[l>>2]|0)+(((k|0)/3|0)*12|0)+(((k|0)%3|0)<<2)>>2]|0;if(!(b[m>>0]|0))C=f[(f[n>>2]|0)+(B<<2)>>2]|0;else C=B;f[g>>2]=C;B=f[d>>2]|0;if(B>>>0<(f[o>>2]|0)>>>0){f[B>>2]=C;f[d>>2]=B+4}else Oi(c,g);f[g>>2]=k;f[h>>2]=0;a:do if(!(f[(f[p>>2]|0)+(w>>>5<<2)>>2]&1<<(w&31)))D=k;else{B=k+1|0;E=((B>>>0)%3|0|0)==0?k+-2|0:B;if(((E|0)!=-1?(f[(f[a>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)==0:0)?(B=f[(f[(f[j>>2]|0)+12>>2]|0)+(E<<2)>>2]|0,E=B+1|0,(B|0)!=-1):0){F=((E>>>0)%3|0|0)==0?B+-2|0:E;f[h>>2]=F;if((F|0)==-1){D=k;break}else G=F;while(1){f[g>>2]=G;F=G+1|0;E=((F>>>0)%3|0|0)==0?G+-2|0:F;if((E|0)==-1)break;if(f[(f[a>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)break;F=f[(f[(f[j>>2]|0)+12>>2]|0)+(E<<2)>>2]|0;E=F+1|0;if((F|0)==-1)break;B=((E>>>0)%3|0|0)==0?F+-2|0:E;f[h>>2]=B;if((B|0)==-1){D=G;break a}else G=B}f[h>>2]=-1;D=G;break}f[h>>2]=-1;D=k}while(0);f[(f[q>>2]|0)+(D<<2)>>2]=v;k=f[s>>2]|0;if((k|0)==(f[t>>2]|0))Oi(r,g);else{f[k>>2]=f[g>>2];f[s>>2]=k+4}k=f[j>>2]|0;B=f[g>>2]|0;b:do if(((B|0)!=-1?(E=(((B>>>0)%3|0|0)==0?2:-1)+B|0,(E|0)!=-1):0)?(F=f[(f[k+12>>2]|0)+(E<<2)>>2]|0,(F|0)!=-1):0){E=F+(((F>>>0)%3|0|0)==0?2:-1)|0;f[h>>2]=E;if((E|0)!=-1&(E|0)!=(B|0)){F=A;H=v;I=E;while(1){E=I+1|0;J=((E>>>0)%3|0|0)==0?I+-2|0:E;do if(f[(f[a>>2]|0)+(J>>>5<<2)>>2]&1<<(J&31)){E=F+1|0;K=f[(f[l>>2]|0)+(((I|0)/3|0)*12|0)+(((I|0)%3|0)<<2)>>2]|0;if(!(b[m>>0]|0))L=f[(f[n>>2]|0)+(K<<2)>>2]|0;else L=K;f[i>>2]=L;K=f[d>>2]|0;if(K>>>0<(f[o>>2]|0)>>>0){f[K>>2]=L;f[d>>2]=K+4}else Oi(c,i);K=f[s>>2]|0;if((K|0)==(f[t>>2]|0)){Oi(r,h);M=E;N=F;break}else{f[K>>2]=f[h>>2];f[s>>2]=K+4;M=E;N=F;break}}else{M=F;N=H}while(0);f[(f[q>>2]|0)+(f[h>>2]<<2)>>2]=N;O=f[j>>2]|0;J=f[h>>2]|0;if((J|0)==-1)break;E=(((J>>>0)%3|0|0)==0?2:-1)+J|0;if((E|0)==-1)break;J=f[(f[O+12>>2]|0)+(E<<2)>>2]|0;if((J|0)==-1)break;I=J+(((J>>>0)%3|0|0)==0?2:-1)|0;f[h>>2]=I;if(!((I|0)!=-1?(I|0)!=(f[g>>2]|0):0)){P=M;Q=O;break b}else{F=M;H=N}}f[h>>2]=-1;P=M;Q=O}else{P=A;Q=k}}else R=28;while(0);if((R|0)==28){R=0;f[h>>2]=-1;P=A;Q=k}y=P;z=Q}w=w+1|0;if(w>>>0>=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2>>>0)break;else{v=y;x=z}}u=e;return}function Tc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0.0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,D=0,E=0,F=0;switch(c|0){case 0:{e=-149;g=24;i=4;break}case 1:{e=-1074;g=53;i=4;break}case 2:{e=-1074;g=53;i=4;break}default:j=0.0}a:do if((i|0)==4){c=a+4|0;k=a+100|0;do{l=f[c>>2]|0;if(l>>>0<(f[k>>2]|0)>>>0){f[c>>2]=l+1;m=h[l>>0]|0}else m=Pi(a)|0}while((Mq(m)|0)!=0);b:do switch(m|0){case 43:case 45:{l=1-(((m|0)==45&1)<<1)|0;n=f[c>>2]|0;if(n>>>0<(f[k>>2]|0)>>>0){f[c>>2]=n+1;o=h[n>>0]|0;p=l;break b}else{o=Pi(a)|0;p=l;break b}break}default:{o=m;p=1}}while(0);l=0;n=o;while(1){if((n|32|0)!=(b[19253+l>>0]|0)){q=l;r=n;break}do if(l>>>0<7){s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;t=h[s>>0]|0;break}else{t=Pi(a)|0;break}}else t=n;while(0);s=l+1|0;if(s>>>0<8){l=s;n=t}else{q=s;r=t;break}}c:do switch(q|0){case 8:break;case 3:{i=23;break}default:{n=(d|0)!=0;if(n&q>>>0>3)if((q|0)==8)break c;else{i=23;break c}d:do if(!q){l=0;s=r;while(1){if((s|32|0)!=(b[19262+l>>0]|0)){u=l;v=s;break d}do if(l>>>0<2){w=f[c>>2]|0;if(w>>>0<(f[k>>2]|0)>>>0){f[c>>2]=w+1;x=h[w>>0]|0;break}else{x=Pi(a)|0;break}}else x=s;while(0);w=l+1|0;if(w>>>0<3){l=w;s=x}else{u=w;v=x;break}}}else{u=q;v=r}while(0);switch(u|0){case 3:{s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;y=h[s>>0]|0}else y=Pi(a)|0;if((y|0)==40)z=1;else{if(!(f[k>>2]|0)){j=B;break a}f[c>>2]=(f[c>>2]|0)+-1;j=B;break a}while(1){s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;A=h[s>>0]|0}else A=Pi(a)|0;if(!((A+-48|0)>>>0<10|(A+-65|0)>>>0<26)?!((A|0)==95|(A+-97|0)>>>0<26):0)break;z=z+1|0}if((A|0)==41){j=B;break a}s=(f[k>>2]|0)==0;if(!s)f[c>>2]=(f[c>>2]|0)+-1;if(!n){l=Br()|0;f[l>>2]=22;kn(a,0);j=0.0;break a}if(!z){j=B;break a}else D=z;while(1){D=D+-1|0;if(!s)f[c>>2]=(f[c>>2]|0)+-1;if(!D){j=B;break a}}break}case 0:{if((v|0)==48){s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;E=h[s>>0]|0}else E=Pi(a)|0;if((E|32|0)==120){j=+Fc(a,g,e,p,d);break a}if(!(f[k>>2]|0))F=48;else{f[c>>2]=(f[c>>2]|0)+-1;F=48}}else F=v;j=+nb(a,F,g,e,p,d);break a;break}default:{if(f[k>>2]|0)f[c>>2]=(f[c>>2]|0)+-1;s=Br()|0;f[s>>2]=22;kn(a,0);j=0.0;break a}}}}while(0);if((i|0)==23){s=(f[k>>2]|0)==0;if(!s)f[c>>2]=(f[c>>2]|0)+-1;if((d|0)!=0&q>>>0>3){n=q;do{if(!s)f[c>>2]=(f[c>>2]|0)+-1;n=n+-1|0}while(n>>>0>3)}}j=+$($(p|0)*$(C))}while(0);return +j}function Uc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;b=u;u=u+16|0;c=b+4|0;d=b;e=f[a+64>>2]|0;if(!e){u=b;return}g=Qa[f[(f[e>>2]|0)+32>>2]&127](e)|0;if(!g){u=b;return}e=g+24|0;h=g+28|0;i=((f[h>>2]|0)-(f[e>>2]|0)>>2)-(f[g+44>>2]|0)|0;j=a+56|0;k=f[j>>2]|0;if(((f[k+12>>2]|0)-(f[k+8>>2]|0)|0)>4){f[c>>2]=0;l=c+4|0;f[l>>2]=0;f[c+8>>2]=0;m=c+8|0;n=0;o=k;while(1){if(!(f[(f[(f[o+8>>2]|0)+(n<<2)>>2]|0)+56>>2]|0))p=o;else{k=Ra[f[(f[a>>2]|0)+56>>2]&127](a,n)|0;f[d>>2]=k;q=k;do if(k|0){r=f[l>>2]|0;if((r|0)==(f[m>>2]|0)){Oi(c,d);break}else{f[r>>2]=q;f[l>>2]=(f[l>>2]|0)+4;break}}while(0);p=f[j>>2]|0}n=n+1|0;if((n|0)>=((f[p+12>>2]|0)-(f[p+8>>2]|0)>>2|0))break;else o=p}o=f[h>>2]|0;h=f[e>>2]|0;e=h;if((o|0)==(h|0)){s=i;t=f[c>>2]|0}else{n=o-h>>2;h=g+12|0;g=f[l>>2]|0;o=f[c>>2]|0;c=(g|0)==(o|0);j=o;d=g-o>>2;o=p+96|0;p=i;g=0;while(1){m=f[e+(g<<2)>>2]|0;if((m|0)==-1)v=p;else{q=f[o>>2]|0;k=f[q+(((m|0)/3|0)*12|0)+(((m|0)%3|0)<<2)>>2]|0;r=(((m>>>0)%3|0|0)==0?2:-1)+m|0;a:do if(((r|0)!=-1?(w=f[(f[h>>2]|0)+(r<<2)>>2]|0,(w|0)!=-1):0)?(x=w+(((w>>>0)%3|0|0)==0?2:-1)|0,(x|0)!=-1):0){if(c){w=0;y=x;z=k;while(1){A=z;z=f[q+(((y|0)/3|0)*12|0)+(((y|0)%3|0)<<2)>>2]|0;B=w+((z|0)!=(A|0)&1)|0;if((y|0)==(m|0)){C=B;break a}A=(((y>>>0)%3|0|0)==0?2:-1)+y|0;if((A|0)==-1){C=B;break a}D=f[(f[h>>2]|0)+(A<<2)>>2]|0;if((D|0)==-1){C=B;break a}y=D+(((D>>>0)%3|0|0)==0?2:-1)|0;if((y|0)==-1){C=B;break a}else w=B}}else{E=0;F=x;G=m;H=k}while(1){w=f[q+(((F|0)/3|0)*12|0)+(((F|0)%3|0)<<2)>>2]|0;b:do if((w|0)==(H|0)){y=0;while(1){z=f[(f[j+(y<<2)>>2]|0)+28>>2]|0;y=y+1|0;if((f[z+(F<<2)>>2]|0)!=(f[z+(G<<2)>>2]|0)){I=H;J=28;break b}if(y>>>0>=d>>>0){K=H;L=E;break}}}else{I=w;J=28}while(0);if((J|0)==28){J=0;K=I;L=E+1|0}if((F|0)==(m|0)){C=L;break a}w=(((F>>>0)%3|0|0)==0?2:-1)+F|0;if((w|0)==-1){C=L;break a}y=f[(f[h>>2]|0)+(w<<2)>>2]|0;if((y|0)==-1){C=L;break a}w=y+(((y>>>0)%3|0|0)==0?2:-1)|0;if((w|0)==-1){C=L;break}else{y=F;E=L;F=w;H=K;G=y}}}else C=0;while(0);m=f[e+(g<<2)>>2]|0;q=m+1|0;if(((m|0)!=-1?(k=((q>>>0)%3|0|0)==0?m+-2|0:q,(k|0)!=-1):0)?(q=f[(f[h>>2]|0)+(k<<2)>>2]|0,k=q+1|0,(q|0)!=-1):0)M=((((k>>>0)%3|0|0)==0?q+-2|0:k)|0)==-1;else M=1;v=C+p+(((C|0)!=0&(M^1))<<31>>31)|0}g=g+1|0;if(g>>>0>=n>>>0){s=v;t=j;break}else p=v}}if(t|0){v=f[l>>2]|0;if((v|0)!=(t|0))f[l>>2]=v+(~((v+-4-t|0)>>>2)<<2);ur(t)}N=s}else N=i;f[a+52>>2]=N;u=b;return}function Vc(a,c,d,e,g,h){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;i=u;u=u+32|0;j=i+4|0;k=i;l=i+16|0;m=(_(e|0)|0)^31;if((e|0)>0)if(m>>>0>17){n=0;u=i;return n|0}else o=m+1|0;else o=1;do if(g){m=yn(48)|0;f[j>>2]=m;f[j+8>>2]=-2147483600;f[j+4>>2]=33;e=m;p=14995;q=e+33|0;do{b[e>>0]=b[p>>0]|0;e=e+1|0;p=p+1|0}while((e|0)<(q|0));b[m+33>>0]=0;r=(Hh(g,j)|0)==0;if((b[j+11>>0]|0)<0)ur(f[j>>2]|0);if(!r){r=yn(48)|0;f[j>>2]=r;f[j+8>>2]=-2147483600;f[j+4>>2]=33;e=r;p=14995;q=e+33|0;do{b[e>>0]=b[p>>0]|0;e=e+1|0;p=p+1|0}while((e|0)<(q|0));b[r+33>>0]=0;p=Sk(g,j)|0;if((b[j+11>>0]|0)<0)ur(f[j>>2]|0);if((p|0)<4){s=o+-2|0;break}if((p|0)<6){s=o+-1|0;break}if((p|0)>9){s=o+2|0;break}else{s=o+((p|0)>7&1)|0;break}}else s=o}else s=o;while(0);o=(s|0)>1?s:1;s=(o|0)<18?o:18;b[l>>0]=s;o=h+16|0;g=f[o+4>>2]|0;if(!((g|0)>0|(g|0)==0&(f[o>>2]|0)>>>0>0)){f[k>>2]=f[h+4>>2];f[j>>2]=f[k>>2];Ke(h,j,l,l+1|0)|0}do switch(s&31){case 1:case 0:{n=ve(a,c,d,h)|0;u=i;return n|0}case 2:{n=ue(a,c,d,h)|0;u=i;return n|0}case 3:{n=te(a,c,d,h)|0;u=i;return n|0}case 4:{n=se(a,c,d,h)|0;u=i;return n|0}case 5:{n=re(a,c,d,h)|0;u=i;return n|0}case 6:{n=qe(a,c,d,h)|0;u=i;return n|0}case 7:{n=pe(a,c,d,h)|0;u=i;return n|0}case 8:{n=oe(a,c,d,h)|0;u=i;return n|0}case 9:{n=ne(a,c,d,h)|0;u=i;return n|0}case 10:{n=me(a,c,d,h)|0;u=i;return n|0}case 11:{n=le(a,c,d,h)|0;u=i;return n|0}case 12:{n=ke(a,c,d,h)|0;u=i;return n|0}case 13:{n=je(a,c,d,h)|0;u=i;return n|0}case 14:{n=ie(a,c,d,h)|0;u=i;return n|0}case 15:{n=he(a,c,d,h)|0;u=i;return n|0}case 16:{n=ge(a,c,d,h)|0;u=i;return n|0}case 17:{n=fe(a,c,d,h)|0;u=i;return n|0}case 18:{n=ee(a,c,d,h)|0;u=i;return n|0}default:{n=0;u=i;return n|0}}while(0);return 0}function Wc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;xb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function Xc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;yb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function Yc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;zb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function Zc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Ab(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function _c(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Fb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function $c(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*524288.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==524288){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Bb(z,A,g);a:do if((x|0)<524288){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=524288-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>524288;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-524288|0;m=x;while(1){v=524288.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==524288){C=p;D=524288;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=524288){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*1.9073486328125e-06)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function ad(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*262144.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==262144){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Cb(z,A,g);a:do if((x|0)<262144){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=262144-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>262144;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-262144|0;m=x;while(1){v=262144.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==262144){C=p;D=262144;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=262144){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*3.814697265625e-06)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function bd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*65536.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==65536){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Db(z,A,g);a:do if((x|0)<65536){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=65536-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>65536;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-65536|0;m=x;while(1){v=65536.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==65536){C=p;D=65536;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=65536){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*.0000152587890625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function cd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*32768.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==32768){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Eb(z,A,g);a:do if((x|0)<32768){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=32768-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>32768;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-32768|0;m=x;while(1){v=32768.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==32768){C=p;D=32768;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=32768){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*.000030517578125)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function dd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*8192.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==8192){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Gb(z,A,g);a:do if((x|0)<8192){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=8192-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>8192;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-8192|0;m=x;while(1){v=8192.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==8192){C=p;D=8192;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=8192){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*.0001220703125)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function ed(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Hb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function fd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Ib(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function gd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Jb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function hd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Kb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function id(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Lb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function jd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Mb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function kd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Nb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function ld(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=lo(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0<j>>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else sh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)Fq(h);else{i=l<<2;t=yn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;rj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Ob(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);ur(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Ug(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Je(a,d)|0;u=e;return w|0}function md(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0;g=u;u=u+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)==0&(k|0)==0&1|0,0)|0;k=~~((+(j>>>0)+4294967296.0*+(m>>>0))/(+(n>>>0)+4294967296.0*+(I>>>0))*256.0+.5)>>>0;n=k>>>0<255?k:255;k=n+((n|0)==0&1)&255;b[h>>0]=k;n=a+12|0;m=a+16|0;j=((f[m>>2]|0)-(f[n>>2]|0)<<1)+64|0;f[i>>2]=0;l=i+4|0;f[l>>2]=0;f[i+8>>2]=0;if(!j)o=0;else{if((j|0)<0)Fq(i);p=yn(j)|0;f[l>>2]=p;f[i>>2]=p;f[i+8>>2]=p+j;q=j;j=p;do{b[j>>0]=0;j=(f[l>>2]|0)+1|0;f[l>>2]=j;q=q+-1|0}while((q|0)!=0);o=f[i>>2]|0}q=a+28|0;j=(f[q>>2]|0)+-1|0;a:do if((j|0)>-1){p=a+24|0;r=j;s=0;t=4096;v=k;while(1){w=(f[p>>2]&1<<r|0)!=0;x=(w?0-(v&255)&255:v)&255;if(t>>>0<x<<12>>>0){y=s;z=t}else{b[o+s>>0]=t;y=s+1|0;z=t>>>8}In(f[4356+(x<<3)>>2]|0,0,z|0,0)|0;A=z+(w?0:0-v&255)+(X((z+I|0)>>>(f[4356+(x<<3)+4>>2]|0),256-x|0)|0)|0;x=r+-1|0;if((x|0)<=-1){B=y;C=A;break a}r=x;s=y;t=A;v=b[h>>0]|0}}else{B=0;C=4096}while(0);y=f[m>>2]|0;if((f[n>>2]|0)==(y|0)){D=B;E=C}else{z=B;B=C;C=y;while(1){C=C+-4|0;y=f[C>>2]|0;k=31;j=z;v=B;while(1){t=b[h>>0]|0;s=(1<<k&y|0)!=0;r=(s?0-(t&255)&255:t)&255;if(v>>>0<r<<12>>>0){F=j;G=v}else{b[o+j>>0]=v;F=j+1|0;G=v>>>8}In(f[4356+(r<<3)>>2]|0,0,G|0,0)|0;v=G+(s?0:0-t&255)+(X((G+I|0)>>>(f[4356+(r<<3)+4>>2]|0),256-r|0)|0)|0;if((k|0)<=0)break;else{k=k+-1|0;j=F}}if((f[n>>2]|0)==(C|0)){D=F;E=v;break}else{z=F;B=v}}}B=E+-4096|0;do if(B>>>0>=64){if(B>>>0<16384){F=o+D|0;z=E+12288|0;b[F>>0]=z;H=2;J=z>>>8;K=F+1|0;L=25;break}if(B>>>0<4194304){F=o+D|0;z=E+8384512|0;b[F>>0]=z;b[F+1>>0]=z>>>8;H=3;J=z>>>16;K=F+2|0;L=25}else M=D}else{H=1;J=B;K=o+D|0;L=25}while(0);if((L|0)==25){b[K>>0]=J;M=H+D|0}D=c+16|0;H=D;J=f[H+4>>2]|0;if(!((J|0)>0|(J|0)==0&(f[H>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Ke(c,e,h,h+1|0)|0}$h(M,c)|0;h=f[i>>2]|0;H=D;D=f[H+4>>2]|0;if(!((D|0)>0|(D|0)==0&(f[H>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Ke(c,e,h,h+M|0)|0}M=e;f[M>>2]=0;f[M+4>>2]=0;sf(a,2,e);e=f[a+12>>2]|0;M=f[m>>2]|0;if((M|0)!=(e|0))f[m>>2]=M+(~((M+-4-e|0)>>>2)<<2);f[a+24>>2]=0;f[q>>2]=0;q=f[i>>2]|0;if(!q){u=d;return}if((f[l>>2]|0)!=(q|0))f[l>>2]=q;ur(q);u=d;return}function od(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;c=u;u=u+16|0;b=c+8|0;d=c+4|0;e=c;g=a+64|0;h=f[g>>2]|0;if((f[h+28>>2]|0)==(f[h+24>>2]|0)){u=c;return}i=a+52|0;j=a+56|0;k=a+60|0;l=a+12|0;m=a+28|0;n=a+40|0;o=a+44|0;p=a+48|0;q=0;r=0;s=h;while(1){h=f[(f[s+24>>2]|0)+(r<<2)>>2]|0;if((h|0)==-1){t=q;v=s}else{w=q+1|0;f[b>>2]=q;x=f[j>>2]|0;if((x|0)==(f[k>>2]|0))Oi(i,b);else{f[x>>2]=q;f[j>>2]=x+4}f[d>>2]=h;f[e>>2]=0;a:do if(!(f[(f[l>>2]|0)+(r>>>5<<2)>>2]&1<<(r&31)))y=h;else{x=h+1|0;z=((x>>>0)%3|0|0)==0?h+-2|0:x;if(((z|0)!=-1?(f[(f[a>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)==0:0)?(x=f[(f[(f[g>>2]|0)+12>>2]|0)+(z<<2)>>2]|0,z=x+1|0,(x|0)!=-1):0){A=((z>>>0)%3|0|0)==0?x+-2|0:z;f[e>>2]=A;if((A|0)==-1){y=h;break}else B=A;while(1){f[d>>2]=B;A=B+1|0;z=((A>>>0)%3|0|0)==0?B+-2|0:A;if((z|0)==-1)break;if(f[(f[a>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)break;A=f[(f[(f[g>>2]|0)+12>>2]|0)+(z<<2)>>2]|0;z=A+1|0;if((A|0)==-1)break;x=((z>>>0)%3|0|0)==0?A+-2|0:z;f[e>>2]=x;if((x|0)==-1){y=B;break a}else B=x}f[e>>2]=-1;y=B;break}f[e>>2]=-1;y=h}while(0);f[(f[m>>2]|0)+(y<<2)>>2]=f[b>>2];h=f[o>>2]|0;if((h|0)==(f[p>>2]|0))Oi(n,d);else{f[h>>2]=f[d>>2];f[o>>2]=h+4}h=f[g>>2]|0;x=f[d>>2]|0;b:do if(((x|0)!=-1?(z=(((x>>>0)%3|0|0)==0?2:-1)+x|0,(z|0)!=-1):0)?(A=f[(f[h+12>>2]|0)+(z<<2)>>2]|0,(A|0)!=-1):0){z=A+(((A>>>0)%3|0|0)==0?2:-1)|0;f[e>>2]=z;if((z|0)!=-1&(z|0)!=(x|0)){A=w;C=z;while(1){z=C+1|0;D=((z>>>0)%3|0|0)==0?C+-2|0:z;do if(f[(f[a>>2]|0)+(D>>>5<<2)>>2]&1<<(D&31)){z=A+1|0;f[b>>2]=A;E=f[j>>2]|0;if((E|0)==(f[k>>2]|0))Oi(i,b);else{f[E>>2]=A;f[j>>2]=E+4}E=f[o>>2]|0;if((E|0)==(f[p>>2]|0)){Oi(n,e);F=z;break}else{f[E>>2]=f[e>>2];f[o>>2]=E+4;F=z;break}}else F=A;while(0);f[(f[m>>2]|0)+(f[e>>2]<<2)>>2]=f[b>>2];G=f[g>>2]|0;D=f[e>>2]|0;if((D|0)==-1)break;z=(((D>>>0)%3|0|0)==0?2:-1)+D|0;if((z|0)==-1)break;D=f[(f[G+12>>2]|0)+(z<<2)>>2]|0;if((D|0)==-1)break;C=D+(((D>>>0)%3|0|0)==0?2:-1)|0;f[e>>2]=C;if(!((C|0)!=-1?(C|0)!=(f[d>>2]|0):0)){H=F;I=G;break b}else A=F}f[e>>2]=-1;H=F;I=G}else{H=w;I=h}}else J=26;while(0);if((J|0)==26){J=0;f[e>>2]=-1;H=w;I=h}t=H;v=I}r=r+1|0;if(r>>>0>=(f[v+28>>2]|0)-(f[v+24>>2]|0)>>2>>>0)break;else{q=t;s=v}}u=c;return}function pd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;h=a+124|0;f[h>>2]=(f[h>>2]|0)+1;h=a+88|0;i=a+120|0;j=f[i>>2]|0;k=j+1|0;do if((j|0)!=-1){l=((k>>>0)%3|0|0)==0?j+-2|0:k;if(!((j>>>0)%3|0)){m=j+2|0;n=l;break}else{m=j+-1|0;n=l;break}}else{m=-1;n=-1}while(0);k=a+104|0;l=a+92|0;o=f[l>>2]|0;p=o+(n<<2)|0;q=f[k>>2]|0;r=q+(f[p>>2]<<2)|0;s=f[r>>2]|0;switch(b|0){case 1:case 0:{f[r>>2]=s+-1;r=q+(f[o+(m<<2)>>2]<<2)|0;f[r>>2]=(f[r>>2]|0)+-1;if((b|0)==1){if((m|0)!=-1?(r=f[(f[(f[h>>2]|0)+12>>2]|0)+(m<<2)>>2]|0,(r|0)!=-1):0){t=a+64|0;v=1;w=r;while(1){r=f[t>>2]|0;x=f[(f[r>>2]|0)+36>>2]|0;f[e>>2]=(w>>>0)/3|0;f[d>>2]=f[e>>2];if(Ra[x&127](r,d)|0){y=v;break}r=w+1|0;x=((r>>>0)%3|0|0)==0?w+-2|0:r;if((x|0)==-1){z=12;break}w=f[(f[(f[h>>2]|0)+12>>2]|0)+(x<<2)>>2]|0;x=v+1|0;if((w|0)==-1){y=x;break}else v=x}if((z|0)==12)y=v+1|0;A=y;B=f[k>>2]|0;C=f[l>>2]|0}else{A=1;B=q;C=o}f[B+(f[C+(f[i>>2]<<2)>>2]<<2)>>2]=A;A=a+108|0;i=f[A>>2]|0;C=i-B>>2;B=i;if((n|0)!=-1?(i=f[(f[(f[h>>2]|0)+12>>2]|0)+(n<<2)>>2]|0,(i|0)!=-1):0){n=a+64|0;y=1;v=i;while(1){i=f[n>>2]|0;w=f[(f[i>>2]|0)+36>>2]|0;f[g>>2]=(v>>>0)/3|0;f[d>>2]=f[g>>2];if(Ra[w&127](i,d)|0){D=y;break}i=v+1|0;f[(f[l>>2]|0)+((((i>>>0)%3|0|0)==0?v+-2|0:i)<<2)>>2]=C;i=(((v>>>0)%3|0|0)==0?2:-1)+v|0;if((i|0)==-1){z=20;break}v=f[(f[(f[h>>2]|0)+12>>2]|0)+(i<<2)>>2]|0;i=y+1|0;if((v|0)==-1){D=i;break}else y=i}if((z|0)==20)D=y+1|0;E=D;F=f[A>>2]|0}else{E=1;F=B}f[d>>2]=E;if(F>>>0<(f[a+112>>2]|0)>>>0){f[F>>2]=E;f[A>>2]=F+4}else Oi(k,d)}break}case 5:{k=q+(f[o+(j<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+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2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];kk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2244;i=c;f[a>>2]=i;return}case 4:{c=yn(168)|0;Qi(c,d,e,g);i=c;f[a>>2]=i;return}case 3:{c=yn(88)|0;f[c>>2]=1656;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];kk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2300;h=c+60|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;f[h+16>>2]=0;f[h+20>>2]=0;f[h+24>>2]=0;i=c;f[a>>2]=i;return}case 5:{c=yn(104)|0;f[c>>2]=1656;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];kk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2356;f[c+60>>2]=0;f[c+64>>2]=0;f[c+76>>2]=0;f[c+80>>2]=0;f[c+84>>2]=0;h=c+88|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=yn(140)|0;f[c>>2]=1656;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];kk(c+32|0,e+24|0);e=c+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=2412;f[c+64>>2]=0;f[c+68>>2]=0;e=c+72|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+60>>2]=2468;f[c+88>>2]=1;g=c+92|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;Ln(c+108|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function sd(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0;switch(c|0){case 1:{c=yn(60)|0;f[c>>2]=1656;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];kk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1768;i=c;f[a>>2]=i;return}case 2:{c=yn(60)|0;f[c>>2]=1656;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];kk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1824;i=c;f[a>>2]=i;return}case 4:{c=yn(168)|0;Ti(c,d,e,g);i=c;f[a>>2]=i;return}case 3:{c=yn(88)|0;f[c>>2]=1656;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];kk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1880;h=c+60|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;f[h+16>>2]=0;f[h+20>>2]=0;f[h+24>>2]=0;i=c;f[a>>2]=i;return}case 5:{c=yn(104)|0;f[c>>2]=1656;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];kk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1936;f[c+60>>2]=0;f[c+64>>2]=0;f[c+76>>2]=0;f[c+80>>2]=0;f[c+84>>2]=0;h=c+88|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=yn(140)|0;f[c>>2]=1656;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];kk(c+32|0,e+24|0);e=c+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=1992;f[c+64>>2]=0;f[c+68>>2]=0;e=c+72|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+60>>2]=2048;f[c+88>>2]=1;g=c+92|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;Ln(c+108|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function td(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)ur(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;op(e,16742);f[e>>2]=7520;va(e|0,1208,126)}e=yn(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)ur(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0<b>>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){g=l;c=m;j=n;b:while(1){c:do if(i){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=q+2|0;v=e+12|0;w=q+6|0;x=f[e>>2]|0;d:do if(!x)y=e;else{z=d[q>>1]|0;A=e;B=x;while(1){C=B+8|0;if(z<<16>>16!=(d[C>>1]|0)){y=A;break d}if((d[u>>1]|0)!=(d[C+2>>1]|0)){y=A;break d}if((d[v>>1]|0)!=(d[B+12>>1]|0)){y=A;break d}if((d[w>>1]|0)!=(d[C+6>>1]|0)){y=A;break d}C=f[B>>2]|0;if(!C){y=B;break}else{D=B;B=C;A=D}}}while(0);f[j>>2]=f[y>>2];f[y>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}else{e=c;while(1){w=f[e+4>>2]|0;if(w>>>0<b>>>0)F=w;else F=(w>>>0)%(b>>>0)|0;if((F|0)==(k|0)){p=e;break c}w=(f[a>>2]|0)+(F<<2)|0;if(!(f[w>>2]|0)){r=e;s=F;t=w;break b}w=e+8|0;v=w+2|0;u=e+12|0;x=w+6|0;q=f[e>>2]|0;e:do if(!q)G=e;else{A=d[w>>1]|0;B=e;z=q;while(1){D=z+8|0;if(A<<16>>16!=(d[D>>1]|0)){G=B;break e}if((d[v>>1]|0)!=(d[D+2>>1]|0)){G=B;break e}if((d[u>>1]|0)!=(d[z+12>>1]|0)){G=B;break e}if((d[x>>1]|0)!=(d[D+6>>1]|0)){G=B;break e}D=f[z>>2]|0;if(!D){G=z;break}else{C=z;z=D;B=C}}}while(0);f[j>>2]=f[G>>2];f[G>>2]=f[f[(f[a>>2]|0)+(F<<2)>>2]>>2];f[f[(f[a>>2]|0)+(F<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}while(0);c=f[p>>2]|0;if(!c){E=43;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){E=43;break}else{k=s;l=r;n=r}}if((E|0)==43)return}function ud(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)ur(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;op(e,16742);f[e>>2]=7520;va(e|0,1208,126)}e=yn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)ur(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0<c>>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){c:do if(i){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=q+1|0;v=q+2|0;w=q+3|0;x=f[e>>2]|0;d:do if(!x)y=e;else{z=b[q>>0]|0;A=e;B=x;while(1){C=B+8|0;if(z<<24>>24!=(b[C>>0]|0)){y=A;break d}if((b[u>>0]|0)!=(b[C+1>>0]|0)){y=A;break d}if((b[v>>0]|0)!=(b[C+2>>0]|0)){y=A;break d}if((b[w>>0]|0)!=(b[C+3>>0]|0)){y=A;break d}C=f[B>>2]|0;if(!C){y=B;break}else{D=B;B=C;A=D}}}while(0);f[j>>2]=f[y>>2];f[y>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}else{e=d;while(1){w=f[e+4>>2]|0;if(w>>>0<c>>>0)F=w;else F=(w>>>0)%(c>>>0)|0;if((F|0)==(k|0)){p=e;break c}w=(f[a>>2]|0)+(F<<2)|0;if(!(f[w>>2]|0)){r=e;s=F;t=w;break b}w=e+8|0;v=w+1|0;u=w+2|0;x=w+3|0;q=f[e>>2]|0;e:do if(!q)G=e;else{A=b[w>>0]|0;B=e;z=q;while(1){D=z+8|0;if(A<<24>>24!=(b[D>>0]|0)){G=B;break e}if((b[v>>0]|0)!=(b[D+1>>0]|0)){G=B;break e}if((b[u>>0]|0)!=(b[D+2>>0]|0)){G=B;break e}if((b[x>>0]|0)!=(b[D+3>>0]|0)){G=B;break e}D=f[z>>2]|0;if(!D){G=z;break}else{C=z;z=D;B=C}}}while(0);f[j>>2]=f[G>>2];f[G>>2]=f[f[(f[a>>2]|0)+(F<<2)>>2]>>2];f[f[(f[a>>2]|0)+(F<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}while(0);d=f[p>>2]|0;if(!d){E=43;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){E=43;break}else{k=s;l=r;n=r}}if((E|0)==43)return}function vd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)ur(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;op(d,16742);f[d>>2]=7520;va(d|0,1208,126)}d=yn(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)ur(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0<b>>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){e=k;c=l;i=m;b:while(1){c:do if(h){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(n<<2)|0;if(!(f[p>>2]|0)){q=d;r=n;s=p;break b}p=d+12|0;t=d+16|0;u=d+20|0;v=f[d>>2]|0;d:do if(!v)w=d;else{x=f[d+8>>2]|0;y=d;z=v;while(1){if((x|0)!=(f[z+8>>2]|0)){w=y;break d}if((f[p>>2]|0)!=(f[z+12>>2]|0)){w=y;break d}if((f[t>>2]|0)!=(f[z+16>>2]|0)){w=y;break d}if((f[u>>2]|0)!=(f[z+20>>2]|0)){w=y;break d}A=f[z>>2]|0;if(!A){w=z;break}else{B=z;z=A;y=B}}}while(0);f[i>>2]=f[w>>2];f[w>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){C=43;break a}}}else{d=c;while(1){u=f[d+4>>2]|0;if(u>>>0<b>>>0)D=u;else D=(u>>>0)%(b>>>0)|0;if((D|0)==(j|0)){o=d;break c}u=(f[a>>2]|0)+(D<<2)|0;if(!(f[u>>2]|0)){q=d;r=D;s=u;break b}u=d+12|0;t=d+16|0;p=d+20|0;v=f[d>>2]|0;e:do if(!v)E=d;else{y=f[d+8>>2]|0;z=d;x=v;while(1){if((y|0)!=(f[x+8>>2]|0)){E=z;break e}if((f[u>>2]|0)!=(f[x+12>>2]|0)){E=z;break e}if((f[t>>2]|0)!=(f[x+16>>2]|0)){E=z;break e}if((f[p>>2]|0)!=(f[x+20>>2]|0)){E=z;break e}B=f[x>>2]|0;if(!B){E=x;break}else{A=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ur(n);n=f[m>>2]|0;if(!n){u=i;return 1}if((f[d>>2]|0)!=(n|0))f[d>>2]=n;ur(n);u=i;return 1}function xd(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)ur(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;op(e,16742);f[e>>2]=7520;va(e|0,1208,126)}e=yn(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)ur(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0<b>>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){g=l;c=m;j=n;b:while(1){c:do if(i){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=e+12|0;v=f[e>>2]|0;d:do if(!v)w=e;else{x=d[q>>1]|0;y=q+2|0;z=e;A=v;while(1){B=A+8|0;if(x<<16>>16!=(d[B>>1]|0)){w=z;break d}if((d[y>>1]|0)!=(d[B+2>>1]|0)){w=z;break d}if((d[u>>1]|0)!=(d[A+12>>1]|0)){w=z;break d}B=f[A>>2]|0;if(!B){w=A;break}else{C=A;A=B;z=C}}}while(0);f[j>>2]=f[w>>2];f[w>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}else{e=c;while(1){u=f[e+4>>2]|0;if(u>>>0<b>>>0)E=u;else E=(u>>>0)%(b>>>0)|0;if((E|0)==(k|0)){p=e;break c}u=(f[a>>2]|0)+(E<<2)|0;if(!(f[u>>2]|0)){r=e;s=E;t=u;break b}u=e+8|0;v=e+12|0;q=f[e>>2]|0;e:do if(!q)F=e;else{z=d[u>>1]|0;A=u+2|0;y=e;x=q;while(1){C=x+8|0;if(z<<16>>16!=(d[C>>1]|0)){F=y;break e}if((d[A>>1]|0)!=(d[C+2>>1]|0)){F=y;break e}if((d[v>>1]|0)!=(d[x+12>>1]|0)){F=y;break e}C=f[x>>2]|0;if(!C){F=x;break}else{B=x;x=C;y=B}}}while(0);f[j>>2]=f[F>>2];f[F>>2]=f[f[(f[a>>2]|0)+(E<<2)>>2]>>2];f[f[(f[a>>2]|0)+(E<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}while(0);c=f[p>>2]|0;if(!c){D=41;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){D=41;break}else{k=s;l=r;n=r}}if((D|0)==41)return}function yd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)ur(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;op(e,16742);f[e>>2]=7520;va(e|0,1208,126)}e=yn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)ur(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0<c>>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){c:do if(i){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=q+1|0;v=q+2|0;w=f[e>>2]|0;d:do if(!w)x=e;else{y=b[q>>0]|0;z=e;A=w;while(1){B=A+8|0;if(y<<24>>24!=(b[B>>0]|0)){x=z;break d}if((b[u>>0]|0)!=(b[B+1>>0]|0)){x=z;break d}if((b[v>>0]|0)!=(b[B+2>>0]|0)){x=z;break d}B=f[A>>2]|0;if(!B){x=A;break}else{C=A;A=B;z=C}}}while(0);f[j>>2]=f[x>>2];f[x>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}else{e=d;while(1){v=f[e+4>>2]|0;if(v>>>0<c>>>0)E=v;else E=(v>>>0)%(c>>>0)|0;if((E|0)==(k|0)){p=e;break c}v=(f[a>>2]|0)+(E<<2)|0;if(!(f[v>>2]|0)){r=e;s=E;t=v;break b}v=e+8|0;u=v+1|0;w=v+2|0;q=f[e>>2]|0;e:do if(!q)F=e;else{z=b[v>>0]|0;A=e;y=q;while(1){C=y+8|0;if(z<<24>>24!=(b[C>>0]|0)){F=A;break e}if((b[u>>0]|0)!=(b[C+1>>0]|0)){F=A;break e}if((b[w>>0]|0)!=(b[C+2>>0]|0)){F=A;break e}C=f[y>>2]|0;if(!C){F=y;break}else{B=y;y=C;A=B}}}while(0);f[j>>2]=f[F>>2];f[F>>2]=f[f[(f[a>>2]|0)+(E<<2)>>2]>>2];f[f[(f[a>>2]|0)+(E<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}while(0);d=f[p>>2]|0;if(!d){D=41;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){D=41;break}else{k=s;l=r;n=r}}if((D|0)==41)return}function zd(a,b){a=+a;b=+b;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0.0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;p[s>>3]=b;e=f[s>>2]|0;g=f[s+4>>2]|0;h=oo(c|0,d|0,52)|0;i=h&2047;h=oo(e|0,g|0,52)|0;j=h&2047;h=d&-2147483648;k=jo(e|0,g|0,1)|0;l=I;a:do if(!((k|0)==0&(l|0)==0)?(m=Qo(b)|0,n=I&2147483647,!((i|0)==2047|(n>>>0>2146435072|(n|0)==2146435072&m>>>0>0))):0){m=jo(c|0,d|0,1)|0;n=I;if(!(n>>>0>l>>>0|(n|0)==(l|0)&m>>>0>k>>>0))return +((m|0)==(k|0)&(n|0)==(l|0)?a*0.0:a);if(!i){n=jo(c|0,d|0,12)|0;m=I;if((m|0)>-1|(m|0)==-1&n>>>0>4294967295){o=0;q=n;n=m;while(1){m=o+-1|0;q=jo(q|0,n|0,1)|0;n=I;if(!((n|0)>-1|(n|0)==-1&q>>>0>4294967295)){r=m;break}else o=m}}else r=0;o=jo(c|0,d|0,1-r|0)|0;t=r;u=o;v=I}else{t=i;u=c;v=d&1048575|1048576}if(!j){o=jo(e|0,g|0,12)|0;q=I;if((q|0)>-1|(q|0)==-1&o>>>0>4294967295){n=0;m=o;o=q;while(1){q=n+-1|0;m=jo(m|0,o|0,1)|0;o=I;if(!((o|0)>-1|(o|0)==-1&m>>>0>4294967295)){w=q;break}else n=q}}else w=0;n=jo(e|0,g|0,1-w|0)|0;x=w;y=n;z=I}else{x=j;y=e;z=g&1048575|1048576}n=no(u|0,v|0,y|0,z|0)|0;m=I;o=(m|0)>-1|(m|0)==-1&n>>>0>4294967295;b:do if((t|0)>(x|0)){q=t;A=m;B=o;C=u;D=v;E=n;while(1){if(B)if((E|0)==0&(A|0)==0)break;else{F=E;G=A}else{F=C;G=D}H=jo(F|0,G|0,1)|0;J=I;K=q+-1|0;L=no(H|0,J|0,y|0,z|0)|0;M=I;N=(M|0)>-1|(M|0)==-1&L>>>0>4294967295;if((K|0)>(x|0)){q=K;A=M;B=N;C=H;D=J;E=L}else{O=K;P=N;Q=L;R=M;S=H;T=J;break b}}U=a*0.0;break a}else{O=t;P=o;Q=n;R=m;S=u;T=v}while(0);if(P)if((Q|0)==0&(R|0)==0){U=a*0.0;break}else{V=R;W=Q}else{V=T;W=S}if(V>>>0<1048576|(V|0)==1048576&W>>>0<0){m=O;n=W;o=V;while(1){E=jo(n|0,o|0,1)|0;D=I;C=m+-1|0;if(D>>>0<1048576|(D|0)==1048576&E>>>0<0){m=C;n=E;o=D}else{X=C;Y=E;Z=D;break}}}else{X=O;Y=W;Z=V}if((X|0)>0){o=lo(Y|0,Z|0,0,-1048576)|0;n=I;m=jo(X|0,0,52)|0;_=n|I;$=o|m}else{m=oo(Y|0,Z|0,1-X|0)|0;_=I;$=m}f[s>>2]=$;f[s+4>>2]=_|h;U=+p[s>>3]}else aa=3;while(0);if((aa|0)==3){ba=a*b;U=ba/ba}return +U}function Ad(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=u;u=u+16|0;h=g;f[c+48>>2]=d;f[c+44>>2]=e;e=f[c+8>>2]|0;i=c+12|0;j=f[i>>2]|0;if((j|0)!=(e|0)){k=j;do{j=k+-4|0;f[i>>2]=j;l=f[j>>2]|0;f[j>>2]=0;if(l|0)Va[f[(f[l>>2]|0)+4>>2]&255](l);k=f[i>>2]|0}while((k|0)!=(e|0))}e=f[c+20>>2]|0;k=c+24|0;i=f[k>>2]|0;if((i|0)!=(e|0))f[k>>2]=i+(~((i+-4-e|0)>>>2)<<2);e=f[c+32>>2]|0;i=c+36|0;k=f[i>>2]|0;if((k|0)!=(e|0))f[i>>2]=k+(~((k+-4-e|0)>>>2)<<2);if(!(f[c+4>>2]|0)){e=yn(32)|0;f[h>>2]=e;f[h+8>>2]=-2147483616;f[h+4>>2]=23;m=e;n=16439;o=m+23|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[e+23>>0]=0;f[a>>2]=-1;oj(a+4|0,h);if((b[h+11>>0]|0)<0)ur(f[h>>2]|0);u=g;return}Vd(a,c);if(f[a>>2]|0){u=g;return}e=a+4|0;k=e+11|0;if((b[k>>0]|0)<0)ur(f[e>>2]|0);Vi(a,c);if(f[a>>2]|0){u=g;return}if((b[k>>0]|0)<0)ur(f[e>>2]|0);if(!(Qa[f[(f[c>>2]|0)+16>>2]&127](c)|0)){k=yn(32)|0;f[h>>2]=k;f[h+8>>2]=-2147483616;f[h+4>>2]=29;m=k;n=16463;o=m+29|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[k+29>>0]=0;f[a>>2]=-1;oj(e,h);if((b[h+11>>0]|0)<0)ur(f[h>>2]|0);u=g;return}if(!(Qa[f[(f[c>>2]|0)+20>>2]&127](c)|0)){k=yn(32)|0;f[h>>2]=k;f[h+8>>2]=-2147483616;f[h+4>>2]=31;m=k;n=16493;o=m+31|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[k+31>>0]=0;f[a>>2]=-1;oj(e,h);if((b[h+11>>0]|0)<0)ur(f[h>>2]|0);u=g;return}if(!(Qa[f[(f[c>>2]|0)+24>>2]&127](c)|0)){k=yn(32)|0;f[h>>2]=k;f[h+8>>2]=-2147483616;f[h+4>>2]=31;m=k;n=16525;o=m+31|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[k+31>>0]=0;f[a>>2]=-1;oj(e,h);if((b[h+11>>0]|0)<0)ur(f[h>>2]|0);u=g;return}if(!(Qa[f[(f[c>>2]|0)+28>>2]&127](c)|0)){k=yn(48)|0;f[h>>2]=k;f[h+8>>2]=-2147483600;f[h+4>>2]=34;m=k;n=16557;o=m+34|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[k+34>>0]=0;f[a>>2]=-1;oj(e,h);if((b[h+11>>0]|0)<0)ur(f[h>>2]|0);u=g;return}e=yn(32)|0;f[h>>2]=e;f[h+8>>2]=-2147483616;f[h+4>>2]=30;m=e;n=16592;o=m+30|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[e+30>>0]=0;e=_j(d,h,0)|0;if((b[h+11>>0]|0)<0)ur(f[h>>2]|0);if(e)Va[f[(f[c>>2]|0)+48>>2]&255](c);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=g;return}function Bd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)ur(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;op(d,16742);f[d>>2]=7520;va(d|0,1208,126)}d=yn(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)ur(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0<b>>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){e=k;c=l;i=m;b:while(1){c:do if(h){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(n<<2)|0;if(!(f[p>>2]|0)){q=d;r=n;s=p;break b}p=d+12|0;t=d+16|0;u=f[d>>2]|0;d:do if(!u)v=d;else{w=f[d+8>>2]|0;x=d;y=u;while(1){if((w|0)!=(f[y+8>>2]|0)){v=x;break d}if((f[p>>2]|0)!=(f[y+12>>2]|0)){v=x;break d}if((f[t>>2]|0)!=(f[y+16>>2]|0)){v=x;break d}z=f[y>>2]|0;if(!z){v=y;break}else{A=y;y=z;x=A}}}while(0);f[i>>2]=f[v>>2];f[v>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){B=41;break a}}}else{d=c;while(1){t=f[d+4>>2]|0;if(t>>>0<b>>>0)C=t;else C=(t>>>0)%(b>>>0)|0;if((C|0)==(j|0)){o=d;break c}t=(f[a>>2]|0)+(C<<2)|0;if(!(f[t>>2]|0)){q=d;r=C;s=t;break b}t=d+12|0;p=d+16|0;u=f[d>>2]|0;e:do if(!u)D=d;else{x=f[d+8>>2]|0;y=d;w=u;while(1){if((x|0)!=(f[w+8>>2]|0)){D=y;break e}if((f[t>>2]|0)!=(f[w+12>>2]|0)){D=y;break e}if((f[p>>2]|0)!=(f[w+16>>2]|0)){D=y;break e}A=f[w>>2]|0;if(!A){D=w;break}else{z=w;w=A;y=z}}}while(0);f[i>>2]=f[D>>2];f[D>>2]=f[f[(f[a>>2]|0)+(C<<2)>>2]>>2];f[f[(f[a>>2]|0)+(C<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){B=41;break a}}}while(0);c=f[o>>2]|0;if(!c){B=41;break a}else{e=o;i=o}}f[s>>2]=i;l=f[q>>2]|0;if(!l){B=41;break}else{j=r;k=q;m=q}}if((B|0)==41)return}function Cd(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0;switch(c|0){case 1:{c=yn(40)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=3092;i=c;f[a>>2]=i;return}case 2:{c=yn(40)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=3148;i=c;f[a>>2]=i;return}case 4:{c=yn(152)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=3204;h=c+96|0;b=c+40|0;j=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));ln(h);f[c+136>>2]=0;f[c+140>>2]=0;f[c+144>>2]=0;i=c;f[a>>2]=i;return}case 3:{c=yn(68)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=3260;h=c+40|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;f[h+16>>2]=0;f[h+20>>2]=0;f[h+24>>2]=0;i=c;f[a>>2]=i;return}case 5:{c=yn(84)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=3316;f[c+40>>2]=0;f[c+44>>2]=0;f[c+56>>2]=0;f[c+60>>2]=0;f[c+64>>2]=0;h=c+68|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=yn(120)|0;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];e=c+24|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=3372;f[c+44>>2]=0;f[c+48>>2]=0;e=c+52|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+40>>2]=3428;f[c+68>>2]=1;g=c+72|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;Ln(c+88|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function Dd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)ur(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;op(e,16742);f[e>>2]=7520;va(e|0,1208,126)}e=yn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)ur(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0<c>>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){o=d;while(1){e=f[o+4>>2]|0;if(!i)if(e>>>0<c>>>0)p=e;else p=(e>>>0)%(c>>>0)|0;else p=e&h;if((p|0)==(k|0))break;q=(f[a>>2]|0)+(p<<2)|0;if(!(f[q>>2]|0))break b;e=f[o>>2]|0;c:do if(!e)r=o;else{s=o+8|0;t=b[s+11>>0]|0;u=t<<24>>24<0;v=t&255;t=u?f[o+12>>2]|0:v;w=(t|0)==0;if(u){u=o;x=e;while(1){y=x+8|0;z=b[y+11>>0]|0;A=z<<24>>24<0;if((t|0)!=((A?f[x+12>>2]|0:z&255)|0)){r=u;break c}if(!w?dl(f[s>>2]|0,A?f[y>>2]|0:y,t)|0:0){r=u;break c}y=f[x>>2]|0;if(!y){r=x;break c}else{A=x;x=y;u=A}}}if(w){u=o;x=e;while(1){A=b[x+8+11>>0]|0;if((A<<24>>24<0?f[x+12>>2]|0:A&255)|0){r=u;break c}A=f[x>>2]|0;if(!A){r=x;break c}else{y=x;x=A;u=y}}}u=o;x=e;while(1){w=x+8|0;y=b[w+11>>0]|0;A=y<<24>>24<0;if((t|0)!=((A?f[x+12>>2]|0:y&255)|0)){r=u;break c}y=A?f[w>>2]|0:w;if((b[y>>0]|0)==(f[s>>2]&255)<<24>>24){B=s;C=v;D=y}else{r=u;break c}while(1){C=C+-1|0;B=B+1|0;if(!C)break;D=D+1|0;if((b[B>>0]|0)!=(b[D>>0]|0)){r=u;break c}}y=f[x>>2]|0;if(!y){r=x;break}else{w=x;x=y;u=w}}}while(0);f[j>>2]=f[r>>2];f[r>>2]=f[f[(f[a>>2]|0)+(p<<2)>>2]>>2];f[f[(f[a>>2]|0)+(p<<2)>>2]>>2]=o;e=f[g>>2]|0;if(!e){E=43;break a}else o=e}d=f[o>>2]|0;if(!d){E=43;break a}else{g=o;j=o}}f[q>>2]=j;m=f[o>>2]|0;if(!m){E=43;break}else{k=p;l=o;n=o}}if((E|0)==43)return}function Ed(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0;switch(c|0){case 1:{c=yn(40)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2728;i=c;f[a>>2]=i;return}case 2:{c=yn(40)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2784;i=c;f[a>>2]=i;return}case 4:{c=yn(152)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2840;h=c+96|0;b=c+40|0;j=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));ln(h);f[c+136>>2]=0;f[c+140>>2]=0;f[c+144>>2]=0;i=c;f[a>>2]=i;return}case 3:{c=yn(68)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2896;h=c+40|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;f[h+16>>2]=0;f[h+20>>2]=0;f[h+24>>2]=0;i=c;f[a>>2]=i;return}case 5:{c=yn(84)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2952;f[c+40>>2]=0;f[c+44>>2]=0;f[c+56>>2]=0;f[c+60>>2]=0;f[c+64>>2]=0;h=c+68|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=yn(120)|0;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2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>>2];if((l|0)>0|(l|0)==0&m>>>0>0){u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;u=c;return 1}function Hd(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)ur(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;op(e,16742);f[e>>2]=7520;va(e|0,1208,126)}e=yn(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)ur(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0<b>>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){g=l;c=m;j=n;b:while(1){c:do if(i){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=f[e>>2]|0;d:do if(!u)v=e;else{w=d[q>>1]|0;x=q+2|0;y=e;z=u;while(1){A=z+8|0;if(w<<16>>16!=(d[A>>1]|0)){v=y;break d}if((d[x>>1]|0)!=(d[A+2>>1]|0)){v=y;break d}A=f[z>>2]|0;if(!A){v=z;break}else{B=z;z=A;y=B}}}while(0);f[j>>2]=f[v>>2];f[v>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}else{e=c;while(1){u=f[e+4>>2]|0;if(u>>>0<b>>>0)D=u;else D=(u>>>0)%(b>>>0)|0;if((D|0)==(k|0)){p=e;break c}u=(f[a>>2]|0)+(D<<2)|0;if(!(f[u>>2]|0)){r=e;s=D;t=u;break b}u=e+8|0;q=f[e>>2]|0;e:do if(!q)E=e;else{y=d[u>>1]|0;z=u+2|0;x=e;w=q;while(1){B=w+8|0;if(y<<16>>16!=(d[B>>1]|0)){E=x;break e}if((d[z>>1]|0)!=(d[B+2>>1]|0)){E=x;break e}B=f[w>>2]|0;if(!B){E=w;break}else{A=w;w=B;x=A}}}while(0);f[j>>2]=f[E>>2];f[E>>2]=f[f[(f[a>>2]|0)+(D<<2)>>2]>>2];f[f[(f[a>>2]|0)+(D<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}while(0);c=f[p>>2]|0;if(!c){C=39;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){C=39;break}else{k=s;l=r;n=r}}if((C|0)==39)return}function Id(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)ur(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;op(e,16742);f[e>>2]=7520;va(e|0,1208,126)}e=yn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)ur(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0<c>>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){c:do if(i){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=f[e>>2]|0;d:do if(!u)v=e;else{w=b[q>>0]|0;x=q+1|0;y=e;z=u;while(1){A=z+8|0;if(w<<24>>24!=(b[A>>0]|0)){v=y;break d}if((b[x>>0]|0)!=(b[A+1>>0]|0)){v=y;break d}A=f[z>>2]|0;if(!A){v=z;break}else{B=z;z=A;y=B}}}while(0);f[j>>2]=f[v>>2];f[v>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}else{e=d;while(1){u=f[e+4>>2]|0;if(u>>>0<c>>>0)D=u;else D=(u>>>0)%(c>>>0)|0;if((D|0)==(k|0)){p=e;break c}u=(f[a>>2]|0)+(D<<2)|0;if(!(f[u>>2]|0)){r=e;s=D;t=u;break b}u=e+8|0;q=f[e>>2]|0;e:do if(!q)E=e;else{y=b[u>>0]|0;z=u+1|0;x=e;w=q;while(1){B=w+8|0;if(y<<24>>24!=(b[B>>0]|0)){E=x;break e}if((b[z>>0]|0)!=(b[B+1>>0]|0)){E=x;break e}B=f[w>>2]|0;if(!B){E=w;break}else{A=w;w=B;x=A}}}while(0);f[j>>2]=f[E>>2];f[E>>2]=f[f[(f[a>>2]|0)+(D<<2)>>2]>>2];f[f[(f[a>>2]|0)+(D<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}while(0);d=f[p>>2]|0;if(!d){C=39;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){C=39;break}else{k=s;l=r;n=r}}if((C|0)==39)return}function Jd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c=u;u=u+48|0;d=c+32|0;e=c+28|0;g=c+16|0;h=c;i=a+16|0;j=f[i>>2]|0;if(j|0){k=f[b>>2]|0;l=i;m=j;a:while(1){j=m;while(1){if((f[j+16>>2]|0)>=(k|0))break;n=f[j+4>>2]|0;if(!n){o=l;break a}else j=n}m=f[j>>2]|0;if(!m){o=j;break}else l=j}if((o|0)!=(i|0)?(k|0)>=(f[o+16>>2]|0):0){p=o;q=p+20|0;u=c;return q|0}}Pp(g);f[h>>2]=f[b>>2];b=h+4|0;f[h+8>>2]=0;o=h+12|0;f[o>>2]=0;k=h+8|0;f[b>>2]=k;l=f[g>>2]|0;m=g+4|0;if((l|0)!=(m|0)){n=k;r=l;while(1){l=r+16|0;f[e>>2]=n;f[d>>2]=f[e>>2];jh(b,d,l,l)|0;l=f[r+4>>2]|0;if(!l){s=r+8|0;t=f[s>>2]|0;if((f[t>>2]|0)==(r|0))v=t;else{t=s;do{s=f[t>>2]|0;t=s+8|0;w=f[t>>2]|0}while((f[w>>2]|0)!=(s|0));v=w}}else{t=l;while(1){j=f[t>>2]|0;if(!j)break;else t=j}v=t}if((v|0)==(m|0))break;else r=v}}v=a+12|0;r=f[i>>2]|0;do if(r){d=f[h>>2]|0;e=a+16|0;n=r;while(1){l=f[n+16>>2]|0;if((d|0)<(l|0)){j=f[n>>2]|0;if(!j){x=23;break}else{y=n;z=j}}else{if((l|0)>=(d|0)){x=27;break}A=n+4|0;l=f[A>>2]|0;if(!l){x=26;break}else{y=A;z=l}}e=y;n=z}if((x|0)==23){B=n;C=n;break}else if((x|0)==26){B=n;C=A;break}else if((x|0)==27){B=n;C=e;break}}else{B=i;C=i}while(0);i=f[C>>2]|0;if(!i){x=yn(32)|0;f[x+16>>2]=f[h>>2];A=x+20|0;f[A>>2]=f[b>>2];z=x+24|0;y=f[h+8>>2]|0;f[z>>2]=y;r=f[o>>2]|0;f[x+28>>2]=r;if(!r)f[A>>2]=z;else{f[y+8>>2]=z;f[b>>2]=k;f[k>>2]=0;f[o>>2]=0}f[x>>2]=0;f[x+4>>2]=0;f[x+8>>2]=B;f[C>>2]=x;B=f[f[v>>2]>>2]|0;if(!B)D=x;else{f[v>>2]=B;D=f[C>>2]|0}Me(f[a+16>>2]|0,D);D=a+20|0;f[D>>2]=(f[D>>2]|0)+1;E=x}else E=i;Dj(h+4|0,f[k>>2]|0);Dj(g,f[m>>2]|0);p=E;q=p+20|0;u=c;return q|0}function Kd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;c=i;e=i;while(1){j=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;c=(X(j>>>24^j,1540483477)|0)^(X(c,1540483477)|0);e=e+-4|0;if(e>>>0<=3)break;else d=d+4|0}d=i+-4|0;e=d&-4;k=d-e|0;l=g+(e+4)|0;m=c}else{k=i;l=g;m=i}switch(k|0){case 3:{n=h[l+2>>0]<<16^m;o=6;break}case 2:{n=m;o=6;break}case 1:{p=m;o=7;break}default:q=m}if((o|0)==6){p=h[l+1>>0]<<8^n;o=7}if((o|0)==7)q=X(p^h[l>>0],1540483477)|0;l=X(q>>>13^q,1540483477)|0;q=l>>>15^l;l=f[a+4>>2]|0;if(!l){r=0;return r|0}p=l+-1|0;n=(p&l|0)==0;if(!n)if(q>>>0<l>>>0)s=q;else s=(q>>>0)%(l>>>0)|0;else s=q&p;m=f[(f[a>>2]|0)+(s<<2)>>2]|0;if(!m){r=0;return r|0}a=f[m>>2]|0;if(!a){r=0;return r|0}m=(i|0)==0;if(n){n=a;a:while(1){k=f[n+4>>2]|0;c=(k|0)==(q|0);if(!(c|(k&p|0)==(s|0))){r=0;o=40;break}do if(c?(k=n+8|0,e=b[k+11>>0]|0,d=e<<24>>24<0,j=e&255,((d?f[n+12>>2]|0:j)|0)==(i|0)):0){e=f[k>>2]|0;t=d?e:k;if(d){if(m){r=n;o=40;break a}if(!(dl(t,g,i)|0)){r=n;o=40;break a}else break}if(m){r=n;o=40;break a}if((b[g>>0]|0)==(e&255)<<24>>24){e=k;k=j;j=g;do{k=k+-1|0;e=e+1|0;if(!k){r=n;o=40;break a}j=j+1|0}while((b[e>>0]|0)==(b[j>>0]|0))}}while(0);n=f[n>>2]|0;if(!n){r=0;o=40;break}}if((o|0)==40)return r|0}else u=a;b:while(1){a=f[u+4>>2]|0;do if((a|0)==(q|0)){n=u+8|0;p=b[n+11>>0]|0;c=p<<24>>24<0;j=p&255;if(((c?f[u+12>>2]|0:j)|0)==(i|0)){p=f[n>>2]|0;e=c?p:n;if(c){if(m){r=u;o=40;break b}if(!(dl(e,g,i)|0)){r=u;o=40;break b}else break}if(m){r=u;o=40;break b}if((b[g>>0]|0)==(p&255)<<24>>24){p=n;n=j;j=g;do{n=n+-1|0;p=p+1|0;if(!n){r=u;o=40;break b}j=j+1|0}while((b[p>>0]|0)==(b[j>>0]|0))}}}else{if(a>>>0<l>>>0)v=a;else v=(a>>>0)%(l>>>0)|0;if((v|0)!=(s|0)){r=0;o=40;break b}}while(0);u=f[u>>2]|0;if(!u){r=0;o=40;break}}if((o|0)==40)return r|0;return 0}function Ld(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)ur(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;op(d,16742);f[d>>2]=7520;va(d|0,1208,126)}d=yn(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)ur(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0<b>>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){e=k;c=l;i=m;b:while(1){c:do if(h){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(n<<2)|0;if(!(f[p>>2]|0)){q=d;r=n;s=p;break b}p=d+12|0;t=f[d>>2]|0;d:do if(!t)u=d;else{v=f[d+8>>2]|0;w=d;x=t;while(1){if((v|0)!=(f[x+8>>2]|0)){u=w;break d}if((f[p>>2]|0)!=(f[x+12>>2]|0)){u=w;break d}y=f[x>>2]|0;if(!y){u=x;break}else{z=x;x=y;w=z}}}while(0);f[i>>2]=f[u>>2];f[u>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){A=39;break a}}}else{d=c;while(1){p=f[d+4>>2]|0;if(p>>>0<b>>>0)B=p;else B=(p>>>0)%(b>>>0)|0;if((B|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(B<<2)|0;if(!(f[p>>2]|0)){q=d;r=B;s=p;break b}p=d+12|0;t=f[d>>2]|0;e:do if(!t)C=d;else{w=f[d+8>>2]|0;x=d;v=t;while(1){if((w|0)!=(f[v+8>>2]|0)){C=x;break e}if((f[p>>2]|0)!=(f[v+12>>2]|0)){C=x;break e}z=f[v>>2]|0;if(!z){C=v;break}else{y=v;v=z;x=y}}}while(0);f[i>>2]=f[C>>2];f[C>>2]=f[f[(f[a>>2]|0)+(B<<2)>>2]>>2];f[f[(f[a>>2]|0)+(B<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){A=39;break a}}}while(0);c=f[o>>2]|0;if(!c){A=39;break a}else{e=o;i=o}}f[s>>2]=i;l=f[q>>2]|0;if(!l){A=39;break}else{j=r;k=q;m=q}}if((A|0)==39)return}function Md(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;h=a+4|0;i=f[c>>2]|0;c=i;do if((i|0)!=(h|0)){j=i+16|0;k=b[j+11>>0]|0;l=k<<24>>24<0;m=l?f[i+20>>2]|0:k&255;k=b[g+11>>0]|0;n=k<<24>>24<0;o=n?f[g+4>>2]|0:k&255;k=m>>>0<o>>>0;p=k?m:o;if((p|0)!=0?(q=dl(n?f[g>>2]|0:g,l?f[j>>2]|0:j,p)|0,(q|0)!=0):0){if((q|0)<0)break}else r=4;if((r|0)==4?o>>>0<m>>>0:0)break;q=o>>>0<m>>>0?o:m;if((q|0)!=0?(m=dl(l?f[j>>2]|0:j,n?f[g>>2]|0:g,q)|0,(m|0)!=0):0){if((m|0)>=0)r=37}else r=21;if((r|0)==21?!k:0)r=37;if((r|0)==37){f[d>>2]=c;f[e>>2]=c;s=e;return s|0}k=f[i+4>>2]|0;m=(k|0)==0;if(m){q=i+8|0;j=f[q>>2]|0;if((f[j>>2]|0)==(i|0))t=j;else{j=q;do{q=f[j>>2]|0;j=q+8|0;l=f[j>>2]|0}while((f[l>>2]|0)!=(q|0));t=l}}else{j=k;while(1){l=f[j>>2]|0;if(!l)break;else j=l}t=j}do if((t|0)!=(h|0)){k=t+16|0;l=b[k+11>>0]|0;q=l<<24>>24<0;p=q?f[t+20>>2]|0:l&255;l=p>>>0<o>>>0?p:o;if((l|0)!=0?(u=dl(n?f[g>>2]|0:g,q?f[k>>2]|0:k,l)|0,(u|0)!=0):0){if((u|0)<0)break}else r=31;if((r|0)==31?o>>>0<p>>>0:0)break;s=wg(a,d,g)|0;return s|0}while(0);if(m){f[d>>2]=c;s=i+4|0;return s|0}else{f[d>>2]=t;s=t;return s|0}}while(0);t=f[i>>2]|0;do if((f[a>>2]|0)==(i|0))v=c;else{if(!t){h=i;while(1){e=f[h+8>>2]|0;if((f[e>>2]|0)==(h|0))h=e;else{w=e;break}}}else{h=t;while(1){m=f[h+4>>2]|0;if(!m){w=h;break}else h=m}}h=w;m=w+16|0;e=b[g+11>>0]|0;o=e<<24>>24<0;n=o?f[g+4>>2]|0:e&255;e=b[m+11>>0]|0;j=e<<24>>24<0;p=j?f[w+20>>2]|0:e&255;e=n>>>0<p>>>0?n:p;if((e|0)!=0?(u=dl(j?f[m>>2]|0:m,o?f[g>>2]|0:g,e)|0,(u|0)!=0):0){if((u|0)<0){v=h;break}}else r=13;if((r|0)==13?p>>>0<n>>>0:0){v=h;break}s=wg(a,d,g)|0;return s|0}while(0);if(!t){f[d>>2]=i;s=i;return s|0}else{f[d>>2]=v;s=v+4|0;return s|0}return 0}function Nd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=a;h=b;i=h;j=c;k=d;l=k;if(!i){m=(e|0)!=0;if(!l){if(m){f[e>>2]=(g>>>0)%(j>>>0);f[e+4>>2]=0}n=0;o=(g>>>0)/(j>>>0)>>>0;return (I=n,o)|0}else{if(!m){n=0;o=0;return (I=n,o)|0}f[e>>2]=a|0;f[e+4>>2]=b&0;n=0;o=0;return (I=n,o)|0}}m=(l|0)==0;do if(j){if(!m){p=(_(l|0)|0)-(_(i|0)|0)|0;if(p>>>0<=31){q=p+1|0;r=31-p|0;s=p-31>>31;t=q;u=g>>>(q>>>0)&s|i<<r;v=i>>>(q>>>0)&s;w=0;x=g<<r;break}if(!e){n=0;o=0;return (I=n,o)|0}f[e>>2]=a|0;f[e+4>>2]=h|b&0;n=0;o=0;return (I=n,o)|0}r=j-1|0;if(r&j|0){s=(_(j|0)|0)+33-(_(i|0)|0)|0;q=64-s|0;p=32-s|0;y=p>>31;z=s-32|0;A=z>>31;t=s;u=p-1>>31&i>>>(z>>>0)|(i<<p|g>>>(s>>>0))&A;v=A&i>>>(s>>>0);w=g<<q&y;x=(i<<q|g>>>(z>>>0))&y|g<<p&s-33>>31;break}if(e|0){f[e>>2]=r&g;f[e+4>>2]=0}if((j|0)==1){n=h|b&0;o=a|0|0;return (I=n,o)|0}else{r=Cm(j|0)|0;n=i>>>(r>>>0)|0;o=i<<32-r|g>>>(r>>>0)|0;return (I=n,o)|0}}else{if(m){if(e|0){f[e>>2]=(i>>>0)%(j>>>0);f[e+4>>2]=0}n=0;o=(i>>>0)/(j>>>0)>>>0;return (I=n,o)|0}if(!g){if(e|0){f[e>>2]=0;f[e+4>>2]=(i>>>0)%(l>>>0)}n=0;o=(i>>>0)/(l>>>0)>>>0;return (I=n,o)|0}r=l-1|0;if(!(r&l)){if(e|0){f[e>>2]=a|0;f[e+4>>2]=r&i|b&0}n=0;o=i>>>((Cm(l|0)|0)>>>0);return (I=n,o)|0}r=(_(l|0)|0)-(_(i|0)|0)|0;if(r>>>0<=30){s=r+1|0;p=31-r|0;t=s;u=i<<p|g>>>(s>>>0);v=i>>>(s>>>0);w=0;x=g<<p;break}if(!e){n=0;o=0;return (I=n,o)|0}f[e>>2]=a|0;f[e+4>>2]=h|b&0;n=0;o=0;return (I=n,o)|0}while(0);if(!t){B=x;C=w;D=v;E=u;F=0;G=0}else{b=c|0|0;c=k|d&0;d=lo(b|0,c|0,-1,-1)|0;k=I;h=x;x=w;w=v;v=u;u=t;t=0;do{a=h;h=x>>>31|h<<1;x=t|x<<1;g=v<<1|a>>>31|0;a=v>>>31|w<<1|0;no(d|0,k|0,g|0,a|0)|0;i=I;l=i>>31|((i|0)<0?-1:0)<<1;t=l&1;v=no(g|0,a|0,l&b|0,(((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1)&c|0)|0;w=I;u=u-1|0}while((u|0)!=0);B=h;C=x;D=w;E=v;F=0;G=t}t=C;C=0;if(e|0){f[e>>2]=E;f[e+4>>2]=D}n=(t|0)>>>31|(B|C)<<1|(C<<1|t>>>31)&0|F;o=(t<<1|0>>>31)&-2|G;return (I=n,o)|0}function Od(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;c=u;u=u+32|0;d=c+4|0;e=c;g=c+16|0;h=a+48|0;i=f[h>>2]|0;j=yn(32)|0;f[d>>2]=j;f[d+8>>2]=-2147483616;f[d+4>>2]=20;k=j;l=15029;m=k+20|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[j+20>>0]=0;j=Kk(i+24|0,d)|0;if((b[d+11>>0]|0)<0)ur(f[d>>2]|0);i=f[h>>2]|0;n=yn(32)|0;f[d>>2]=n;f[d+8>>2]=-2147483616;f[d+4>>2]=22;k=n;l=15050;m=k+22|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[n+22>>0]=0;n=Kk(i+24|0,d)|0;if((b[d+11>>0]|0)<0)ur(f[d>>2]|0);i=a+64|0;o=f[i>>2]|0;f[i>>2]=0;if(o|0)Va[f[(f[o>>2]|0)+4>>2]&255](o);o=f[a+56>>2]|0;p=(((f[o+100>>2]|0)-(f[o+96>>2]|0)|0)/12|0)>>>0<1e3;o=f[h>>2]|0;q=yn(32)|0;f[d>>2]=q;f[d+8>>2]=-2147483616;f[d+4>>2]=18;k=q;l=15073;m=k+18|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[q+18>>0]=0;q=Nk(o,d,-1)|0;if((b[d+11>>0]|0)<0)ur(f[d>>2]|0);switch(q|0){case -1:{if(j?p|((ki(f[h>>2]|0)|0)>4|n^1):0)r=13;else r=17;break}case 0:{if(j)r=13;else r=21;break}case 2:{r=17;break}default:r=21}if((r|0)==13){j=f[a+44>>2]|0;b[g>>0]=0;n=j+16|0;h=f[n+4>>2]|0;if(!((h|0)>0|(h|0)==0&(f[n>>2]|0)>>>0>0)){f[e>>2]=f[j+4>>2];f[d>>2]=f[e>>2];Ke(j,d,g,g+1|0)|0}j=yn(296)|0;Zi(j);n=f[i>>2]|0;f[i>>2]=j;if(!n)s=j;else{Va[f[(f[n>>2]|0)+4>>2]&255](n);r=21}}else if((r|0)==17){n=f[a+44>>2]|0;b[g>>0]=2;j=n+16|0;h=f[j+4>>2]|0;if(!((h|0)>0|(h|0)==0&(f[j>>2]|0)>>>0>0)){f[e>>2]=f[n+4>>2];f[d>>2]=f[e>>2];Ke(n,d,g,g+1|0)|0}g=yn(360)|0;vi(g);d=f[i>>2]|0;f[i>>2]=g;if(!d)s=g;else{Va[f[(f[d>>2]|0)+4>>2]&255](d);r=21}}if((r|0)==21){r=f[i>>2]|0;if(!r){t=0;u=c;return t|0}else s=r}t=Ra[f[(f[s>>2]|0)+8>>2]&127](s,a)|0;u=c;return t|0}function Pd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;e=b+12|0;g=f[e>>2]|0;h=c+4|0;i=(f[h>>2]|0)-g|0;j=c;f[j>>2]=(f[c>>2]|0)-g;f[j+4>>2]=i;i=(f[d>>2]|0)-g|0;j=d+4|0;k=(f[j>>2]|0)-g|0;g=d;f[g>>2]=i;f[g+4>>2]=k;g=f[e>>2]|0;if((((k|0)>-1?k:0-k|0)+((i|0)>-1?i:0-i|0)|0)>(g|0)){l=f[c>>2]|0;m=f[h>>2]|0;if((l|0)>-1)if((m|0)<=-1)if((l|0)<1){n=-1;o=-1}else p=6;else{n=1;o=1}else if((m|0)<1){n=-1;o=-1}else p=6;if((p|0)==6){n=(l|0)>0?1:-1;o=(m|0)>0?1:-1}q=X(g,n)|0;r=X(g,o)|0;g=(l<<1)-q|0;f[c>>2]=g;l=(m<<1)-r|0;f[h>>2]=l;if((X(n,o)|0)>-1){o=0-l|0;f[c>>2]=o;s=0-g|0;t=o}else{f[c>>2]=l;s=g;t=l}f[c>>2]=(t+q|0)/2|0;f[h>>2]=(s+r|0)/2|0;r=f[d>>2]|0;s=f[j>>2]|0;if((r|0)>-1)if((s|0)<=-1)if((r|0)<1){u=-1;v=-1}else p=14;else{u=1;v=1}else if((s|0)<1){u=-1;v=-1}else p=14;if((p|0)==14){u=(r|0)>0?1:-1;v=(s|0)>0?1:-1}q=f[e>>2]|0;e=X(q,u)|0;t=X(q,v)|0;q=(r<<1)-e|0;f[d>>2]=q;r=(s<<1)-t|0;f[j>>2]=r;if((X(u,v)|0)>-1){v=0-r|0;f[d>>2]=v;w=0-q|0;x=v}else{f[d>>2]=r;w=q;x=r}r=(x+e|0)/2|0;f[d>>2]=r;e=(w+t|0)/2|0;f[j>>2]=e;y=r;z=e}else{y=i;z=k}if(!y)if(!z){A=y;B=z}else p=22;else if((y|0)<0&(z|0)<1){A=y;B=z}else p=22;if((p|0)==22){if(!y)C=(z|0)==0?0:(z|0)>0?3:1;else C=(y|0)>0?(z>>31)+2|0:(z|0)<1?0:3;z=f[c>>2]|0;y=f[h>>2]|0;switch(C|0){case 1:{C=c;f[C>>2]=y;f[C+4>>2]=0-z;D=f[j>>2]|0;E=0-(f[d>>2]|0)|0;break}case 2:{C=c;f[C>>2]=0-z;f[C+4>>2]=0-y;D=0-(f[d>>2]|0)|0;E=0-(f[j>>2]|0)|0;break}case 3:{C=c;f[C>>2]=0-y;f[C+4>>2]=z;D=0-(f[j>>2]|0)|0;E=f[d>>2]|0;break}default:{C=c;f[C>>2]=z;f[C+4>>2]=y;D=f[d>>2]|0;E=f[j>>2]|0}}j=d;f[j>>2]=D;f[j+4>>2]=E;A=D;B=E}E=(f[c>>2]|0)-A|0;f[a>>2]=E;A=(f[h>>2]|0)-B|0;B=a+4|0;f[B>>2]=A;if((E|0)<0)F=(f[b+4>>2]|0)+E|0;else F=E;f[a>>2]=F;if((A|0)>=0){G=A;f[B>>2]=G;return}G=(f[b+4>>2]|0)+A|0;f[B>>2]=G;return}function Qd(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)ur(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;op(e,16742);f[e>>2]=7520;va(e|0,1208,126)}e=yn(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)ur(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0<b>>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){b:do if(i){g=l;c=m;j=n;while(1){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0))break;p=(f[a>>2]|0)+(o<<2)|0;if(!(f[p>>2]|0)){q=e;r=j;s=o;t=p;break b}p=e+8|0;u=e;while(1){v=f[u>>2]|0;if(!v)break;if((d[p>>1]|0)==(d[v+8>>1]|0))u=v;else break}f[j>>2]=v;f[u>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;p=f[g>>2]|0;if(!p){w=37;break a}else e=p}c=f[e>>2]|0;if(!c){w=37;break a}else{g=e;j=e}}}else{j=l;g=m;c=n;while(1){p=g;while(1){x=f[p+4>>2]|0;if(x>>>0<b>>>0)y=x;else y=(x>>>0)%(b>>>0)|0;if((y|0)==(k|0))break;x=(f[a>>2]|0)+(y<<2)|0;if(!(f[x>>2]|0)){q=p;r=c;s=y;t=x;break b}x=p+8|0;z=p;while(1){A=f[z>>2]|0;if(!A)break;if((d[x>>1]|0)==(d[A+8>>1]|0))z=A;else break}f[c>>2]=A;f[z>>2]=f[f[(f[a>>2]|0)+(y<<2)>>2]>>2];f[f[(f[a>>2]|0)+(y<<2)>>2]>>2]=p;x=f[j>>2]|0;if(!x){w=37;break a}else p=x}g=f[p>>2]|0;if(!g){w=37;break a}else{j=p;c=p}}}while(0);f[t>>2]=r;m=f[q>>2]|0;if(!m){w=37;break}else{k=s;l=q;n=q}}if((w|0)==37)return}function Rd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)ur(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;op(e,16742);f[e>>2]=7520;va(e|0,1208,126)}e=yn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)ur(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0<c>>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){b:do if(i){g=l;d=m;j=n;while(1){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0))break;p=(f[a>>2]|0)+(o<<2)|0;if(!(f[p>>2]|0)){q=e;r=j;s=o;t=p;break b}p=e+8|0;u=e;while(1){v=f[u>>2]|0;if(!v)break;if((b[p>>0]|0)==(b[v+8>>0]|0))u=v;else break}f[j>>2]=v;f[u>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;p=f[g>>2]|0;if(!p){w=37;break a}else e=p}d=f[e>>2]|0;if(!d){w=37;break a}else{g=e;j=e}}}else{j=l;g=m;d=n;while(1){p=g;while(1){x=f[p+4>>2]|0;if(x>>>0<c>>>0)y=x;else y=(x>>>0)%(c>>>0)|0;if((y|0)==(k|0))break;x=(f[a>>2]|0)+(y<<2)|0;if(!(f[x>>2]|0)){q=p;r=d;s=y;t=x;break b}x=p+8|0;z=p;while(1){A=f[z>>2]|0;if(!A)break;if((b[x>>0]|0)==(b[A+8>>0]|0))z=A;else break}f[d>>2]=A;f[z>>2]=f[f[(f[a>>2]|0)+(y<<2)>>2]>>2];f[f[(f[a>>2]|0)+(y<<2)>>2]>>2]=p;x=f[j>>2]|0;if(!x){w=37;break a}else p=x}g=f[p>>2]|0;if(!g){w=37;break a}else{j=p;d=p}}}while(0);f[t>>2]=r;m=f[q>>2]|0;if(!m){w=37;break}else{k=s;l=q;n=q}}if((w|0)==37)return}function Sd(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;g=f[c>>2]|0;c=f[b>>2]|0;h=g-c|0;i=a+8|0;j=f[i>>2]|0;if(h>>>0<64){if(j>>>0<=1){k=0;return k|0}l=f[e>>2]|0;m=0;n=1;while(1){o=(f[l+(m<<2)>>2]|0)>>>0>(f[l+(n<<2)>>2]|0)>>>0?n:m;n=n+1|0;if(n>>>0>=j>>>0){k=o;break}else m=o}return k|0}if(j){j=f[a+1128>>2]|0;m=f[e>>2]|0;e=f[a+1140>>2]|0;n=f[d>>2]|0;d=b+4|0;l=b+8|0;if((g|0)==(c|0)){b=0;do{o=j+(b<<2)|0;f[o>>2]=0;p=(f[a>>2]|0)-(f[m+(b<<2)>>2]|0)|0;f[e+(b<<2)>>2]=p;if(p|0){p=f[o>>2]|0;q=h-p|0;f[o>>2]=q>>>0<p>>>0?p:q}b=b+1|0;q=f[i>>2]|0}while(b>>>0<q>>>0);r=q}else{b=0;do{q=j+(b<<2)|0;f[q>>2]=0;p=(f[a>>2]|0)-(f[m+(b<<2)>>2]|0)|0;f[e+(b<<2)>>2]=p;if(p|0){o=(f[n+(b<<2)>>2]|0)+(1<<p+-1)|0;p=f[l>>2]|0;s=f[(f[d>>2]|0)+24>>2]|0;t=c;u=f[q>>2]|0;do{v=s+((X(t,p)|0)<<2)+(b<<2)|0;u=u+((f[v>>2]|0)>>>0<o>>>0&1)|0;f[q>>2]=u;t=t+1|0}while((t|0)!=(g|0));t=h-u|0;f[q>>2]=t>>>0<u>>>0?u:t}b=b+1|0;t=f[i>>2]|0}while(b>>>0<t>>>0);r=t}if(r){b=f[a+1140>>2]|0;i=a+1128|0;h=0;g=0;c=0;while(1){if(!(f[b+(g<<2)>>2]|0)){w=h;x=c}else{d=f[(f[i>>2]|0)+(g<<2)>>2]|0;l=h>>>0<d>>>0;w=l?d:h;x=l?g:c}g=g+1|0;if(g>>>0>=r>>>0){y=x;break}else{h=w;c=x}}}else y=0}else y=0;x=a+1088|0;c=a+1104|0;w=f[c>>2]|0;h=32-w|0;if((h|0)<4){r=y&15;g=4-h|0;f[c>>2]=g;h=a+1100|0;i=f[h>>2]|r>>>g;f[h>>2]=i;g=a+1092|0;b=f[g>>2]|0;if((b|0)==(f[a+1096>>2]|0))Oi(x,h);else{f[b>>2]=i;f[g>>2]=b+4}f[h>>2]=r<<32-(f[c>>2]|0);k=y;return k|0}r=a+1100|0;h=f[r>>2]|y<<28>>>w;f[r>>2]=h;b=w+4|0;f[c>>2]=b;if((b|0)!=32){k=y;return k|0}b=a+1092|0;w=f[b>>2]|0;if((w|0)==(f[a+1096>>2]|0))Oi(x,r);else{f[w>>2]=h;f[b>>2]=w+4}f[r>>2]=0;f[c>>2]=0;k=y;return k|0}function Td(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)ur(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;op(d,16742);f[d>>2]=7520;va(d|0,1208,126)}d=yn(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)ur(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0<b>>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){b:do if(h){e=k;c=l;i=m;while(1){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0))break;o=(f[a>>2]|0)+(n<<2)|0;if(!(f[o>>2]|0)){p=d;q=i;r=n;s=o;break b}o=d+8|0;t=d;while(1){u=f[t>>2]|0;if(!u)break;if((f[o>>2]|0)==(f[u+8>>2]|0))t=u;else break}f[i>>2]=u;f[t>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;o=f[e>>2]|0;if(!o){v=37;break a}else d=o}c=f[d>>2]|0;if(!c){v=37;break a}else{e=d;i=d}}}else{i=k;e=l;c=m;while(1){o=e;while(1){w=f[o+4>>2]|0;if(w>>>0<b>>>0)x=w;else x=(w>>>0)%(b>>>0)|0;if((x|0)==(j|0))break;w=(f[a>>2]|0)+(x<<2)|0;if(!(f[w>>2]|0)){p=o;q=c;r=x;s=w;break b}w=o+8|0;y=o;while(1){z=f[y>>2]|0;if(!z)break;if((f[w>>2]|0)==(f[z+8>>2]|0))y=z;else break}f[c>>2]=z;f[y>>2]=f[f[(f[a>>2]|0)+(x<<2)>>2]>>2];f[f[(f[a>>2]|0)+(x<<2)>>2]>>2]=o;w=f[i>>2]|0;if(!w){v=37;break a}else o=w}e=f[o>>2]|0;if(!e){v=37;break a}else{i=o;c=o}}}while(0);f[s>>2]=q;l=f[p>>2]|0;if(!l){v=37;break}else{j=r;k=p;m=p}}if((v|0)==37)return}function Ud(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)ur(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;op(e,16742);f[e>>2]=7520;va(e|0,1208,126)}e=yn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)ur(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0<c>>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;e=a+24|0;k=j;j=g;l=d;d=g;a:while(1){g=j;m=l;n=d;b:while(1){o=m;while(1){p=f[o+4>>2]|0;if(!i)if(p>>>0<c>>>0)q=p;else q=(p>>>0)%(c>>>0)|0;else q=p&h;if((q|0)==(k|0))break;r=(f[a>>2]|0)+(q<<2)|0;if(!(f[r>>2]|0))break b;p=f[o>>2]|0;c:do if(!p)s=o;else{t=f[o+8>>2]|0;u=f[e>>2]|0;v=f[u+8>>2]|0;w=(f[u+12>>2]|0)-v|0;u=v;v=w>>>2;if((w|0)>0){x=o;y=p}else{w=p;while(1){z=f[w>>2]|0;if(!z){s=w;break c}else w=z}}while(1){w=f[y+8>>2]|0;z=0;do{A=f[u+(z<<2)>>2]|0;if(!(b[A+84>>0]|0)){B=f[A+68>>2]|0;C=f[B+(w<<2)>>2]|0;D=f[B+(t<<2)>>2]|0}else{C=w;D=t}z=z+1|0;if((D|0)!=(C|0)){s=x;break c}}while((z|0)<(v|0));z=f[y>>2]|0;if(!z){s=y;break}else{w=y;y=z;x=w}}}while(0);f[n>>2]=f[s>>2];f[s>>2]=f[f[(f[a>>2]|0)+(q<<2)>>2]>>2];f[f[(f[a>>2]|0)+(q<<2)>>2]>>2]=o;p=f[g>>2]|0;if(!p){E=38;break a}else o=p}m=f[o>>2]|0;if(!m){E=38;break a}else{g=o;n=o}}f[r>>2]=n;l=f[o>>2]|0;if(!l){E=38;break}else{k=q;j=o;d=o}}if((E|0)==38)return}function Vd(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;e=u;u=u+16|0;g=e+4|0;h=e;i=e+12|0;j=e+11|0;k=e+10|0;l=e+8|0;m=c+44|0;n=f[m>>2]|0;o=n+16|0;p=f[o+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0)){f[h>>2]=f[n+4>>2];f[g>>2]=f[h>>2];Ke(n,g,16650,16655)|0}n=Qa[f[(f[c>>2]|0)+8>>2]&127](c)|0;b[i>>0]=n;b[j>>0]=2;b[k>>0]=(n&255|0)==0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;x=s+(v<<2)|0;if($(n[x>>2])<z)n[x>>2]=z;v=v+1|0}while((v|0)!=(h|0));t=t+1|0}while(t>>>0<p>>>0)}while(0);if(d<<24>>24>0){d=f[k>>2]|0;k=0;z=$(n[j>>2]);while(1){y=$(n[s+(k<<2)>>2]);w=$(y-$(n[d+(k<<2)>>2]));if(w>z){n[j>>2]=w;A=w}else A=z;k=k+1|0;if((k|0)==(h|0))break;else z=A}}sr(q);sr(s);i=1;u=e;return i|0}function Xd(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=a+8|0;Oh(g,b,d,e);h=d-e|0;if((h|0)>0){d=0-e|0;i=a+16|0;j=a+32|0;k=a+12|0;l=a+28|0;m=a+20|0;n=a+24|0;o=h;h=f[g>>2]|0;while(1){p=b+(o<<2)|0;q=c+(o<<2)|0;if((h|0)>0){r=0;s=p+(d<<2)|0;t=h;while(1){if((t|0)>0){u=0;do{v=f[s+(u<<2)>>2]|0;w=f[i>>2]|0;if((v|0)>(w|0)){x=f[j>>2]|0;f[x+(u<<2)>>2]=w;y=x}else{x=f[k>>2]|0;w=f[j>>2]|0;f[w+(u<<2)>>2]=(v|0)<(x|0)?x:v;y=w}u=u+1|0}while((u|0)<(f[g>>2]|0));z=y}else z=f[j>>2]|0;u=(f[p+(r<<2)>>2]|0)-(f[z+(r<<2)>>2]|0)|0;w=q+(r<<2)|0;f[w>>2]=u;if((u|0)>=(f[l>>2]|0)){if((u|0)>(f[n>>2]|0)){A=u-(f[m>>2]|0)|0;B=31}}else{A=(f[m>>2]|0)+u|0;B=31}if((B|0)==31){B=0;f[w>>2]=A}r=r+1|0;w=f[g>>2]|0;if((r|0)>=(w|0)){C=w;break}else{s=z;t=w}}}else C=h;o=o-e|0;if((o|0)<=0){D=C;break}else h=C}}else D=f[g>>2]|0;C=e>>>0>1073741823?-1:e<<2;e=rr(C)|0;rj(e|0,0,C|0)|0;if((D|0)<=0){sr(e);return 1}C=a+16|0;h=a+32|0;o=a+12|0;z=a+28|0;A=a+20|0;m=a+24|0;a=0;n=e;l=D;while(1){if((l|0)>0){D=0;do{j=f[n+(D<<2)>>2]|0;y=f[C>>2]|0;if((j|0)>(y|0)){k=f[h>>2]|0;f[k+(D<<2)>>2]=y;E=k}else{k=f[o>>2]|0;y=f[h>>2]|0;f[y+(D<<2)>>2]=(j|0)<(k|0)?k:j;E=y}D=D+1|0}while((D|0)<(f[g>>2]|0));F=E}else F=f[h>>2]|0;D=(f[b+(a<<2)>>2]|0)-(f[F+(a<<2)>>2]|0)|0;y=c+(a<<2)|0;f[y>>2]=D;if((D|0)>=(f[z>>2]|0)){if((D|0)>(f[m>>2]|0)){G=D-(f[A>>2]|0)|0;B=16}}else{G=(f[A>>2]|0)+D|0;B=16}if((B|0)==16){B=0;f[y>>2]=G}a=a+1|0;l=f[g>>2]|0;if((a|0)>=(l|0))break;else n=F}sr(e);return 1}function Yd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;e=f[a>>2]|0;g=e;h=(f[b>>2]|0)-g|0;b=e+(h>>2<<2)|0;i=f[c>>2]|0;c=f[d>>2]|0;d=c-i|0;j=d>>2;k=i;l=c;if((d|0)<=0){m=b;return m|0}d=a+8|0;n=f[d>>2]|0;o=a+4|0;p=f[o>>2]|0;q=p;if((j|0)<=(n-q>>2|0)){r=b;s=q-r|0;t=s>>2;if((j|0)>(t|0)){u=k+(t<<2)|0;t=u;if((u|0)==(l|0))v=p;else{w=l+-4-t|0;x=u;u=p;while(1){f[u>>2]=f[x>>2];x=x+4|0;if((x|0)==(l|0))break;else u=u+4|0}u=p+((w>>>2)+1<<2)|0;f[o>>2]=u;v=u}if((s|0)>0){y=t;z=v}else{m=b;return m|0}}else{y=c;z=p}c=z-(b+(j<<2))>>2;v=b+(c<<2)|0;if(v>>>0<p>>>0){t=(p+(0-c<<2)+~r|0)>>>2;r=v;s=z;while(1){f[s>>2]=f[r>>2];r=r+4|0;if(r>>>0>=p>>>0)break;else s=s+4|0}f[o>>2]=z+(t+1<<2)}if(c|0){c=v;v=z;do{c=c+-4|0;v=v+-4|0;f[v>>2]=f[c>>2]}while((c|0)!=(b|0))}c=y;if((k|0)==(c|0)){m=b;return m|0}else{A=b;B=k}while(1){f[A>>2]=f[B>>2];B=B+4|0;if((B|0)==(c|0)){m=b;break}else A=A+4|0}return m|0}A=(q-g>>2)+j|0;if(A>>>0>1073741823)Fq(a);j=n-g|0;g=j>>1;n=j>>2>>>0<536870911?(g>>>0<A>>>0?A:g):1073741823;g=b;A=h>>2;do if(n)if(n>>>0>1073741823){j=ra(8)|0;op(j,16742);f[j>>2]=7520;va(j|0,1208,126)}else{j=yn(n<<2)|0;C=j;D=j;break}else{C=0;D=0}while(0);j=D+(A<<2)|0;A=D+(n<<2)|0;if((l|0)==(k|0))E=j;else{n=((l+-4-i|0)>>>2)+1|0;i=k;k=j;while(1){f[k>>2]=f[i>>2];i=i+4|0;if((i|0)==(l|0))break;else k=k+4|0}E=j+(n<<2)|0}if((h|0)>0)eh(C|0,e|0,h|0)|0;h=q-g|0;if((h|0)>0){eh(E|0,b|0,h|0)|0;F=E+(h>>>2<<2)|0}else F=E;f[a>>2]=D;f[o>>2]=F;f[d>>2]=A;if(!e){m=j;return m|0}ur(e);m=j;return m|0}function Zd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;c=u;u=u+48|0;d=c+40|0;e=c+36|0;g=c+32|0;h=c;i=a+60|0;$h(f[i>>2]|0,b)|0;Ln(h);yk(h);j=f[a+56>>2]|0;k=f[i>>2]|0;i=k>>>5;l=j+(i<<2)|0;m=k&31;k=(i|0)!=0;a:do if(i|m|0){if(!m){n=1;o=j;p=k;while(1){if(p){q=n;r=0;while(1){s=(f[o>>2]&1<<r|0)!=0;ej(h,q^s^1);if((r|0)==31){t=s;break}else{q=s;r=r+1|0}}}else{r=n;q=0;while(1){s=(f[o>>2]&1<<q|0)!=0;ej(h,r^s^1);if((q|0)==31){t=s;break}else{r=s;q=q+1|0}}}o=o+4|0;if((l|0)==(o|0))break a;else{n=t;p=1}}}if(k){p=1;n=j;while(1){o=p;q=0;while(1){r=o;o=(f[n>>2]&1<<q|0)!=0;ej(h,r^o^1);if((q|0)==31)break;else q=q+1|0}q=n+4|0;if((l|0)==(q|0)){v=o;w=q;break}else{p=o;n=q}}}else{v=1;w=j}n=v;p=0;do{q=n;n=(f[w>>2]&1<<p|0)!=0;ej(h,q^n^1);p=p+1|0}while((p|0)!=(m|0))}while(0);nd(h,b);f[g>>2]=f[a+12>>2];m=b+16|0;w=m;v=f[w>>2]|0;j=f[w+4>>2]|0;if((j|0)>0|(j|0)==0&v>>>0>0){x=j;y=v}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;v=m;x=f[v+4>>2]|0;y=f[v>>2]|0}f[g>>2]=f[a+20>>2];if((x|0)>0|(x|0)==0&y>>>0>0){Ej(h);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;Ej(h);u=c;return 1}function _d(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;switch(b-a>>2|0){case 2:{d=b+-4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=f[c>>2]|0;i=f[h>>2]|0;j=(f[h+4>>2]|0)-i>>3;if(j>>>0<=e>>>0)Fq(h);k=i;if(j>>>0<=g>>>0)Fq(h);if((f[k+(e<<3)>>2]|0)>>>0>=(f[k+(g<<3)>>2]|0)>>>0){l=1;return l|0}f[a>>2]=e;f[d>>2]=g;l=1;return l|0}case 3:{Rg(a,a+4|0,b+-4|0,c)|0;l=1;return l|0}case 4:{dh(a,a+4|0,a+8|0,b+-4|0,c)|0;l=1;return l|0}case 5:{gg(a,a+4|0,a+8|0,a+12|0,b+-4|0,c)|0;l=1;return l|0}case 1:case 0:{l=1;return l|0}default:{g=a+8|0;Rg(a,a+4|0,g,c)|0;d=a+12|0;a:do if((d|0)!=(b|0)){e=f[c>>2]|0;k=f[e>>2]|0;h=(f[e+4>>2]|0)-k>>3;j=k;k=d;i=0;m=g;b:while(1){n=f[k>>2]|0;o=f[m>>2]|0;if(h>>>0<=n>>>0){p=14;break}if(h>>>0<=o>>>0){p=16;break}q=j+(n<<3)|0;if((f[q>>2]|0)>>>0<(f[j+(o<<3)>>2]|0)>>>0){r=m;s=k;t=o;while(1){f[s>>2]=t;if((r|0)==(a|0)){u=a;break}o=r+-4|0;t=f[o>>2]|0;if(h>>>0<=t>>>0){p=20;break b}if((f[q>>2]|0)>>>0>=(f[j+(t<<3)>>2]|0)>>>0){u=r;break}else{v=r;r=o;s=v}}f[u>>2]=n;s=i+1|0;if((s|0)==8){w=0;x=(k+4|0)==(b|0);break a}else y=s}else y=i;s=k+4|0;if((s|0)==(b|0)){w=1;x=0;break a}else{r=k;k=s;i=y;m=r}}if((p|0)==14)Fq(e);else if((p|0)==16)Fq(e);else if((p|0)==20)Fq(e)}else{w=1;x=0}while(0);l=x|w;return l|0}}return 0}function $d(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;c=u;u=u+48|0;d=c+40|0;e=c+36|0;g=c+32|0;h=c;i=a+80|0;$h(f[i>>2]|0,b)|0;Ln(h);yk(h);j=f[a+76>>2]|0;k=f[i>>2]|0;i=k>>>5;l=j+(i<<2)|0;m=k&31;k=(i|0)!=0;a:do if(i|m|0){if(!m){n=1;o=j;p=k;while(1){if(p){q=n;r=0;while(1){s=(f[o>>2]&1<<r|0)!=0;ej(h,q^s^1);if((r|0)==31){t=s;break}else{q=s;r=r+1|0}}}else{r=n;q=0;while(1){s=(f[o>>2]&1<<q|0)!=0;ej(h,r^s^1);if((q|0)==31){t=s;break}else{r=s;q=q+1|0}}}o=o+4|0;if((l|0)==(o|0))break a;else{n=t;p=1}}}if(k){p=1;n=j;while(1){o=p;q=0;while(1){r=o;o=(f[n>>2]&1<<q|0)!=0;ej(h,r^o^1);if((q|0)==31)break;else q=q+1|0}q=n+4|0;if((l|0)==(q|0)){v=o;w=q;break}else{p=o;n=q}}}else{v=1;w=j}n=v;p=0;do{q=n;n=(f[w>>2]&1<<p|0)!=0;ej(h,q^n^1);p=p+1|0}while((p|0)!=(m|0))}while(0);nd(h,b);f[g>>2]=f[a+12>>2];m=b+16|0;w=m;v=f[w>>2]|0;j=f[w+4>>2]|0;if((j|0)>0|(j|0)==0&v>>>0>0){x=j;y=v}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;v=m;x=f[v+4>>2]|0;y=f[v>>2]|0}f[g>>2]=f[a+16>>2];if((x|0)>0|(x|0)==0&y>>>0>0){Ej(h);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;Ej(h);u=c;return 1}
+function $a(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=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>>l;n=i>>>1&2;h=i>>>n;i=h>>>1&1;s=f[20152+((k|j|l|n|i)+(h>>>i)<<2)>>2]|0;i=(f[s+4>>2]&-8)-d|0;h=f[s+16+(((f[s+16>>2]|0)==0&1)<<2)>>2]|0;if(!h){t=s;v=i}else{n=s;s=i;i=h;while(1){h=(f[i+4>>2]&-8)-d|0;l=h>>>0<s>>>0;j=l?h:s;h=l?i:n;i=f[i+16+(((f[i+16>>2]|0)==0&1)<<2)>>2]|0;if(!i){t=h;v=j;break}else{n=h;s=j}}}s=t+d|0;if(s>>>0>t>>>0){n=f[t+24>>2]|0;i=f[t+12>>2]|0;do if((i|0)==(t|0)){j=t+20|0;h=f[j>>2]|0;if(!h){l=t+16|0;k=f[l>>2]|0;if(!k){w=0;break}else{x=k;y=l}}else{x=h;y=j}while(1){j=x+20|0;h=f[j>>2]|0;if(h|0){x=h;y=j;continue}j=x+16|0;h=f[j>>2]|0;if(!h)break;else{x=h;y=j}}f[y>>2]=0;w=x}else{j=f[t+8>>2]|0;f[j+12>>2]=i;f[i+8>>2]=j;w=i}while(0);do if(n|0){i=f[t+28>>2]|0;j=20152+(i<<2)|0;if((t|0)==(f[j>>2]|0)){f[j>>2]=w;if(!w){f[4963]=e&~(1<<i);break}}else{f[n+16+(((f[n+16>>2]|0)!=(t|0)&1)<<2)>>2]=w;if(!w)break}f[w+24>>2]=n;i=f[t+16>>2]|0;if(i|0){f[w+16>>2]=i;f[i+24>>2]=w}i=f[t+20>>2]|0;if(i|0){f[w+20>>2]=i;f[i+24>>2]=w}}while(0);if(v>>>0<16){n=v+d|0;f[t+4>>2]=n|3;e=t+n+4|0;f[e>>2]=f[e>>2]|1}else{f[t+4>>2]=d|3;f[s+4>>2]=v|1;f[s+v>>2]=v;if(m|0){e=f[4967]|0;n=m>>>3;i=19888+(n<<1<<2)|0;j=1<<n;if(!(g&j)){f[4962]=g|j;z=i;A=i+8|0}else{j=i+8|0;z=f[j>>2]|0;A=j}f[A>>2]=e;f[z+12>>2]=e;f[e+8>>2]=z;f[e+12>>2]=i}f[4964]=v;f[4967]=s}o=t+8|0;u=b;return o|0}else B=d}else B=d}else B=d}else if(a>>>0<=4294967231){i=a+11|0;e=i&-8;j=f[4963]|0;if(j){n=0-e|0;h=i>>>8;if(h)if(e>>>0>16777215)C=31;else{i=(h+1048320|0)>>>16&8;l=h<<i;h=(l+520192|0)>>>16&4;k=l<<h;l=(k+245760|0)>>>16&2;D=14-(h|i|l)+(k<<l>>>15)|0;C=e>>>(D+7|0)&1|D<<1}else C=0;D=f[20152+(C<<2)>>2]|0;a:do if(!D){E=0;F=0;G=n;H=57}else{l=0;k=n;i=D;h=e<<((C|0)==31?0:25-(C>>>1)|0);I=0;while(1){J=(f[i+4>>2]&-8)-e|0;if(J>>>0<k>>>0)if(!J){K=0;L=i;M=i;H=61;break a}else{N=i;O=J}else{N=l;O=k}J=f[i+20>>2]|0;i=f[i+16+(h>>>31<<2)>>2]|0;P=(J|0)==0|(J|0)==(i|0)?I:J;J=(i|0)==0;if(J){E=P;F=N;G=O;H=57;break}else{l=N;k=O;h=h<<((J^1)&1);I=P}}}while(0);if((H|0)==57){if((E|0)==0&(F|0)==0){D=2<<C;n=j&(D|0-D);if(!n){B=e;break}D=(n&0-n)+-1|0;n=D>>>12&16;d=D>>>n;D=d>>>5&8;s=d>>>D;d=s>>>2&4;g=s>>>d;s=g>>>1&2;m=g>>>s;g=m>>>1&1;Q=0;R=f[20152+((D|n|d|s|g)+(m>>>g)<<2)>>2]|0}else{Q=F;R=E}if(!R){S=Q;T=G}else{K=G;L=R;M=Q;H=61}}if((H|0)==61)while(1){H=0;g=(f[L+4>>2]&-8)-e|0;m=g>>>0<K>>>0;s=m?g:K;g=m?L:M;L=f[L+16+(((f[L+16>>2]|0)==0&1)<<2)>>2]|0;if(!L){S=g;T=s;break}else{K=s;M=g;H=61}}if((S|0)!=0?T>>>0<((f[4964]|0)-e|0)>>>0:0){g=S+e|0;if(g>>>0<=S>>>0){o=0;u=b;return o|0}s=f[S+24>>2]|0;m=f[S+12>>2]|0;do if((m|0)==(S|0)){d=S+20|0;n=f[d>>2]|0;if(!n){D=S+16|0;I=f[D>>2]|0;if(!I){U=0;break}else{V=I;W=D}}else{V=n;W=d}while(1){d=V+20|0;n=f[d>>2]|0;if(n|0){V=n;W=d;continue}d=V+16|0;n=f[d>>2]|0;if(!n)break;else{V=n;W=d}}f[W>>2]=0;U=V}else{d=f[S+8>>2]|0;f[d+12>>2]=m;f[m+8>>2]=d;U=m}while(0);do if(s){m=f[S+28>>2]|0;d=20152+(m<<2)|0;if((S|0)==(f[d>>2]|0)){f[d>>2]=U;if(!U){d=j&~(1<<m);f[4963]=d;X=d;break}}else{f[s+16+(((f[s+16>>2]|0)!=(S|0)&1)<<2)>>2]=U;if(!U){X=j;break}}f[U+24>>2]=s;d=f[S+16>>2]|0;if(d|0){f[U+16>>2]=d;f[d+24>>2]=U}d=f[S+20>>2]|0;if(d){f[U+20>>2]=d;f[d+24>>2]=U;X=j}else X=j}else X=j;while(0);do if(T>>>0>=16){f[S+4>>2]=e|3;f[g+4>>2]=T|1;f[g+T>>2]=T;j=T>>>3;if(T>>>0<256){s=19888+(j<<1<<2)|0;d=f[4962]|0;m=1<<j;if(!(d&m)){f[4962]=d|m;Y=s;Z=s+8|0}else{m=s+8|0;Y=f[m>>2]|0;Z=m}f[Z>>2]=g;f[Y+12>>2]=g;f[g+8>>2]=Y;f[g+12>>2]=s;break}s=T>>>8;if(s)if(T>>>0>16777215)_=31;else{m=(s+1048320|0)>>>16&8;d=s<<m;s=(d+520192|0)>>>16&4;j=d<<s;d=(j+245760|0)>>>16&2;n=14-(s|m|d)+(j<<d>>>15)|0;_=T>>>(n+7|0)&1|n<<1}else _=0;n=20152+(_<<2)|0;f[g+28>>2]=_;d=g+16|0;f[d+4>>2]=0;f[d>>2]=0;d=1<<_;if(!(X&d)){f[4963]=X|d;f[n>>2]=g;f[g+24>>2]=n;f[g+12>>2]=g;f[g+8>>2]=g;break}d=T<<((_|0)==31?0:25-(_>>>1)|0);j=f[n>>2]|0;while(1){if((f[j+4>>2]&-8|0)==(T|0)){H=97;break}$=j+16+(d>>>31<<2)|0;n=f[$>>2]|0;if(!n){H=96;break}else{d=d<<1;j=n}}if((H|0)==96){f[$>>2]=g;f[g+24>>2]=j;f[g+12>>2]=g;f[g+8>>2]=g;break}else if((H|0)==97){d=j+8|0;n=f[d>>2]|0;f[n+12>>2]=g;f[d>>2]=g;f[g+8>>2]=n;f[g+12>>2]=j;f[g+24>>2]=0;break}}else{n=T+e|0;f[S+4>>2]=n|3;d=S+n+4|0;f[d>>2]=f[d>>2]|1}while(0);o=S+8|0;u=b;return o|0}else B=e}else B=e}else B=-1;while(0);S=f[4964]|0;if(S>>>0>=B>>>0){T=S-B|0;$=f[4967]|0;if(T>>>0>15){_=$+B|0;f[4967]=_;f[4964]=T;f[_+4>>2]=T|1;f[$+S>>2]=T;f[$+4>>2]=B|3}else{f[4964]=0;f[4967]=0;f[$+4>>2]=S|3;T=$+S+4|0;f[T>>2]=f[T>>2]|1}o=$+8|0;u=b;return o|0}$=f[4965]|0;if($>>>0>B>>>0){T=$-B|0;f[4965]=T;S=f[4968]|0;_=S+B|0;f[4968]=_;f[_+4>>2]=T|1;f[S+4>>2]=B|3;o=S+8|0;u=b;return o|0}if(!(f[5080]|0)){f[5082]=4096;f[5081]=4096;f[5083]=-1;f[5084]=-1;f[5085]=0;f[5073]=0;f[5080]=c&-16^1431655768;aa=4096}else aa=f[5082]|0;c=B+48|0;S=B+47|0;T=aa+S|0;_=0-aa|0;aa=T&_;if(aa>>>0<=B>>>0){o=0;u=b;return o|0}X=f[5072]|0;if(X|0?(Y=f[5070]|0,Z=Y+aa|0,Z>>>0<=Y>>>0|Z>>>0>X>>>0):0){o=0;u=b;return o|0}b:do if(!(f[5073]&4)){X=f[4968]|0;c:do if(X){Z=20296;while(1){Y=f[Z>>2]|0;if(Y>>>0<=X>>>0?(ba=Z+4|0,(Y+(f[ba>>2]|0)|0)>>>0>X>>>0):0)break;Y=f[Z+8>>2]|0;if(!Y){H=118;break c}else Z=Y}j=T-$&_;if(j>>>0<2147483647){Y=Xl(j|0)|0;if((Y|0)==((f[Z>>2]|0)+(f[ba>>2]|0)|0))if((Y|0)==(-1|0))ca=j;else{da=j;ea=Y;H=135;break b}else{fa=Y;ga=j;H=126}}else ca=0}else H=118;while(0);do if((H|0)==118){X=Xl(0)|0;if((X|0)!=(-1|0)?(e=X,j=f[5081]|0,Y=j+-1|0,U=((Y&e|0)==0?0:(Y+e&0-j)-e|0)+aa|0,e=f[5070]|0,j=U+e|0,U>>>0>B>>>0&U>>>0<2147483647):0){Y=f[5072]|0;if(Y|0?j>>>0<=e>>>0|j>>>0>Y>>>0:0){ca=0;break}Y=Xl(U|0)|0;if((Y|0)==(X|0)){da=U;ea=X;H=135;break b}else{fa=Y;ga=U;H=126}}else ca=0}while(0);do if((H|0)==126){U=0-ga|0;if(!(c>>>0>ga>>>0&(ga>>>0<2147483647&(fa|0)!=(-1|0))))if((fa|0)==(-1|0)){ca=0;break}else{da=ga;ea=fa;H=135;break b}Y=f[5082]|0;X=S-ga+Y&0-Y;if(X>>>0>=2147483647){da=ga;ea=fa;H=135;break b}if((Xl(X|0)|0)==(-1|0)){Xl(U|0)|0;ca=0;break}else{da=X+ga|0;ea=fa;H=135;break b}}while(0);f[5073]=f[5073]|4;ha=ca;H=133}else{ha=0;H=133}while(0);if(((H|0)==133?aa>>>0<2147483647:0)?(ca=Xl(aa|0)|0,aa=Xl(0)|0,fa=aa-ca|0,ga=fa>>>0>(B+40|0)>>>0,!((ca|0)==(-1|0)|ga^1|ca>>>0<aa>>>0&((ca|0)!=(-1|0)&(aa|0)!=(-1|0))^1)):0){da=ga?fa:ha;ea=ca;H=135}if((H|0)==135){ca=(f[5070]|0)+da|0;f[5070]=ca;if(ca>>>0>(f[5071]|0)>>>0)f[5071]=ca;ca=f[4968]|0;do if(ca){ha=20296;while(1){ia=f[ha>>2]|0;ja=ha+4|0;ka=f[ja>>2]|0;if((ea|0)==(ia+ka|0)){H=143;break}fa=f[ha+8>>2]|0;if(!fa)break;else ha=fa}if(((H|0)==143?(f[ha+12>>2]&8|0)==0:0)?ea>>>0>ca>>>0&ia>>>0<=ca>>>0:0){f[ja>>2]=ka+da;fa=(f[4965]|0)+da|0;ga=ca+8|0;aa=(ga&7|0)==0?0:0-ga&7;ga=ca+aa|0;S=fa-aa|0;f[4968]=ga;f[4965]=S;f[ga+4>>2]=S|1;f[ca+fa+4>>2]=40;f[4969]=f[5084];break}if(ea>>>0<(f[4966]|0)>>>0)f[4966]=ea;fa=ea+da|0;S=20296;while(1){if((f[S>>2]|0)==(fa|0)){H=151;break}ga=f[S+8>>2]|0;if(!ga){la=20296;break}else S=ga}if((H|0)==151)if(!(f[S+12>>2]&8)){f[S>>2]=ea;ha=S+4|0;f[ha>>2]=(f[ha>>2]|0)+da;ha=ea+8|0;ga=ea+((ha&7|0)==0?0:0-ha&7)|0;ha=fa+8|0;aa=fa+((ha&7|0)==0?0:0-ha&7)|0;ha=ga+B|0;c=aa-ga-B|0;f[ga+4>>2]=B|3;do if((ca|0)!=(aa|0)){if((f[4967]|0)==(aa|0)){ba=(f[4964]|0)+c|0;f[4964]=ba;f[4967]=ha;f[ha+4>>2]=ba|1;f[ha+ba>>2]=ba;break}ba=f[aa+4>>2]|0;if((ba&3|0)==1){_=ba&-8;$=ba>>>3;d:do if(ba>>>0<256){T=f[aa+8>>2]|0;X=f[aa+12>>2]|0;if((X|0)==(T|0)){f[4962]=f[4962]&~(1<<$);break}else{f[T+12>>2]=X;f[X+8>>2]=T;break}}else{T=f[aa+24>>2]|0;X=f[aa+12>>2]|0;do if((X|0)==(aa|0)){U=aa+16|0;Y=U+4|0;j=f[Y>>2]|0;if(!j){e=f[U>>2]|0;if(!e){ma=0;break}else{na=e;oa=U}}else{na=j;oa=Y}while(1){Y=na+20|0;j=f[Y>>2]|0;if(j|0){na=j;oa=Y;continue}Y=na+16|0;j=f[Y>>2]|0;if(!j)break;else{na=j;oa=Y}}f[oa>>2]=0;ma=na}else{Y=f[aa+8>>2]|0;f[Y+12>>2]=X;f[X+8>>2]=Y;ma=X}while(0);if(!T)break;X=f[aa+28>>2]|0;Y=20152+(X<<2)|0;do if((f[Y>>2]|0)!=(aa|0)){f[T+16+(((f[T+16>>2]|0)!=(aa|0)&1)<<2)>>2]=ma;if(!ma)break d}else{f[Y>>2]=ma;if(ma|0)break;f[4963]=f[4963]&~(1<<X);break d}while(0);f[ma+24>>2]=T;X=aa+16|0;Y=f[X>>2]|0;if(Y|0){f[ma+16>>2]=Y;f[Y+24>>2]=ma}Y=f[X+4>>2]|0;if(!Y)break;f[ma+20>>2]=Y;f[Y+24>>2]=ma}while(0);pa=aa+_|0;qa=_+c|0}else{pa=aa;qa=c}$=pa+4|0;f[$>>2]=f[$>>2]&-2;f[ha+4>>2]=qa|1;f[ha+qa>>2]=qa;$=qa>>>3;if(qa>>>0<256){ba=19888+($<<1<<2)|0;Z=f[4962]|0;Y=1<<$;if(!(Z&Y)){f[4962]=Z|Y;ra=ba;sa=ba+8|0}else{Y=ba+8|0;ra=f[Y>>2]|0;sa=Y}f[sa>>2]=ha;f[ra+12>>2]=ha;f[ha+8>>2]=ra;f[ha+12>>2]=ba;break}ba=qa>>>8;do if(!ba)ta=0;else{if(qa>>>0>16777215){ta=31;break}Y=(ba+1048320|0)>>>16&8;Z=ba<<Y;$=(Z+520192|0)>>>16&4;X=Z<<$;Z=(X+245760|0)>>>16&2;j=14-($|Y|Z)+(X<<Z>>>15)|0;ta=qa>>>(j+7|0)&1|j<<1}while(0);ba=20152+(ta<<2)|0;f[ha+28>>2]=ta;_=ha+16|0;f[_+4>>2]=0;f[_>>2]=0;_=f[4963]|0;j=1<<ta;if(!(_&j)){f[4963]=_|j;f[ba>>2]=ha;f[ha+24>>2]=ba;f[ha+12>>2]=ha;f[ha+8>>2]=ha;break}j=qa<<((ta|0)==31?0:25-(ta>>>1)|0);_=f[ba>>2]|0;while(1){if((f[_+4>>2]&-8|0)==(qa|0)){H=192;break}ua=_+16+(j>>>31<<2)|0;ba=f[ua>>2]|0;if(!ba){H=191;break}else{j=j<<1;_=ba}}if((H|0)==191){f[ua>>2]=ha;f[ha+24>>2]=_;f[ha+12>>2]=ha;f[ha+8>>2]=ha;break}else if((H|0)==192){j=_+8|0;ba=f[j>>2]|0;f[ba+12>>2]=ha;f[j>>2]=ha;f[ha+8>>2]=ba;f[ha+12>>2]=_;f[ha+24>>2]=0;break}}else{ba=(f[4965]|0)+c|0;f[4965]=ba;f[4968]=ha;f[ha+4>>2]=ba|1}while(0);o=ga+8|0;u=b;return o|0}else la=20296;while(1){ha=f[la>>2]|0;if(ha>>>0<=ca>>>0?(va=ha+(f[la+4>>2]|0)|0,va>>>0>ca>>>0):0)break;la=f[la+8>>2]|0}ga=va+-47|0;ha=ga+8|0;c=ga+((ha&7|0)==0?0:0-ha&7)|0;ha=ca+16|0;ga=c>>>0<ha>>>0?ca:c;c=ga+8|0;aa=da+-40|0;fa=ea+8|0;S=(fa&7|0)==0?0:0-fa&7;fa=ea+S|0;ba=aa-S|0;f[4968]=fa;f[4965]=ba;f[fa+4>>2]=ba|1;f[ea+aa+4>>2]=40;f[4969]=f[5084];aa=ga+4|0;f[aa>>2]=27;f[c>>2]=f[5074];f[c+4>>2]=f[5075];f[c+8>>2]=f[5076];f[c+12>>2]=f[5077];f[5074]=ea;f[5075]=da;f[5077]=0;f[5076]=c;c=ga+24|0;do{ba=c;c=c+4|0;f[c>>2]=7}while((ba+8|0)>>>0<va>>>0);if((ga|0)!=(ca|0)){c=ga-ca|0;f[aa>>2]=f[aa>>2]&-2;f[ca+4>>2]=c|1;f[ga>>2]=c;ba=c>>>3;if(c>>>0<256){fa=19888+(ba<<1<<2)|0;S=f[4962]|0;j=1<<ba;if(!(S&j)){f[4962]=S|j;wa=fa;xa=fa+8|0}else{j=fa+8|0;wa=f[j>>2]|0;xa=j}f[xa>>2]=ca;f[wa+12>>2]=ca;f[ca+8>>2]=wa;f[ca+12>>2]=fa;break}fa=c>>>8;if(fa)if(c>>>0>16777215)ya=31;else{j=(fa+1048320|0)>>>16&8;S=fa<<j;fa=(S+520192|0)>>>16&4;ba=S<<fa;S=(ba+245760|0)>>>16&2;Z=14-(fa|j|S)+(ba<<S>>>15)|0;ya=c>>>(Z+7|0)&1|Z<<1}else ya=0;Z=20152+(ya<<2)|0;f[ca+28>>2]=ya;f[ca+20>>2]=0;f[ha>>2]=0;S=f[4963]|0;ba=1<<ya;if(!(S&ba)){f[4963]=S|ba;f[Z>>2]=ca;f[ca+24>>2]=Z;f[ca+12>>2]=ca;f[ca+8>>2]=ca;break}ba=c<<((ya|0)==31?0:25-(ya>>>1)|0);S=f[Z>>2]|0;while(1){if((f[S+4>>2]&-8|0)==(c|0)){H=213;break}za=S+16+(ba>>>31<<2)|0;Z=f[za>>2]|0;if(!Z){H=212;break}else{ba=ba<<1;S=Z}}if((H|0)==212){f[za>>2]=ca;f[ca+24>>2]=S;f[ca+12>>2]=ca;f[ca+8>>2]=ca;break}else if((H|0)==213){ba=S+8|0;c=f[ba>>2]|0;f[c+12>>2]=ca;f[ba>>2]=ca;f[ca+8>>2]=c;f[ca+12>>2]=S;f[ca+24>>2]=0;break}}}else{c=f[4966]|0;if((c|0)==0|ea>>>0<c>>>0)f[4966]=ea;f[5074]=ea;f[5075]=da;f[5077]=0;f[4971]=f[5080];f[4970]=-1;f[4975]=19888;f[4974]=19888;f[4977]=19896;f[4976]=19896;f[4979]=19904;f[4978]=19904;f[4981]=19912;f[4980]=19912;f[4983]=19920;f[4982]=19920;f[4985]=19928;f[4984]=19928;f[4987]=19936;f[4986]=19936;f[4989]=19944;f[4988]=19944;f[4991]=19952;f[4990]=19952;f[4993]=19960;f[4992]=19960;f[4995]=19968;f[4994]=19968;f[4997]=19976;f[4996]=19976;f[4999]=19984;f[4998]=19984;f[5001]=19992;f[5e3]=19992;f[5003]=2e4;f[5002]=2e4;f[5005]=20008;f[5004]=20008;f[5007]=20016;f[5006]=20016;f[5009]=20024;f[5008]=20024;f[5011]=20032;f[5010]=20032;f[5013]=20040;f[5012]=20040;f[5015]=20048;f[5014]=20048;f[5017]=20056;f[5016]=20056;f[5019]=20064;f[5018]=20064;f[5021]=20072;f[5020]=20072;f[5023]=20080;f[5022]=20080;f[5025]=20088;f[5024]=20088;f[5027]=20096;f[5026]=20096;f[5029]=20104;f[5028]=20104;f[5031]=20112;f[5030]=20112;f[5033]=20120;f[5032]=20120;f[5035]=20128;f[5034]=20128;f[5037]=20136;f[5036]=20136;c=da+-40|0;ba=ea+8|0;ha=(ba&7|0)==0?0:0-ba&7;ba=ea+ha|0;ga=c-ha|0;f[4968]=ba;f[4965]=ga;f[ba+4>>2]=ga|1;f[ea+c+4>>2]=40;f[4969]=f[5084]}while(0);ea=f[4965]|0;if(ea>>>0>B>>>0){da=ea-B|0;f[4965]=da;ea=f[4968]|0;ca=ea+B|0;f[4968]=ca;f[ca+4>>2]=da|1;f[ea+4>>2]=B|3;o=ea+8|0;u=b;return o|0}}ea=Br()|0;f[ea>>2]=12;o=0;u=b;return o|0}function ab(a,c,d,e,g,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0.0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fb=0;while(1){if(!(b[n+gb>>0]|0))mb=(1<<gb|fb&255)&255;else mb=fb;gb=gb+1|0;if((gb|0)==(Ka|0)){lb=mb;break}else fb=mb}}fb=f[m>>2]|0;do if(T){f[fb>>2]=(f[fb>>2]|0)/(db|0)|0;if(!oa){gb=1;do{eb=fb+(gb<<2)|0;f[eb>>2]=(f[eb>>2]|0)/(db|0)|0;gb=gb+1|0}while((gb|0)!=(g|0));gb=f[_>>2]|0;if(T)nb=gb;else{ob=0;pb=gb;break}}else nb=f[_>>2]|0;gb=0;eb=0;while(1){ib=(f[fb+(gb<<2)>>2]|0)-(f[Ea+(gb<<2)>>2]|0)|0;hb=((ib|0)>-1?ib:0-ib|0)+eb|0;f[Ia+(gb<<2)>>2]=ib;f[nb+(gb<<2)>>2]=ib<<1^ib>>31;gb=gb+1|0;if((gb|0)==(g|0)){ob=hb;pb=nb;break}else eb=hb}}else{ob=0;pb=f[_>>2]|0}while(0);Bo(j,$,pb,g);fb=hl(j)|0;eb=I;gb=Im(j)|0;hb=lo(gb|0,I|0,fb|0,eb|0)|0;eb=I;if(Ba){fb=Ha;gb=lo(f[fb>>2]|0,f[fb+4>>2]|0,db|0,0)|0;fb=pa;ib=f[fb>>2]|0;jb=f[fb+4>>2]|0;Va=+W(+(+Dm(ib,gb)*(+(ib>>>0)+4294967296.0*+(jb|0))));jb=lo(hb|0,eb|0,~~Va>>>0|0,(+K(Va)>=1.0?(Va>0.0?~~+Y(+J(Va/4294967296.0),4294967295.0)>>>0:~~+W((Va-+(~~Va>>>0))/4294967296.0)>>>0):0)|0)|0;qb=jb}else qb=hb;hb=f[r>>2]|0;if(!((qb|0)>=(hb|0)?!((qb|0)<=(hb|0)?(ob|0)<(f[U>>2]|0):0):0)){hb=r;f[hb>>2]=qb;f[hb+4>>2]=ob;b[V>>0]=lb;f[Z>>2]=db;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[k>>2]=f[v>>2];f[j>>2]=f[w>>2];If(aa,k,j);f[x>>2]=Ca;f[y>>2]=Qa;f[k>>2]=f[x>>2];f[j>>2]=f[y>>2];If(ba,k,j)}if(Ma)break;rb=b[Ja>>0]|0;hb=-1;jb=rb;while(1){eb=hb+-1|0;sb=Da+eb|0;ib=jb;jb=b[sb>>0]|0;if((jb&255)<(ib&255))break;if((sb|0)==(n|0)){tb=86;break d}else hb=eb}eb=Da+hb|0;if((jb&255)<(rb&255)){ub=Ja;vb=rb}else{ib=Da;gb=Ja;while(1){fb=gb+-1|0;if((jb&255)<(h[ib+-2>>0]|0)){ub=fb;vb=1;break}else{wb=gb;gb=fb;ib=wb}}}b[sb>>0]=vb;b[ub>>0]=jb;if((hb|0)<-1){xb=eb;yb=Ja}else continue;while(1){ib=b[xb>>0]|0;b[xb>>0]=b[yb>>0]|0;b[yb>>0]=ib;ib=xb+1|0;gb=yb+-1|0;if(ib>>>0<gb>>>0){xb=ib;yb=gb}else continue d}}if(((tb|0)==86?(tb=0,Oa):0)?(eb=b[n>>0]|0,b[n>>0]=rb,b[Ja>>0]=eb,Ra):0){eb=Pa;hb=ma;do{jb=b[hb>>0]|0;b[hb>>0]=b[eb>>0]|0;b[eb>>0]=jb;hb=hb+1|0;eb=eb+-1|0}while(hb>>>0<eb>>>0)}if((db|0)>=(Ka|0)){Xa=La;Ya=Ia;Za=La;_a=Ia;$a=Qa;ab=Ca;bb=Ia;break}else db=db+1|0}}if(Ba){db=f[Z>>2]|0;Ia=o+(Ka+-1<<3)|0;Ca=Ia;Qa=lo(f[Ca>>2]|0,f[Ca+4>>2]|0,db|0,((db|0)<0)<<31>>31|0)|0;db=Ia;f[db>>2]=Qa;f[db+4>>2]=I}if(T){db=f[ba>>2]|0;Qa=f[C>>2]|0;Ia=0;do{Ca=f[db+(Ia<<2)>>2]|0;f[Qa+(Ia<<2)>>2]=Ca<<1^Ca>>31;Ia=Ia+1|0}while((Ia|0)!=(g|0));zb=Qa}else zb=f[C>>2]|0;Ao(j,$,zb,g);if(Ba){Qa=Ka+-1|0;Ab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=0;while(1){if(!(b[n+ib>>0]|0))ob=(1<<ib|hb&255)&255;else ob=hb;ib=ib+1|0;if((ib|0)==(Ha|0)){nb=ob;break}else hb=ob}}hb=f[m>>2]|0;do if(S){f[hb>>2]=(f[hb>>2]|0)/(fb|0)|0;if(!na){ib=1;do{gb=hb+(ib<<2)|0;f[gb>>2]=(f[gb>>2]|0)/(fb|0)|0;ib=ib+1|0}while((ib|0)!=(g|0));ib=f[Z>>2]|0;if(S)pb=ib;else{qb=0;rb=ib;break}}else pb=f[Z>>2]|0;ib=0;gb=0;while(1){kb=(f[hb+(ib<<2)>>2]|0)-(f[Ba+(ib<<2)>>2]|0)|0;jb=((kb|0)>-1?kb:0-kb|0)+gb|0;f[Oa+(ib<<2)>>2]=kb;f[pb+(ib<<2)>>2]=kb<<1^kb>>31;ib=ib+1|0;if((ib|0)==(g|0)){qb=jb;rb=pb;break}else gb=jb}}else{qb=0;rb=f[Z>>2]|0}while(0);Bo(j,_,rb,g);hb=hl(j)|0;gb=I;ib=Im(j)|0;jb=lo(ib|0,I|0,hb|0,gb|0)|0;gb=I;if(oa){hb=Ma;ib=lo(f[hb>>2]|0,f[hb+4>>2]|0,fb|0,0)|0;hb=Fa;kb=f[hb>>2]|0;lb=f[hb+4>>2]|0;Va=+W(+(+Dm(kb,ib)*(+(kb>>>0)+4294967296.0*+(lb|0))));lb=lo(jb|0,gb|0,~~Va>>>0|0,(+K(Va)>=1.0?(Va>0.0?~~+Y(+J(Va/4294967296.0),4294967295.0)>>>0:~~+W((Va-+(~~Va>>>0))/4294967296.0)>>>0):0)|0)|0;sb=lb}else sb=jb;jb=f[r>>2]|0;if(!((sb|0)>=(jb|0)?!((sb|0)<=(jb|0)?(qb|0)<(f[T>>2]|0):0):0)){jb=r;f[jb>>2]=sb;f[jb+4>>2]=qb;b[U>>0]=nb;f[V>>2]=fb;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[k>>2]=f[v>>2];f[j>>2]=f[w>>2];If($,k,j);f[x>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;k=h;a:while(1){l=(f[7216+(g<<2)>>2]|0)+k|0;h=5;while(1){if(h>>>0>=47){m=211;n=i;o=8;break}p=f[7024+(h<<2)>>2]|0;q=(l>>>0)/(p>>>0)|0;if(q>>>0<p>>>0){o=106;break a}if((l|0)==(X(q,p)|0)){r=i;break}else h=h+1|0}b:do if((o|0)==8){c:while(1){o=0;h=(l>>>0)/(m>>>0)|0;do if(h>>>0>=m>>>0)if((l|0)!=(X(h,m)|0)){p=m+10|0;q=(l>>>0)/(p>>>0)|0;if(q>>>0>=p>>>0)if((l|0)!=(X(q,p)|0)){q=m+12|0;s=(l>>>0)/(q>>>0)|0;if(s>>>0>=q>>>0)if((l|0)!=(X(s,q)|0)){s=m+16|0;t=(l>>>0)/(s>>>0)|0;if(t>>>0>=s>>>0)if((l|0)!=(X(t,s)|0)){t=m+18|0;v=(l>>>0)/(t>>>0)|0;if(v>>>0>=t>>>0)if((l|0)!=(X(v,t)|0)){v=m+22|0;w=(l>>>0)/(v>>>0)|0;if(w>>>0>=v>>>0)if((l|0)!=(X(w,v)|0)){w=m+28|0;x=(l>>>0)/(w>>>0)|0;if(x>>>0>=w>>>0)if((l|0)==(X(x,w)|0)){y=w;z=9;A=n}else{x=m+30|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+36|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+40|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+42|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+46|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+52|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+58|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+60|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+66|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+70|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+72|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+78|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+82|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+88|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+96|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+100|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+102|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+106|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+108|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+112|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+120|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+126|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+130|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+136|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+138|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+142|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+148|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+150|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+156|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+162|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+166|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+168|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+172|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+178|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+180|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+186|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+190|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+192|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+196|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+198|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0<x>>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+208|0;B=(l>>>0)/(x>>>0)|0;C=B>>>0<x>>>0;D=(l|0)==(X(B,x)|0);y=C|D?x:m+210|0;z=C?1:D?9:0;A=C?l:n}else{y=w;z=1;A=l}}else{y=v;z=9;A=n}else{y=v;z=1;A=l}}else{y=t;z=9;A=n}else{y=t;z=1;A=l}}else{y=s;z=9;A=n}else{y=s;z=1;A=l}}else{y=q;z=9;A=n}else{y=q;z=1;A=l}}else{y=p;z=9;A=n}else{y=p;z=1;A=l}}else{y=m;z=9;A=n}else{y=m;z=1;A=l}while(0);switch(z&15){case 9:{r=A;break b;break}case 0:{m=y;n=A;o=8;break}default:break c}}if(!z)r=A;else{o=107;break a}}while(0);h=g+1|0;p=(h|0)==48;q=j+(p&1)|0;i=r;j=q;g=p?0:h;k=q*210|0}if((o|0)==106){f[d>>2]=l;E=l;break}else if((o|0)==107){f[d>>2]=l;E=A;break}}else{k=Rl(7024,7216,d,c)|0;E=f[k>>2]|0}while(0);u=b;return E|0}function db(a,c,d,e,g,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0.0,Ua=0,Va=0,Wa=0,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2]=(f[db>>2]|0)/(bb|0)|0;if(!ma){eb=1;do{cb=db+(eb<<2)|0;f[cb>>2]=(f[cb>>2]|0)/(bb|0)|0;eb=eb+1|0}while((eb|0)!=(g|0));eb=f[_>>2]|0;if(T)lb=eb;else{mb=0;nb=eb;break}}else lb=f[_>>2]|0;eb=0;cb=0;while(1){gb=(f[db+(eb<<2)>>2]|0)-(f[Ca+(eb<<2)>>2]|0)|0;fb=((gb|0)>-1?gb:0-gb|0)+cb|0;f[Ga+(eb<<2)>>2]=gb;f[lb+(eb<<2)>>2]=gb<<1^gb>>31;eb=eb+1|0;if((eb|0)==(g|0)){mb=fb;nb=lb;break}else cb=fb}}else{mb=0;nb=f[_>>2]|0}while(0);Bo(e,$,nb,g);db=hl(e)|0;cb=I;eb=Im(e)|0;fb=lo(eb|0,I|0,db|0,cb|0)|0;cb=I;if(za){db=Fa;eb=lo(f[db>>2]|0,f[db+4>>2]|0,bb|0,0)|0;db=na;gb=f[db>>2]|0;hb=f[db+4>>2]|0;Ta=+W(+(+Dm(gb,eb)*(+(gb>>>0)+4294967296.0*+(hb|0))));hb=lo(fb|0,cb|0,~~Ta>>>0|0,(+K(Ta)>=1.0?(Ta>0.0?~~+Y(+J(Ta/4294967296.0),4294967295.0)>>>0:~~+W((Ta-+(~~Ta>>>0))/4294967296.0)>>>0):0)|0)|0;ob=hb}else ob=fb;fb=f[r>>2]|0;if(!((ob|0)>=(fb|0)?!((ob|0)<=(fb|0)?(mb|0)<(f[U>>2]|0):0):0)){fb=r;f[fb>>2]=ob;f[fb+4>>2]=mb;b[V>>0]=jb;f[Z>>2]=bb;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[j>>2]=f[v>>2];f[e>>2]=f[w>>2];If(aa,j,e);f[x>>2]=Aa;f[y>>2]=Oa;f[j>>2]=f[x>>2];f[e>>2]=f[y>>2];If(ba,j,e)}if(Ka)break;pb=b[Ha>>0]|0;fb=-1;hb=pb;while(1){cb=fb+-1|0;qb=Ba+cb|0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0)==(Fa|0)){lb=mb;break}else fb=mb}}fb=f[m>>2]|0;do if(S){f[fb>>2]=(f[fb>>2]|0)/(db|0)|0;if(!la){gb=1;do{eb=fb+(gb<<2)|0;f[eb>>2]=(f[eb>>2]|0)/(db|0)|0;gb=gb+1|0}while((gb|0)!=(g|0));gb=f[Z>>2]|0;if(S)nb=gb;else{ob=0;pb=gb;break}}else nb=f[Z>>2]|0;gb=0;eb=0;while(1){ib=(f[fb+(gb<<2)>>2]|0)-(f[za+(gb<<2)>>2]|0)|0;hb=((ib|0)>-1?ib:0-ib|0)+eb|0;f[Ma+(gb<<2)>>2]=ib;f[nb+(gb<<2)>>2]=ib<<1^ib>>31;gb=gb+1|0;if((gb|0)==(g|0)){ob=hb;pb=nb;break}else eb=hb}}else{ob=0;pb=f[Z>>2]|0}while(0);Bo(e,_,pb,g);fb=hl(e)|0;eb=I;gb=Im(e)|0;hb=lo(gb|0,I|0,fb|0,eb|0)|0;eb=I;if(ma){fb=Ka;gb=lo(f[fb>>2]|0,f[fb+4>>2]|0,db|0,0)|0;fb=Da;ib=f[fb>>2]|0;jb=f[fb+4>>2]|0;Ta=+W(+(+Dm(ib,gb)*(+(ib>>>0)+4294967296.0*+(jb|0))));jb=lo(hb|0,eb|0,~~Ta>>>0|0,(+K(Ta)>=1.0?(Ta>0.0?~~+Y(+J(Ta/4294967296.0),4294967295.0)>>>0:~~+W((Ta-+(~~Ta>>>0))/4294967296.0)>>>0):0)|0)|0;qb=jb}else qb=hb;hb=f[r>>2]|0;if(!((qb|0)>=(hb|0)?!((qb|0)<=(hb|0)?(ob|0)<(f[T>>2]|0):0):0)){hb=r;f[hb>>2]=qb;f[hb+4>>2]=ob;b[U>>0]=lb;f[V>>2]=db;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[j>>2]=f[v>>2];f[e>>2]=f[w>>2];If($,j,e);f[x>>2]=ya;f[y>>2]=La;f[j>>2]=f[x>>2];f[e>>2]=f[y>>2];If(aa,j,e)}if(Na)break;rb=b[Ca>>0]|0;hb=-1;jb=rb;while(1){eb=hb+-1|0;sb=Ea+eb|0;ib=jb;jb=b[sb>>0]|0;if((jb&255)<(ib&255))break;if((sb|0)==(n|0)){tb=86;break d}else hb=eb}eb=Ea+hb|0;if((jb&255)<(rb&255)){ub=Ca;vb=rb}else{ib=Ea;gb=Ca;while(1){fb=gb+-1|0;if((jb&255)<(h[ib+-2>>0]|0)){ub=fb;vb=1;break}else{wb=gb;gb=fb;ib=wb}}}b[sb>>0]=vb;b[ub>>0]=jb;if((hb|0)<-1){xb=eb;yb=Ca}else continue;while(1){ib=b[xb>>0]|0;b[xb>>0]=b[yb>>0]|0;b[yb>>0]=ib;ib=xb+1|0;gb=yb+-1|0;if(ib>>>0<gb>>>0){xb=ib;yb=gb}else continue d}}if(((tb|0)==86?(tb=0,bb):0)?(eb=b[n>>0]|0,b[n>>0]=rb,b[Ca>>0]=eb,Ja):0){eb=Ga;hb=ja;do{jb=b[hb>>0]|0;b[hb>>0]=b[eb>>0]|0;b[eb>>0]=jb;hb=hb+1|0;eb=eb+-1|0}while(hb>>>0<eb>>>0)}if((db|0)>=(Fa|0)){Va=Ia;Wa=Ma;Xa=Ia;Ya=Ma;Za=La;_a=ya;$a=Ma;break}else db=db+1|0}}if(ma){db=f[V>>2]|0;Ma=o+(Fa+-1<<3)|0;ya=Ma;La=lo(f[ya>>2]|0,f[ya+4>>2]|0,db|0,((db|0)<0)<<31>>31|0)|0;db=Ma;f[db>>2]=La;f[db+4>>2]=I}if(S){db=f[aa>>2]|0;La=f[C>>2]|0;Ma=0;do{ya=f[db+(Ma<<2)>>2]|0;f[La+(Ma<<2)>>2]=ya<<1^ya>>31;Ma=Ma+1|0}while((Ma|0)!=(g|0));zb=La}else zb=f[C>>2]|0;Ao(e,_,zb,g);if(ma){La=Fa+-1|0;Ab=a+40+(La*12|0)|0;Ma=a+40+(La*12|0)+4|0;db=a+40+(La*12|0)+8|0;La=0;do{ya=f[Ma>>2]|0;Ia=f[db>>2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=0;r=0}m=a+4|0;k=f[a>>2]|0;n=(f[m>>2]|0)-k|0;o=n>>2;f[e>>2]=0;s=e+4|0;f[s>>2]=0;t=e+8|0;f[t>>2]=0;do if(o){if((n|0)<0)Fq(e);v=((o+-1|0)>>>5)+1|0;w=yn(v<<2)|0;f[e>>2]=w;f[t>>2]=v;f[s>>2]=o;v=o>>>5;rj(w|0,0,v<<2|0)|0;x=o&31;y=w+(v<<2)|0;if(x|0)f[y>>2]=f[y>>2]&~(-1>>>(32-x|0));if(o>>>0>2){x=a+12|0;y=a+32|0;v=a+52|0;w=a+56|0;z=a+48|0;A=b;B=k;C=0;D=q;E=r;a:while(1){F=B;G=C*3|0;if((G|0)!=-1){H=f[F+(G<<2)>>2]|0;I=G+1|0;J=((I>>>0)%3|0|0)==0?G+-2|0:I;if((J|0)==-1)K=-1;else K=f[F+(J<<2)>>2]|0;J=(((G>>>0)%3|0|0)==0?2:-1)+G|0;if((J|0)==-1)L=-1;else L=f[F+(J<<2)>>2]|0;if((H|0)!=(K|0)?!((H|0)==(L|0)|(K|0)==(L|0)):0){H=0;J=A;F=E;I=D;while(1){M=H+G|0;if(!(f[(f[e>>2]|0)+(M>>>5<<2)>>2]&1<<(M&31))){N=f[(f[a>>2]|0)+(M<<2)>>2]|0;f[g>>2]=N;if(!(f[F+(N>>>5<<2)>>2]&1<<(N&31))){O=0;P=J;Q=N}else{N=f[i>>2]|0;if((N|0)==(f[y>>2]|0))Oi(h,6404);else{f[N>>2]=-1;f[i>>2]=N+4}N=f[v>>2]|0;if((N|0)==(f[w>>2]|0))Oi(z,g);else{f[N>>2]=f[g>>2];f[v>>2]=N+4}N=f[l>>2]|0;R=f[j>>2]|0;if((N|0)==(R<<5|0)){if((N+1|0)<0){S=50;break a}T=R<<6;R=N+32&-32;ti(d,N>>>0<1073741823?(T>>>0<R>>>0?R:T):2147483647);U=f[l>>2]|0}else U=N;f[l>>2]=U+1;N=(f[d>>2]|0)+(U>>>5<<2)|0;f[N>>2]=f[N>>2]&~(1<<(U&31));f[g>>2]=J;O=1;P=J+1|0;Q=J}N=f[d>>2]|0;T=N+(Q>>>5<<2)|0;f[T>>2]=f[T>>2]|1<<(Q&31);T=N;b:do if(O){R=M;while(1){if((R|0)==-1){S=64;break b}V=(f[e>>2]|0)+(R>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(R&31);V=f[g>>2]|0;f[(f[h>>2]|0)+(V<<2)>>2]=R;f[(f[a>>2]|0)+(R<<2)>>2]=V;V=R+1|0;W=((V>>>0)%3|0|0)==0?R+-2|0:V;do if((W|0)==-1)X=-1;else{V=f[(f[x>>2]|0)+(W<<2)>>2]|0;Y=V+1|0;if((V|0)==-1){X=-1;break}X=((Y>>>0)%3|0|0)==0?V+-2|0:Y}while(0);if((X|0)==(M|0))break;else R=X}}else{R=M;while(1){if((R|0)==-1){S=64;break b}W=(f[e>>2]|0)+(R>>>5<<2)|0;f[W>>2]=f[W>>2]|1<<(R&31);f[(f[h>>2]|0)+(f[g>>2]<<2)>>2]=R;W=R+1|0;Y=((W>>>0)%3|0|0)==0?R+-2|0:W;do if((Y|0)==-1)Z=-1;else{W=f[(f[x>>2]|0)+(Y<<2)>>2]|0;V=W+1|0;if((W|0)==-1){Z=-1;break}Z=((V>>>0)%3|0|0)==0?W+-2|0:V}while(0);if((Z|0)==(M|0))break;else R=Z}}while(0);c:do if((S|0)==64){S=0;if((M|0)==-1)break;R=(((M>>>0)%3|0|0)==0?2:-1)+M|0;if((R|0)==-1)break;Y=f[(f[x>>2]|0)+(R<<2)>>2]|0;if((Y|0)==-1)break;R=Y+(((Y>>>0)%3|0|0)==0?2:-1)|0;if((R|0)==-1)break;if(!O){Y=R;while(1){V=(f[e>>2]|0)+(Y>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(Y&31);V=(((Y>>>0)%3|0|0)==0?2:-1)+Y|0;if((V|0)==-1)break c;W=f[(f[x>>2]|0)+(V<<2)>>2]|0;if((W|0)==-1)break c;Y=W+(((W>>>0)%3|0|0)==0?2:-1)|0;if((Y|0)==-1)break c}}Y=f[a>>2]|0;W=R;do{V=(f[e>>2]|0)+(W>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(W&31);f[Y+(W<<2)>>2]=f[g>>2];V=(((W>>>0)%3|0|0)==0?2:-1)+W|0;if((V|0)==-1)break c;_=f[(f[x>>2]|0)+(V<<2)>>2]|0;if((_|0)==-1)break c;W=_+(((_>>>0)%3|0|0)==0?2:-1)|0}while((W|0)!=-1)}while(0);$=P;aa=T;ba=N}else{$=J;aa=I;ba=F}if((H|0)<2){H=H+1|0;J=$;F=ba;I=aa}else{ca=$;da=aa;ea=ba;break}}}else{ca=A;da=D;ea=E}}else{ca=A;da=D;ea=E}C=C+1|0;B=f[a>>2]|0;if(C>>>0>=(((f[m>>2]|0)-B>>2>>>0)/3|0)>>>0){S=18;break}else{A=ca;D=da;E=ea}}if((S|0)==18){fa=da;ga=f[l>>2]|0;break}else if((S|0)==50)Fq(d)}else{fa=q;ga=p}}else{fa=q;ga=p}while(0);p=a+44|0;f[p>>2]=0;a=fa;fa=ga>>>5;q=a+(fa<<2)|0;S=ga&31;ga=(fa|0)!=0;d:do if(fa|S|0)if(!S){l=a;da=0;ea=ga;while(1){e:do if(ea){if(!(f[l>>2]&1)){ca=da+1|0;f[p>>2]=ca;ha=ca}else ha=da;if(!(f[l>>2]&2)){ca=ha+1|0;f[p>>2]=ca;ia=ca}else ia=ha;if(!(f[l>>2]&4)){ca=ia+1|0;f[p>>2]=ca;ja=ca}else ja=ia;if(!(f[l>>2]&8)){ca=ja+1|0;f[p>>2]=ca;ka=ca}else ka=ja;if(!(f[l>>2]&16)){ca=ka+1|0;f[p>>2]=ca;la=ca}else la=ka;if(!(f[l>>2]&32)){ca=la+1|0;f[p>>2]=ca;ma=ca}else ma=la;if(!(f[l>>2]&64)){ca=ma+1|0;f[p>>2]=ca;na=ca}else na=ma;if(!(f[l>>2]&128)){ca=na+1|0;f[p>>2]=ca;oa=ca}else oa=na;if(!(f[l>>2]&256)){ca=oa+1|0;f[p>>2]=ca;pa=ca}else pa=oa;if(!(f[l>>2]&512)){ca=pa+1|0;f[p>>2]=ca;qa=ca}else qa=pa;if(!(f[l>>2]&1024)){ca=qa+1|0;f[p>>2]=ca;ra=ca}else ra=qa;if(!(f[l>>2]&2048)){ca=ra+1|0;f[p>>2]=ca;sa=ca}else sa=ra;if(!(f[l>>2]&4096)){ca=sa+1|0;f[p>>2]=ca;ta=ca}else ta=sa;if(!(f[l>>2]&8192)){ca=ta+1|0;f[p>>2]=ca;ua=ca}else ua=ta;if(!(f[l>>2]&16384)){ca=ua+1|0;f[p>>2]=ca;va=ca}else va=ua;if(!(f[l>>2]&32768)){ca=va+1|0;f[p>>2]=ca;wa=ca}else wa=va;if(!(f[l>>2]&65536)){ca=wa+1|0;f[p>>2]=ca;xa=ca}else xa=wa;if(!(f[l>>2]&131072)){ca=xa+1|0;f[p>>2]=ca;ya=ca}else ya=xa;if(!(f[l>>2]&262144)){ca=ya+1|0;f[p>>2]=ca;za=ca}else za=ya;if(!(f[l>>2]&524288)){ca=za+1|0;f[p>>2]=ca;Aa=ca}else Aa=za;if(!(f[l>>2]&1048576)){ca=Aa+1|0;f[p>>2]=ca;Ba=ca}else Ba=Aa;if(!(f[l>>2]&2097152)){ca=Ba+1|0;f[p>>2]=ca;Ca=ca}else Ca=Ba;if(!(f[l>>2]&4194304)){ca=Ca+1|0;f[p>>2]=ca;Da=ca}else Da=Ca;if(!(f[l>>2]&8388608)){ca=Da+1|0;f[p>>2]=ca;Ea=ca}else Ea=Da;if(!(f[l>>2]&16777216)){ca=Ea+1|0;f[p>>2]=ca;Fa=ca}else Fa=Ea;if(!(f[l>>2]&33554432)){ca=Fa+1|0;f[p>>2]=ca;Ga=ca}else Ga=Fa;if(!(f[l>>2]&67108864)){ca=Ga+1|0;f[p>>2]=ca;Ha=ca}else Ha=Ga;if(!(f[l>>2]&134217728)){ca=Ha+1|0;f[p>>2]=ca;Ia=ca}else Ia=Ha;if(!(f[l>>2]&268435456)){ca=Ia+1|0;f[p>>2]=ca;Ja=ca}else Ja=Ia;if(!(f[l>>2]&536870912)){ca=Ja+1|0;f[p>>2]=ca;Ka=ca}else Ka=Ja;if(!(f[l>>2]&1073741824)){ca=Ka+1|0;f[p>>2]=ca;La=ca}else La=Ka;if((f[l>>2]|0)<=-1){Ma=La;break}ca=La+1|0;f[p>>2]=ca;Ma=ca}else{ca=0;m=da;while(1){if(!(f[l>>2]&1<<ca)){ba=m+1|0;f[p>>2]=ba;Na=ba}else Na=m;if((ca|0)==31){Ma=Na;break e}ca=ca+1|0;if(!ca)break d;else m=Na}}while(0);l=l+4|0;if((q|0)==(l|0))break;else{da=Ma;ea=1}}}else{if(ga){ea=0;da=a;l=0;while(1){if(!(f[da>>2]&1)){m=l+1|0;f[p>>2]=m;Oa=m;Pa=m}else{Oa=l;Pa=ea}if(!(f[da>>2]&2)){m=Oa+1|0;f[p>>2]=m;Qa=m;Ra=m}else{Qa=Oa;Ra=Pa}if(!(f[da>>2]&4)){m=Qa+1|0;f[p>>2]=m;Sa=m;Ta=m}else{Sa=Qa;Ta=Ra}if(!(f[da>>2]&8)){m=Sa+1|0;f[p>>2]=m;Ua=m;Va=m}else{Ua=Sa;Va=Ta}if(!(f[da>>2]&16)){m=Ua+1|0;f[p>>2]=m;Wa=m;Xa=m}else{Wa=Ua;Xa=Va}if(!(f[da>>2]&32)){m=Wa+1|0;f[p>>2]=m;Ya=m;Za=m}else{Ya=Wa;Za=Xa}if(!(f[da>>2]&64)){m=Ya+1|0;f[p>>2]=m;_a=m;$a=m}else{_a=Ya;$a=Za}if(!(f[da>>2]&128)){m=_a+1|0;f[p>>2]=m;ab=m;bb=m}else{ab=_a;bb=$a}if(!(f[da>>2]&256)){m=ab+1|0;f[p>>2]=m;cb=m;db=m}else{cb=ab;db=bb}if(!(f[da>>2]&512)){m=cb+1|0;f[p>>2]=m;eb=m;fb=m}else{eb=cb;fb=db}if(!(f[da>>2]&1024)){m=eb+1|0;f[p>>2]=m;gb=m;hb=m}else{gb=eb;hb=fb}if(!(f[da>>2]&2048)){m=gb+1|0;f[p>>2]=m;ib=m;jb=m}else{ib=gb;jb=hb}if(!(f[da>>2]&4096)){m=ib+1|0;f[p>>2]=m;kb=m;lb=m}else{kb=ib;lb=jb}if(!(f[da>>2]&8192)){m=kb+1|0;f[p>>2]=m;mb=m;nb=m}else{mb=kb;nb=lb}if(!(f[da>>2]&16384)){m=mb+1|0;f[p>>2]=m;ob=m;pb=m}else{ob=mb;pb=nb}if(!(f[da>>2]&32768)){m=ob+1|0;f[p>>2]=m;qb=m;rb=m}else{qb=ob;rb=pb}if(!(f[da>>2]&65536)){m=qb+1|0;f[p>>2]=m;sb=m;tb=m}else{sb=qb;tb=rb}if(!(f[da>>2]&131072)){m=sb+1|0;f[p>>2]=m;ub=m;vb=m}else{ub=sb;vb=tb}if(!(f[da>>2]&262144)){m=ub+1|0;f[p>>2]=m;wb=m;xb=m}else{wb=ub;xb=vb}if(!(f[da>>2]&524288)){m=wb+1|0;f[p>>2]=m;yb=m;zb=m}else{yb=wb;zb=xb}if(!(f[da>>2]&1048576)){m=yb+1|0;f[p>>2]=m;Ab=m;Bb=m}else{Ab=yb;Bb=zb}if(!(f[da>>2]&2097152)){m=Ab+1|0;f[p>>2]=m;Cb=m;Db=m}else{Cb=Ab;Db=Bb}if(!(f[da>>2]&4194304)){m=Cb+1|0;f[p>>2]=m;Eb=m;Fb=m}else{Eb=Cb;Fb=Db}if(!(f[da>>2]&8388608)){m=Eb+1|0;f[p>>2]=m;Gb=m;Hb=m}else{Gb=Eb;Hb=Fb}if(!(f[da>>2]&16777216)){m=Gb+1|0;f[p>>2]=m;Ib=m;Jb=m}else{Ib=Gb;Jb=Hb}if(!(f[da>>2]&33554432)){m=Ib+1|0;f[p>>2]=m;Kb=m;Lb=m}else{Kb=Ib;Lb=Jb}if(!(f[da>>2]&67108864)){m=Kb+1|0;f[p>>2]=m;Mb=m;Nb=m}else{Mb=Kb;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+16|0;qa=f[pa>>2]|0;if(qa){ra=pa;sa=qa;b:while(1){qa=sa;while(1){if((f[qa+16>>2]|0)>=(k|0))break;ta=f[qa+4>>2]|0;if(!ta){ua=ra;break b}else qa=ta}sa=f[qa>>2]|0;if(!sa){ua=qa;break}else ra=qa}if(((ua|0)!=(pa|0)?(k|0)>=(f[ua+16>>2]|0):0)?(ra=ua+20|0,(Hh(ra,d)|0)!=0):0)va=Nk(ra,d,-1)|0;else wa=17}else wa=17;if((wa|0)==17){wa=0;va=Nk(ka,d,-1)|0}if((b[w>>0]|0)<0)ur(f[d>>2]|0);if((va|0)<1)xa=1;else{ra=f[(f[j>>2]|0)+48>>2]|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;sa=yn(32)|0;f[d>>2]=sa;f[z>>2]=-2147483616;f[A>>2]=19;ma=sa;na=14933;oa=ma+19|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[sa+19>>0]=0;ka=ra+16|0;pa=f[ka>>2]|0;if(pa){la=ka;ta=pa;c:while(1){pa=ta;while(1){if((f[pa+16>>2]|0)>=(k|0))break;ya=f[pa+4>>2]|0;if(!ya){za=la;break c}else pa=ya}ta=f[pa>>2]|0;if(!ta){za=pa;break}else la=pa}if((za|0)!=(ka|0)?(k|0)>=(f[za+16>>2]|0):0)Aa=za+20|0;else wa=29}else wa=29;if((wa|0)==29){wa=0;Aa=ra}if(!(Hh(Aa,d)|0))Ba=0;else{la=f[(f[j>>2]|0)+48>>2]|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;ta=yn(32)|0;f[e>>2]=ta;f[X>>2]=-2147483616;f[Y>>2]=18;ma=ta;na=14953;oa=ma+18|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[ta+18>>0]=0;ra=la+16|0;ka=f[ra>>2]|0;if(ka){sa=ra;qa=ka;d:while(1){ka=qa;while(1){if((f[ka+16>>2]|0)>=(k|0))break;ya=f[ka+4>>2]|0;if(!ya){Ca=sa;break d}else ka=ya}qa=f[ka>>2]|0;if(!qa){Ca=ka;break}else sa=ka}if((Ca|0)!=(ra|0)?(k|0)>=(f[Ca+16>>2]|0):0)Da=Ca+20|0;else wa=39}else wa=39;if((wa|0)==39){wa=0;Da=la}sa=(Hh(Da,e)|0)!=0;if((b[Z>>0]|0)<0)ur(f[e>>2]|0);Ba=sa}if((b[B>>0]|0)<0)ur(f[d>>2]|0);if(Ba){sa=ja+24|0;qa=b[sa>>0]|0;ta=qa<<24>>24;f[h>>2]=0;f[C>>2]=0;f[D>>2]=0;if(!(qa<<24>>24))Ea=0;else{if(qa<<24>>24<0){wa=48;break a}qa=ta<<2;pa=yn(qa)|0;f[h>>2]=pa;ya=pa+(ta<<2)|0;f[O>>2]=ya;rj(pa|0,0,qa|0)|0;f[C>>2]=ya;Ea=pa}pa=f[(f[j>>2]|0)+48>>2]|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;ya=yn(32)|0;f[i>>2]=ya;f[E>>2]=-2147483616;f[F>>2]=19;ma=ya;na=14933;oa=ma+19|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[ya+19>>0]=0;la=b[sa>>0]|0;ra=la<<24>>24;qa=pa+16|0;ta=f[qa>>2]|0;if(ta){Fa=qa;Ga=ta;e:while(1){ta=Ga;while(1){if((f[ta+16>>2]|0)>=(k|0))break;Ha=f[ta+4>>2]|0;if(!Ha){Ia=Fa;break e}else ta=Ha}Ga=f[ta>>2]|0;if(!Ga){Ia=ta;break}else Fa=ta}if(((Ia|0)!=(qa|0)?(k|0)>=(f[Ia+16>>2]|0):0)?(Fa=Ia+20|0,(Hh(Fa,i)|0)!=0):0){Ga=Og(Fa,i)|0;if((Ga|0)!=(Ia+24|0)){oj(d,Ga+28|0);Ga=b[M>>0]|0;Fa=Ga<<24>>24<0;if(!((Fa?f[N>>2]|0:Ga&255)|0))Ja=Ga;else{if(la<<24>>24>0){ya=Fa?f[d>>2]|0:d;Fa=0;do{Ka=$(Iq(ya,e));ka=ya;ya=f[e>>2]|0;if((ka|0)==(ya|0))break;n[Ea+(Fa<<2)>>2]=Ka;Fa=Fa+1|0}while((Fa|0)<(ra|0));La=b[M>>0]|0}else La=Ga;Ja=La}if(Ja<<24>>24<0)ur(f[d>>2]|0)}}else wa=69}else wa=69;if((wa|0)==69?(wa=0,Fa=Og(pa,i)|0,(Fa|0)!=(pa+4|0)):0){oj(d,Fa+28|0);Fa=b[G>>0]|0;ya=Fa<<24>>24<0;if(!((ya?f[H>>2]|0:Fa&255)|0))Ma=Fa;else{if(la<<24>>24>0){qa=ya?f[d>>2]|0:d;ya=0;do{Ka=$(Iq(qa,e));ka=qa;qa=f[e>>2]|0;if((ka|0)==(qa|0))break;n[Ea+(ya<<2)>>2]=Ka;ya=ya+1|0}while((ya|0)<(ra|0));Na=b[G>>0]|0}else Na=Fa;Ma=Na}if(Ma<<24>>24<0)ur(f[d>>2]|0)}if((b[I>>0]|0)<0)ur(f[i>>2]|0);ra=f[(f[j>>2]|0)+48>>2]|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;ya=yn(32)|0;f[d>>2]=ya;f[J>>2]=-2147483616;f[K>>2]=18;ma=ya;na=14953;oa=ma+18|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[ya+18>>0]=0;na=ra+16|0;ma=f[na>>2]|0;do if(ma){oa=na;Fa=ma;f:while(1){qa=Fa;while(1){if((f[qa+16>>2]|0)>=(k|0))break;la=f[qa+4>>2]|0;if(!la){Pa=oa;break f}else qa=la}Fa=f[qa>>2]|0;if(!Fa){Pa=qa;break}else oa=qa}if((Pa|0)!=(na|0)?(k|0)>=(f[Pa+16>>2]|0):0){oa=Pa+20|0;if(!(Hh(oa,d)|0)){wa=91;break}Qa=$(xk(oa,d,$(1.0)))}else wa=91}else wa=91;while(0);if((wa|0)==91){wa=0;Qa=$(xk(ra,d,$(1.0)))}if((b[L>>0]|0)<0)ur(f[d>>2]|0);Nl(g,va,f[h>>2]|0,b[sa>>0]|0,Qa);k=f[h>>2]|0;if(k|0){na=f[C>>2]|0;if((na|0)!=(k|0))f[C>>2]=na+(~((na+-4-k|0)>>>2)<<2);ur(k)}}else Wd(g,ja,va)|0;k=f[P>>2]|0;if((k|0)==(f[Q>>2]|0))Df(R,g);else{f[k>>2]=1308;f[k+4>>2]=f[s>>2];Ra=k+8|0;f[Ra>>2]=0;na=k+12|0;f[na>>2]=0;f[k+16>>2]=0;ma=(f[y>>2]|0)-(f[V>>2]|0)|0;ya=ma>>2;if(ya|0){if(ya>>>0>1073741823){wa=103;break a}oa=yn(ma)|0;f[na>>2]=oa;f[Ra>>2]=oa;f[k+16>>2]=oa+(ya<<2);ya=f[V>>2]|0;ma=(f[y>>2]|0)-ya|0;if((ma|0)>0){eh(oa|0,ya|0,ma|0)|0;f[na>>2]=oa+(ma>>>2<<2)}}f[k+20>>2]=f[W>>2];f[P>>2]=(f[P>>2]|0)+24}cf(d,g,ja,m);k=f[S>>2]|0;if(k>>>0<(f[T>>2]|0)>>>0){ma=f[d>>2]|0;f[d>>2]=0;f[k>>2]=ma;f[S>>2]=k+4}else Ye(U,d);k=f[d>>2]|0;f[d>>2]=0;if(k|0){ma=k+88|0;oa=f[ma>>2]|0;f[ma>>2]=0;if(oa|0){ma=f[oa+8>>2]|0;if(ma|0){na=oa+12|0;if((f[na>>2]|0)!=(ma|0))f[na>>2]=ma;ur(ma)}ur(oa)}oa=f[k+68>>2]|0;if(oa|0){ma=k+72|0;na=f[ma>>2]|0;if((na|0)!=(oa|0))f[ma>>2]=na+(~((na+-4-oa|0)>>>2)<<2);ur(oa)}oa=k+64|0;na=f[oa>>2]|0;f[oa>>2]=0;if(na|0){oa=f[na>>2]|0;if(oa|0){ma=na+4|0;if((f[ma>>2]|0)!=(oa|0))f[ma>>2]=oa;ur(oa)}ur(na)}ur(k)}xa=0}f[g>>2]=1308;k=f[r>>2]|0;if(k|0){na=f[y>>2]|0;if((na|0)!=(k|0))f[y>>2]=na+(~((na+-4-k|0)>>>2)<<2);ur(k)}if(xa|0){v=0;wa=169;break a}break}case 1:case 3:case 5:{k=ja+24|0;na=b[k>>0]|0;oa=na<<24>>24;f[g>>2]=0;f[_>>2]=0;f[aa>>2]=0;if(!(na<<24>>24))Sa=0;else{if(na<<24>>24<0){wa=137;break a}na=yn(oa<<2)|0;f[_>>2]=na;f[g>>2]=na;ma=na+(oa<<2)|0;f[a>>2]=ma;ya=oa;oa=na;while(1){f[oa>>2]=2147483647;ya=ya+-1|0;if(!ya)break;else oa=oa+4|0}f[_>>2]=ma;Sa=b[k>>0]|0}oa=Sa<<24>>24;f[h>>2]=0;f[ba>>2]=0;f[ca>>2]=0;if(!(Sa<<24>>24))Ta=0;else{if(Sa<<24>>24<0){wa=144;break a}ya=oa<<2;sa=yn(ya)|0;f[h>>2]=sa;ra=sa+(oa<<2)|0;f[da>>2]=ra;rj(sa|0,0,ya|0)|0;f[ba>>2]=ra;Ta=sa}sa=ja+80|0;ra=b[k>>0]|0;g:do if(!(f[sa>>2]|0))Ua=ra;else{ya=0;oa=ra;na=Ta;while(1){f[e>>2]=ya;f[d>>2]=f[e>>2];Qb(ja,d,oa,na)|0;Fa=b[k>>0]|0;if(Fa<<24>>24>0){ta=f[g>>2]|0;la=f[h>>2]|0;pa=Fa<<24>>24;Ga=0;do{ka=ta+(Ga<<2)|0;Ha=f[la+(Ga<<2)>>2]|0;if((f[ka>>2]|0)>(Ha|0))f[ka>>2]=Ha;Ga=Ga+1|0}while((Ga|0)<(pa|0))}pa=ya+1|0;if(pa>>>0>=(f[sa>>2]|0)>>>0){Ua=Fa;break g}ya=pa;oa=Fa;na=f[h>>2]|0}}while(0);if(Ua<<24>>24>0){sa=0;ja=Ua;while(1){ra=(f[g>>2]|0)+(sa<<2)|0;ma=f[ea>>2]|0;if((ma|0)==(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if(!z){fa=99;break}else{ga=0;ha=ea}while(1){ba=(f[N>>2]|0)+((X(f[M>>2]|0,S+ga|0)|0)<<2)|0;if(!ha)ia=0;else{aa=0;do{ca=f[(f[w>>2]|0)+(aa<<2)>>2]|0;U=(f[a>>2]|0)-(f[(f[Y>>2]|0)+(ca<<2)>>2]|0)|0;do if(U|0){da=f[y>>2]|0;ja=32-da|0;ka=32-U|0;la=f[ba+(ca<<2)>>2]<<ka;if((U|0)>(ja|0)){ma=la>>>ka;ka=U-ja|0;f[y>>2]=ka;ja=f[h>>2]|ma>>>ka;f[h>>2]=ja;ka=f[j>>2]|0;if((ka|0)==(f[m>>2]|0))Oi(n,h);else{f[ka>>2]=ja;f[j>>2]=ka+4}f[h>>2]=ma<<32-(f[y>>2]|0);break}ma=f[h>>2]|la>>>da;f[h>>2]=ma;la=da+U|0;f[y>>2]=la;if((la|0)!=32)break;la=f[j>>2]|0;if((la|0)==(f[m>>2]|0))Oi(n,h);else{f[la>>2]=ma;f[j>>2]=la+4}f[h>>2]=0;f[y>>2]=0}while(0);aa=aa+1|0;U=f[g>>2]|0}while(aa>>>0<U>>>0);ia=U}ga=ga+1|0;if(ga>>>0>=z>>>0){fa=99;break a}else ha=ia}}$=Z+1|0;Fg(R+($*12|0)|0,f[R+(Z*12|0)>>2]|0,f[R+(Z*12|0)+4>>2]|0);aa=(f[(f[k>>2]|0)+($*12|0)>>2]|0)+(V<<2)|0;ba=(f[aa>>2]|0)+(1<<T+-1)|0;f[aa>>2]=ba;aa=f[A>>2]|0;U=f[B>>2]|0;b:do if((W|0)==(S|0))na=S;else{ca=f[O>>2]|0;if(!aa){if((f[ca+(V<<2)>>2]|0)>>>0<ba>>>0){na=W;break}else{oa=W;pa=S}while(1){la=oa;do{la=la+-1|0;if((pa|0)==(la|0)){na=pa;break b}ma=(f[P>>2]|0)+((X(la,U)|0)<<2)+(V<<2)|0}while((f[ma>>2]|0)>>>0>=ba>>>0);pa=pa+1|0;if((pa|0)==(la|0)){na=la;break b}else oa=la}}else{qa=W;ra=S}while(1){ma=ra;while(1){sa=ca+((X(ma,aa)|0)<<2)|0;if((f[sa+(V<<2)>>2]|0)>>>0>=ba>>>0){ta=qa;break}da=ma+1|0;if((da|0)==(qa|0)){na=qa;break b}else ma=da}while(1){ta=ta+-1|0;if((ma|0)==(ta|0)){na=ma;break b}ua=(f[P>>2]|0)+((X(ta,U)|0)<<2)|0;if((f[ua+(V<<2)>>2]|0)>>>0<ba>>>0){va=0;break}}do{la=sa+(va<<2)|0;da=ua+(va<<2)|0;ka=f[la>>2]|0;f[la>>2]=f[da>>2];f[da>>2]=ka;va=va+1|0}while((va|0)!=(aa|0));ra=ma+1|0;if((ra|0)==(ta|0)){na=ta;break}else qa=ta}}while(0);ba=(_(z|0)|0)^31;U=na-S|0;ca=W-na|0;ka=U>>>0<ca>>>0;if((U|0)!=(ca|0)){da=f[H>>2]|0;if(ka)f[I>>2]=f[I>>2]|1<<31-da;la=da+1|0;f[H>>2]=la;if((la|0)==32){la=f[J>>2]|0;if((la|0)==(f[K>>2]|0))Oi(L,I);else{f[la>>2]=f[I>>2];f[J>>2]=la+4}f[H>>2]=0;f[I>>2]=0}}la=z>>>1;do if(ka){da=f[C>>2]|0;ja=32-da|0;wa=32-ba|0;xa=la-U<<wa;if((ba|0)>(ja|0)){ya=xa>>>wa;wa=ba-ja|0;f[C>>2]=wa;ja=f[D>>2]|ya>>>wa;f[D>>2]=ja;wa=f[E>>2]|0;if((wa|0)==(f[F>>2]|0))Oi(G,D);else{f[wa>>2]=ja;f[E>>2]=wa+4}f[D>>2]=ya<<32-(f[C>>2]|0);break}ya=f[D>>2]|xa>>>da;f[D>>2]=ya;xa=da+ba|0;f[C>>2]=xa;if((xa|0)==32){xa=f[E>>2]|0;if((xa|0)==(f[F>>2]|0))Oi(G,D);else{f[xa>>2]=ya;f[E>>2]=xa+4}f[D>>2]=0;f[C>>2]=0}}else{xa=f[C>>2]|0;ya=32-xa|0;da=32-ba|0;wa=la-ca<<da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|0);break}ka=f[j>>2]|ja>>>ba;f[j>>2]=ka;ja=ba+W|0;f[A>>2]=ja;if((ja|0)!=32)break;ja=f[l>>2]|0;if((ja|0)==(f[o>>2]|0))Oi(p,j);else{f[ja>>2]=ka;f[l>>2]=ja+4}f[j>>2]=0;f[A>>2]=0}while(0);Z=Z+1|0;W=f[i>>2]|0}while(Z>>>0<W>>>0);ga=W}ea=ea+1|0;if(ea>>>0>=U>>>0){da=87;break a}else fa=ga}}Y=V+1|0;Z=f[m>>2]|0;$=Z+(Y*12|0)|0;if(($|0)==(S|0))la=Z;else{Fg($,f[S>>2]|0,f[O+(V*12|0)+4>>2]|0);la=f[m>>2]|0}$=(f[la+(Y*12|0)>>2]|0)+(Q<<2)|0;Z=(f[$>>2]|0)+(1<<R+-1)|0;f[$>>2]=Z;$=f[C>>2]|0;W=f[D>>2]|0;b:do if((T|0)==(P|0))ma=P;else{aa=f[L>>2]|0;if(!$){if((f[aa+(Q<<2)>>2]|0)>>>0<Z>>>0){ma=T;break}else{na=T;oa=P}while(1){ja=na;do{ja=ja+-1|0;if((oa|0)==(ja|0)){ma=oa;break b}ka=(f[M>>2]|0)+((X(ja,W)|0)<<2)+(Q<<2)|0}while((f[ka>>2]|0)>>>0>=Z>>>0);oa=oa+1|0;if((oa|0)==(ja|0)){ma=ja;break b}else na=ja}}else{pa=T;qa=P}while(1){ka=qa;while(1){ra=aa+((X(ka,$)|0)<<2)|0;if((f[ra+(Q<<2)>>2]|0)>>>0>=Z>>>0){sa=pa;break}ba=ka+1|0;if((ba|0)==(pa|0)){ma=pa;break b}else ka=ba}while(1){sa=sa+-1|0;if((ka|0)==(sa|0)){ma=ka;break b}ta=(f[M>>2]|0)+((X(sa,W)|0)<<2)|0;if((f[ta+(Q<<2)>>2]|0)>>>0<Z>>>0){ua=0;break}}do{ja=ra+(ua<<2)|0;ba=ta+(ua<<2)|0;ia=f[ja>>2]|0;f[ja>>2]=f[ba>>2];f[ba>>2]=ia;ua=ua+1|0}while((ua|0)!=($|0));qa=ka+1|0;if((qa|0)==(sa|0)){ma=sa;break}else pa=sa}}while(0);Z=(_(U|0)|0)^31;W=ma-P|0;aa=T-ma|0;ia=W>>>0<aa>>>0;if((W|0)!=(aa|0)){ba=f[E>>2]|0;if(ia)f[F>>2]=f[F>>2]|1<<31-ba;ja=ba+1|0;f[E>>2]=ja;if((ja|0)==32){ja=f[G>>2]|0;if((ja|0)==(f[H>>2]|0))Oi(I,F);else{f[ja>>2]=f[F>>2];f[G>>2]=ja+4}f[E>>2]=0;f[F>>2]=0}}ja=U>>>1;if(ia){ia=ja-W|0;if(Z|0){ba=0;ha=1<<Z+-1;while(1){ej(a+12+(ba<<5)|0,(ha&ia|0)!=0);ba=ba+1|0;if((ba|0)==(Z|0))break;else ha=ha>>>1}}}else{ha=ja-aa|0;if(Z|0){ba=0;ia=1<<Z+-1;while(1){ej(a+12+(ba<<5)|0,(ia&ha|0)!=0);ba=ba+1|0;if((ba|0)==(Z|0))break;else ia=ia>>>1}}}ia=f[v>>2]|0;Z=f[ia+(V*12|0)>>2]|0;ba=Z+(Q<<2)|0;f[ba>>2]=(f[ba>>2]|0)+1;Fg(ia+(Y*12|0)|0,Z,f[ia+(V*12|0)+4>>2]|0);if((ma|0)!=(P|0)){ia=f[q>>2]|0;Z=f[w>>2]|0;ba=ia-Z>>2;ha=f[x>>2]|0;ja=f[n>>2]|0;if((((ba|0)==0?0:(ba*113|0)+-1|0)|0)==(ja+ha|0)){Rc(h);va=f[x>>2]|0;wa=f[n>>2]|0;xa=f[q>>2]|0;ya=f[w>>2]|0}else{va=ha;wa=ja;xa=ia;ya=Z}Z=wa+va|0;if((xa|0)==(ya|0))za=0;else za=(f[ya+(((Z>>>0)/113|0)<<2)>>2]|0)+(((Z>>>0)%113|0)*36|0)|0;f[za>>2]=P;Z=za+4|0;f[Z>>2]=t;f[Z+4>>2]=z;f[za+12>>2]=ma;f[za+16>>2]=k;f[za+20>>2]=$;f[za+24>>2]=Q;f[za+28>>2]=W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;da=101;break}case 2:{Na=113;da=101;break}default:{}}if((da|0)==101)f[x>>2]=Na;if((La|0)!=(Ma|0)){Na=La;do{ur(f[Na>>2]|0);Na=Na+4|0}while((Na|0)!=(Ma|0));Ma=f[w>>2]|0;w=f[q>>2]|0;if((w|0)!=(Ma|0))f[q>>2]=w+(~((w+-4-Ma|0)>>>2)<<2)}Ma=f[h>>2]|0;if(!Ma){u=d;return}ur(Ma);u=d;return}function jb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0;d=u;u=u+1424|0;e=d+1408|0;g=d+1396|0;h=d+1420|0;i=d+1200|0;j=d+12|0;k=d;l=d+1384|0;m=d+1372|0;n=d+1360|0;o=d+1348|0;p=d+1336|0;q=d+1324|0;r=d+1312|0;s=d+1300|0;t=d+1288|0;v=d+1276|0;w=d+1264|0;x=d+1252|0;y=d+1240|0;z=d+1228|0;A=a+28|0;B=10-(ki(f[(f[A>>2]|0)+48>>2]|0)|0)|0;C=(B|0)<6?B:6;b[h>>0]=C;if((C&255|0)==6?(f[a+72>>2]|0)>15:0)b[h>>0]=5;C=c+16|0;B=f[C+4>>2]|0;if(!((B|0)>0|(B|0)==0&(f[C>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Ke(c,e,h,h+1|0)|0}C=f[A>>2]|0;B=f[(f[C+4>>2]|0)+80>>2]|0;D=a+72|0;E=f[D>>2]|0;f[i>>2]=B;F=i+4|0;f[F>>2]=E;f[i+8>>2]=E<<2;G=i+12|0;H=X(E,B)|0;f[G>>2]=0;J=i+16|0;f[J>>2]=0;f[i+20>>2]=0;do if(H)if(H>>>0>1073741823)Fq(G);else{K=H<<2;L=yn(K)|0;f[G>>2]=L;M=L+(H<<2)|0;f[i+20>>2]=M;rj(L|0,0,K|0)|0;f[J>>2]=M;N=L;break}else N=0;while(0);H=i+24|0;f[H>>2]=N;G=a+4|0;L=a+8|0;M=f[G>>2]|0;a:do if((f[L>>2]|0)!=(M|0)){K=j+4|0;O=j+8|0;P=j+8|0;Q=(B|0)==0;R=j+4|0;S=j+8|0;T=k+4|0;U=k+8|0;V=k+8|0;W=a+48|0;Y=j+8|0;Z=a+60|0;$=0;aa=0;ba=0;ca=0;da=M;ea=C;b:while(1){fa=f[(f[(f[ea+4>>2]|0)+8>>2]|0)+(f[da+(ca<<2)>>2]<<2)>>2]|0;switch(f[fa+28>>2]|0){case 1:case 3:case 5:case 2:case 4:case 6:{ga=fa;ha=aa;break}case 9:{ga=f[(f[Z>>2]|0)+(aa<<2)>>2]|0;ha=aa+1|0;break}default:{ia=0;break a}}if(!ga){ia=0;break a}c:do switch(f[ga+28>>2]|0){case 6:{if(Q){ja=ba;ka=ga+24|0;break c}fa=ga+84|0;la=ga+68|0;ma=ga+48|0;na=ga+40|0;oa=ga+24|0;pa=0;do{if(!(b[fa>>0]|0))qa=f[(f[la>>2]|0)+(pa<<2)>>2]|0;else qa=pa;ra=ma;sa=f[ra>>2]|0;ta=f[ra+4>>2]|0;ra=na;ua=In(f[ra>>2]|0,f[ra+4>>2]|0,qa|0,0)|0;ra=lo(ua|0,I|0,sa|0,ta|0)|0;eh((f[H>>2]|0)+((X(f[F>>2]|0,pa)|0)<<2)+($<<2)|0,(f[f[ga>>2]>>2]|0)+ra|0,b[oa>>0]<<2|0)|0;pa=pa+1|0}while((pa|0)!=(B|0));ja=ba;ka=oa;break}case 1:case 3:case 5:{oa=ga+24|0;pa=b[oa>>0]|0;na=pa<<24>>24;f[j>>2]=0;f[R>>2]=0;f[S>>2]=0;if(!(pa<<24>>24))va=0;else{if(pa<<24>>24<0){wa=24;break b}pa=na<<2;ma=yn(pa)|0;f[j>>2]=ma;la=ma+(na<<2)|0;f[Y>>2]=la;rj(ma|0,0,pa|0)|0;f[R>>2]=la;va=b[oa>>0]|0}la=va<<24>>24;f[k>>2]=0;f[T>>2]=0;f[U>>2]=0;if(!(va<<24>>24)){xa=0;ya=0}else{if(va<<24>>24<0){wa=30;break b}pa=la<<2;ma=yn(pa)|0;f[k>>2]=ma;na=ma+(la<<2)|0;f[V>>2]=na;rj(ma|0,0,pa|0)|0;f[T>>2]=na;xa=ma;ya=ma}if(Q){za=ya;Aa=xa}else{ma=ga+84|0;na=ga+68|0;pa=0;do{if(!(b[ma>>0]|0))Ba=f[(f[na>>2]|0)+(pa<<2)>>2]|0;else Ba=pa;la=f[j>>2]|0;f[g>>2]=Ba;fa=b[oa>>0]|0;f[e>>2]=f[g>>2];Qb(ga,e,fa,la)|0;la=b[oa>>0]|0;fa=la<<24>>24;if(la<<24>>24>0){la=f[j>>2]|0;ra=f[W>>2]|0;ta=f[k>>2]|0;sa=0;do{f[ta+(sa<<2)>>2]=(f[la+(sa<<2)>>2]|0)-(f[ra+(sa+ba<<2)>>2]|0);sa=sa+1|0}while((sa|0)<(fa|0));Ca=ta}else Ca=f[k>>2]|0;eh((f[H>>2]|0)+((X(f[F>>2]|0,pa)|0)<<2)+($<<2)|0,Ca|0,fa<<2|0)|0;pa=pa+1|0}while(pa>>>0<B>>>0);pa=f[k>>2]|0;za=pa;Aa=pa}pa=ba+(b[oa>>0]|0)|0;if(za|0){na=f[T>>2]|0;if((na|0)!=(za|0))f[T>>2]=na+(~((na+-4-za|0)>>>2)<<2);ur(Aa)}na=f[j>>2]|0;if(na|0){ma=f[R>>2]|0;if((ma|0)!=(na|0))f[R>>2]=ma+(~((ma+-4-na|0)>>>2)<<2);ur(na)}ja=pa;ka=oa;break}default:{pa=ga+24|0;na=b[pa>>0]|0;ma=na<<24>>24;f[j>>2]=0;f[K>>2]=0;f[O>>2]=0;if(!(na<<24>>24)){Da=0;Ea=0}else{if(na<<24>>24<0){wa=53;break b}na=ma<<2;ta=yn(na)|0;f[j>>2]=ta;sa=ta+(ma<<2)|0;f[P>>2]=sa;rj(ta|0,0,na|0)|0;f[K>>2]=sa;Da=ta;Ea=ta}if(Q){Fa=Ea;Ga=Da}else{ta=ga+84|0;sa=ga+68|0;na=0;do{if(!(b[ta>>0]|0))Ha=f[(f[sa>>2]|0)+(na<<2)>>2]|0;else Ha=na;ma=f[j>>2]|0;f[g>>2]=Ha;ra=b[pa>>0]|0;f[e>>2]=f[g>>2];Pb(ga,e,ra,ma)|0;eh((f[H>>2]|0)+((X(f[F>>2]|0,na)|0)<<2)+($<<2)|0,f[j>>2]|0,b[pa>>0]<<2|0)|0;na=na+1|0}while(na>>>0<B>>>0);na=f[j>>2]|0;Fa=na;Ga=na}if(Fa|0){na=f[K>>2]|0;if((na|0)!=(Fa|0))f[K>>2]=na+(~((na+-4-Fa|0)>>>2)<<2);ur(Ga)}ja=ba;ka=pa}}while(0);na=ca+1|0;sa=f[G>>2]|0;if(na>>>0>=(f[L>>2]|0)-sa>>2>>>0){wa=66;break}$=$+(b[ka>>0]|0)|0;aa=ha;ba=ja;ca=na;da=sa;ea=f[A>>2]|0}if((wa|0)==24)Fq(j);else if((wa|0)==30)Fq(k);else if((wa|0)==53)Fq(j);else if((wa|0)==66){Ia=f[D>>2]|0;Ja=f[H>>2]|0;wa=67;break}}else{Ia=E;Ja=N;wa=67}while(0);d:do if((wa|0)==67){N=X(Ia,B)|0;if((N|0)>0){E=0;H=0;while(1){D=f[Ja+(E<<2)>>2]|0;if(!D)Ka=H;else{A=(_(D|0)|0)^31;Ka=(A|0)<(H|0)?H:A+1|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]=f[s+8>>2];H=Bf(j,g,e,k,c)|0;gf(j);if(!H){ia=0;break d}break}case 2:{_e(j,Ia);f[t>>2]=0;f[t+4>>2]=i;H=f[F>>2]|0;f[t+8>>2]=H;f[v>>2]=f[i>>2];f[v+4>>2]=i;f[v+8>>2]=H;f[k>>2]=La;f[g>>2]=f[t>>2];f[g+4>>2]=f[t+4>>2];f[g+8>>2]=f[t+8>>2];f[e>>2]=f[v>>2];f[e+4>>2]=f[v+4>>2];f[e+8>>2]=f[v+8>>2];H=Bf(j,g,e,k,c)|0;gf(j);if(!H){ia=0;break d}break}case 1:{$e(j,Ia);f[w>>2]=0;f[w+4>>2]=i;H=f[F>>2]|0;f[w+8>>2]=H;f[x>>2]=f[i>>2];f[x+4>>2]=i;f[x+8>>2]=H;f[k>>2]=La;f[g>>2]=f[w>>2];f[g+4>>2]=f[w+4>>2];f[g+8>>2]=f[w+8>>2];f[e>>2]=f[x>>2];f[e+4>>2]=f[x+4>>2];f[e+8>>2]=f[x+8>>2];H=Af(j,g,e,k,c)|0;ff(j);if(!H){ia=0;break d}break}case 0:{$e(j,Ia);f[y>>2]=0;f[y+4>>2]=i;H=f[F>>2]|0;f[y+8>>2]=H;f[z>>2]=f[i>>2];f[z+4>>2]=i;f[z+8>>2]=H;f[k>>2]=La;f[g>>2]=f[y>>2];f[g+4>>2]=f[y+4>>2];f[g+8>>2]=f[y+8>>2];f[e>>2]=f[z>>2];f[e+4>>2]=f[z+4>>2];f[e+8>>2]=f[z+8>>2];H=Af(j,g,e,k,c)|0;ff(j);if(!H){ia=0;break d}break}default:{ia=0;break d}}ia=1}while(0);j=f[i+12>>2]|0;if(!j){u=d;return ia|0}i=f[J>>2]|0;if((i|0)!=(j|0))f[J>>2]=i+(~((i+-4-j|0)>>>2)<<2);ur(j);u=d;return ia|0}function kb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,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|0,f[M+(T*12|0)+4>>2]|0);V=(f[(f[k>>2]|0)+(U*12|0)>>2]|0)+(Q<<2)|0;W=(f[V>>2]|0)+(1<<O+-1)|0;f[V>>2]=W;V=f[A>>2]|0;P=f[B>>2]|0;b:do if((R|0)==(N|0))ia=N;else{Y=f[J>>2]|0;if(!V){if((f[Y+(Q<<2)>>2]|0)>>>0<W>>>0){ia=R;break}else{ja=R;ka=N}while(1){ga=ja;do{ga=ga+-1|0;if((ka|0)==(ga|0)){ia=ka;break b}ha=(f[K>>2]|0)+((X(ga,P)|0)<<2)+(Q<<2)|0}while((f[ha>>2]|0)>>>0>=W>>>0);ka=ka+1|0;if((ka|0)==(ga|0)){ia=ga;break b}else ja=ga}}else{la=R;ma=N}while(1){ha=ma;while(1){na=Y+((X(ha,V)|0)<<2)|0;if((f[na+(Q<<2)>>2]|0)>>>0>=W>>>0){oa=la;break}Z=ha+1|0;if((Z|0)==(la|0)){ia=la;break b}else ha=Z}while(1){oa=oa+-1|0;if((ha|0)==(oa|0)){ia=ha;break b}pa=(f[K>>2]|0)+((X(oa,P)|0)<<2)|0;if((f[pa+(Q<<2)>>2]|0)>>>0<W>>>0){qa=0;break}}do{ga=na+(qa<<2)|0;Z=pa+(qa<<2)|0;fa=f[ga>>2]|0;f[ga>>2]=f[Z>>2];f[Z>>2]=fa;qa=qa+1|0}while((qa|0)!=(V|0));ma=ha+1|0;if((ma|0)==(oa|0)){ia=oa;break}else la=oa}}while(0);W=(_(z|0)|0)^31;P=ia-N|0;Y=R-ia|0;fa=P>>>0<Y>>>0;if((P|0)!=(Y|0)){Z=f[C>>2]|0;if(fa)f[D>>2]=f[D>>2]|1<<31-Z;ga=Z+1|0;f[C>>2]=ga;if((ga|0)==32){ga=f[E>>2]|0;if((ga|0)==(f[F>>2]|0))Oi(G,D);else{f[ga>>2]=f[D>>2];f[E>>2]=ga+4}f[C>>2]=0;f[D>>2]=0}}ga=z>>>1;if(fa){fa=ga-P|0;if(W|0){Z=0;ea=1<<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0);W=(f[(f[k>>2]|0)+(V*12|0)>>2]|0)+(R<<2)|0;Y=(f[W>>2]|0)+(1<<P+-1)|0;f[W>>2]=Y;W=f[A>>2]|0;Q=f[B>>2]|0;b:do if((S|0)==(O|0))ja=O;else{Z=f[K>>2]|0;if(!W){if((f[Z+(R<<2)>>2]|0)>>>0<Y>>>0){ja=S;break}else{ka=S;la=O}while(1){ha=ka;do{ha=ha+-1|0;if((la|0)==(ha|0)){ja=la;break b}ia=(f[L>>2]|0)+((X(ha,Q)|0)<<2)+(R<<2)|0}while((f[ia>>2]|0)>>>0>=Y>>>0);la=la+1|0;if((la|0)==(ha|0)){ja=ha;break b}else ka=ha}}else{ma=S;na=O}while(1){ia=na;while(1){oa=Z+((X(ia,W)|0)<<2)|0;if((f[oa+(R<<2)>>2]|0)>>>0>=Y>>>0){pa=ma;break}$=ia+1|0;if(($|0)==(ma|0)){ja=ma;break b}else ia=$}while(1){pa=pa+-1|0;if((ia|0)==(pa|0)){ja=ia;break b}qa=(f[L>>2]|0)+((X(pa,Q)|0)<<2)|0;if((f[qa+(R<<2)>>2]|0)>>>0<Y>>>0){ra=0;break}}do{ha=oa+(ra<<2)|0;$=qa+(ra<<2)|0;ga=f[ha>>2]|0;f[ha>>2]=f[$>>2];f[$>>2]=ga;ra=ra+1|0}while((ra|0)!=(W|0));na=ia+1|0;if((na|0)==(pa|0)){ja=pa;break}else ma=pa}}while(0);Y=(_(z|0)|0)^31;Q=ja-O|0;Z=S-ja|0;ga=Q>>>0<Z>>>0;if((Q|0)!=(Z|0)){$=f[D>>2]|0;if(ga)f[E>>2]=f[E>>2]|1<<31-$;ha=$+1|0;f[D>>2]=ha;if((ha|0)==32){ha=f[F>>2]|0;if((ha|0)==(f[G>>2]|0))Oi(H,E);else{f[ha>>2]=f[E>>2];f[F>>2]=ha+4}f[D>>2]=0;f[E>>2]=0}}ha=z>>>1;if(ga)qg(C,Y,ha-Q|0);else qg(C,Y,ha-Z|0);ha=f[s>>2]|0;Y=f[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=f[l>>2]|0}if(!Ca)break;else M=Ca}}Ca=f[t>>2]|0;M=f[v>>2]|0;Ba=Ca+(((M>>>0)/113|0)<<2)|0;q=f[o>>2]|0;p=q;i=Ca;if((q|0)==(Ca|0)){Da=0;Ea=0}else{ja=(f[Ba>>2]|0)+(((M>>>0)%113|0)*36|0)|0;Da=ja;Ea=ja}ja=Ba;Ba=Ea;c:while(1){Ea=Ba;do{M=Ea;if((Da|0)==(M|0))break c;Ea=M+36|0}while((Ea-(f[ja>>2]|0)|0)!=4068);Ea=ja+4|0;ja=Ea;Ba=f[Ea>>2]|0}f[l>>2]=0;l=p-i>>2;if(l>>>0>2){i=Ca;do{ur(f[i>>2]|0);i=(f[t>>2]|0)+4|0;f[t>>2]=i;Fa=f[o>>2]|0;Ga=Fa-i>>2}while(Ga>>>0>2);Ha=Ga;Ia=i;Ja=Fa}else{Ha=l;Ia=Ca;Ja=q}switch(Ha|0){case 1:{Ka=56;ba=95;break}case 2:{Ka=113;ba=95;break}default:{}}if((ba|0)==95)f[v>>2]=Ka;if((Ia|0)!=(Ja|0)){Ka=Ia;do{ur(f[Ka>>2]|0);Ka=Ka+4|0}while((Ka|0)!=(Ja|0));Ja=f[t>>2]|0;t=f[o>>2]|0;if((t|0)!=(Ja|0))f[o>>2]=t+(~((t+-4-Ja|0)>>>2)<<2)}Ja=f[e>>2]|0;if(!Ja){u=d;return}ur(Ja);u=d;return}function mb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=Oa,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=In(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=lo(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;if(!(b[a+32>>0]|0)){r=o;m=0;while(1){s=$(b[r>>0]|0);n[g+(m<<2)>>2]=s;m=m+1|0;q=b[k>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){t=q;break}else r=r+1|0}}else{r=o;m=0;while(1){s=$($(b[r>>0]|0)/$(127.0));n[g+(m<<2)>>2]=s;m=m+1|0;q=b[k>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){t=q;break}else r=r+1|0}}}else t=l;r=t<<24>>24;if(t<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 2:{r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;q=In(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;u=lo(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+u|0;if(!(b[a+32>>0]|0)){u=o;k=0;while(1){s=$(h[u>>0]|0);n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){v=q;break}else u=u+1|0}}else{u=o;k=0;while(1){s=$($(h[u>>0]|0)/$(255.0));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){v=l;break}else u=u+1|0}}}else v=m;u=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 3:{u=a+48|0;k=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(lo(In(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,k|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;l=0;while(1){s=$(d[u>>1]|0);n[g+(l<<2)>>2]=s;l=l+1|0;q=b[r>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){w=q;break}else u=u+2|0}}else{u=o;l=0;while(1){s=$($(d[u>>1]|0)/$(32767.0));n[g+(l<<2)>>2]=s;l=l+1|0;m=b[r>>0]|0;if((l|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else u=u+2|0}}else w=k;u=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 4:{u=a+48|0;l=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(lo(In(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,l|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;m=0;while(1){s=$(j[u>>1]|0);n[g+(m<<2)>>2]=s;m=m+1|0;q=b[r>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){x=q;break}else u=u+2|0}}else{u=o;m=0;while(1){s=$($(j[u>>1]|0)/$(65535.0));n[g+(m<<2)>>2]=s;m=m+1|0;k=b[r>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){x=k;break}else u=u+2|0}}else x=l;u=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 5:{u=a+48|0;m=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(lo(In(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,m|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;k=0;while(1){s=$(f[u>>2]|0);n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){y=q;break}else u=u+4|0}}else{u=o;k=0;while(1){s=$($(f[u>>2]|0)*$(4.65661287e-10));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){y=l;break}else u=u+4|0}}else y=m;u=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 6:{u=a+48|0;k=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(lo(In(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,k|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;l=0;while(1){s=$((f[u>>2]|0)>>>0);n[g+(l<<2)>>2]=s;l=l+1|0;q=b[r>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){z=q;break}else u=u+4|0}}else{u=o;l=0;while(1){s=$($((f[u>>2]|0)>>>0)*$(2.32830644e-10));n[g+(l<<2)>>2]=s;l=l+1|0;m=b[r>>0]|0;if((l|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){z=m;break}else u=u+4|0}}else z=k;u=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 7:{u=a+48|0;l=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(lo(In(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,l|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;m=0;while(1){q=u;s=$(+((f[q>>2]|0)>>>0)+4294967296.0*+(f[q+4>>2]|0));n[g+(m<<2)>>2]=s;m=m+1|0;q=b[r>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else u=u+8|0}}else{u=o;m=0;while(1){k=u;s=$($(+((f[k>>2]|0)>>>0)+4294967296.0*+(f[k+4>>2]|0))*$(1.08420217e-19));n[g+(m<<2)>>2]=s;m=m+1|0;k=b[r>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){A=k;break}else u=u+8|0}}else A=l;u=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 8:{u=a+48|0;m=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(lo(In(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,m|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;k=0;while(1){q=u;s=$(+((f[q>>2]|0)>>>0)+4294967296.0*+((f[q+4>>2]|0)>>>0));n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){B=q;break}else u=u+8|0}}else{u=o;k=0;while(1){l=u;s=$($(+((f[l>>2]|0)>>>0)+4294967296.0*+((f[l+4>>2]|0)>>>0))*$(5.42101086e-20));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){B=l;break}else u=u+8|0}}else B=m;u=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 9:{u=a+24|0;k=b[u>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){r=f[f[a>>2]>>2]|0;o=a+40|0;l=In(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;q=lo(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=r+q|0;q=0;while(1){f[g+(q<<2)>>2]=f[o>>2];q=q+1|0;r=b[u>>0]|0;if((q|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){C=r;break}else o=o+4|0}}else C=k;o=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 10:{o=a+24|0;q=b[o>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){u=f[f[a>>2]>>2]|0;m=a+40|0;r=In(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;l=lo(r|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=u+l|0;l=0;while(1){s=$(+p[m>>3]);n[g+(l<<2)>>2]=s;l=l+1|0;u=b[o>>0]|0;if((l|0)>=((u<<24>>24>e<<24>>24?e:u)<<24>>24|0)){D=u;break}else m=m+8|0}}else D=q;m=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 11:{m=a+24|0;l=b[m>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){o=f[f[a>>2]>>2]|0;k=a+40|0;u=In(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=lo(u|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=o+r|0;r=0;while(1){s=$((b[k>>0]|0)!=0&1);n[g+(r<<2)>>2]=s;r=r+1|0;o=b[m>>0]|0;if((r|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){E=o;break}else k=k+1|0}}else E=l;k=E<<24>>24;if(E<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function nb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0.0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0.0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0.0,kb=0.0,lb=0.0,mb=0.0,nb=0.0,ob=0.0,pb=0.0,qb=0.0,rb=0.0,sb=0.0,tb=0;i=u;u=u+512|0;j=i;k=d+c|0;l=0-k|0;m=a+4|0;n=a+100|0;o=b;b=0;a:while(1){switch(o|0){case 46:{p=6;break a;break}case 48:break;default:{q=0;r=o;s=b;t=0;v=0;break a}}w=f[m>>2]|0;if(w>>>0<(f[n>>2]|0)>>>0){f[m>>2]=w+1;o=h[w>>0]|0;b=1;continue}else{o=Pi(a)|0;b=1;continue}}if((p|0)==6){o=f[m>>2]|0;if(o>>>0<(f[n>>2]|0)>>>0){f[m>>2]=o+1;x=h[o>>0]|0}else x=Pi(a)|0;if((x|0)==48){o=0;w=0;while(1){y=lo(o|0,w|0,-1,-1)|0;z=I;A=f[m>>2]|0;if(A>>>0<(f[n>>2]|0)>>>0){f[m>>2]=A+1;B=h[A>>0]|0}else B=Pi(a)|0;if((B|0)==48){o=y;w=z}else{q=1;r=B;s=1;t=y;v=z;break}}}else{q=1;r=x;s=b;t=0;v=0}}f[j>>2]=0;b=r+-48|0;x=(r|0)==46;b:do if(x|b>>>0<10){B=j+496|0;w=0;o=0;z=0;y=q;A=s;C=r;D=x;E=b;F=t;G=v;H=0;J=0;c:while(1){do if(D)if(!y){L=w;M=o;N=1;O=z;P=A;Q=H;R=J;S=H;T=J}else break c;else{U=lo(H|0,J|0,1,0)|0;V=I;W=(C|0)!=48;if((o|0)>=125){if(!W){L=w;M=o;N=y;O=z;P=A;Q=F;R=G;S=U;T=V;break}f[B>>2]=f[B>>2]|1;L=w;M=o;N=y;O=z;P=A;Q=F;R=G;S=U;T=V;break}Y=j+(o<<2)|0;if(!w)Z=E;else Z=C+-48+((f[Y>>2]|0)*10|0)|0;f[Y>>2]=Z;Y=w+1|0;_=(Y|0)==9;L=_?0:Y;M=o+(_&1)|0;N=y;O=W?U:z;P=1;Q=F;R=G;S=U;T=V}while(0);V=f[m>>2]|0;if(V>>>0<(f[n>>2]|0)>>>0){f[m>>2]=V+1;$=h[V>>0]|0}else $=Pi(a)|0;E=$+-48|0;D=($|0)==46;if(!(D|E>>>0<10)){aa=L;ba=M;ca=O;da=N;ea=$;fa=P;ga=S;ha=Q;ia=T;ja=R;p=29;break b}else{w=L;o=M;z=O;y=N;A=P;C=$;F=Q;G=R;H=S;J=T}}ka=w;la=o;ma=z;na=H;oa=J;pa=F;qa=G;ra=(A|0)!=0;p=37}else{aa=0;ba=0;ca=0;da=q;ea=r;fa=s;ga=0;ha=t;ia=0;ja=v;p=29}while(0);do if((p|0)==29){v=(da|0)==0;t=v?ga:ha;s=v?ia:ja;v=(fa|0)!=0;if(!(v&(ea|32|0)==101))if((ea|0)>-1){ka=aa;la=ba;ma=ca;na=ga;oa=ia;pa=t;qa=s;ra=v;p=37;break}else{sa=aa;ta=ba;ua=ca;va=ga;wa=ia;xa=v;ya=t;za=s;p=39;break}v=Pe(a,g)|0;r=I;if((v|0)==0&(r|0)==-2147483648){if(!g){kn(a,0);Aa=0.0;break}if(!(f[n>>2]|0)){Ba=0;Ca=0}else{f[m>>2]=(f[m>>2]|0)+-1;Ba=0;Ca=0}}else{Ba=v;Ca=r}r=lo(Ba|0,Ca|0,t|0,s|0)|0;Da=aa;Ea=ba;Fa=ca;Ga=r;Ha=ga;Ia=I;Ja=ia;p=41}while(0);if((p|0)==37)if(f[n>>2]|0){f[m>>2]=(f[m>>2]|0)+-1;if(ra){Da=ka;Ea=la;Fa=ma;Ga=pa;Ha=na;Ia=qa;Ja=oa;p=41}else p=40}else{sa=ka;ta=la;ua=ma;va=na;wa=oa;xa=ra;ya=pa;za=qa;p=39}if((p|0)==39)if(xa){Da=sa;Ea=ta;Fa=ua;Ga=ya;Ha=va;Ia=za;Ja=wa;p=41}else p=40;do if((p|0)==40){wa=Br()|0;f[wa>>2]=22;kn(a,0);Aa=0.0}else if((p|0)==41){wa=f[j>>2]|0;if(!wa){Aa=+(e|0)*0.0;break}if(((Ja|0)<0|(Ja|0)==0&Ha>>>0<10)&((Ga|0)==(Ha|0)&(Ia|0)==(Ja|0))?(c|0)>30|(wa>>>c|0)==0:0){Aa=+(e|0)*+(wa>>>0);break}wa=(d|0)/-2|0;za=((wa|0)<0)<<31>>31;if((Ia|0)>(za|0)|(Ia|0)==(za|0)&Ga>>>0>wa>>>0){wa=Br()|0;f[wa>>2]=34;Aa=+(e|0)*1797693134862315708145274.0e284*1797693134862315708145274.0e284;break}wa=d+-106|0;za=((wa|0)<0)<<31>>31;if((Ia|0)<(za|0)|(Ia|0)==(za|0)&Ga>>>0<wa>>>0){wa=Br()|0;f[wa>>2]=34;Aa=+(e|0)*2.2250738585072014e-308*2.2250738585072014e-308;break}if(!Da)Ka=Ea;else{if((Da|0)<9){wa=j+(Ea<<2)|0;za=Da;va=f[wa>>2]|0;while(1){va=va*10|0;if((za|0)>=8)break;else za=za+1|0}f[wa>>2]=va}Ka=Ea+1|0}if((Fa|0)<9?(Fa|0)<=(Ga|0)&(Ga|0)<18:0){if((Ga|0)==9){Aa=+(e|0)*+((f[j>>2]|0)>>>0);break}if((Ga|0)<9){Aa=+(e|0)*+((f[j>>2]|0)>>>0)/+(f[6984+(8-Ga<<2)>>2]|0);break}za=c+27+(X(Ga,-3)|0)|0;A=f[j>>2]|0;if((za|0)>30|(A>>>za|0)==0){Aa=+(e|0)*+(A>>>0)*+(f[6984+(Ga+-10<<2)>>2]|0);break}}A=(Ga|0)%9|0;if(!A){La=0;Ma=Ka;Na=0;Oa=Ga}else{za=(Ga|0)>-1?A:A+9|0;A=f[6984+(8-za<<2)>>2]|0;if(Ka){G=1e9/(A|0)|0;F=0;J=0;H=Ga;z=0;do{o=j+(z<<2)|0;w=f[o>>2]|0;ya=((w>>>0)/(A>>>0)|0)+F|0;f[o>>2]=ya;F=X(G,(w>>>0)%(A>>>0)|0)|0;w=(z|0)==(J|0)&(ya|0)==0;H=w?H+-9|0:H;J=w?J+1&127:J;z=z+1|0}while((z|0)!=(Ka|0));if(!F){Pa=J;Qa=Ka;Ra=H}else{f[j+(Ka<<2)>>2]=F;Pa=J;Qa=Ka+1|0;Ra=H}}else{Pa=0;Qa=0;Ra=Ga}La=0;Ma=Qa;Na=Pa;Oa=9-za+Ra|0}d:while(1){z=(Oa|0)<18;A=(Oa|0)==18;G=j+(Na<<2)|0;va=La;wa=Ma;while(1){if(!z){if(!A){Sa=va;Ta=Na;Ua=Oa;Va=wa;break d}if((f[G>>2]|0)>>>0>=9007199){Sa=va;Ta=Na;Ua=18;Va=wa;break d}}w=0;Wa=wa;ya=wa+127|0;while(1){o=ya&127;ua=j+(o<<2)|0;ta=jo(f[ua>>2]|0,0,29)|0;sa=lo(ta|0,I|0,w|0,0)|0;ta=I;if(ta>>>0>0|(ta|0)==0&sa>>>0>1e9){xa=Np(sa|0,ta|0,1e9,0)|0;qa=vn(sa|0,ta|0,1e9,0)|0;Xa=xa;Ya=qa}else{Xa=0;Ya=sa}f[ua>>2]=Ya;ua=(o|0)==(Na|0);Wa=(Ya|0)==0&(((o|0)!=(Wa+127&127|0)|ua)^1)?o:Wa;if(ua)break;else{w=Xa;ya=o+-1|0}}va=va+-29|0;if(Xa|0)break;else wa=Wa}wa=Na+127&127;G=Wa+127&127;A=j+((Wa+126&127)<<2)|0;if((wa|0)==(Wa|0)){f[A>>2]=f[A>>2]|f[j+(G<<2)>>2];Za=G}else Za=Wa;f[j+(wa<<2)>>2]=Xa;La=va;Ma=Za;Na=wa;Oa=Oa+9|0}e:while(1){za=Va+1&127;H=j+((Va+127&127)<<2)|0;J=Sa;F=Ta;wa=Ua;while(1){G=(wa|0)==18;A=(wa|0)>27?9:1;_a=J;$a=F;while(1){z=0;while(1){ya=z+$a&127;if((ya|0)==(Va|0)){ab=2;p=88;break}w=f[j+(ya<<2)>>2]|0;ya=f[7016+(z<<2)>>2]|0;if(w>>>0<ya>>>0){ab=2;p=88;break}if(w>>>0>ya>>>0)break;ya=z+1|0;if((z|0)<1)z=ya;else{ab=ya;p=88;break}}if((p|0)==88?(p=0,G&(ab|0)==2):0){bb=0.0;cb=0;db=Va;break e}eb=A+_a|0;if(($a|0)==(Va|0)){_a=eb;$a=Va}else break}G=(1<<A)+-1|0;z=1e9>>>A;fb=0;gb=$a;hb=wa;ya=$a;do{w=j+(ya<<2)|0;o=f[w>>2]|0;ua=(o>>>A)+fb|0;f[w>>2]=ua;fb=X(o&G,z)|0;o=(ya|0)==(gb|0)&(ua|0)==0;hb=o?hb+-9|0:hb;gb=o?gb+1&127:gb;ya=ya+1&127}while((ya|0)!=(Va|0));if(!fb){J=eb;F=gb;wa=hb;continue}if((za|0)!=(gb|0))break;f[H>>2]=f[H>>2]|1;J=eb;F=gb;wa=hb}f[j+(Va<<2)>>2]=fb;Sa=eb;Ta=gb;Ua=hb;Va=za}while(1){wa=cb+$a&127;F=db+1&127;if((wa|0)==(db|0)){f[j+(F+-1<<2)>>2]=0;ib=F}else ib=db;bb=bb*1.0e9+ +((f[j+(wa<<2)>>2]|0)>>>0);cb=cb+1|0;if((cb|0)==2)break;else db=ib}jb=+(e|0);kb=bb*jb;wa=_a+53|0;F=wa-d|0;J=(F|0)<(c|0);H=J?((F|0)>0?F:0):c;if((H|0)<53){lb=+Zq(+gk(1.0,105-H|0),kb);mb=+jr(kb,+gk(1.0,53-H|0));nb=lb;ob=mb;pb=lb+(kb-mb)}else{nb=0.0;ob=0.0;pb=kb}va=$a+2&127;if((va|0)!=(ib|0)){ya=f[j+(va<<2)>>2]|0;do if(ya>>>0>=5e8){if((ya|0)!=5e8){qb=jb*.75+ob;break}if(($a+3&127|0)==(ib|0)){qb=jb*.5+ob;break}else{qb=jb*.75+ob;break}}else{if((ya|0)==0?($a+3&127|0)==(ib|0):0){qb=ob;break}qb=jb*.25+ob}while(0);if((53-H|0)>1?!(+jr(qb,1.0)!=0.0):0)rb=qb+1.0;else rb=qb}else rb=ob;jb=pb+rb-nb;do if((wa&2147483647|0)>(-2-k|0)){ya=!(+K(+jb)>=9007199254740992.0);va=_a+((ya^1)&1)|0;kb=ya?jb:jb*.5;if((va+50|0)<=(l|0)?!(rb!=0.0&(J&((H|0)!=(F|0)|ya))):0){sb=kb;tb=va;break}ya=Br()|0;f[ya>>2]=34;sb=kb;tb=va}else{sb=jb;tb=_a}while(0);Aa=+_q(sb,tb)}while(0);u=i;return +Aa}function ob(a,c,d,e,g,i){a=a|0;c=+c;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0,D=0.0,E=0,F=0,G=0,H=0.0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0.0,ga=0.0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0;j=u;u=u+560|0;k=j+8|0;l=j;m=j+524|0;n=m;o=j+512|0;f[l>>2]=0;p=o+12|0;Qo(c)|0;if((I|0)<0){q=-c;r=1;s=17312}else{q=c;r=(g&2049|0)!=0&1;s=(g&2048|0)==0?((g&1|0)==0?17313:17318):17315}Qo(q)|0;do if(0==0&(I&2146435072|0)==2146435072){t=(i&32|0)!=0;v=r+3|0;Xk(a,32,d,v,g&-65537);xp(a,s,r);xp(a,q!=q|0.0!=0.0?(t?19262:17339):t?17331:17335,3);Xk(a,32,d,v,g^8192);w=v}else{c=+$q(q,l)*2.0;v=c!=0.0;if(v)f[l>>2]=(f[l>>2]|0)+-1;t=i|32;if((t|0)==97){x=i&32;y=(x|0)==0?s:s+9|0;z=r|2;A=12-e|0;do if(!(e>>>0>11|(A|0)==0)){B=8.0;C=A;do{C=C+-1|0;B=B*16.0}while((C|0)!=0);if((b[y>>0]|0)==45){D=-(B+(-c-B));break}else{D=c+B-B;break}}else D=c;while(0);A=f[l>>2]|0;C=(A|0)<0?0-A|0:A;E=Uj(C,((C|0)<0)<<31>>31,p)|0;if((E|0)==(p|0)){C=o+11|0;b[C>>0]=48;F=C}else F=E;b[F+-1>>0]=(A>>31&2)+43;A=F+-2|0;b[A>>0]=i+15;E=(e|0)<1;C=(g&8|0)==0;G=m;H=D;while(1){J=~~H;K=G+1|0;b[G>>0]=x|h[17343+J>>0];H=(H-+(J|0))*16.0;if((K-n|0)==1?!(C&(E&H==0.0)):0){b[K>>0]=46;L=G+2|0}else L=K;if(!(H!=0.0))break;else G=L}G=L;if((e|0)!=0?(-2-n+G|0)<(e|0):0){M=G-n|0;N=e+2|0}else{E=G-n|0;M=E;N=E}E=p-A|0;G=E+z+N|0;Xk(a,32,d,G,g);xp(a,y,z);Xk(a,48,d,G,g^65536);xp(a,m,M);Xk(a,48,N-M|0,0,0);xp(a,A,E);Xk(a,32,d,G,g^8192);w=G;break}G=(e|0)<0?6:e;if(v){E=(f[l>>2]|0)+-28|0;f[l>>2]=E;O=c*268435456.0;P=E}else{O=c;P=f[l>>2]|0}E=(P|0)<0?k:k+288|0;C=E;H=O;do{x=~~H>>>0;f[C>>2]=x;C=C+4|0;H=(H-+(x>>>0))*1.0e9}while(H!=0.0);if((P|0)>0){v=E;A=C;z=P;while(1){y=(z|0)<29?z:29;x=A+-4|0;if(x>>>0>=v>>>0){K=x;x=0;do{J=jo(f[K>>2]|0,0,y|0)|0;Q=lo(J|0,I|0,x|0,0)|0;J=I;R=vn(Q|0,J|0,1e9,0)|0;f[K>>2]=R;x=Np(Q|0,J|0,1e9,0)|0;K=K+-4|0}while(K>>>0>=v>>>0);if(x){K=v+-4|0;f[K>>2]=x;S=K}else S=v}else S=v;K=A;while(1){if(K>>>0<=S>>>0)break;J=K+-4|0;if(!(f[J>>2]|0))K=J;else break}x=(f[l>>2]|0)-y|0;f[l>>2]=x;if((x|0)>0){v=S;A=K;z=x}else{T=S;U=K;V=x;break}}}else{T=E;U=C;V=P}if((V|0)<0){z=((G+25|0)/9|0)+1|0;A=(t|0)==102;v=T;x=U;J=V;while(1){Q=0-J|0;R=(Q|0)<9?Q:9;if(v>>>0<x>>>0){Q=(1<<R)+-1|0;W=1e9>>>R;Y=0;Z=v;do{_=f[Z>>2]|0;f[Z>>2]=(_>>>R)+Y;Y=X(_&Q,W)|0;Z=Z+4|0}while(Z>>>0<x>>>0);Z=(f[v>>2]|0)==0?v+4|0:v;if(!Y){$=Z;aa=x}else{f[x>>2]=Y;$=Z;aa=x+4|0}}else{$=(f[v>>2]|0)==0?v+4|0:v;aa=x}Z=A?E:$;W=(aa-Z>>2|0)>(z|0)?Z+(z<<2)|0:aa;J=(f[l>>2]|0)+R|0;f[l>>2]=J;if((J|0)>=0){ba=$;ca=W;break}else{v=$;x=W}}}else{ba=T;ca=U}x=E;if(ba>>>0<ca>>>0){v=(x-ba>>2)*9|0;J=f[ba>>2]|0;if(J>>>0<10)da=v;else{z=v;v=10;while(1){v=v*10|0;A=z+1|0;if(J>>>0<v>>>0){da=A;break}else z=A}}}else da=0;z=(t|0)==103;v=(G|0)!=0;J=G-((t|0)!=102?da:0)+((v&z)<<31>>31)|0;if((J|0)<(((ca-x>>2)*9|0)+-9|0)){A=J+9216|0;J=E+4+(((A|0)/9|0)+-1024<<2)|0;C=(A|0)%9|0;if((C|0)<8){A=C;C=10;while(1){W=C*10|0;if((A|0)<7){A=A+1|0;C=W}else{ea=W;break}}}else ea=10;C=f[J>>2]|0;A=(C>>>0)%(ea>>>0)|0;t=(J+4|0)==(ca|0);if(!(t&(A|0)==0)){B=(((C>>>0)/(ea>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;W=(ea|0)/2|0;H=A>>>0<W>>>0?.5:t&(A|0)==(W|0)?1.0:1.5;if(!r){fa=H;ga=B}else{W=(b[s>>0]|0)==45;fa=W?-H:H;ga=W?-B:B}W=C-A|0;f[J>>2]=W;if(ga+fa!=ga){A=W+ea|0;f[J>>2]=A;if(A>>>0>999999999){A=ba;W=J;while(1){C=W+-4|0;f[W>>2]=0;if(C>>>0<A>>>0){t=A+-4|0;f[t>>2]=0;ha=t}else ha=A;t=(f[C>>2]|0)+1|0;f[C>>2]=t;if(t>>>0>999999999){A=ha;W=C}else{ia=ha;ja=C;break}}}else{ia=ba;ja=J}W=(x-ia>>2)*9|0;A=f[ia>>2]|0;if(A>>>0<10){ka=ja;la=W;ma=ia}else{C=W;W=10;while(1){W=W*10|0;t=C+1|0;if(A>>>0<W>>>0){ka=ja;la=t;ma=ia;break}else C=t}}}else{ka=J;la=da;ma=ba}}else{ka=J;la=da;ma=ba}C=ka+4|0;na=la;oa=ca>>>0>C>>>0?C:ca;pa=ma}else{na=da;oa=ca;pa=ba}C=oa;while(1){if(C>>>0<=pa>>>0){qa=0;break}W=C+-4|0;if(!(f[W>>2]|0))C=W;else{qa=1;break}}J=0-na|0;do if(z){W=G+((v^1)&1)|0;if((W|0)>(na|0)&(na|0)>-5){ra=i+-1|0;sa=W+-1-na|0}else{ra=i+-2|0;sa=W+-1|0}W=g&8;if(!W){if(qa?(A=f[C+-4>>2]|0,(A|0)!=0):0)if(!((A>>>0)%10|0)){t=0;Z=10;while(1){Z=Z*10|0;Q=t+1|0;if((A>>>0)%(Z>>>0)|0|0){ta=Q;break}else t=Q}}else ta=0;else ta=9;t=((C-x>>2)*9|0)+-9|0;if((ra|32|0)==102){Z=t-ta|0;A=(Z|0)>0?Z:0;ua=ra;va=(sa|0)<(A|0)?sa:A;wa=0;break}else{A=t+na-ta|0;t=(A|0)>0?A:0;ua=ra;va=(sa|0)<(t|0)?sa:t;wa=0;break}}else{ua=ra;va=sa;wa=W}}else{ua=i;va=G;wa=g&8}while(0);G=va|wa;x=(G|0)!=0&1;v=(ua|32|0)==102;if(v){xa=0;ya=(na|0)>0?na:0}else{z=(na|0)<0?J:na;t=Uj(z,((z|0)<0)<<31>>31,p)|0;z=p;if((z-t|0)<2){A=t;while(1){Z=A+-1|0;b[Z>>0]=48;if((z-Z|0)<2)A=Z;else{za=Z;break}}}else za=t;b[za+-1>>0]=(na>>31&2)+43;A=za+-2|0;b[A>>0]=ua;xa=A;ya=z-A|0}A=r+1+va+x+ya|0;Xk(a,32,d,A,g);xp(a,s,r);Xk(a,48,d,A,g^65536);if(v){J=pa>>>0>E>>>0?E:pa;Z=m+9|0;R=Z;Y=m+8|0;Q=J;do{K=Uj(f[Q>>2]|0,0,Z)|0;if((Q|0)==(J|0))if((K|0)==(Z|0)){b[Y>>0]=48;Aa=Y}else Aa=K;else if(K>>>0>m>>>0){rj(m|0,48,K-n|0)|0;y=K;while(1){_=y+-1|0;if(_>>>0>m>>>0)y=_;else{Aa=_;break}}}else Aa=K;xp(a,Aa,R-Aa|0);Q=Q+4|0}while(Q>>>0<=E>>>0);if(G|0)xp(a,17359,1);if(Q>>>0<C>>>0&(va|0)>0){E=va;R=Q;while(1){Y=Uj(f[R>>2]|0,0,Z)|0;if(Y>>>0>m>>>0){rj(m|0,48,Y-n|0)|0;J=Y;while(1){v=J+-1|0;if(v>>>0>m>>>0)J=v;else{Ba=v;break}}}else Ba=Y;xp(a,Ba,(E|0)<9?E:9);R=R+4|0;J=E+-9|0;if(!(R>>>0<C>>>0&(E|0)>9)){Ca=J;break}else E=J}}else Ca=va;Xk(a,48,Ca+9|0,9,0)}else{E=qa?C:pa+4|0;if((va|0)>-1){R=m+9|0;Z=(wa|0)==0;Q=R;G=0-n|0;J=m+8|0;K=va;v=pa;while(1){x=Uj(f[v>>2]|0,0,R)|0;if((x|0)==(R|0)){b[J>>0]=48;Da=J}else Da=x;do if((v|0)==(pa|0)){x=Da+1|0;xp(a,Da,1);if(Z&(K|0)<1){Ea=x;break}xp(a,17359,1);Ea=x}else{if(Da>>>0<=m>>>0){Ea=Da;break}rj(m|0,48,Da+G|0)|0;x=Da;while(1){z=x+-1|0;if(z>>>0>m>>>0)x=z;else{Ea=z;break}}}while(0);Y=Q-Ea|0;xp(a,Ea,(K|0)>(Y|0)?Y:K);x=K-Y|0;v=v+4|0;if(!(v>>>0<E>>>0&(x|0)>-1)){Fa=x;break}else K=x}}else Fa=va;Xk(a,48,Fa+18|0,18,0);xp(a,xa,p-xa|0)}Xk(a,32,d,A,g^8192);w=A}while(0);u=j;return ((w|0)<(d|0)?d:w)|0}function pb(a){a=a|0;var c=0,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z=(f[A+28>>2]|0)-(f[A+24>>2]|0)>>2;f[d>>2]=-1;fg(a+52|0,z,d);z=a+40|0;A=f[z>>2]|0;B=a+44|0;C=f[B>>2]|0;if((C|0)!=(A|0))f[B>>2]=C+(~((C+-4-A|0)>>>2)<<2);A=f[s>>2]|0;C=(f[A+4>>2]|0)-(f[A>>2]|0)>>2;lk(z,C-((C>>>0)%3|0)|0);C=a+84|0;z=f[s>>2]|0;A=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2;b[d>>0]=0;kh(C,A,d);A=a+96|0;z=f[A>>2]|0;B=a+100|0;D=f[B>>2]|0;if((D|0)!=(z|0))f[B>>2]=D+(~((D+-4-z|0)>>>2)<<2);f[a+164>>2]=-1;z=a+168|0;f[z>>2]=0;D=f[a+108>>2]|0;E=a+112|0;F=f[E>>2]|0;if((F|0)!=(D|0))f[E>>2]=F+(~(((F+-12-D|0)>>>0)/12|0)*12|0);D=a+132|0;if(f[D>>2]|0){F=a+128|0;E=f[F>>2]|0;if(E|0){G=E;do{E=G;G=f[G>>2]|0;ur(E)}while((G|0)!=0)}f[F>>2]=0;F=f[a+124>>2]|0;if(F|0){G=a+120|0;E=0;do{f[(f[G>>2]|0)+(E<<2)>>2]=0;E=E+1|0}while((E|0)!=(F|0))}f[D>>2]=0}f[a+144>>2]=0;D=f[s>>2]|0;F=(f[D+28>>2]|0)-(f[D+24>>2]|0)>>2;f[d>>2]=-1;fg(a+152|0,F,d);F=a+72|0;D=f[F>>2]|0;E=a+76|0;G=f[E>>2]|0;if((G|0)!=(D|0))f[E>>2]=G+(~((G+-4-D|0)>>>2)<<2);D=f[s>>2]|0;lk(F,((f[D+4>>2]|0)-(f[D>>2]|0)>>2>>>0)/3|0);f[a+64>>2]=0;if(!(Ae(a)|0)){w=0;u=c;return w|0}if(!(rh(a)|0)){w=0;u=c;return w|0}D=a+172|0;G=a+176|0;H=(((f[G>>2]|0)-(f[D>>2]|0)|0)/136|0)&255;b[h>>0]=H;I=f[(f[x>>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?Q+-2|0:V;f[d>>2]=_;Y=f[H>>2]|0;if(Y>>>0<(f[K>>2]|0)>>>0){f[Y>>2]=_;f[H>>2]=Y+4}else Oi(i,d);if(R)break;Y=((V>>>0)%3|0|0)==0?Q+-2|0:V;if((Y|0)==-1)break;V=f[(f[(f[s>>2]|0)+12>>2]|0)+(Y<<2)>>2]|0;Y=(V|0)==-1;W=Y?-1:(V>>>0)/3|0;if(Y)break;if(f[(f[t>>2]|0)+(W>>>5<<2)>>2]&1<<(W&31)|0)break;f[l>>2]=V;f[d>>2]=f[l>>2];if(!(ic(a,d)|0))break b}else{V=Q+1|0;if(R)$=-1;else $=((V>>>0)%3|0|0)==0?Q+-2|0:V;f[m>>2]=$;f[d>>2]=f[m>>2];Oe(a,d,1)|0;f[n>>2]=f[e>>2];f[d>>2]=f[n>>2];if(!(ic(a,d)|0))break b}while(0)}M=M+1|0;if((M|0)>=(L|0)){aa=62;break a}}ba=0}else aa=62;while(0);if((aa|0)==62){aa=f[F>>2]|0;L=f[E>>2]|0;n=L;if((aa|0)!=(L|0)?(m=L+-4|0,aa>>>0<m>>>0):0){L=aa;aa=m;do{m=f[L>>2]|0;f[L>>2]=f[aa>>2];f[aa>>2]=m;L=L+4|0;aa=aa+-4|0}while(L>>>0<aa>>>0)}f[o>>2]=n;f[p>>2]=f[i>>2];f[q>>2]=f[H>>2];f[g>>2]=f[o>>2];f[e>>2]=f[p>>2];f[d>>2]=f[q>>2];Yd(F,g,e,d)|0;if((f[G>>2]|0)!=(f[D>>2]|0)?(D=f[y>>2]|0,y=((f[D+100>>2]|0)-(f[D+96>>2]|0)|0)/12|0,b[d>>0]=0,kh(t,y,d),y=f[F>>2]|0,F=f[E>>2]|0,(y|0)!=(F|0)):0){E=y;do{f[r>>2]=f[E>>2];f[d>>2]=f[r>>2];Ge(a,d)|0;E=E+4|0}while((E|0)!=(F|0))}nh(v);F=a+232|0;nd(v,F);v=a+280|0;E=f[v>>2]|0;if((E|0?(f[h>>2]|0)>0:0)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-1;break}else{x=s+t|0;break}else x=t;while(0);w=f[j>>2]|0;y=b[w>>0]|0;if(!(y<<24>>24)){z=88;break}else{A=y;B=w}b:while(1){switch(A<<24>>24){case 37:{C=B;D=B;z=9;break b;break}case 0:{E=B;break b;break}default:{}}y=B+1|0;f[j>>2]=y;A=b[y>>0]|0;B=y}c:do if((z|0)==9)while(1){z=0;if((b[D+1>>0]|0)!=37){E=C;break c}y=C+1|0;D=D+2|0;f[j>>2]=D;if((b[D>>0]|0)!=37){E=y;break}else{C=y;z=9}}while(0);y=E-w|0;if(c)xp(a,w,y);if(y|0){s=y;t=x;continue}y=(gr(b[(f[j>>2]|0)+1>>0]|0)|0)==0;F=f[j>>2]|0;if(!y?(b[F+2>>0]|0)==36:0){G=(b[F+1>>0]|0)+-48|0;H=1;J=3}else{G=-1;H=v;J=1}y=F+J|0;f[j>>2]=y;F=b[y>>0]|0;K=(F<<24>>24)+-32|0;if(K>>>0>31|(1<<K&75913|0)==0){L=0;M=F;N=y}else{K=0;O=F;F=y;while(1){y=1<<(O<<24>>24)+-32|K;P=F+1|0;f[j>>2]=P;Q=b[P>>0]|0;R=(Q<<24>>24)+-32|0;if(R>>>0>31|(1<<R&75913|0)==0){L=y;M=Q;N=P;break}else{K=y;O=Q;F=P}}}if(M<<24>>24==42){if((gr(b[N+1>>0]|0)|0)!=0?(F=f[j>>2]|0,(b[F+2>>0]|0)==36):0){O=F+1|0;f[h+((b[O>>0]|0)+-48<<2)>>2]=10;S=f[g+((b[O>>0]|0)+-48<<3)>>2]|0;T=1;U=F+3|0}else{if(H|0){V=-1;break}if(c){F=(f[e>>2]|0)+(4-1)&~(4-1);O=f[F>>2]|0;f[e>>2]=F+4;W=O}else W=0;S=W;T=0;U=(f[j>>2]|0)+1|0}f[j>>2]=U;O=(S|0)<0;X=O?0-S|0:S;Y=O?L|8192:L;Z=T;_=U}else{O=Vl(j)|0;if((O|0)<0){V=-1;break}X=O;Y=L;Z=H;_=f[j>>2]|0}do if((b[_>>0]|0)==46){if((b[_+1>>0]|0)!=42){f[j>>2]=_+1;O=Vl(j)|0;$=O;aa=f[j>>2]|0;break}if(gr(b[_+2>>0]|0)|0?(O=f[j>>2]|0,(b[O+3>>0]|0)==36):0){F=O+2|0;f[h+((b[F>>0]|0)+-48<<2)>>2]=10;K=f[g+((b[F>>0]|0)+-48<<3)>>2]|0;F=O+4|0;f[j>>2]=F;$=K;aa=F;break}if(Z|0){V=-1;break a}if(c){F=(f[e>>2]|0)+(4-1)&~(4-1);K=f[F>>2]|0;f[e>>2]=F+4;ba=K}else ba=0;K=(f[j>>2]|0)+2|0;f[j>>2]=K;$=ba;aa=K}else{$=-1;aa=_}while(0);K=0;F=aa;while(1){if(((b[F>>0]|0)+-65|0)>>>0>57){V=-1;break a}O=F;F=F+1|0;f[j>>2]=F;ca=b[(b[O>>0]|0)+-65+(16831+(K*58|0))>>0]|0;da=ca&255;if((da+-1|0)>>>0>=8)break;else K=da}if(!(ca<<24>>24)){V=-1;break}O=(G|0)>-1;do if(ca<<24>>24==19)if(O){V=-1;break a}else z=50;else{if(O){f[h+(G<<2)>>2]=da;P=g+(G<<3)|0;Q=f[P+4>>2]|0;y=k;f[y>>2]=f[P>>2];f[y+4>>2]=Q;z=50;break}if(!c){V=0;break a}Ue(k,da,e);ea=f[j>>2]|0}while(0);if((z|0)==50){z=0;if(c)ea=F;else{s=0;t=x;v=Z;continue}}O=b[ea+-1>>0]|0;Q=(K|0)!=0&(O&15|0)==3?O&-33:O;O=Y&-65537;y=(Y&8192|0)==0?Y:O;d:do switch(Q|0){case 110:{switch((K&255)<<24>>24){case 0:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 1:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 2:{P=f[k>>2]|0;f[P>>2]=x;f[P+4>>2]=((x|0)<0)<<31>>31;s=0;t=x;v=Z;continue a;break}case 3:{d[f[k>>2]>>1]=x;s=0;t=x;v=Z;continue a;break}case 4:{b[f[k>>2]>>0]=x;s=0;t=x;v=Z;continue a;break}case 6:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 7:{P=f[k>>2]|0;f[P>>2]=x;f[P+4>>2]=((x|0)<0)<<31>>31;s=0;t=x;v=Z;continue a;break}default:{s=0;t=x;v=Z;continue a}}break}case 112:{fa=120;ga=$>>>0>8?$:8;ha=y|8;z=62;break}case 88:case 120:{fa=Q;ga=$;ha=y;z=62;break}case 111:{P=k;R=f[P>>2]|0;ia=f[P+4>>2]|0;P=Yl(R,ia,o)|0;ja=q-P|0;ka=P;la=0;ma=17295;na=(y&8|0)==0|($|0)>(ja|0)?$:ja+1|0;oa=y;pa=R;qa=ia;z=68;break}case 105:case 100:{ia=k;R=f[ia>>2]|0;ja=f[ia+4>>2]|0;if((ja|0)<0){ia=no(0,0,R|0,ja|0)|0;P=I;ra=k;f[ra>>2]=ia;f[ra+4>>2]=P;sa=1;ta=17295;ua=ia;va=P;z=67;break d}else{sa=(y&2049|0)!=0&1;ta=(y&2048|0)==0?((y&1|0)==0?17295:17297):17296;ua=R;va=ja;z=67;break d}break}case 117:{ja=k;sa=0;ta=17295;ua=f[ja>>2]|0;va=f[ja+4>>2]|0;z=67;break}case 99:{b[r>>0]=f[k>>2];wa=r;xa=0;ya=17295;za=o;Aa=1;Ba=O;break}case 109:{ja=Br()|0;Ca=Dp(f[ja>>2]|0)|0;z=72;break}case 115:{ja=f[k>>2]|0;Ca=ja|0?ja:17305;z=72;break}case 67:{f[m>>2]=f[k>>2];f[l>>2]=0;f[k>>2]=m;Da=-1;Ea=m;z=76;break}case 83:{ja=f[k>>2]|0;if(!$){Xk(a,32,X,0,y);Fa=0;z=85}else{Da=$;Ea=ja;z=76}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{s=ob(a,+p[k>>3],X,$,y,Q)|0;t=x;v=Z;continue a;break}default:{wa=w;xa=0;ya=17295;za=o;Aa=$;Ba=y}}while(0);e:do if((z|0)==62){z=0;w=k;Q=f[w>>2]|0;K=f[w+4>>2]|0;w=El(Q,K,o,fa&32)|0;F=(ha&8|0)==0|(Q|0)==0&(K|0)==0;ka=w;la=F?0:2;ma=F?17295:17295+(fa>>4)|0;na=ga;oa=ha;pa=Q;qa=K;z=68}else if((z|0)==67){z=0;ka=Uj(ua,va,o)|0;la=sa;ma=ta;na=$;oa=y;pa=ua;qa=va;z=68}else if((z|0)==72){z=0;K=rg(Ca,0,$)|0;Q=(K|0)==0;wa=Ca;xa=0;ya=17295;za=Q?Ca+$|0:K;Aa=Q?$:K-Ca|0;Ba=O}else if((z|0)==76){z=0;K=Ea;Q=0;F=0;while(1){w=f[K>>2]|0;if(!w){Ga=Q;Ha=F;break}ja=pp(n,w)|0;if((ja|0)<0|ja>>>0>(Da-Q|0)>>>0){Ga=Q;Ha=ja;break}w=ja+Q|0;if(Da>>>0>w>>>0){K=K+4|0;Q=w;F=ja}else{Ga=w;Ha=ja;break}}if((Ha|0)<0){V=-1;break a}Xk(a,32,X,Ga,y);if(!Ga){Fa=0;z=85}else{F=Ea;Q=0;while(1){K=f[F>>2]|0;if(!K){Fa=Ga;z=85;break e}ja=pp(n,K)|0;Q=ja+Q|0;if((Q|0)>(Ga|0)){Fa=Ga;z=85;break e}xp(a,n,ja);if(Q>>>0>=Ga>>>0){Fa=Ga;z=85;break}else F=F+4|0}}}while(0);if((z|0)==68){z=0;O=(pa|0)!=0|(qa|0)!=0;F=(na|0)!=0|O;Q=q-ka+((O^1)&1)|0;wa=F?ka:o;xa=la;ya=ma;za=o;Aa=F?((na|0)>(Q|0)?na:Q):na;Ba=(na|0)>-1?oa&-65537:oa}else if((z|0)==85){z=0;Xk(a,32,X,Fa,y^8192);s=(X|0)>(Fa|0)?X:Fa;t=x;v=Z;continue}Q=za-wa|0;F=(Aa|0)<(Q|0)?Q:Aa;O=F+xa|0;ja=(X|0)<(O|0)?O:X;Xk(a,32,ja,O,Ba);xp(a,ya,xa);Xk(a,48,ja,O,Ba^65536);Xk(a,48,F,Q,0);xp(a,wa,Q);Xk(a,32,ja,O,Ba^8192);s=ja;t=x;v=Z}f:do if((z|0)==88)if(!a)if(v){Z=1;while(1){t=f[h+(Z<<2)>>2]|0;if(!t){Ia=Z;break}Ue(g+(Z<<3)|0,t,e);t=Z+1|0;if((Z|0)<9)Z=t;else{Ia=t;break}}if((Ia|0)<10){Z=Ia;while(1){if(f[h+(Z<<2)>>2]|0){V=-1;break f}if((Z|0)<9)Z=Z+1|0;else{V=1;break}}}else V=1}else V=0;else V=x;while(0);u=i;return V|0}function rb(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0;c=u;u=u+64|0;d=c+56|0;e=c+52|0;g=c+48|0;h=c+60|0;i=c;j=c+44|0;k=c+40|0;l=c+36|0;m=c+32|0;n=c+28|0;o=c+24|0;p=c+20|0;q=c+16|0;r=c+12|0;if(!(b[a+352>>0]|0)){Ze(d,f[a+8>>2]|0);s=a+12|0;t=f[d>>2]|0;f[d>>2]=0;v=f[s>>2]|0;f[s>>2]=t;if(v){Gi(v);ur(v);v=f[d>>2]|0;f[d>>2]=0;if(v|0){Gi(v);ur(v)}}else f[d>>2]=0}else{$g(d,f[a+8>>2]|0);v=a+12|0;t=f[d>>2]|0;f[d>>2]=0;s=f[v>>2]|0;f[v>>2]=t;if(s){Gi(s);ur(s);s=f[d>>2]|0;f[d>>2]=0;if(s|0){Gi(s);ur(s)}}else f[d>>2]=0}s=a+12|0;t=f[s>>2]|0;if(!t){w=0;u=c;return w|0}if((((f[t+4>>2]|0)-(f[t>>2]|0)>>2>>>0)/3|0|0)==(f[t+40>>2]|0)){w=0;u=c;return w|0}t=a+200|0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>2]=-1;fg(a+152|0,F,d);F=a+72|0;D=f[F>>2]|0;E=a+76|0;G=f[E>>2]|0;if((G|0)!=(D|0))f[E>>2]=G+(~((G+-4-D|0)>>>2)<<2);D=f[s>>2]|0;lk(F,((f[D+4>>2]|0)-(f[D>>2]|0)>>2>>>0)/3|0);f[a+64>>2]=0;if(!(Ae(a)|0)){w=0;u=c;return w|0}if(!(qh(a)|0)){w=0;u=c;return w|0}D=a+172|0;G=a+176|0;H=(((f[G>>2]|0)-(f[D>>2]|0)|0)/136|0)&255;b[h>>0]=H;I=f[(f[x>>2]|0)+44>>2]|0;J=I+16|0;K=f[J+4>>2]|0;if((K|0)>0|(K|0)==0&(f[J>>2]|0)>>>0>0)L=H;else{f[e>>2]=f[I+4>>2];f[d>>2]=f[e>>2];Ke(I,d,h,h+1|0)|0;L=b[h>>0]|0}f[a+284>>2]=L&255;L=f[s>>2]|0;h=(f[L+4>>2]|0)-(f[L>>2]|0)|0;L=h>>2;cj(t);f[i>>2]=0;I=i+4|0;f[I>>2]=0;f[i+8>>2]=0;a:do if((h|0)>0){H=a+104|0;J=i+8|0;K=0;b:while(1){M=(K>>>0)/3|0;N=M>>>5;O=1<<(M&31);if((f[(f[v>>2]|0)+(N<<2)>>2]&O|0)==0?(P=f[s>>2]|0,f[j>>2]=M,f[d>>2]=f[j>>2],!(bk(P,d)|0)):0){f[e>>2]=0;f[k>>2]=M;f[d>>2]=f[k>>2];M=vg(a,d,e)|0;ej(t,M);P=f[e>>2]|0;Q=(P|0)==-1;do if(M){do if(Q){R=-1;S=-1;T=-1}else{U=f[f[s>>2]>>2]|0;V=f[U+(P<<2)>>2]|0;W=P+1|0;X=((W>>>0)%3|0|0)==0?P+-2|0:W;if((X|0)==-1)Y=-1;else Y=f[U+(X<<2)>>2]|0;X=(((P>>>0)%3|0|0)==0?2:-1)+P|0;if((X|0)==-1){R=-1;S=Y;T=V;break}R=f[U+(X<<2)>>2]|0;S=Y;T=V}while(0);V=f[C>>2]|0;X=V+(T>>>5<<2)|0;f[X>>2]=f[X>>2]|1<<(T&31);X=V+(S>>>5<<2)|0;f[X>>2]=f[X>>2]|1<<(S&31);X=V+(R>>>5<<2)|0;f[X>>2]=f[X>>2]|1<<(R&31);f[d>>2]=1;X=f[B>>2]|0;if(X>>>0<(f[H>>2]|0)>>>0){f[X>>2]=1;f[B>>2]=X+4}else Oi(A,d);X=(f[v>>2]|0)+(N<<2)|0;f[X>>2]=f[X>>2]|O;X=P+1|0;if(Q)Z=-1;else Z=((X>>>0)%3|0|0)==0?P+-2|0:X;f[d>>2]=Z;V=f[I>>2]|0;if(V>>>0<(f[J>>2]|0)>>>0){f[V>>2]=Z;f[I>>2]=V+4}else Oi(i,d);if(Q)break;V=((X>>>0)%3|0|0)==0?P+-2|0:X;if((V|0)==-1)break;X=f[(f[(f[s>>2]|0)+12>>2]|0)+(V<<2)>>2]|0;V=(X|0)==-1;U=V?-1:(X>>>0)/3|0;if(V)break;if(f[(f[v>>2]|0)+(U>>>5<<2)>>2]&1<<(U&31)|0)break;f[l>>2]=X;f[d>>2]=f[l>>2];if(!(_b(a,d)|0))break b}else{X=P+1|0;if(Q)_=-1;else _=((X>>>0)%3|0|0)==0?P+-2|0:X;f[m>>2]=_;f[d>>2]=f[m>>2];Oe(a,d,1)|0;f[n>>2]=f[e>>2];f[d>>2]=f[n>>2];if(!(_b(a,d)|0))break b}while(0)}K=K+1|0;if((K|0)>=(L|0)){$=62;break a}}aa=0}else $=62;while(0);if(($|0)==62){$=f[F>>2]|0;L=f[E>>2]|0;n=L;if(($|0)!=(L|0)?(m=L+-4|0,$>>>0<m>>>0):0){L=$;$=m;do{m=f[L>>2]|0;f[L>>2]=f[$>>2];f[$>>2]=m;L=L+4|0;$=$+-4|0}while(L>>>0<$>>>0)}f[o>>2]=n;f[p>>2]=f[i>>2];f[q>>2]=f[I>>2];f[g>>2]=f[o>>2];f[e>>2]=f[p>>2];f[d>>2]=f[q>>2];Yd(F,g,e,d)|0;if((f[G>>2]|0)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);k=f[j>>2]|0;f[e>>2]=0;i=e+4|0;f[i>>2]=0;f[e+8>>2]=0;m=(k|0)==0;do if(!m)if(k>>>0>1073741823)Fq(e);else{o=k<<2;p=yn(o)|0;f[e>>2]=p;q=p+(k<<2)|0;f[e+8>>2]=q;rj(p|0,0,o|0)|0;f[i>>2]=q;break}while(0);f[g>>2]=0;k=g+4|0;f[k>>2]=0;f[g+8>>2]=0;f[h>>2]=0;if(!m){m=d+16|0;q=d+4|0;o=d+12|0;p=d+8|0;r=g+8|0;s=d+24|0;t=0;v=0;while(1){w=f[m>>2]|0;x=f[w+8>>2]|0;y=(f[w+12>>2]|0)-x|0;w=(y|0)>0;z=x;if(w){x=y>>>2;A=0;B=0;while(1){C=f[z+(A<<2)>>2]|0;if(!(b[C+84>>0]|0))D=f[(f[C+68>>2]|0)+(v<<2)>>2]|0;else D=v;C=D+239^B;A=A+1|0;if((A|0)>=(x|0)){E=C;break}else B=C}}else E=0;B=f[q>>2]|0;x=(B|0)==0;a:do if(!x){A=B+-1|0;C=(A&B|0)==0;if(!C)if(E>>>0<B>>>0)F=E;else F=(E>>>0)%(B>>>0)|0;else F=A&E;G=f[(f[d>>2]|0)+(F<<2)>>2]|0;if((G|0)!=0?(H=f[G>>2]|0,(H|0)!=0):0){G=f[s>>2]|0;I=G+8|0;J=G+12|0;b:do if(C){G=H;while(1){K=f[G+4>>2]|0;L=(K|0)==(E|0);if(!(L|(K&A|0)==(F|0))){M=44;break a}c:do if(L){K=f[G+8>>2]|0;N=f[I>>2]|0;O=(f[J>>2]|0)-N|0;P=N;if((O|0)<=0){Q=G;break b}N=O>>>2;O=0;while(1){R=f[P+(O<<2)>>2]|0;if(!(b[R+84>>0]|0)){S=f[R+68>>2]|0;T=f[S+(v<<2)>>2]|0;U=f[S+(K<<2)>>2]|0}else{T=v;U=K}O=O+1|0;if((U|0)!=(T|0))break c;if((O|0)>=(N|0)){V=G;M=42;break b}}}while(0);G=f[G>>2]|0;if(!G){M=44;break a}}}else{G=H;while(1){L=f[G+4>>2]|0;d:do if((L|0)!=(E|0)){if(L>>>0<B>>>0)X=L;else X=(L>>>0)%(B>>>0)|0;if((X|0)!=(F|0)){M=44;break a}}else{N=f[G+8>>2]|0;O=f[I>>2]|0;K=(f[J>>2]|0)-O|0;P=O;if((K|0)<=0){Q=G;break b}O=K>>>2;K=0;while(1){S=f[P+(K<<2)>>2]|0;if(!(b[S+84>>0]|0)){R=f[S+68>>2]|0;Y=f[R+(v<<2)>>2]|0;Z=f[R+(N<<2)>>2]|0}else{Y=v;Z=N}K=K+1|0;if((Z|0)!=(Y|0))break d;if((K|0)>=(O|0)){V=G;M=42;break b}}}while(0);G=f[G>>2]|0;if(!G){M=44;break a}}}while(0);if((M|0)==42){M=0;if(!V){M=44;break}else Q=V}f[(f[e>>2]|0)+(v<<2)>>2]=f[Q+12>>2];_=t}else M=44}else M=44;while(0);do if((M|0)==44){M=0;if(w){J=y>>>2;I=0;H=0;while(1){A=f[z+(I<<2)>>2]|0;if(!(b[A+84>>0]|0))aa=f[(f[A+68>>2]|0)+(v<<2)>>2]|0;else aa=v;A=aa+239^H;I=I+1|0;if((I|0)>=(J|0)){ba=A;break}else H=A}}else ba=0;e:do if(!x){H=B+-1|0;J=(H&B|0)==0;if(!J)if(ba>>>0<B>>>0)ca=ba;else ca=(ba>>>0)%(B>>>0)|0;else ca=H&ba;I=f[(f[d>>2]|0)+(ca<<2)>>2]|0;if((I|0)!=0?(A=f[I>>2]|0,(A|0)!=0):0){I=f[s>>2]|0;C=I+8|0;G=I+12|0;if(J){J=A;while(1){I=f[J+4>>2]|0;if(!((I|0)==(ba|0)|(I&H|0)==(ca|0))){da=ca;M=76;break e}I=f[J+8>>2]|0;L=f[C>>2]|0;O=(f[G>>2]|0)-L|0;K=L;if((O|0)<=0){ea=v;break e}L=O>>>2;O=0;while(1){N=f[K+(O<<2)>>2]|0;if(!(b[N+84>>0]|0)){P=f[N+68>>2]|0;fa=f[P+(v<<2)>>2]|0;ga=f[P+(I<<2)>>2]|0}else{fa=v;ga=I}O=O+1|0;if((ga|0)!=(fa|0))break;if((O|0)>=(L|0)){ea=v;break e}}J=f[J>>2]|0;if(!J){da=ca;M=76;break e}}}else ha=A;while(1){J=f[ha+4>>2]|0;if((J|0)!=(ba|0)){if(J>>>0<B>>>0)ia=J;else ia=(J>>>0)%(B>>>0)|0;if((ia|0)!=(ca|0)){da=ca;M=76;break e}}J=f[ha+8>>2]|0;H=f[C>>2]|0;L=(f[G>>2]|0)-H|0;O=H;if((L|0)<=0){ea=v;break e}H=L>>>2;L=0;while(1){I=f[O+(L<<2)>>2]|0;if(!(b[I+84>>0]|0)){K=f[I+68>>2]|0;ja=f[K+(v<<2)>>2]|0;ka=f[K+(J<<2)>>2]|0}else{ja=v;ka=J}L=L+1|0;if((ka|0)!=(ja|0))break;if((L|0)>=(H|0)){ea=v;break e}}ha=f[ha>>2]|0;if(!ha){da=ca;M=76;break}}}else{da=ca;M=76}}else{da=0;M=76}while(0);if((M|0)==76){M=0;G=yn(16)|0;f[G+8>>2]=v;f[G+12>>2]=t;f[G+4>>2]=ba;f[G>>2]=0;la=$(((f[o>>2]|0)+1|0)>>>0);ma=$(B>>>0);na=$(n[l>>2]);do if(x|$(na*ma)<la){C=B<<1|(B>>>0<3|(B+-1&B|0)!=0)&1;A=~~$(W($(la/na)))>>>0;Fh(d,C>>>0<A>>>0?A:C);C=f[q>>2]|0;A=C+-1|0;if(!(A&C)){oa=C;pa=A&ba;break}if(ba>>>0<C>>>0){oa=C;pa=ba}else{oa=C;pa=(ba>>>0)%(C>>>0)|0}}else{oa=B;pa=da}while(0);C=(f[d>>2]|0)+(pa<<2)|0;A=f[C>>2]|0;if(!A){f[G>>2]=f[p>>2];f[p>>2]=G;f[C>>2]=p;C=f[G>>2]|0;if(C|0){H=f[C+4>>2]|0;C=oa+-1|0;if(C&oa)if(H>>>0<oa>>>0)qa=H;else qa=(H>>>0)%(oa>>>0)|0;else qa=H&C;ra=(f[d>>2]|0)+(qa<<2)|0;M=89}}else{f[G>>2]=f[A>>2];ra=A;M=89}if((M|0)==89){M=0;f[ra>>2]=G}f[o>>2]=(f[o>>2]|0)+1;ea=f[h>>2]|0}A=t+1|0;f[(f[e>>2]|0)+(ea<<2)>>2]=t;C=f[k>>2]|0;if((C|0)==(f[r>>2]|0)){Oi(g,h);_=A;break}else{f[C>>2]=f[h>>2];f[k>>2]=C+4;_=A;break}}while(0);v=(f[h>>2]|0)+1|0;f[h>>2]=v;sa=f[j>>2]|0;if(v>>>0>=sa>>>0)break;else t=_}if((_|0)!=(sa|0)){Xa[f[(f[a>>2]|0)+24>>2]&15](a,e,g);f[j>>2]=_}}_=f[g>>2]|0;if(_|0){g=f[k>>2]|0;if((g|0)!=(_|0))f[k>>2]=g+(~((g+-4-_|0)>>>2)<<2);ur(_)}_=f[e>>2]|0;if(_|0){e=f[i>>2]|0;if((e|0)!=(_|0))f[i>>2]=e+(~((e+-4-_|0)>>>2)<<2);ur(_)}_=f[d+8>>2]|0;if(_|0){e=_;do{_=e;e=f[e>>2]|0;ur(_)}while((e|0)!=0)}e=f[d>>2]|0;f[d>>2]=0;if(!e){u=c;return}ur(e);u=c;return}function tb(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0;g=u;u=u+80|0;h=g+76|0;i=g+72|0;j=g+48|0;k=g+24|0;l=g;m=a+32|0;n=f[c>>2]|0;c=n+1|0;if((n|0)!=-1){o=((c>>>0)%3|0|0)==0?n+-2|0:c;c=(((n>>>0)%3|0|0)==0?2:-1)+n|0;if((o|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|0)|0;K=I;H=no(V|0,q|0,E|0,s|0)|0;s=I;E=no(R|0,o|0,G|0,C|0)|0;C=I;G=Ok(H|0,s|0,N|0,L|0)|0;s=I;H=Ok(E|0,C|0,N|0,L|0)|0;C=I;E=e<<1;F=f[d+(E<<2)>>2]|0;M=((F|0)<0)<<31>>31;B=f[d+((E|1)<<2)>>2]|0;E=((B|0)<0)<<31>>31;O=no(F|0,M|0,x|0,D|0)|0;J=I;P=no(B|0,E|0,p|0,K|0)|0;U=I;T=In(O|0,J|0,O|0,J|0)|0;J=I;O=In(P|0,U|0,P|0,U|0)|0;U=lo(O|0,I|0,T|0,J|0)|0;J=I;T=no(F|0,M|0,G|0,s|0)|0;M=I;F=no(B|0,E|0,H|0,C|0)|0;E=I;B=In(T|0,M|0,T|0,M|0)|0;M=I;T=In(F|0,E|0,F|0,E|0)|0;E=lo(T|0,I|0,B|0,M|0)|0;M=I;B=a+16|0;T=a+20|0;F=f[T>>2]|0;O=f[a+24>>2]|0;P=(F|0)==(O<<5|0);if(J>>>0<M>>>0|(J|0)==(M|0)&U>>>0<E>>>0){do if(P)if((F+1|0)<0)Fq(B);else{E=O<<6;U=F+32&-32;ti(B,F>>>0<1073741823?(E>>>0<U>>>0?U:E):2147483647);da=f[T>>2]|0;break}else da=F;while(0);f[T>>2]=da+1;L=(f[B>>2]|0)+(da>>>5<<2)|0;f[L>>2]=f[L>>2]|1<<(da&31);ea=x;fa=p;ga=K;ha=D}else{do if(P)if((F+1|0)<0)Fq(B);else{L=O<<6;N=F+32&-32;ti(B,F>>>0<1073741823?(L>>>0<N>>>0?N:L):2147483647);ia=f[T>>2]|0;break}else ia=F;while(0);f[T>>2]=ia+1;F=(f[B>>2]|0)+(ia>>>5<<2)|0;f[F>>2]=f[F>>2]&~(1<<(ia&31));ea=G;fa=H;ga=C;ha=s}f[a+8>>2]=ea;f[a+12>>2]=fa;u=g;return 1}while(0);do if(r)ja=m<<1;else{if((e|0)>0){ja=(e<<1)+-2|0;break}fa=a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J>>>0<M>>>0|(J|0)==(M|0)&U>>>0<E>>>0){do if(P)if((F+1|0)<0)Fq(B);else{E=O<<6;U=F+32&-32;ti(B,F>>>0<1073741823?(E>>>0<U>>>0?U:E):2147483647);da=f[T>>2]|0;break}else da=F;while(0);f[T>>2]=da+1;L=(f[B>>2]|0)+(da>>>5<<2)|0;f[L>>2]=f[L>>2]|1<<(da&31);ea=x;fa=c;ga=K;ha=D}else{do if(P)if((F+1|0)<0)Fq(B);else{L=O<<6;N=F+32&-32;ti(B,F>>>0<1073741823?(L>>>0<N>>>0?N:L):2147483647);ia=f[T>>2]|0;break}else ia=F;while(0);f[T>>2]=ia+1;F=(f[B>>2]|0)+(ia>>>5<<2)|0;f[F>>2]=f[F>>2]&~(1<<(ia&31));ea=G;fa=H;ga=C;ha=s}f[a+8>>2]=ea;f[a+12>>2]=fa;u=g;return 1}while(0);do if(q)ja=n<<1;else{if((e|0)>0){ja=(e<<1)+-2|0;break}fa=a+8|0;f[fa>>2]=0;f[fa+4>>2]=0;u=g;return 1}while(0);f[a+8>>2]=f[d+(ja<<2)>>2];f[a+12>>2]=f[d+(ja+1<<2)>>2];u=g;return 1}function vb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=Oa,D=0,E=0.0,F=0,G=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=In(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=lo(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){m=b[o>>0]|0;q=g+(r<<3)|0;f[q>>2]=m;f[q+4>>2]=((m|0)<0)<<31>>31;r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(o<<3)|0,0,(e<<24>>24)-o<<3|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=In(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=lo(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=g+(t<<3)|0;f[k>>2]=h[m>>0];f[k+4>>2]=0;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(m<<3)|0,0,(e<<24>>24)-m<<3|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=In(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=lo(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){o=d[l>>1]|0;k=g+(q<<3)|0;f[k>>2]=o;f[k+4>>2]=((o|0)<0)<<31>>31;q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(l<<3)|0,0,(e<<24>>24)-l<<3|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=In(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=lo(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){m=g+(k<<3)|0;f[m>>2]=j[r>>1];f[m+4>>2]=0;k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(r<<3)|0,0,(e<<24>>24)-r<<3|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=In(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=lo(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){l=f[t>>2]|0;m=g+(o<<3)|0;f[m>>2]=l;f[m+4>>2]=((l|0)<0)<<31>>31;o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(t<<3)|0,0,(e<<24>>24)-t<<3|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=In(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=lo(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){r=g+(m<<3)|0;f[r>>2]=f[q>>2];f[r+4>>2]=0;m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(q<<3)|0,0,(e<<24>>24)-q<<3|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=In(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=lo(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){t=k;r=f[t+4>>2]|0;z=g+(l<<3)|0;f[z>>2]=f[t>>2];f[z+4>>2]=r;l=l+1|0;r=b[q>>0]|0;if((l|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){A=r;break}else k=k+8|0}}else A=m;k=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(k<<3)|0,0,(e<<24>>24)-k<<3|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;r=In(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;z=lo(r|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+z|0;z=0;while(1){q=o;r=f[q+4>>2]|0;t=g+(z<<3)|0;f[t>>2]=f[q>>2];f[t+4>>2]=r;z=z+1|0;r=b[k>>0]|0;if((z|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){B=r;break}else o=o+8|0}}else B=l;o=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(o<<3)|0,0,(e<<24>>24)-o<<3|0)|0;i=1;return i|0}case 9:{o=a+24|0;z=b[o>>0]|0;if((z<<24>>24>e<<24>>24?e:z)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;r=In(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=lo(r|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){C=$(n[m>>2]);k=+K(+C)>=1.0?(+C>0.0?~~+Y(+J(+C/4294967296.0),4294967295.0)>>>0:~~+W((+C-+(~~+C>>>0))/4294967296.0)>>>0):0;r=g+(t<<3)|0;f[r>>2]=~~+C>>>0;f[r+4>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){D=k;break}else m=m+4|0}}else D=z;m=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(m<<3)|0,0,(e<<24>>24)-m<<3|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=In(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;r=lo(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+r|0;r=0;while(1){E=+p[l>>3];o=+K(E)>=1.0?(E>0.0?~~+Y(+J(E/4294967296.0),4294967295.0)>>>0:~~+W((E-+(~~E>>>0))/4294967296.0)>>>0):0;k=g+(r<<3)|0;f[k>>2]=~~E>>>0;f[k+4>>2]=o;r=r+1|0;o=b[m>>0]|0;if((r|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){F=o;break}else l=l+8|0}}else F=t;l=F<<24>>24;if(F<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(l<<3)|0,0,(e<<24>>24)-l<<3|0)|0;i=1;return i|0}case 11:{l=a+24|0;r=b[l>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){m=f[f[a>>2]>>2]|0;z=a+40|0;o=In(f[z>>2]|0,f[z+4>>2]|0,f[c>>2]|0,0)|0;z=a+48|0;k=lo(o|0,I|0,f[z>>2]|0,f[z+4>>2]|0)|0;z=m+k|0;k=0;while(1){m=g+(k<<3)|0;f[m>>2]=h[z>>0];f[m+4>>2]=0;k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){G=m;break}else z=z+1|0}}else G=r;z=G<<24>>24;if(G<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(z<<3)|0,0,(e<<24>>24)-z<<3|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function wb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;c=u;u=u+16|0;d=c+8|0;e=c;if((f[a+92>>2]|0)==(f[a+88>>2]|0)){u=c;return 1}g=a+52|0;h=f[g>>2]|0;if((h|0)==(f[a+56>>2]|0)){Oi(a+48|0,b);i=b}else{f[h>>2]=f[b>>2];f[g>>2]=h+4;i=b}b=a+84|0;f[b>>2]=0;h=a+4|0;g=f[h>>2]|0;j=f[i>>2]|0;k=j+1|0;if((j|0)!=-1){l=((k>>>0)%3|0|0)==0?j+-2|0:k;if((l|0)==-1)m=-1;else m=f[(f[g>>2]|0)+(l<<2)>>2]|0;l=(((j>>>0)%3|0|0)==0?2:-1)+j|0;if((l|0)==-1){n=m;o=-1}else{n=m;o=f[(f[g>>2]|0)+(l<<2)>>2]|0}}else{n=-1;o=-1}l=a+36|0;g=f[l>>2]|0;m=g+(n>>>5<<2)|0;j=1<<(n&31);k=f[m>>2]|0;if(!(k&j)){f[m>>2]=k|j;j=f[i>>2]|0;k=j+1|0;if((j|0)==-1)p=-1;else p=((k>>>0)%3|0|0)==0?j+-2|0:k;f[e>>2]=p;k=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((p>>>0)/3|0)*12|0)+(((p>>>0)%3|0)<<2)>>2]|0;p=f[a+20>>2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|0;o=f[a+20>>2]|0;f[d>>2]=t;s=f[o+4>>2]|0;o=s+4|0;p=f[o>>2]|0;if((p|0)==(f[s+8>>2]|0))Oi(s,d);else{f[p>>2]=t;f[o>>2]=p+4}p=a+12|0;o=f[p>>2]|0;t=o+4|0;s=f[t>>2]|0;if((s|0)==(f[o+8>>2]|0)){Oi(o,e);w=f[p>>2]|0}else{f[s>>2]=f[e>>2];f[t>>2]=s+4;w=o}o=w+24|0;f[(f[w+12>>2]|0)+(v<<2)>>2]=f[o>>2];f[o>>2]=(f[o>>2]|0)+1}o=f[b>>2]|0;a:do if((o|0)<3){v=a+24|0;w=a+16|0;s=a+20|0;t=a+12|0;p=a+88|0;r=o;while(1){g=r;while(1){x=a+48+(g*12|0)+4|0;y=f[x>>2]|0;if((f[a+48+(g*12|0)>>2]|0)!=(y|0))break;if((g|0)<2)g=g+1|0;else break a}n=y+-4|0;q=f[n>>2]|0;f[x>>2]=n;f[b>>2]=g;f[i>>2]=q;if((q|0)==-1)break;n=(q>>>0)/3|0;j=f[v>>2]|0;do if(!(f[j+(n>>>5<<2)>>2]&1<<(n&31))){k=q;m=j;b:while(1){z=(k>>>0)/3|0;A=m+(z>>>5<<2)|0;f[A>>2]=1<<(z&31)|f[A>>2];A=f[i>>2]|0;if((A|0)==-1)B=-1;else B=f[(f[f[h>>2]>>2]|0)+(A<<2)>>2]|0;z=(f[l>>2]|0)+(B>>>5<<2)|0;C=1<<(B&31);D=f[z>>2]|0;if(!(C&D)){f[z>>2]=D|C;C=f[i>>2]|0;f[e>>2]=C;D=f[(f[(f[w>>2]|0)+96>>2]|0)+(((C>>>0)/3|0)*12|0)+(((C>>>0)%3|0)<<2)>>2]|0;C=f[s>>2]|0;f[d>>2]=D;z=f[C+4>>2]|0;C=z+4|0;E=f[C>>2]|0;if((E|0)==(f[z+8>>2]|0))Oi(z,d);else{f[E>>2]=D;f[C>>2]=E+4}E=f[t>>2]|0;C=E+4|0;D=f[C>>2]|0;if((D|0)==(f[E+8>>2]|0)){Oi(E,e);F=f[t>>2]|0}else{f[D>>2]=f[e>>2];f[C>>2]=D+4;F=E}E=F+24|0;f[(f[F+12>>2]|0)+(B<<2)>>2]=f[E>>2];f[E>>2]=(f[E>>2]|0)+1;G=f[i>>2]|0}else G=A;A=f[h>>2]|0;if((G|0)==-1){H=93;break}E=G+1|0;D=((E>>>0)%3|0|0)==0?G+-2|0:E;if((D|0)==-1)I=-1;else I=f[(f[A+12>>2]|0)+(D<<2)>>2]|0;D=(((G>>>0)%3|0|0)==0?2:-1)+G|0;if((D|0)==-1)J=-1;else J=f[(f[A+12>>2]|0)+(D<<2)>>2]|0;D=(I|0)==-1;E=D?-1:(I>>>0)/3|0;C=(J|0)==-1;z=C?-1:(J>>>0)/3|0;if(D)K=1;else K=(f[(f[v>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)!=0;do if(C)if(K){H=93;break b}else H=82;else{if(f[(f[v>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)if(K){H=93;break b}else{H=82;break}E=f[(f[A>>2]|0)+(J<<2)>>2]|0;if(!(1<<(E&31)&f[(f[l>>2]|0)+(E>>>5<<2)>>2])){L=(f[p>>2]|0)+(E<<2)|0;E=f[L>>2]|0;f[L>>2]=E+1;M=(E|0)>0?1:2}else M=0;if(K?(M|0)<=(f[b>>2]|0):0){N=J;break}f[d>>2]=J;E=a+48+(M*12|0)+4|0;L=f[E>>2]|0;if((L|0)==(f[a+48+(M*12|0)+8>>2]|0))Oi(a+48+(M*12|0)|0,d);else{f[L>>2]=J;f[E>>2]=L+4}if((f[b>>2]|0)>(M|0))f[b>>2]=M;if(K){H=93;break b}else H=82}while(0);if((H|0)==82){H=0;if(D)O=-1;else O=f[(f[f[h>>2]>>2]|0)+(I<<2)>>2]|0;if(!(1<<(O&31)&f[(f[l>>2]|0)+(O>>>5<<2)>>2])){A=(f[p>>2]|0)+(O<<2)|0;z=f[A>>2]|0;f[A>>2]=z+1;P=(z|0)>0?1:2}else P=0;if((P|0)>(f[b>>2]|0))break;else N=I}f[i>>2]=N;k=N;m=f[v>>2]|0}if((H|0)==93){H=0;Q=f[b>>2]|0;break}f[d>>2]=I;m=a+48+(P*12|0)+4|0;k=f[m>>2]|0;if((k|0)==(f[a+48+(P*12|0)+8>>2]|0))Oi(a+48+(P*12|0)|0,d);else{f[k>>2]=I;f[m>>2]=k+4}k=f[b>>2]|0;if((k|0)>(P|0)){f[b>>2]=P;R=P}else R=k;Q=R}else Q=g;while(0);if((Q|0)<3)r=Q;else break a}u=c;return 1}while(0);f[i>>2]=-1;u=c;return 1}function xb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}xb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;xb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function yb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}yb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;yb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function zb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}zb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;zb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Ab(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Ab(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Ab(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}
+function Bb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Bb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Bb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Cb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Cb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Cb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Db(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Db(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Db(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Eb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Eb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Eb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Fb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Fb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Fb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Gb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Gb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Gb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Hb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Hb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Hb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Ib(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Ib(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Ib(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Jb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Jb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Jb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Kb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Kb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Kb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Lb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Lb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Lb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Mb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Mb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Mb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Nb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Nb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Nb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Ob(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=gg(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Rg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0<s>>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0<s>>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0<t>>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Ob(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Ob(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)Fq(d);_=$;if(i>>>0<=Y>>>0)Fq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Rg(h,h+4|0,e,c)|0;return}case 12:{dh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{gg(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ch(h,a,c);return}case 20:{Fq(p);break}case 22:{Fq(p);break}case 26:{Fq(p);break}case 32:{Fq(p);break}case 38:{Fq(A);break}case 40:{Fq(A);break}case 46:{Fq(A);break}case 47:{Fq(A);break}case 51:{Fq(p);break}case 57:{Fq(R);break}case 59:{Fq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)Fq(S);else Fq(S);break}case 66:{Fq(S);break}case 72:{Fq(Z);break}case 74:{Fq(Z);break}case 84:return}}function Pb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=In(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=lo(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){f[g+(r<<2)>>2]=b[o>>0];r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=In(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=lo(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){f[g+(t<<2)>>2]=h[m>>0];t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=In(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=lo(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=d[l>>1];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=In(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=lo(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=j[r>>1];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=In(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=lo(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){f[g+(o<<2)>>2]=f[t>>2];o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(t<<2)|0,0,(e<<24>>24)-t<<2|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=In(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=lo(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){f[g+(m<<2)>>2]=f[q>>2];m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(q<<2)|0,0,(e<<24>>24)-q<<2|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=In(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=lo(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){f[g+(l<<2)>>2]=f[k>>2];l=l+1|0;t=b[q>>0]|0;if((l|0)>=((t<<24>>24>e<<24>>24?e:t)<<24>>24|0)){z=t;break}else k=k+8|0}}else z=m;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;t=In(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=lo(t|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+r|0;r=0;while(1){f[g+(r<<2)>>2]=f[o>>2];r=r+1|0;q=b[k>>0]|0;if((r|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else o=o+8|0}}else A=l;o=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 9:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=In(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=lo(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=~~$(n[m>>2])>>>0;f[g+(t<<2)>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else m=m+4|0}}else B=r;m=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=In(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=lo(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=~~+p[l>>3]>>>0;q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){C=o;break}else l=l+8|0}}else C=t;l=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 11:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=In(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=lo(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=h[r>>0];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){D=m;break}else r=r+1|0}}else D=q;r=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function Qb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=In(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=lo(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){f[g+(r<<2)>>2]=b[o>>0];r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=In(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=lo(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){f[g+(t<<2)>>2]=h[m>>0];t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=In(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=lo(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=d[l>>1];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=In(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=lo(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=j[r>>1];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=In(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=lo(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){f[g+(o<<2)>>2]=f[t>>2];o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(t<<2)|0,0,(e<<24>>24)-t<<2|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=In(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=lo(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){f[g+(m<<2)>>2]=f[q>>2];m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(q<<2)|0,0,(e<<24>>24)-q<<2|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=In(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=lo(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){f[g+(l<<2)>>2]=f[k>>2];l=l+1|0;t=b[q>>0]|0;if((l|0)>=((t<<24>>24>e<<24>>24?e:t)<<24>>24|0)){z=t;break}else k=k+8|0}}else z=m;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;t=In(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=lo(t|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+r|0;r=0;while(1){f[g+(r<<2)>>2]=f[o>>2];r=r+1|0;q=b[k>>0]|0;if((r|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else o=o+8|0}}else A=l;o=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 9:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=In(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=lo(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=~~$(n[m>>2]);f[g+(t<<2)>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else m=m+4|0}}else B=r;m=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=In(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=lo(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=~~+p[l>>3];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){C=o;break}else l=l+8|0}}else C=t;l=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 11:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=In(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=lo(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=h[r>>0];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){D=m;break}else r=r+1|0}}else D=q;r=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}rj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function Rb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=Oa,J=0,K=0,L=0,M=0,N=Oa;e=u;u=u+48|0;g=e+36|0;h=e+24|0;i=e+12|0;j=e;if(!(xh(a,c,d)|0)){k=0;u=e;return k|0}l=f[(f[(f[c+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;if((f[l+28>>2]|0)!=9){k=0;u=e;return k|0}m=c+48|0;c=f[m>>2]|0;o=yn(32)|0;f[g>>2]=o;f[g+8>>2]=-2147483616;f[g+4>>2]=17;p=o;q=14860;r=p+17|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[o+17>>0]=0;o=c+16|0;s=f[o>>2]|0;if(s){t=o;v=s;a:while(1){s=v;while(1){if((f[s+16>>2]|0)>=(d|0))break;w=f[s+4>>2]|0;if(!w){x=t;break a}else s=w}v=f[s>>2]|0;if(!v){x=s;break}else t=s}if(((x|0)!=(o|0)?(f[x+16>>2]|0)<=(d|0):0)?(o=x+20|0,(Hh(o,g)|0)!=0):0)y=Nk(o,g,-1)|0;else z=12}else z=12;if((z|0)==12)y=Nk(c,g,-1)|0;if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);if((y|0)<1){k=0;u=e;return k|0}c=f[m>>2]|0;o=yn(32)|0;f[g>>2]=o;f[g+8>>2]=-2147483616;f[g+4>>2]=19;p=o;q=14933;r=p+19|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[o+19>>0]=0;o=c+16|0;x=f[o>>2]|0;if(x){t=o;v=x;b:while(1){x=v;while(1){if((f[x+16>>2]|0)>=(d|0))break;w=f[x+4>>2]|0;if(!w){A=t;break b}else x=w}v=f[x>>2]|0;if(!v){A=x;break}else t=x}if((A|0)!=(o|0)?(f[A+16>>2]|0)<=(d|0):0)B=A+20|0;else z=24}else z=24;if((z|0)==24)B=c;if(!(Hh(B,g)|0))C=0;else{B=f[m>>2]|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;c=yn(32)|0;f[h>>2]=c;f[h+8>>2]=-2147483616;f[h+4>>2]=18;p=c;q=14953;r=p+18|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[c+18>>0]=0;c=B+16|0;A=f[c>>2]|0;if(A){o=c;t=A;c:while(1){A=t;while(1){if((f[A+16>>2]|0)>=(d|0))break;v=f[A+4>>2]|0;if(!v){D=o;break c}else A=v}t=f[A>>2]|0;if(!t){D=A;break}else o=A}if((D|0)!=(c|0)?(f[D+16>>2]|0)<=(d|0):0)E=D+20|0;else z=34}else z=34;if((z|0)==34)E=B;B=(Hh(E,h)|0)!=0;if((b[h+11>>0]|0)<0)ur(f[h>>2]|0);C=B}if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);if(!C){Wd(a+40|0,l,y)|0;k=1;u=e;return k|0}C=l+24|0;l=b[C>>0]|0;B=l<<24>>24;f[i>>2]=0;E=i+4|0;f[E>>2]=0;f[i+8>>2]=0;do if(l<<24>>24)if(l<<24>>24<0)Fq(i);else{D=B<<2;c=yn(D)|0;f[i>>2]=c;o=c+(B<<2)|0;f[i+8>>2]=o;rj(c|0,0,D|0)|0;f[E>>2]=o;F=c;break}else F=0;while(0);B=f[m>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;l=yn(32)|0;f[j>>2]=l;f[j+8>>2]=-2147483616;f[j+4>>2]=19;p=l;q=14933;r=p+19|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[l+19>>0]=0;l=b[C>>0]|0;c=l<<24>>24;o=B+16|0;D=f[o>>2]|0;if(D){t=o;x=D;d:while(1){D=x;while(1){if((f[D+16>>2]|0)>=(d|0))break;v=f[D+4>>2]|0;if(!v){G=t;break d}else D=v}x=f[D>>2]|0;if(!x){G=D;break}else t=D}if(((G|0)!=(o|0)?(f[G+16>>2]|0)<=(d|0):0)?(o=G+20|0,(Hh(o,j)|0)!=0):0){t=Og(o,j)|0;if((t|0)!=(G+24|0)){oj(g,t+28|0);t=g+11|0;G=b[t>>0]|0;o=G<<24>>24<0;if(!((o?f[g+4>>2]|0:G&255)|0))H=G;else{if(l<<24>>24>0){x=o?f[g>>2]|0:g;o=0;do{I=$(Iq(x,h));A=x;x=f[h>>2]|0;if((A|0)==(x|0))break;n[F+(o<<2)>>2]=I;o=o+1|0}while((o|0)<(c|0));J=b[t>>0]|0}else J=G;H=J}if(H<<24>>24<0)ur(f[g>>2]|0)}}else z=64}else z=64;if((z|0)==64?(H=Og(B,j)|0,(H|0)!=(B+4|0)):0){oj(g,H+28|0);H=g+11|0;B=b[H>>0]|0;J=B<<24>>24<0;if(!((J?f[g+4>>2]|0:B&255)|0))K=B;else{if(l<<24>>24>0){l=J?f[g>>2]|0:g;J=0;do{I=$(Iq(l,h));G=l;l=f[h>>2]|0;if((G|0)==(l|0))break;n[F+(J<<2)>>2]=I;J=J+1|0}while((J|0)<(c|0));L=b[H>>0]|0}else L=B;K=L}if(K<<24>>24<0)ur(f[g>>2]|0)}if((b[j+11>>0]|0)<0)ur(f[j>>2]|0);j=f[m>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;m=yn(32)|0;f[g>>2]=m;f[g+8>>2]=-2147483616;f[g+4>>2]=18;p=m;q=14953;r=p+18|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[m+18>>0]=0;m=j+16|0;q=f[m>>2]|0;if(q){p=m;r=q;e:while(1){q=r;while(1){if((f[q+16>>2]|0)>=(d|0))break;K=f[q+4>>2]|0;if(!K){M=p;break e}else q=K}r=f[q>>2]|0;if(!r){M=q;break}else p=q}if(((M|0)!=(m|0)?(f[M+16>>2]|0)<=(d|0):0)?(d=M+20|0,(Hh(d,g)|0)!=0):0)N=$(xk(d,g,$(1.0)));else z=86}else z=86;if((z|0)==86)N=$(xk(j,g,$(1.0)));if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);Nl(a+40|0,y,f[i>>2]|0,b[C>>0]|0,N);C=f[i>>2]|0;if(C|0){i=f[E>>2]|0;if((i|0)!=(C|0))f[E>>2]=i+(~((i+-4-C|0)>>>2)<<2);ur(C)}k=1;u=e;return k|0}function Sb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,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P)):0)?(p=(N|0)==(ca|0),!(M&p)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(p&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);f[j>>2]=da;f[x>>2]=ea;N=K<<1;M=b+(N<<2)|0;H=f[y>>2]|0;if((H|0)>0){O=0;P=i;p=H;while(1){if((p|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;U=f[z>>2]|0;if((V|0)>(U|0)){fa=f[A>>2]|0;f[fa+(H<<2)>>2]=U;ga=fa}else{fa=f[B>>2]|0;U=f[A>>2]|0;f[U+(H<<2)>>2]=(V|0)<(fa|0)?fa:V;ga=U}H=H+1|0;U=f[y>>2]|0}while((H|0)<(U|0));ha=ga;ia=U}else{ha=f[A>>2]|0;ia=p}H=(f[M+(O<<2)>>2]|0)-(f[ha+(O<<2)>>2]|0)|0;U=k+(O<<2)|0;f[U>>2]=H;ja=f[C>>2]|0;if((H|0)>=(ja|0)){if((H|0)>(f[E>>2]|0)){ka=H-(f[D>>2]|0)|0;la=52}}else{ka=(f[D>>2]|0)+H|0;la=52}if((la|0)==52){la=0;f[U>>2]=ka}O=O+1|0;if((O|0)>=(ia|0))break;else{P=ha;p=ia}}if((ia|0)>0){p=0;P=j;O=ia;U=ja;while(1){if((O|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;fa=f[z>>2]|0;if((V|0)>(fa|0))f[ha+(H<<2)>>2]=fa;else{fa=f[B>>2]|0;f[ha+(H<<2)>>2]=(V|0)<(fa|0)?fa:V}H=H+1|0;ma=f[y>>2]|0}while((H|0)<(ma|0));na=f[C>>2]|0;oa=ma}else{na=U;oa=O}H=(f[M+(p<<2)>>2]|0)-(f[ha+(p<<2)>>2]|0)|0;V=l+(p<<2)|0;f[V>>2]=H;if((H|0)>=(na|0)){if((H|0)>(f[E>>2]|0)){pa=H-(f[D>>2]|0)|0;la=65}}else{pa=(f[D>>2]|0)+H|0;la=65}if((la|0)==65){la=0;f[V>>2]=pa}p=p+1|0;if((p|0)>=(oa|0))break;else{P=ha;O=oa;U=na}}}}U=f[k>>2]|0;O=f[t>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))qa=(f[F>>2]|0)+U|0;else qa=U;else qa=U-(f[F>>2]|0)|0;f[k>>2]=qa;U=f[a>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ra=(f[F>>2]|0)+U|0;else ra=U;else ra=U-(f[F>>2]|0)|0;f[a>>2]=ra;U=f[l>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))sa=(f[F>>2]|0)+U|0;else sa=U;else sa=U-(f[F>>2]|0)|0;f[l>>2]=sa;U=f[G>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ta=(f[F>>2]|0)+U|0;else ta=U;else ta=U-(f[F>>2]|0)|0;f[G>>2]=ta;if((((ra|0)>-1?ra:0-ra|0)+((qa|0)>-1?qa:0-qa|0)|0)<(((sa|0)>-1?sa:0-sa|0)+((ta|0)>-1?ta:0-ta|0)|0)){ej(g,0);ua=k}else{ej(g,1);ua=l}U=f[ua>>2]|0;if((U|0)<0)va=(f[F>>2]|0)+U|0;else va=U;U=c+(N<<2)|0;f[U>>2]=va;O=f[ua+4>>2]|0;if((O|0)<0)wa=(f[F>>2]|0)+O|0;else wa=O;f[U+4>>2]=wa;K=K+1|0;if((K|0)>=(r|0)){la=3;break}U=f[o>>2]|0;L=f[U>>2]|0;if((f[U+4>>2]|0)-L>>2>>>0<=K>>>0){J=U;la=4;break}}if((la|0)==3){u=e;return 1}else if((la|0)==4)Fq(J);return 0}function Tb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0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0)?(p=(N|0)==(ca|0),!(M&p)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(p&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);f[j>>2]=da;f[x>>2]=ea;N=K<<1;M=b+(N<<2)|0;H=f[y>>2]|0;if((H|0)>0){O=0;P=i;p=H;while(1){if((p|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;U=f[z>>2]|0;if((V|0)>(U|0)){fa=f[A>>2]|0;f[fa+(H<<2)>>2]=U;ga=fa}else{fa=f[B>>2]|0;U=f[A>>2]|0;f[U+(H<<2)>>2]=(V|0)<(fa|0)?fa:V;ga=U}H=H+1|0;U=f[y>>2]|0}while((H|0)<(U|0));ha=ga;ia=U}else{ha=f[A>>2]|0;ia=p}H=(f[M+(O<<2)>>2]|0)-(f[ha+(O<<2)>>2]|0)|0;U=k+(O<<2)|0;f[U>>2]=H;ja=f[C>>2]|0;if((H|0)>=(ja|0)){if((H|0)>(f[E>>2]|0)){ka=H-(f[D>>2]|0)|0;la=52}}else{ka=(f[D>>2]|0)+H|0;la=52}if((la|0)==52){la=0;f[U>>2]=ka}O=O+1|0;if((O|0)>=(ia|0))break;else{P=ha;p=ia}}if((ia|0)>0){p=0;P=j;O=ia;U=ja;while(1){if((O|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;fa=f[z>>2]|0;if((V|0)>(fa|0))f[ha+(H<<2)>>2]=fa;else{fa=f[B>>2]|0;f[ha+(H<<2)>>2]=(V|0)<(fa|0)?fa:V}H=H+1|0;ma=f[y>>2]|0}while((H|0)<(ma|0));na=f[C>>2]|0;oa=ma}else{na=U;oa=O}H=(f[M+(p<<2)>>2]|0)-(f[ha+(p<<2)>>2]|0)|0;V=l+(p<<2)|0;f[V>>2]=H;if((H|0)>=(na|0)){if((H|0)>(f[E>>2]|0)){pa=H-(f[D>>2]|0)|0;la=65}}else{pa=(f[D>>2]|0)+H|0;la=65}if((la|0)==65){la=0;f[V>>2]=pa}p=p+1|0;if((p|0)>=(oa|0))break;else{P=ha;O=oa;U=na}}}}U=f[k>>2]|0;O=f[t>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))qa=(f[F>>2]|0)+U|0;else qa=U;else qa=U-(f[F>>2]|0)|0;f[k>>2]=qa;U=f[a>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ra=(f[F>>2]|0)+U|0;else ra=U;else ra=U-(f[F>>2]|0)|0;f[a>>2]=ra;U=f[l>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))sa=(f[F>>2]|0)+U|0;else sa=U;else sa=U-(f[F>>2]|0)|0;f[l>>2]=sa;U=f[G>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ta=(f[F>>2]|0)+U|0;else ta=U;else ta=U-(f[F>>2]|0)|0;f[G>>2]=ta;if((((ra|0)>-1?ra:0-ra|0)+((qa|0)>-1?qa:0-qa|0)|0)<(((sa|0)>-1?sa:0-sa|0)+((ta|0)>-1?ta:0-ta|0)|0)){ej(g,0);ua=k}else{ej(g,1);ua=l}U=f[ua>>2]|0;if((U|0)<0)va=(f[F>>2]|0)+U|0;else va=U;U=c+(N<<2)|0;f[U>>2]=va;O=f[ua+4>>2]|0;if((O|0)<0)wa=(f[F>>2]|0)+O|0;else wa=O;f[U+4>>2]=wa;K=K+1|0;if((K|0)>=(r|0)){la=3;break}U=f[o>>2]|0;L=f[U>>2]|0;if((f[U+4>>2]|0)-L>>2>>>0<=K>>>0){J=U;la=4;break}}if((la|0)==3){u=e;return 1}else if((la|0)==4)Fq(J);return 0}function Ub(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;c=u;u=u+16|0;d=c+8|0;e=c;g=f[b>>2]|0;if((g|0)==-1){h=1;u=c;return h|0}i=(g>>>0)/3|0;j=a+24|0;if(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0){h=1;u=c;return h|0}i=a+48|0;k=f[i>>2]|0;l=a+52|0;m=f[l>>2]|0;if((m|0)==(k|0))n=k;else{o=m+(~((m+-4-k|0)>>>2)<<2)|0;f[l>>2]=o;n=o}o=a+56|0;if((n|0)==(f[o>>2]|0))Oi(i,b);else{f[n>>2]=g;f[l>>2]=n+4}n=a+4|0;g=f[n>>2]|0;k=f[b>>2]|0;m=k+1|0;do if((k|0)!=-1){p=f[g+28>>2]|0;q=f[p+((((m>>>0)%3|0|0)==0?k+-2|0:m)<<2)>>2]|0;if(!((k>>>0)%3|0)){r=q;s=k+2|0;t=p;break}else{r=q;s=k+-1|0;t=p;break}}else{p=f[g+28>>2]|0;r=f[p+-4>>2]|0;s=-1;t=p}while(0);g=f[t+(s<<2)>>2]|0;if((r|0)==-1|(g|0)==-1){h=0;u=c;return h|0}s=a+36|0;t=f[s>>2]|0;k=t+(r>>>5<<2)|0;m=1<<(r&31);p=f[k>>2]|0;if(!(p&m)){f[k>>2]=p|m;m=f[b>>2]|0;p=m+1|0;if((m|0)==-1)v=-1;else v=((p>>>0)%3|0|0)==0?m+-2|0:p;f[e>>2]=v;p=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((v>>>0)/3|0)*12|0)+(((v>>>0)%3|0)<<2)>>2]|0;v=f[a+20>>2]|0;f[d>>2]=p;m=f[v+4>>2]|0;v=m+4|0;k=f[v>>2]|0;if((k|0)==(f[m+8>>2]|0))Oi(m,d);else{f[k>>2]=p;f[v>>2]=k+4}k=a+12|0;v=f[k>>2]|0;p=v+4|0;m=f[p>>2]|0;if((m|0)==(f[v+8>>2]|0)){Oi(v,e);w=f[k>>2]|0}else{f[m>>2]=f[e>>2];f[p>>2]=m+4;w=v}v=w+24|0;f[(f[w+12>>2]|0)+(r<<2)>>2]=f[v>>2];f[v>>2]=(f[v>>2]|0)+1;x=f[s>>2]|0}else x=t;t=x+(g>>>5<<2)|0;x=1<<(g&31);v=f[t>>2]|0;if(!(v&x)){f[t>>2]=v|x;x=f[b>>2]|0;do if((x|0)!=-1)if(!((x>>>0)%3|0)){y=x+2|0;break}else{y=x+-1|0;break}else y=-1;while(0);f[e>>2]=y;x=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((y>>>0)/3|0)*12|0)+(((y>>>0)%3|0)<<2)>>2]|0;y=f[a+20>>2]|0;f[d>>2]=x;v=f[y+4>>2]|0;y=v+4|0;t=f[y>>2]|0;if((t|0)==(f[v+8>>2]|0))Oi(v,d);else{f[t>>2]=x;f[y>>2]=t+4}t=a+12|0;y=f[t>>2]|0;x=y+4|0;v=f[x>>2]|0;if((v|0)==(f[y+8>>2]|0)){Oi(y,e);z=f[t>>2]|0}else{f[v>>2]=f[e>>2];f[x>>2]=v+4;z=y}y=z+24|0;f[(f[z+12>>2]|0)+(g<<2)>>2]=f[y>>2];f[y>>2]=(f[y>>2]|0)+1}y=f[i>>2]|0;g=f[l>>2]|0;if((y|0)==(g|0)){h=1;u=c;return h|0}z=a+16|0;v=a+20|0;x=a+12|0;a=g;g=y;a:while(1){y=f[a+-4>>2]|0;f[b>>2]=y;t=(y>>>0)/3|0;if((y|0)!=-1?(y=(f[j>>2]|0)+(t>>>5<<2)|0,r=1<<(t&31),t=f[y>>2]|0,(t&r|0)==0):0){f[y>>2]=t|r;r=f[n>>2]|0;t=f[b>>2]|0;y=f[(f[r+28>>2]|0)+(t<<2)>>2]|0;if((y|0)==-1){h=0;A=79;break}else{B=y;C=r;D=t}b:while(1){t=(f[s>>2]|0)+(B>>>5<<2)|0;r=1<<(B&31);y=f[t>>2]|0;do if(!(y&r)){w=f[(f[C+40>>2]|0)+(B<<2)>>2]|0;if((w|0)==-1)E=1;else{m=f[(f[f[C+64>>2]>>2]|0)+(w<<2)>>2]|0;E=(1<<(m&31)&f[(f[C+12>>2]|0)+(m>>>5<<2)>>2]|0)!=0}f[t>>2]=y|r;m=f[b>>2]|0;f[e>>2]=m;w=f[(f[(f[z>>2]|0)+96>>2]|0)+(((m>>>0)/3|0)*12|0)+(((m>>>0)%3|0)<<2)>>2]|0;m=f[v>>2]|0;f[d>>2]=w;p=f[m+4>>2]|0;m=p+4|0;k=f[m>>2]|0;if((k|0)==(f[p+8>>2]|0))Oi(p,d);else{f[k>>2]=w;f[m>>2]=k+4}k=f[x>>2]|0;m=k+4|0;w=f[m>>2]|0;if((w|0)==(f[k+8>>2]|0)){Oi(k,e);F=f[x>>2]|0}else{f[w>>2]=f[e>>2];f[m>>2]=w+4;F=k}k=F+24|0;f[(f[F+12>>2]|0)+(B<<2)>>2]=f[k>>2];f[k>>2]=(f[k>>2]|0)+1;k=f[n>>2]|0;w=f[b>>2]|0;if(E){G=w;H=k;A=59;break}m=w+1|0;do if((w|0)==-1)I=-1;else{p=((m>>>0)%3|0|0)==0?w+-2|0:m;if((p|0)==-1){I=-1;break}if(f[(f[k>>2]|0)+(p>>>5<<2)>>2]&1<<(p&31)|0){I=-1;break}I=f[(f[(f[k+64>>2]|0)+12>>2]|0)+(p<<2)>>2]|0}while(0);f[b>>2]=I;J=(I>>>0)/3|0;K=k}else{G=D;H=C;A=59}while(0);if((A|0)==59){A=0;r=G+1|0;if((G|0)==-1){A=60;break}y=((r>>>0)%3|0|0)==0?G+-2|0:r;do if((y|0)==-1)L=-1;else{if(f[(f[H>>2]|0)+(y>>>5<<2)>>2]&1<<(y&31)|0){L=-1;break}L=f[(f[(f[H+64>>2]|0)+12>>2]|0)+(y<<2)>>2]|0}while(0);f[d>>2]=L;y=(((G>>>0)%3|0|0)==0?2:-1)+G|0;do if((y|0)==-1)M=-1;else{if(f[(f[H>>2]|0)+(y>>>5<<2)>>2]&1<<(y&31)|0){M=-1;break}M=f[(f[(f[H+64>>2]|0)+12>>2]|0)+(y<<2)>>2]|0}while(0);y=(L|0)==-1;r=(L>>>0)/3|0;t=y?-1:r;m=(M|0)==-1;w=(M>>>0)/3|0;p=m?-1:w;do if(!y){q=f[j>>2]|0;if(f[q+(t>>>5<<2)>>2]&1<<(t&31)|0){A=69;break}if(m){N=L;O=r;break}if(!(f[q+(p>>>5<<2)>>2]&1<<(p&31))){A=74;break b}else{N=L;O=r}}else A=69;while(0);if((A|0)==69){A=0;if(m){A=71;break}if(!(f[(f[j>>2]|0)+(p>>>5<<2)>>2]&1<<(p&31))){N=M;O=w}else{A=71;break}}f[b>>2]=N;J=O;K=H}r=(f[j>>2]|0)+(J>>>5<<2)|0;f[r>>2]=f[r>>2]|1<<(J&31);D=f[b>>2]|0;B=f[(f[K+28>>2]|0)+(D<<2)>>2]|0;if((B|0)==-1){h=0;A=79;break a}else C=K}do if((A|0)==60){A=0;f[d>>2]=-1;A=71}else if((A|0)==74){A=0;r=f[l>>2]|0;f[r+-4>>2]=M;if((r|0)==(f[o>>2]|0)){Oi(i,d);P=f[l>>2]|0;break}else{f[r>>2]=f[d>>2];t=r+4|0;f[l>>2]=t;P=t;break}}while(0);if((A|0)==71){A=0;t=(f[l>>2]|0)+-4|0;f[l>>2]=t;P=t}Q=f[i>>2]|0;R=P}else{t=a+-4|0;f[l>>2]=t;Q=g;R=t}if((Q|0)==(R|0)){h=1;A=79;break}else{a=R;g=Q}}if((A|0)==79){u=c;return h|0}return 0}function Vb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=Oa,V=Oa,Y=Oa,Z=0,_=0,aa=0,ba=0;d=u;u=u+16|0;e=d;g=a+16|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;n[g>>2]=$(1.0);i=a+20|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[a+36>>2]=$(1.0);j=f[c+8>>2]|0;a:do if(j|0){k=a+4|0;l=a+12|0;m=a+8|0;o=j;p=j;while(1){q=o+8|0;r=b[q+11>>0]|0;s=r<<24>>24<0;t=s?f[q>>2]|0:q;v=s?f[o+12>>2]|0:r&255;if(v>>>0>3){r=t;s=v;w=v;while(1){x=X(h[r>>0]|h[r+1>>0]<<8|h[r+2>>0]<<16|h[r+3>>0]<<24,1540483477)|0;s=(X(x>>>24^x,1540483477)|0)^(X(s,1540483477)|0);w=w+-4|0;if(w>>>0<=3)break;else r=r+4|0}r=v+-4|0;w=r&-4;y=r-w|0;z=t+(w+4)|0;A=s}else{y=v;z=t;A=v}switch(y|0){case 3:{B=h[z+2>>0]<<16^A;C=8;break}case 2:{B=A;C=8;break}case 1:{D=A;C=9;break}default:E=A}if((C|0)==8){C=0;D=h[z+1>>0]<<8^B;C=9}if((C|0)==9){C=0;E=X(D^h[z>>0],1540483477)|0}w=X(E>>>13^E,1540483477)|0;r=w>>>15^w;w=f[k>>2]|0;x=(w|0)==0;b:do if(!x){F=w+-1|0;G=(F&w|0)==0;if(!G)if(r>>>0<w>>>0)H=r;else H=(r>>>0)%(w>>>0)|0;else H=r&F;I=f[(f[a>>2]|0)+(H<<2)>>2]|0;if((I|0)!=0?(J=f[I>>2]|0,(J|0)!=0):0){I=(v|0)==0;if(G){if(I){G=J;while(1){K=f[G+4>>2]|0;if(!((K|0)==(r|0)|(K&F|0)==(H|0))){L=H;C=50;break b}K=b[G+8+11>>0]|0;if(!((K<<24>>24<0?f[G+12>>2]|0:K&255)|0))break b;G=f[G>>2]|0;if(!G){L=H;C=50;break b}}}else M=J;while(1){G=f[M+4>>2]|0;if(!((G|0)==(r|0)|(G&F|0)==(H|0))){L=H;C=50;break b}G=M+8|0;K=b[G+11>>0]|0;N=K<<24>>24<0;O=K&255;do if(((N?f[M+12>>2]|0:O)|0)==(v|0)){K=f[G>>2]|0;if(N)if(!(dl(K,t,v)|0))break b;else break;if((b[t>>0]|0)==(K&255)<<24>>24){K=G;P=O;Q=t;do{P=P+-1|0;K=K+1|0;if(!P)break b;Q=Q+1|0}while((b[K>>0]|0)==(b[Q>>0]|0))}}while(0);M=f[M>>2]|0;if(!M){L=H;C=50;break b}}}if(I){F=J;while(1){O=f[F+4>>2]|0;if((O|0)!=(r|0)){if(O>>>0<w>>>0)R=O;else R=(O>>>0)%(w>>>0)|0;if((R|0)!=(H|0)){L=H;C=50;break b}}O=b[F+8+11>>0]|0;if(!((O<<24>>24<0?f[F+12>>2]|0:O&255)|0))break b;F=f[F>>2]|0;if(!F){L=H;C=50;break b}}}else S=J;while(1){F=f[S+4>>2]|0;if((F|0)!=(r|0)){if(F>>>0<w>>>0)T=F;else T=(F>>>0)%(w>>>0)|0;if((T|0)!=(H|0)){L=H;C=50;break b}}F=S+8|0;I=b[F+11>>0]|0;O=I<<24>>24<0;G=I&255;do if(((O?f[S+12>>2]|0:G)|0)==(v|0)){I=f[F>>2]|0;if(O)if(!(dl(I,t,v)|0))break b;else break;if((b[t>>0]|0)==(I&255)<<24>>24){I=F;N=G;Q=t;do{N=N+-1|0;I=I+1|0;if(!N)break b;Q=Q+1|0}while((b[I>>0]|0)==(b[Q>>0]|0))}}while(0);S=f[S>>2]|0;if(!S){L=H;C=50;break}}}else{L=H;C=50}}else{L=0;C=50}while(0);if((C|0)==50){C=0;Bi(e,a,r,q);U=$(((f[l>>2]|0)+1|0)>>>0);V=$(w>>>0);Y=$(n[g>>2]);do if(x|$(Y*V)<U){t=w<<1|(w>>>0<3|(w+-1&w|0)!=0)&1;v=~~$(W($(U/Y)))>>>0;bi(a,t>>>0<v>>>0?v:t);t=f[k>>2]|0;v=t+-1|0;if(!(v&t)){Z=t;_=v&r;break}if(r>>>0<t>>>0){Z=t;_=r}else{Z=t;_=(r>>>0)%(t>>>0)|0}}else{Z=w;_=L}while(0);w=f[(f[a>>2]|0)+(_<<2)>>2]|0;if(!w){f[f[e>>2]>>2]=f[m>>2];f[m>>2]=f[e>>2];f[(f[a>>2]|0)+(_<<2)>>2]=m;r=f[e>>2]|0;x=f[r>>2]|0;if(x|0){q=f[x+4>>2]|0;x=Z+-1|0;if(x&Z)if(q>>>0<Z>>>0)aa=q;else aa=(q>>>0)%(Z>>>0)|0;else aa=q&x;f[(f[a>>2]|0)+(aa<<2)>>2]=r}}else{f[f[e>>2]>>2]=f[w>>2];f[w>>2]=f[e>>2]}f[l>>2]=(f[l>>2]|0)+1}w=f[p>>2]|0;if(!w)break a;else{o=w;p=w}}}while(0);e=f[c+28>>2]|0;if(!e){u=d;return}else ba=e;do{e=ba;c=yn(40)|0;Vb(c,f[e+20>>2]|0);aa=Ec(i,e+8|0)|0;e=f[aa>>2]|0;f[aa>>2]=c;if(e|0){c=f[e+28>>2]|0;if(c|0){aa=c;do{c=aa;aa=f[aa>>2]|0;pi(c+8|0);ur(c)}while((aa|0)!=0)}aa=e+20|0;c=f[aa>>2]|0;f[aa>>2]=0;if(c|0)ur(c);c=f[e+8>>2]|0;if(c|0){aa=c;do{c=aa;aa=f[aa>>2]|0;a=c+8|0;Z=f[c+20>>2]|0;if(Z|0){_=c+24|0;if((f[_>>2]|0)!=(Z|0))f[_>>2]=Z;ur(Z)}if((b[a+11>>0]|0)<0)ur(f[a>>2]|0);ur(c)}while((aa|0)!=0)}aa=f[e>>2]|0;f[e>>2]=0;if(aa|0)ur(aa);ur(e)}ba=f[ba>>2]|0}while((ba|0)!=0);u=d;return}function Wb(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=Oa,fa=Oa,ga=Oa,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0;g=u;u=u+48|0;i=g+16|0;j=g+12|0;k=g;l=i+16|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)Fq(k);q=o<<2;r=yn(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;rj(r|0,0,q|0)|0;f[p>>2]=s;s=c+48|0;q=c+40|0;o=i+4|0;t=i+12|0;v=i+8|0;w=a+40|0;x=a+64|0;y=f[e>>2]|0;e=r;z=0;A=0;B=r;C=r;D=0;E=r;while(1){r=s;F=f[r>>2]|0;G=f[r+4>>2]|0;r=q;H=In(f[r>>2]|0,f[r+4>>2]|0,y+z|0,0)|0;r=lo(H|0,I|0,F|0,G|0)|0;G=(f[f[c>>2]>>2]|0)+r|0;r=h[G>>0]|h[G+1>>0]<<8|h[G+2>>0]<<16|h[G+3>>0]<<24;f[j>>2]=r;G=r&65535;F=r>>>16;H=F&65535;J=(r&65535^318)+239^F;F=(D|0)==0;a:do if(!F){K=D+-1|0;L=(K&D|0)==0;if(!L)if(J>>>0<D>>>0)M=J;else M=(J>>>0)%(D>>>0)|0;else M=J&K;N=f[(f[i>>2]|0)+(M<<2)>>2]|0;do if(N|0?(O=f[N>>2]|0,O|0):0){b:do if(L){P=O;while(1){Q=f[P+4>>2]|0;R=(Q|0)==(J|0);if(!(R|(Q&K|0)==(M|0))){S=27;break b}if((R?(R=P+8|0,(d[R>>1]|0)==G<<16>>16):0)?(d[R+2>>1]|0)==H<<16>>16:0){T=P;S=26;break b}P=f[P>>2]|0;if(!P){S=27;break}}}else{P=O;while(1){R=f[P+4>>2]|0;if((R|0)==(J|0)){Q=P+8|0;if((d[Q>>1]|0)==G<<16>>16?(d[Q+2>>1]|0)==H<<16>>16:0){T=P;S=26;break b}}else{if(R>>>0<D>>>0)U=R;else U=(R>>>0)%(D>>>0)|0;if((U|0)!=(M|0)){S=27;break b}}P=f[P>>2]|0;if(!P){S=27;break}}}while(0);if((S|0)==26){S=0;f[E+(z<<2)>>2]=f[T+12>>2];V=e;X=A;Y=C;Z=B;_=E;break a}else if((S|0)==27){S=0;if(F){aa=0;S=46;break a}else break}}while(0);K=D+-1|0;L=(K&D|0)==0;if(!L)if(J>>>0<D>>>0)ba=J;else ba=(J>>>0)%(D>>>0)|0;else ba=K&J;N=f[(f[i>>2]|0)+(ba<<2)>>2]|0;if((N|0)!=0?(O=f[N>>2]|0,(O|0)!=0):0){if(L){L=O;while(1){N=f[L+4>>2]|0;if(!((N|0)==(J|0)|(N&K|0)==(ba|0))){aa=ba;S=46;break a}N=L+8|0;if((d[N>>1]|0)==G<<16>>16?(d[N+2>>1]|0)==H<<16>>16:0){S=61;break a}L=f[L>>2]|0;if(!L){aa=ba;S=46;break a}}}else ca=O;while(1){L=f[ca+4>>2]|0;if((L|0)!=(J|0)){if(L>>>0<D>>>0)da=L;else da=(L>>>0)%(D>>>0)|0;if((da|0)!=(ba|0)){aa=ba;S=46;break a}}L=ca+8|0;if((d[L>>1]|0)==G<<16>>16?(d[L+2>>1]|0)==H<<16>>16:0){S=61;break a}ca=f[ca>>2]|0;if(!ca){aa=ba;S=46;break}}}else{aa=ba;S=46}}else{aa=0;S=46}while(0);if((S|0)==46){S=0;H=yn(16)|0;G=H+8|0;d[G>>1]=r;d[G+2>>1]=r>>>16;f[H+12>>2]=A;f[H+4>>2]=J;f[H>>2]=0;ea=$(((f[t>>2]|0)+1|0)>>>0);fa=$(D>>>0);ga=$(n[l>>2]);do if(F|$(ga*fa)<ea){G=D<<1|(D>>>0<3|(D+-1&D|0)!=0)&1;O=~~$(W($(ea/ga)))>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>2]|0}Y=f[k>>2]|0;if(!oa)na=Y;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[Y+(a<<2)>>2];a=a+1|0}while(a>>>0<oa>>>0);na=Y}}f[m>>2]=X;ma=na}if(!ma)pa=X;else{na=f[p>>2]|0;if((na|0)!=(ma|0))f[p>>2]=na+(~((na+-4-ma|0)>>>2)<<2);ur(ma);pa=X}}else pa=0;X=f[i+8>>2]|0;if(X|0){ma=X;do{X=ma;ma=f[ma>>2]|0;ur(X)}while((ma|0)!=0)}ma=f[i>>2]|0;f[i>>2]=0;if(!ma){u=g;return pa|0}ur(ma);u=g;return pa|0}function Xb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;c=u;u=u+16|0;d=c+8|0;e=c;g=f[b>>2]|0;if((g|0)==-1){h=1;u=c;return h|0}i=(g>>>0)/3|0;j=a+24|0;if(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0){h=1;u=c;return h|0}i=a+48|0;k=f[i>>2]|0;l=a+52|0;m=f[l>>2]|0;if((m|0)==(k|0))n=k;else{o=m+(~((m+-4-k|0)>>>2)<<2)|0;f[l>>2]=o;n=o}o=a+56|0;if((n|0)==(f[o>>2]|0))Oi(i,b);else{f[n>>2]=g;f[l>>2]=n+4}n=a+4|0;g=f[n>>2]|0;k=f[b>>2]|0;m=k+1|0;if((k|0)==-1){h=0;u=c;return h|0}p=((m>>>0)%3|0|0)==0?k+-2|0:m;if((p|0)==-1)q=-1;else q=f[(f[g>>2]|0)+(p<<2)>>2]|0;p=(((k>>>0)%3|0|0)==0?2:-1)+k|0;if((p|0)==-1){h=0;u=c;return h|0}k=f[(f[g>>2]|0)+(p<<2)>>2]|0;if((q|0)==-1|(k|0)==-1){h=0;u=c;return h|0}p=a+36|0;g=f[p>>2]|0;m=g+(q>>>5<<2)|0;r=1<<(q&31);s=f[m>>2]|0;if(!(s&r)){f[m>>2]=s|r;r=f[b>>2]|0;s=r+1|0;if((r|0)==-1)t=-1;else t=((s>>>0)%3|0|0)==0?r+-2|0:s;f[e>>2]=t;s=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((t>>>0)/3|0)*12|0)+(((t>>>0)%3|0)<<2)>>2]|0;t=f[a+20>>2]|0;f[d>>2]=s;r=f[t+4>>2]|0;t=r+4|0;m=f[t>>2]|0;if((m|0)==(f[r+8>>2]|0))Oi(r,d);else{f[m>>2]=s;f[t>>2]=m+4}m=a+12|0;t=f[m>>2]|0;s=t+4|0;r=f[s>>2]|0;if((r|0)==(f[t+8>>2]|0)){Oi(t,e);v=f[m>>2]|0}else{f[r>>2]=f[e>>2];f[s>>2]=r+4;v=t}t=v+24|0;f[(f[v+12>>2]|0)+(q<<2)>>2]=f[t>>2];f[t>>2]=(f[t>>2]|0)+1;w=f[p>>2]|0}else w=g;g=w+(k>>>5<<2)|0;w=1<<(k&31);t=f[g>>2]|0;if(!(t&w)){f[g>>2]=t|w;w=f[b>>2]|0;do if((w|0)!=-1)if(!((w>>>0)%3|0)){x=w+2|0;break}else{x=w+-1|0;break}else x=-1;while(0);f[e>>2]=x;w=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((x>>>0)/3|0)*12|0)+(((x>>>0)%3|0)<<2)>>2]|0;x=f[a+20>>2]|0;f[d>>2]=w;t=f[x+4>>2]|0;x=t+4|0;g=f[x>>2]|0;if((g|0)==(f[t+8>>2]|0))Oi(t,d);else{f[g>>2]=w;f[x>>2]=g+4}g=a+12|0;x=f[g>>2]|0;w=x+4|0;t=f[w>>2]|0;if((t|0)==(f[x+8>>2]|0)){Oi(x,e);y=f[g>>2]|0}else{f[t>>2]=f[e>>2];f[w>>2]=t+4;y=x}x=y+24|0;f[(f[y+12>>2]|0)+(k<<2)>>2]=f[x>>2];f[x>>2]=(f[x>>2]|0)+1}x=f[i>>2]|0;k=f[l>>2]|0;if((x|0)==(k|0)){h=1;u=c;return h|0}y=a+16|0;t=a+20|0;w=a+12|0;a=k;k=x;a:while(1){x=f[a+-4>>2]|0;f[b>>2]=x;g=(x>>>0)/3|0;if((x|0)!=-1?(x=(f[j>>2]|0)+(g>>>5<<2)|0,q=1<<(g&31),g=f[x>>2]|0,(g&q|0)==0):0){f[x>>2]=g|q;q=f[b>>2]|0;if((q|0)==-1){h=0;z=80;break}g=f[n>>2]|0;x=q;b:while(1){q=f[(f[g>>2]|0)+(x<<2)>>2]|0;if((q|0)==-1){h=0;z=80;break a}v=(f[p>>2]|0)+(q>>>5<<2)|0;r=1<<(q&31);s=f[v>>2]|0;do if(!(s&r)){m=f[(f[g+24>>2]|0)+(q<<2)>>2]|0;A=m+1|0;do if((m|0)==-1)B=1;else{C=((A>>>0)%3|0|0)==0?m+-2|0:A;if((C|0)==-1){B=1;break}D=f[(f[g+12>>2]|0)+(C<<2)>>2]|0;C=D+1|0;if((D|0)==-1){B=1;break}B=((((C>>>0)%3|0|0)==0?D+-2|0:C)|0)==-1}while(0);f[v>>2]=s|r;A=f[b>>2]|0;f[e>>2]=A;m=f[(f[(f[y>>2]|0)+96>>2]|0)+(((A>>>0)/3|0)*12|0)+(((A>>>0)%3|0)<<2)>>2]|0;A=f[t>>2]|0;f[d>>2]=m;C=f[A+4>>2]|0;A=C+4|0;D=f[A>>2]|0;if((D|0)==(f[C+8>>2]|0))Oi(C,d);else{f[D>>2]=m;f[A>>2]=D+4}D=f[w>>2]|0;A=D+4|0;m=f[A>>2]|0;if((m|0)==(f[D+8>>2]|0)){Oi(D,e);E=f[w>>2]|0}else{f[m>>2]=f[e>>2];f[A>>2]=m+4;E=D}D=E+24|0;f[(f[E+12>>2]|0)+(q<<2)>>2]=f[D>>2];f[D>>2]=(f[D>>2]|0)+1;D=f[n>>2]|0;m=f[b>>2]|0;if(B)if((m|0)==-1){z=63;break b}else{F=m;G=D;z=64;break}do if((m|0)==-1)H=-1;else{A=m+1|0;C=((A>>>0)%3|0|0)==0?m+-2|0:A;if((C|0)==-1){H=-1;break}H=f[(f[D+12>>2]|0)+(C<<2)>>2]|0}while(0);f[b>>2]=H;I=(H>>>0)/3|0;J=D}else{F=x;G=g;z=64}while(0);if((z|0)==64){z=0;q=F+1|0;r=((q>>>0)%3|0|0)==0?F+-2|0:q;if((r|0)==-1)K=-1;else K=f[(f[G+12>>2]|0)+(r<<2)>>2]|0;f[d>>2]=K;r=(((F>>>0)%3|0|0)==0?2:-1)+F|0;if((r|0)==-1)L=-1;else L=f[(f[G+12>>2]|0)+(r<<2)>>2]|0;r=(K|0)==-1;q=(K>>>0)/3|0;s=r?-1:q;v=(L|0)==-1;m=(L>>>0)/3|0;C=v?-1:m;do if(!r){A=f[j>>2]|0;if(f[A+(s>>>5<<2)>>2]&1<<(s&31)|0){z=70;break}if(v){M=K;N=q;break}if(!(f[A+(C>>>5<<2)>>2]&1<<(C&31))){z=75;break b}else{M=K;N=q}}else z=70;while(0);if((z|0)==70){z=0;if(v){z=72;break}if(!(f[(f[j>>2]|0)+(C>>>5<<2)>>2]&1<<(C&31))){M=L;N=m}else{z=72;break}}f[b>>2]=M;I=N;J=G}q=(f[j>>2]|0)+(I>>>5<<2)|0;f[q>>2]=f[q>>2]|1<<(I&31);x=f[b>>2]|0;if((x|0)==-1){h=0;z=80;break a}else g=J}do if((z|0)==63){z=0;f[d>>2]=-1;z=72}else if((z|0)==75){z=0;g=f[l>>2]|0;f[g+-4>>2]=L;if((g|0)==(f[o>>2]|0)){Oi(i,d);O=f[l>>2]|0;break}else{f[g>>2]=f[d>>2];x=g+4|0;f[l>>2]=x;O=x;break}}while(0);if((z|0)==72){z=0;x=(f[l>>2]|0)+-4|0;f[l>>2]=x;O=x}P=f[i>>2]|0;Q=O}else{x=a+-4|0;f[l>>2]=x;P=k;Q=x}if((P|0)==(Q|0)){h=1;z=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|0;else K=D&H;L=f[(f[g>>2]|0)+(K<<2)>>2]|0;do if(L|0?(M=f[L>>2]|0,M|0):0){b:do if(J){N=M;while(1){O=f[N+4>>2]|0;P=(O|0)==(D|0);if(!(P|(O&H|0)==(K|0))){Q=27;break b}if((P?(f[N+8>>2]|0)==(E|0):0)?(f[N+12>>2]|0)==(F|0):0){R=N;Q=26;break b}N=f[N>>2]|0;if(!N){Q=27;break}}}else{N=M;while(1){P=f[N+4>>2]|0;if((P|0)==(D|0)){if((f[N+8>>2]|0)==(E|0)?(f[N+12>>2]|0)==(F|0):0){R=N;Q=26;break b}}else{if(P>>>0<q>>>0)S=P;else S=(P>>>0)%(q>>>0)|0;if((S|0)!=(K|0)){Q=27;break b}}N=f[N>>2]|0;if(!N){Q=27;break}}}while(0);if((Q|0)==26){Q=0;f[A+(y<<2)>>2]=f[R+16>>2];T=d;U=z;V=C;X=B;Y=A;break a}else if((Q|0)==27){Q=0;if(G){Z=0;Q=46;break a}else break}}while(0);H=q+-1|0;J=(H&q|0)==0;if(!J)if(D>>>0<q>>>0)_=D;else _=(D>>>0)%(q>>>0)|0;else _=H&D;L=f[(f[g>>2]|0)+(_<<2)>>2]|0;if((L|0)!=0?(M=f[L>>2]|0,(M|0)!=0):0){if(J){J=M;while(1){L=f[J+4>>2]|0;if(!((L|0)==(D|0)|(L&H|0)==(_|0))){Z=_;Q=46;break a}if((f[J+8>>2]|0)==(E|0)?(f[J+12>>2]|0)==(F|0):0){Q=61;break a}J=f[J>>2]|0;if(!J){Z=_;Q=46;break a}}}else aa=M;while(1){J=f[aa+4>>2]|0;if((J|0)!=(D|0)){if(J>>>0<q>>>0)ba=J;else ba=(J>>>0)%(q>>>0)|0;if((ba|0)!=(_|0)){Z=_;Q=46;break a}}if((f[aa+8>>2]|0)==(E|0)?(f[aa+12>>2]|0)==(F|0):0){Q=61;break a}aa=f[aa>>2]|0;if(!aa){Z=_;Q=46;break}}}else{Z=_;Q=46}}else{Z=0;Q=46}while(0);if((Q|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T}}else{b[X>>0]=0;X=a+68|0;T=a+72|0;B=f[T>>2]|0;q=f[X>>2]|0;V=B-q>>2;C=q;q=B;if(ja>>>0<=V>>>0)if(ja>>>0<V>>>0?(B=C+(ja<<2)|0,(B|0)!=(q|0)):0){f[T>>2]=q+(~((q+-4-B|0)>>>2)<<2);ma=ja}else ma=ja;else{zh(X,ja-V|0,1332);ma=f[l>>2]|0}V=f[j>>2]|0;if(!ma)la=V;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[V+(a<<2)>>2];a=a+1|0}while(a>>>0<ma>>>0);la=V}}f[l>>2]=U;ka=la}if(!ka)na=U;else{la=f[o>>2]|0;if((la|0)!=(ka|0))f[o>>2]=la+(~((la+-4-ka|0)>>>2)<<2);ur(ka);na=U}}else na=0;U=f[g+8>>2]|0;if(U|0){ka=U;do{U=ka;ka=f[ka>>2]|0;ur(U)}while((ka|0)!=0)}ka=f[g>>2]|0;f[g>>2]=0;if(!ka){u=e;return na|0}ur(ka);u=e;return na|0}function Zb(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=Oa,fa=Oa,ga=Oa,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0;g=u;u=u+48|0;i=g+12|0;j=g+32|0;k=g;l=i+16|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)Fq(k);q=o<<2;r=yn(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;rj(r|0,0,q|0)|0;f[p>>2]=s;s=c+48|0;q=c+40|0;o=i+4|0;t=i+12|0;v=i+8|0;w=a+40|0;x=a+64|0;y=f[e>>2]|0;e=r;z=0;A=0;B=r;C=r;D=0;E=r;while(1){r=s;F=f[r>>2]|0;G=f[r+4>>2]|0;r=q;H=In(f[r>>2]|0,f[r+4>>2]|0,y+z|0,0)|0;r=lo(H|0,I|0,F|0,G|0)|0;G=(f[f[c>>2]>>2]|0)+r|0;r=h[G>>0]|h[G+1>>0]<<8;d[j>>1]=r;G=r&255;F=(r&65535)>>>8;H=F&255;J=((r&255^318)+239<<16>>16^F)&65535;F=(D|0)==0;a:do if(!F){K=D+-1|0;L=(K&D|0)==0;if(!L)if(D>>>0>J>>>0)M=J;else M=(J>>>0)%(D>>>0)|0;else M=K&J;N=f[(f[i>>2]|0)+(M<<2)>>2]|0;do if(N|0?(O=f[N>>2]|0,O|0):0){b:do if(L){P=O;while(1){Q=f[P+4>>2]|0;R=(Q|0)==(J|0);if(!(R|(Q&K|0)==(M|0))){S=27;break b}if((R?(R=P+8|0,(b[R>>0]|0)==G<<24>>24):0)?(b[R+1>>0]|0)==H<<24>>24:0){T=P;S=26;break b}P=f[P>>2]|0;if(!P){S=27;break}}}else{P=O;while(1){R=f[P+4>>2]|0;if((R|0)==(J|0)){Q=P+8|0;if((b[Q>>0]|0)==G<<24>>24?(b[Q+1>>0]|0)==H<<24>>24:0){T=P;S=26;break b}}else{if(R>>>0<D>>>0)U=R;else U=(R>>>0)%(D>>>0)|0;if((U|0)!=(M|0)){S=27;break b}}P=f[P>>2]|0;if(!P){S=27;break}}}while(0);if((S|0)==26){S=0;f[E+(z<<2)>>2]=f[T+12>>2];V=e;X=A;Y=C;Z=B;_=E;break a}else if((S|0)==27){S=0;if(F){aa=0;S=46;break a}else break}}while(0);K=D+-1|0;L=(K&D|0)==0;if(!L)if(D>>>0>J>>>0)ba=J;else ba=(J>>>0)%(D>>>0)|0;else ba=K&J;N=f[(f[i>>2]|0)+(ba<<2)>>2]|0;if((N|0)!=0?(O=f[N>>2]|0,(O|0)!=0):0){if(L){L=O;while(1){N=f[L+4>>2]|0;if(!((N|0)==(J|0)|(N&K|0)==(ba|0))){aa=ba;S=46;break a}N=L+8|0;if((b[N>>0]|0)==G<<24>>24?(b[N+1>>0]|0)==H<<24>>24:0){S=61;break a}L=f[L>>2]|0;if(!L){aa=ba;S=46;break a}}}else ca=O;while(1){L=f[ca+4>>2]|0;if((L|0)!=(J|0)){if(L>>>0<D>>>0)da=L;else da=(L>>>0)%(D>>>0)|0;if((da|0)!=(ba|0)){aa=ba;S=46;break a}}L=ca+8|0;if((b[L>>0]|0)==G<<24>>24?(b[L+1>>0]|0)==H<<24>>24:0){S=61;break a}ca=f[ca>>2]|0;if(!ca){aa=ba;S=46;break}}}else{aa=ba;S=46}}else{aa=0;S=46}while(0);if((S|0)==46){S=0;H=yn(16)|0;G=H+8|0;b[G>>0]=r;b[G+1>>0]=r>>8;f[H+12>>2]=A;f[H+4>>2]=J;f[H>>2]=0;ea=$(((f[t>>2]|0)+1|0)>>>0);fa=$(D>>>0);ga=$(n[l>>2]);do if(F|$(ga*fa)<ea){G=D<<1|(D>>>0<3|(D+-1&D|0)!=0)&1;O=~~$(W($(ea/ga)))>>>0;Zh(i,G>>>0<O>>>0?O:G);G=f[o>>2]|0;O=G+-1|0;if(!(O&G)){ha=G;ia=O&J;break}if(G>>>0>J>>>0){ha=G;ia=J}else{ha=G;ia=(J>>>0)%(G>>>0)|0}}else{ha=D;ia=aa}while(0);J=(f[i>>2]|0)+(ia<<2)|0;F=f[J>>2]|0;if(!F){f[H>>2]=f[v>>2];f[v>>2]=H;f[J>>2]=v;J=f[H>>2]|0;if(J|0){r=f[J+4>>2]|0;J=ha+-1|0;if(J&ha)if(r>>>0<ha>>>0)ja=r;else ja=(r>>>0)%(ha>>>0)|0;else ja=r&J;ka=(f[i>>2]|0)+(ja<<2)|0;S=59}}else{f[H>>2]=f[F>>2];ka=F;S=59}if((S|0)==59){S=0;f[ka>>2]=H}f[t>>2]=(f[t>>2]|0)+1;S=61}if((S|0)==61){S=0;F=w;J=f[F>>2]|0;r=In(J|0,f[F+4>>2]|0,A|0,0)|0;eh((f[f[x>>2]>>2]|0)+r|0,j|0,J|0)|0;J=f[k>>2]|0;f[J+(z<<2)>>2]=A;V=J;X=A+1|0;Y=J;Z=J;_=J}J=z+1|0;la=f[m>>2]|0;if(J>>>0>=la>>>0)break;e=V;z=J;A=X;B=Z;C=Y;D=f[o>>2]|0;E=_}if((X|0)==(la|0))ma=Z;else{Z=a+84|0;if(!(b[Z>>0]|0)){_=f[a+72>>2]|0;E=f[a+68>>2]|0;o=E;if((_|0)==(E|0))na=V;else{D=_-E>>2;E=0;do{_=o+(E<<2)|0;f[_>>2]=f[Y+(f[_>>2]<<2)>>2];E=E+1|0}while(E>>>0<D>>>0);na=V}}else{b[Z>>0]=0;Z=a+68|0;V=a+72|0;D=f[V>>2]|0;E=f[Z>>2]|0;Y=D-E>>2;o=E;E=D;if(la>>>0<=Y>>>0)if(la>>>0<Y>>>0?(D=o+(la<<2)|0,(D|0)!=(E|0)):0){f[V>>2]=E+(~((E+-4-D|0)>>>2)<<2);oa=la}else oa=la;else{zh(Z,la-Y|0,1332);oa=f[m>>2]|0}Y=f[k>>2]|0;if(!oa)na=Y;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[Y+(a<<2)>>2];a=a+1|0}while(a>>>0<oa>>>0);na=Y}}f[m>>2]=X;ma=na}if(!ma)pa=X;else{na=f[p>>2]|0;if((na|0)!=(ma|0))f[p>>2]=na+(~((na+-4-ma|0)>>>2)<<2);ur(ma);pa=X}}else pa=0;X=f[i+8>>2]|0;if(X|0){ma=X;do{X=ma;ma=f[ma>>2]|0;ur(X)}while((ma|0)!=0)}ma=f[i>>2]|0;f[i>>2]=0;if(!ma){u=g;return pa|0}ur(ma);u=g;return pa|0}function _b(a,b){a=a|0;b=b|0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ca;R=(((T>>>0)%3|0|0)==0?2:-1)+T|0;if((R|0)==-1)da=-1;else da=f[(f[(f[p>>2]|0)+12>>2]|0)+(R<<2)>>2]|0;R=(ca|0)==-1;S=R?-1:(ca>>>0)/3|0;ea=(da|0)==-1;fa=ea?-1:(da>>>0)/3|0;Q=((M>>>0)%3|0|0)==0?T+-2|0:M;if(((Q|0)!=-1?(M=f[(f[p>>2]|0)+12>>2]|0,aa=f[M+(Q<<2)>>2]|0,(aa|0)!=-1):0)?(Q=(aa>>>0)/3|0,aa=f[n>>2]|0,(f[aa+(Q>>>5<<2)>>2]&1<<(Q&31)|0)==0):0){Q=(((T>>>0)%3|0|0)==0?2:-1)+T|0;do if((Q|0)!=-1){V=f[M+(Q<<2)>>2]|0;if((V|0)==-1)break;_=(V>>>0)/3|0;if(!(f[aa+(_>>>5<<2)>>2]&1<<(_&31))){U=62;break b}}while(0);if(!ea)yf(a,f[i>>2]|0,N,0,fa);pd(t,3);ga=f[e>>2]|0}else{if(!R){yf(a,f[i>>2]|0,N,1,S);aa=f[b>>2]|0;if((aa|0)==-1){U=52;break}else ha=aa}else ha=T;aa=(((ha>>>0)%3|0|0)==0?2:-1)+ha|0;if((aa|0)==-1){U=52;break}Q=f[(f[(f[p>>2]|0)+12>>2]|0)+(aa<<2)>>2]|0;if((Q|0)==-1){U=52;break}aa=(Q>>>0)/3|0;if(f[(f[n>>2]|0)+(aa>>>5<<2)>>2]&1<<(aa&31)|0){U=52;break}pd(t,5);ga=da}f[b>>2]=ga}if((K|0)>=(k|0))break a;J=K;L=f[n>>2]|0}do if((U|0)==43){U=0;f[e>>2]=-1;U=54}else if((U|0)==52){U=0;if(ea)U=54;else{yf(a,f[i>>2]|0,N,0,fa);U=54}}else if((U|0)==62){U=0;pd(t,1);f[F>>2]=(f[F>>2]|0)+1;if(P?(L=f[(f[w>>2]|0)+(O<<2)>>2]|0,(1<<(L&31)&f[(f[G>>2]|0)+(L>>>5<<2)>>2]|0)==0):0){f[g>>2]=f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]|0;r=q<<24>>24<0;c=r?f[i>>2]|0:i;o=r?f[i+4>>2]|0:q&255;if(o>>>0>3){q=c;r=o;m=o;while(1){d=X(h[q>>0]|h[q+1>>0]<<8|h[q+2>>0]<<16|h[q+3>>0]<<24,1540483477)|0;r=(X(d>>>24^d,1540483477)|0)^(X(r,1540483477)|0);m=m+-4|0;if(m>>>0<=3)break;else q=q+4|0}q=o+-4|0;m=q&-4;s=q-m|0;t=c+(m+4)|0;v=r}else{s=o;t=c;v=o}switch(s|0){case 3:{w=h[t+2>>0]<<16^v;x=10;break}case 2:{w=v;x=10;break}case 1:{y=v;x=11;break}default:z=v}if((x|0)==10){y=h[t+1>>0]<<8^w;x=11}if((x|0)==11)z=X(y^h[t>>0],1540483477)|0;t=X(z>>>13^z,1540483477)|0;z=t>>>15^t;t=a+4|0;y=f[t>>2]|0;w=(y|0)==0;a:do if(!w){v=y+-1|0;s=(v&y|0)==0;if(!s)if(z>>>0<y>>>0)A=z;else A=(z>>>0)%(y>>>0)|0;else A=z&v;r=f[(f[a>>2]|0)+(A<<2)>>2]|0;if((r|0)!=0?(m=f[r>>2]|0,(m|0)!=0):0){r=(o|0)==0;if(s){if(r){s=m;while(1){q=f[s+4>>2]|0;if(!((q|0)==(z|0)|(q&v|0)==(A|0))){B=A;x=52;break a}q=b[s+8+11>>0]|0;if(!((q<<24>>24<0?f[s+12>>2]|0:q&255)|0))break a;s=f[s>>2]|0;if(!s){B=A;x=52;break a}}}else C=m;while(1){s=f[C+4>>2]|0;if(!((s|0)==(z|0)|(s&v|0)==(A|0))){B=A;x=52;break a}s=C+8|0;q=b[s+11>>0]|0;d=q<<24>>24<0;D=q&255;do if(((d?f[C+12>>2]|0:D)|0)==(o|0)){q=f[s>>2]|0;if(d)if(!(dl(q,c,o)|0))break a;else break;if((b[c>>0]|0)==(q&255)<<24>>24){q=s;E=D;F=c;do{E=E+-1|0;q=q+1|0;if(!E)break a;F=F+1|0}while((b[q>>0]|0)==(b[F>>0]|0))}}while(0);C=f[C>>2]|0;if(!C){B=A;x=52;break a}}}if(r){v=m;while(1){D=f[v+4>>2]|0;if((D|0)!=(z|0)){if(D>>>0<y>>>0)G=D;else G=(D>>>0)%(y>>>0)|0;if((G|0)!=(A|0)){B=A;x=52;break a}}D=b[v+8+11>>0]|0;if(!((D<<24>>24<0?f[v+12>>2]|0:D&255)|0))break a;v=f[v>>2]|0;if(!v){B=A;x=52;break a}}}else H=m;while(1){v=f[H+4>>2]|0;if((v|0)!=(z|0)){if(v>>>0<y>>>0)I=v;else I=(v>>>0)%(y>>>0)|0;if((I|0)!=(A|0)){B=A;x=52;break a}}v=H+8|0;r=b[v+11>>0]|0;D=r<<24>>24<0;s=r&255;do if(((D?f[H+12>>2]|0:s)|0)==(o|0)){r=f[v>>2]|0;if(D)if(!(dl(r,c,o)|0))break a;else break;if((b[c>>0]|0)==(r&255)<<24>>24){r=v;d=s;F=c;do{d=d+-1|0;r=r+1|0;if(!d)break a;F=F+1|0}while((b[r>>0]|0)==(b[F>>0]|0))}}while(0);H=f[H>>2]|0;if(!H){B=A;x=52;break}}}else{B=A;x=52}}else{B=0;x=52}while(0);if((x|0)==52){mi(g,a,z,i);x=a+12|0;J=$(((f[x>>2]|0)+1|0)>>>0);K=$(y>>>0);L=$(n[a+16>>2]);do if(w|$(L*K)<J){A=y<<1|(y>>>0<3|(y+-1&y|0)!=0)&1;H=~~$(W($(J/L)))>>>0;bi(a,A>>>0<H>>>0?H:A);A=f[t>>2]|0;H=A+-1|0;if(!(H&A)){M=A;N=H&z;break}if(z>>>0<A>>>0){M=A;N=z}else{M=A;N=(z>>>0)%(A>>>0)|0}}else{M=y;N=B}while(0);B=f[(f[a>>2]|0)+(N<<2)>>2]|0;if(!B){y=a+8|0;f[f[g>>2]>>2]=f[y>>2];f[y>>2]=f[g>>2];f[(f[a>>2]|0)+(N<<2)>>2]=y;y=f[g>>2]|0;N=f[y>>2]|0;if(!N)O=g;else{z=f[N+4>>2]|0;N=M+-1|0;if(N&M)if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[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;f[j+16>>2]=0;f[j+20>>2]=0;f[h>>2]=v;v=b[s+24>>0]|0;f[g>>2]=f[h>>2];vb(s,g,v,j)|0;v=a+28|0;a=(f[v>>2]|0)==0;a:do if(!p){s=k+8|0;t=j+8|0;w=k+16|0;x=j+16|0;y=l+8|0;z=l+16|0;A=o;B=o;C=0;D=0;E=0;F=0;G=0;H=0;J=a;K=o;while(1){do if(J){L=K+1|0;if((K|0)==-1){M=A;N=-1;O=-1;P=-1;break}Q=((L>>>0)%3|0|0)==0?K+-2|0:L;if((A|0)!=-1)if(!((A>>>0)%3|0)){R=A;S=A+2|0;T=Q;U=A;V=19;break}else{R=A;S=A+-1|0;T=Q;U=A;V=19;break}else{R=-1;S=-1;T=Q;U=-1;V=19}}else{Q=B+1|0;L=((Q>>>0)%3|0|0)==0?B+-2|0:Q;if(!((B>>>0)%3|0)){R=A;S=B+2|0;T=L;U=K;V=19;break}else{R=A;S=B+-1|0;T=L;U=K;V=19;break}}while(0);if((V|0)==19){V=0;if((T|0)==-1){M=R;N=-1;O=S;P=U}else{M=R;N=f[(f[f[m>>2]>>2]|0)+(T<<2)>>2]|0;O=S;P=U}}W=f[n>>2]|0;L=f[W>>2]|0;if((f[W+4>>2]|0)-L>>2>>>0<=N>>>0){V=22;break}Q=f[(f[r>>2]|0)+(f[L+(N<<2)>>2]<<2)>>2]|0;L=f[q>>2]|0;if(!(b[L+84>>0]|0))X=f[(f[L+68>>2]|0)+(Q<<2)>>2]|0;else X=Q;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[h>>2]=X;Q=b[L+24>>0]|0;f[g>>2]=f[h>>2];vb(L,g,Q,k)|0;if((O|0)==-1)Y=-1;else Y=f[(f[f[m>>2]>>2]|0)+(O<<2)>>2]|0;Z=f[n>>2]|0;Q=f[Z>>2]|0;if((f[Z+4>>2]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(i);B=f[c>>2]|0;$=(f[v>>2]|0)==0;if((B|0)==-1){oa=$;pa=da;qa=ma;ra=ia;sa=fa;ta=L;ua=ba;break a}else{A=M;C=ma;D=da;E=fa;F=ia;G=ba;H=L;J=$;K=P}}if((V|0)==22)Fq(W);else if((V|0)==28)Fq(Z)}else{oa=a;pa=0;qa=0;ra=0;sa=0;ta=0;ua=0}while(0);a=(pa|0)>-1|(pa|0)==-1&qa>>>0>4294967295;Z=no(0,0,qa|0,pa|0)|0;V=a?pa:I;W=(ra|0)>-1|(ra|0)==-1&sa>>>0>4294967295;P=no(0,0,sa|0,ra|0)|0;M=W?ra:I;v=(ta|0)>-1|(ta|0)==-1&ua>>>0>4294967295;c=no(0,0,ua|0,ta|0)|0;i=lo((W?sa:P)|0,M|0,(v?ua:c)|0,(v?ta:I)|0)|0;v=lo(i|0,I|0,(a?qa:Z)|0,V|0)|0;V=I;if(oa){if((v|0)<=536870912){va=qa;wa=sa;xa=ua;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}oa=oo(v|0,V|0,29)|0;Z=oa&7;oa=Ok(qa|0,pa|0,Z|0,0)|0;a=Ok(sa|0,ra|0,Z|0,0)|0;i=Ok(ua|0,ta|0,Z|0,0)|0;va=oa;wa=a;xa=i;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}else{if(!((V|0)>0|(V|0)==0&v>>>0>536870912)){va=qa;wa=sa;xa=ua;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}i=oo(v|0,V|0,29)|0;V=I;v=Ok(qa|0,pa|0,i|0,V|0)|0;pa=Ok(sa|0,ra|0,i|0,V|0)|0;ra=Ok(ua|0,ta|0,i|0,V|0)|0;va=v;wa=pa;xa=ra;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}}function bc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=Oa,M=Oa,N=Oa,O=0,P=0,Q=0,R=0;e=u;u=u+64|0;g=e+40|0;i=e+16|0;j=e;k=Kd(a,c)|0;if(k|0){f[i>>2]=k;f[g>>2]=f[i>>2];lf(a,g)|0}f[j>>2]=0;k=j+4|0;f[k>>2]=0;f[j+8>>2]=0;l=d+11|0;m=b[l>>0]|0;o=d+4|0;p=f[o>>2]|0;q=m<<24>>24<0?p:m&255;if(!q){r=m;s=p;t=0}else{Di(j,q);r=b[l>>0]|0;s=f[o>>2]|0;t=f[j>>2]|0}o=r<<24>>24<0;eh(t|0,(o?f[d>>2]|0:d)|0,(o?s:r&255)|0)|0;oj(i,c);c=i+12|0;f[c>>2]=0;r=i+16|0;f[r>>2]=0;f[i+20>>2]=0;s=f[k>>2]|0;o=f[j>>2]|0;d=s-o|0;if(!d){v=o;w=s;x=0}else{Di(c,d);v=f[j>>2]|0;w=f[k>>2]|0;x=f[c>>2]|0}eh(x|0,v|0,w-v|0)|0;v=i+11|0;w=b[v>>0]|0;x=w<<24>>24<0;c=x?f[i>>2]|0:i;d=x?f[i+4>>2]|0:w&255;if(d>>>0>3){w=c;x=d;s=d;while(1){o=X(h[w>>0]|h[w+1>>0]<<8|h[w+2>>0]<<16|h[w+3>>0]<<24,1540483477)|0;x=(X(o>>>24^o,1540483477)|0)^(X(x,1540483477)|0);s=s+-4|0;if(s>>>0<=3)break;else w=w+4|0}w=d+-4|0;s=w&-4;y=w-s|0;z=c+(s+4)|0;A=x}else{y=d;z=c;A=d}switch(y|0){case 3:{B=h[z+2>>0]<<16^A;C=12;break}case 2:{B=A;C=12;break}case 1:{D=A;C=13;break}default:E=A}if((C|0)==12){D=h[z+1>>0]<<8^B;C=13}if((C|0)==13)E=X(D^h[z>>0],1540483477)|0;z=X(E>>>13^E,1540483477)|0;E=z>>>15^z;z=a+4|0;D=f[z>>2]|0;B=(D|0)==0;a:do if(!B){A=D+-1|0;y=(A&D|0)==0;if(!y)if(E>>>0<D>>>0)F=E;else F=(E>>>0)%(D>>>0)|0;else F=E&A;x=f[(f[a>>2]|0)+(F<<2)>>2]|0;if((x|0)!=0?(s=f[x>>2]|0,(s|0)!=0):0){x=(d|0)==0;if(y){if(x){y=s;while(1){w=f[y+4>>2]|0;if(!((w|0)==(E|0)|(w&A|0)==(F|0))){G=F;C=54;break a}w=b[y+8+11>>0]|0;if(!((w<<24>>24<0?f[y+12>>2]|0:w&255)|0))break a;y=f[y>>2]|0;if(!y){G=F;C=54;break a}}}else H=s;while(1){y=f[H+4>>2]|0;if(!((y|0)==(E|0)|(y&A|0)==(F|0))){G=F;C=54;break a}y=H+8|0;w=b[y+11>>0]|0;o=w<<24>>24<0;t=w&255;do if(((o?f[H+12>>2]|0:t)|0)==(d|0)){w=f[y>>2]|0;if(o)if(!(dl(w,c,d)|0))break a;else break;if((b[c>>0]|0)==(w&255)<<24>>24){w=y;l=t;q=c;do{l=l+-1|0;w=w+1|0;if(!l)break a;q=q+1|0}while((b[w>>0]|0)==(b[q>>0]|0))}}while(0);H=f[H>>2]|0;if(!H){G=F;C=54;break a}}}if(x){A=s;while(1){t=f[A+4>>2]|0;if((t|0)!=(E|0)){if(t>>>0<D>>>0)I=t;else I=(t>>>0)%(D>>>0)|0;if((I|0)!=(F|0)){G=F;C=54;break a}}t=b[A+8+11>>0]|0;if(!((t<<24>>24<0?f[A+12>>2]|0:t&255)|0))break a;A=f[A>>2]|0;if(!A){G=F;C=54;break a}}}else J=s;while(1){A=f[J+4>>2]|0;if((A|0)!=(E|0)){if(A>>>0<D>>>0)K=A;else K=(A>>>0)%(D>>>0)|0;if((K|0)!=(F|0)){G=F;C=54;break a}}A=J+8|0;x=b[A+11>>0]|0;t=x<<24>>24<0;y=x&255;do if(((t?f[J+12>>2]|0:y)|0)==(d|0)){x=f[A>>2]|0;if(t)if(!(dl(x,c,d)|0))break a;else break;if((b[c>>0]|0)==(x&255)<<24>>24){x=A;o=y;q=c;do{o=o+-1|0;x=x+1|0;if(!o)break a;q=q+1|0}while((b[x>>0]|0)==(b[q>>0]|0))}}while(0);J=f[J>>2]|0;if(!J){G=F;C=54;break}}}else{G=F;C=54}}else{G=0;C=54}while(0);if((C|0)==54){mi(g,a,E,i);C=a+12|0;L=$(((f[C>>2]|0)+1|0)>>>0);M=$(D>>>0);N=$(n[a+16>>2]);do if(B|$(N*M)<L){F=D<<1|(D>>>0<3|(D+-1&D|0)!=0)&1;J=~~$(W($(L/N)))>>>0;bi(a,F>>>0<J>>>0?J:F);F=f[z>>2]|0;J=F+-1|0;if(!(J&F)){O=F;P=J&E;break}if(E>>>0<F>>>0){O=F;P=E}else{O=F;P=(E>>>0)%(F>>>0)|0}}else{O=D;P=G}while(0);G=f[(f[a>>2]|0)+(P<<2)>>2]|0;if(!G){D=a+8|0;f[f[g>>2]>>2]=f[D>>2];f[D>>2]=f[g>>2];f[(f[a>>2]|0)+(P<<2)>>2]=D;D=f[g>>2]|0;P=f[D>>2]|0;if(!P)Q=g;else{E=f[P+4>>2]|0;P=O+-1|0;if(P&O)if(E>>>0<O>>>0)R=E;else R=(E>>>0)%(O>>>0)|0;else R=E&P;f[(f[a>>2]|0)+(R<<2)>>2]=D;Q=g}}else{f[f[g>>2]>>2]=f[G>>2];f[G>>2]=f[g>>2];Q=g}f[C>>2]=(f[C>>2]|0)+1;f[Q>>2]=0}Q=f[i+12>>2]|0;if(Q|0){if((f[r>>2]|0)!=(Q|0))f[r>>2]=Q;ur(Q)}if((b[v>>0]|0)<0)ur(f[i>>2]|0);i=f[j>>2]|0;if(!i){u=e;return}if((f[k>>2]|0)!=(i|0))f[k>>2]=i;ur(i);u=e;return}function cc(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,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0;if((P|0)==(G|0)){if((d[N+8>>1]|0)==r<<16>>16){Q=N;break c}}else{if(P>>>0<e>>>0)R=P;else R=(P>>>0)%(e>>>0)|0;if((R|0)!=(J|0))break b}N=f[N>>2]|0;if(!N)break b}}while(0);f[E+(A<<2)>>2]=f[Q+12>>2];S=z;T=B;U=D;V=C;X=E;break a}while(0);if(!H)if(e>>>0>G>>>0)Y=G;else Y=(G>>>0)%(e>>>0)|0;else Y=F&G;L=f[K+(Y<<2)>>2]|0;if(!L){Z=Y;_=e;aa=0;ba=40}else{if(H){M=L;while(1){M=f[M>>2]|0;if(!M){Z=Y;_=e;aa=0;ba=40;break a}N=f[M+4>>2]|0;if(!((N|0)==(G|0)|(N&F|0)==(Y|0))){Z=Y;_=e;aa=0;ba=40;break a}if((d[M+8>>1]|0)==r<<16>>16){ba=55;break a}}}else ca=L;while(1){ca=f[ca>>2]|0;if(!ca){Z=Y;_=e;aa=0;ba=40;break a}M=f[ca+4>>2]|0;if((M|0)!=(G|0)){if(M>>>0<e>>>0)da=M;else da=(M>>>0)%(e>>>0)|0;if((da|0)!=(Y|0)){Z=Y;_=e;aa=0;ba=40;break a}}if((d[ca+8>>1]|0)==r<<16>>16){ba=55;break}}}}else{Z=0;_=0;aa=1;ba=40}while(0);if((ba|0)==40){ba=0;L=yn(16)|0;d[L+8>>1]=r;f[L+12>>2]=B;f[L+4>>2]=G;f[L>>2]=0;ea=$(((f[t>>2]|0)+1|0)>>>0);fa=$(_>>>0);ga=$(n[l>>2]);do if(aa|$(ga*fa)<ea){M=_<<1|(_>>>0<3|(_+-1&_|0)!=0)&1;F=~~$(W($(ea/ga)))>>>0;Th(i,M>>>0<F>>>0?F:M);M=f[o>>2]|0;F=M+-1|0;if(!(F&M)){ha=M;ia=F&G;break}if(M>>>0>G>>>0){ha=M;ia=G}else{ha=M;ia=(G>>>0)%(M>>>0)|0}}else{ha=_;ia=Z}while(0);G=(f[i>>2]|0)+(ia<<2)|0;r=f[G>>2]|0;if(!r){f[L>>2]=f[v>>2];f[v>>2]=L;f[G>>2]=v;G=f[L>>2]|0;if(G|0){M=f[G+4>>2]|0;G=ha+-1|0;if(G&ha)if(M>>>0<ha>>>0)ja=M;else ja=(M>>>0)%(ha>>>0)|0;else ja=M&G;ka=(f[i>>2]|0)+(ja<<2)|0;ba=53}}else{f[L>>2]=f[r>>2];ka=r;ba=53}if((ba|0)==53){ba=0;f[ka>>2]=L}f[t>>2]=(f[t>>2]|0)+1;ba=55}if((ba|0)==55){ba=0;r=w;G=f[r>>2]|0;M=In(G|0,f[r+4>>2]|0,B|0,0)|0;eh((f[f[x>>2]>>2]|0)+M|0,j|0,G|0)|0;G=f[k>>2]|0;f[G+(A<<2)>>2]=B;S=G;T=B+1|0;U=G;V=G;X=G}G=A+1|0;la=f[m>>2]|0;if(G>>>0>=la>>>0)break;e=f[o>>2]|0;z=S;A=G;B=T;C=V;D=U;E=X}if((T|0)==(la|0))ma=V;else{V=a+84|0;if(!(b[V>>0]|0)){X=f[a+72>>2]|0;E=f[a+68>>2]|0;D=E;if((X|0)==(E|0))na=S;else{C=X-E>>2;E=0;do{X=D+(E<<2)|0;f[X>>2]=f[U+(f[X>>2]<<2)>>2];E=E+1|0}while(E>>>0<C>>>0);na=S}}else{b[V>>0]=0;V=a+68|0;S=a+72|0;C=f[S>>2]|0;E=f[V>>2]|0;U=C-E>>2;D=E;E=C;if(la>>>0<=U>>>0)if(la>>>0<U>>>0?(C=D+(la<<2)|0,(C|0)!=(E|0)):0){f[S>>2]=E+(~((E+-4-C|0)>>>2)<<2);oa=la}else oa=la;else{zh(V,la-U|0,1332);oa=f[m>>2]|0}U=f[k>>2]|0;if(!oa)na=U;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[U+(a<<2)>>2];a=a+1|0}while(a>>>0<oa>>>0);na=U}}f[m>>2]=T;ma=na}if(!ma)pa=T;else{na=f[p>>2]|0;if((na|0)!=(ma|0))f[p>>2]=na+(~((na+-4-ma|0)>>>2)<<2);ur(ma);pa=T}}else pa=0;T=f[i+8>>2]|0;if(T|0){ma=T;do{T=ma;ma=f[ma>>2]|0;ur(T)}while((ma|0)!=0)}ma=f[i>>2]|0;f[i>>2]=0;if(!ma){u=g;return pa|0}ur(ma);u=g;return pa|0}function dc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=Oa,K=Oa,L=Oa,M=0,N=0,O=0,P=0;e=u;u=u+64|0;g=e+40|0;i=e+16|0;j=e;k=Kd(a,c)|0;if(k|0){f[i>>2]=k;f[g>>2]=f[i>>2];lf(a,g)|0}f[j>>2]=0;k=j+4|0;f[k>>2]=0;f[j+8>>2]=0;Di(j,4);l=f[j>>2]|0;m=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[l>>0]=m;b[l+1>>0]=m>>8;b[l+2>>0]=m>>16;b[l+3>>0]=m>>24;oj(i,c);c=i+12|0;f[c>>2]=0;m=i+16|0;f[m>>2]=0;f[i+20>>2]=0;l=f[k>>2]|0;d=f[j>>2]|0;o=l-d|0;if(!o){p=d;q=l;r=0}else{Di(c,o);p=f[j>>2]|0;q=f[k>>2]|0;r=f[c>>2]|0}eh(r|0,p|0,q-p|0)|0;p=i+11|0;q=b[p>>0]|0;r=q<<24>>24<0;c=r?f[i>>2]|0:i;o=r?f[i+4>>2]|0:q&255;if(o>>>0>3){q=c;r=o;l=o;while(1){d=X(h[q>>0]|h[q+1>>0]<<8|h[q+2>>0]<<16|h[q+3>>0]<<24,1540483477)|0;r=(X(d>>>24^d,1540483477)|0)^(X(r,1540483477)|0);l=l+-4|0;if(l>>>0<=3)break;else q=q+4|0}q=o+-4|0;l=q&-4;s=q-l|0;t=c+(l+4)|0;v=r}else{s=o;t=c;v=o}switch(s|0){case 3:{w=h[t+2>>0]<<16^v;x=10;break}case 2:{w=v;x=10;break}case 1:{y=v;x=11;break}default:z=v}if((x|0)==10){y=h[t+1>>0]<<8^w;x=11}if((x|0)==11)z=X(y^h[t>>0],1540483477)|0;t=X(z>>>13^z,1540483477)|0;z=t>>>15^t;t=a+4|0;y=f[t>>2]|0;w=(y|0)==0;a:do if(!w){v=y+-1|0;s=(v&y|0)==0;if(!s)if(z>>>0<y>>>0)A=z;else A=(z>>>0)%(y>>>0)|0;else A=z&v;r=f[(f[a>>2]|0)+(A<<2)>>2]|0;if((r|0)!=0?(l=f[r>>2]|0,(l|0)!=0):0){r=(o|0)==0;if(s){if(r){s=l;while(1){q=f[s+4>>2]|0;if(!((q|0)==(z|0)|(q&v|0)==(A|0))){B=A;x=52;break a}q=b[s+8+11>>0]|0;if(!((q<<24>>24<0?f[s+12>>2]|0:q&255)|0))break a;s=f[s>>2]|0;if(!s){B=A;x=52;break a}}}else C=l;while(1){s=f[C+4>>2]|0;if(!((s|0)==(z|0)|(s&v|0)==(A|0))){B=A;x=52;break a}s=C+8|0;q=b[s+11>>0]|0;d=q<<24>>24<0;D=q&255;do if(((d?f[C+12>>2]|0:D)|0)==(o|0)){q=f[s>>2]|0;if(d)if(!(dl(q,c,o)|0))break a;else break;if((b[c>>0]|0)==(q&255)<<24>>24){q=s;E=D;F=c;do{E=E+-1|0;q=q+1|0;if(!E)break a;F=F+1|0}while((b[q>>0]|0)==(b[F>>0]|0))}}while(0);C=f[C>>2]|0;if(!C){B=A;x=52;break a}}}if(r){v=l;while(1){D=f[v+4>>2]|0;if((D|0)!=(z|0)){if(D>>>0<y>>>0)G=D;else G=(D>>>0)%(y>>>0)|0;if((G|0)!=(A|0)){B=A;x=52;break a}}D=b[v+8+11>>0]|0;if(!((D<<24>>24<0?f[v+12>>2]|0:D&255)|0))break a;v=f[v>>2]|0;if(!v){B=A;x=52;break a}}}else H=l;while(1){v=f[H+4>>2]|0;if((v|0)!=(z|0)){if(v>>>0<y>>>0)I=v;else I=(v>>>0)%(y>>>0)|0;if((I|0)!=(A|0)){B=A;x=52;break a}}v=H+8|0;r=b[v+11>>0]|0;D=r<<24>>24<0;s=r&255;do if(((D?f[H+12>>2]|0:s)|0)==(o|0)){r=f[v>>2]|0;if(D)if(!(dl(r,c,o)|0))break a;else break;if((b[c>>0]|0)==(r&255)<<24>>24){r=v;d=s;F=c;do{d=d+-1|0;r=r+1|0;if(!d)break a;F=F+1|0}while((b[r>>0]|0)==(b[F>>0]|0))}}while(0);H=f[H>>2]|0;if(!H){B=A;x=52;break}}}else{B=A;x=52}}else{B=0;x=52}while(0);if((x|0)==52){mi(g,a,z,i);x=a+12|0;J=$(((f[x>>2]|0)+1|0)>>>0);K=$(y>>>0);L=$(n[a+16>>2]);do if(w|$(L*K)<J){A=y<<1|(y>>>0<3|(y+-1&y|0)!=0)&1;H=~~$(W($(J/L)))>>>0;bi(a,A>>>0<H>>>0?H:A);A=f[t>>2]|0;H=A+-1|0;if(!(H&A)){M=A;N=H&z;break}if(z>>>0<A>>>0){M=A;N=z}else{M=A;N=(z>>>0)%(A>>>0)|0}}else{M=y;N=B}while(0);B=f[(f[a>>2]|0)+(N<<2)>>2]|0;if(!B){y=a+8|0;f[f[g>>2]>>2]=f[y>>2];f[y>>2]=f[g>>2];f[(f[a>>2]|0)+(N<<2)>>2]=y;y=f[g>>2]|0;N=f[y>>2]|0;if(!N)O=g;else{z=f[N+4>>2]|0;N=M+-1|0;if(N&M)if(z>>>0<M>>>0)P=z;else P=(z>>>0)%(M>>>0)|0;else P=z&N;f[(f[a>>2]|0)+(P<<2)>>2]=y;O=g}}else{f[f[g>>2]>>2]=f[B>>2];f[B>>2]=f[g>>2];O=g}f[x>>2]=(f[x>>2]|0)+1;f[O>>2]=0}O=f[i+12>>2]|0;if(O|0){if((f[m>>2]|0)!=(O|0))f[m>>2]=O;ur(O)}if((b[p>>0]|0)<0)ur(f[i>>2]|0);i=f[j>>2]|0;if(!i){u=e;return}if((f[k>>2]|0)!=(i|0))f[k>>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<24>>24:0){O=L;break c}L=f[L>>2]|0;if(!L)break b}}else{L=K;while(1){N=f[L+4>>2]|0;if((N|0)==(p|0)){if((b[L+8>>0]|0)==E<<24>>24){O=L;break c}}else{if(N>>>0<d>>>0)P=N;else P=(N>>>0)%(d>>>0)|0;if((P|0)!=(G|0))break b}L=f[L>>2]|0;if(!L)break b}}while(0);f[C+(y<<2)>>2]=f[O+12>>2];Q=x;R=z;S=B;T=A;U=C;break a}while(0);if(!F)if(p>>>0<d>>>0)V=p;else V=(p>>>0)%(d>>>0)|0;else V=D&p;J=f[H+(V<<2)>>2]|0;if(!J){X=V;Y=d;Z=0;_=40}else{if(F){K=J;while(1){K=f[K>>2]|0;if(!K){X=V;Y=d;Z=0;_=40;break a}L=f[K+4>>2]|0;if(!((L|0)==(p|0)|(L&D|0)==(V|0))){X=V;Y=d;Z=0;_=40;break a}if((b[K+8>>0]|0)==E<<24>>24){_=55;break a}}}else aa=J;while(1){aa=f[aa>>2]|0;if(!aa){X=V;Y=d;Z=0;_=40;break a}K=f[aa+4>>2]|0;if((K|0)!=(p|0)){if(K>>>0<d>>>0)ba=K;else ba=(K>>>0)%(d>>>0)|0;if((ba|0)!=(V|0)){X=V;Y=d;Z=0;_=40;break a}}if((b[aa+8>>0]|0)==E<<24>>24){_=55;break}}}}else{X=0;Y=0;Z=1;_=40}while(0);if((_|0)==40){_=0;J=yn(16)|0;b[J+8>>0]=E;f[J+12>>2]=z;f[J+4>>2]=p;f[J>>2]=0;ca=$(((f[r>>2]|0)+1|0)>>>0);da=$(Y>>>0);ea=$(n[j>>2]);do if(Z|$(ea*da)<ca){K=Y<<1|(Y>>>0<3|(Y+-1&Y|0)!=0)&1;D=~~$(W($(ca/ea)))>>>0;_h(g,K>>>0<D>>>0?D:K);K=f[l>>2]|0;D=K+-1|0;if(!(D&K)){fa=K;ga=D&p;break}if(p>>>0<K>>>0){fa=K;ga=p}else{fa=K;ga=(p>>>0)%(K>>>0)|0}}else{fa=Y;ga=X}while(0);p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|0;G=(E&d|0)==0;if(!G)if(F>>>0<d>>>0)H=F;else H=(F>>>0)%(d>>>0)|0;else H=E&F;J=f[g>>2]|0;K=f[J+(H<<2)>>2]|0;b:do if(K|0?(L=f[K>>2]|0,L|0):0){c:do if(G){M=L;while(1){N=f[M+4>>2]|0;O=(N|0)==(F|0);if(!(O|(N&E|0)==(H|0)))break b;if(O?(f[M+8>>2]|0)==(q|0):0){P=M;break c}M=f[M>>2]|0;if(!M)break b}}else{M=L;while(1){O=f[M+4>>2]|0;if((O|0)==(F|0)){if((f[M+8>>2]|0)==(q|0)){P=M;break c}}else{if(O>>>0<d>>>0)Q=O;else Q=(O>>>0)%(d>>>0)|0;if((Q|0)!=(H|0))break b}M=f[M>>2]|0;if(!M)break b}}while(0);f[D+(z<<2)>>2]=f[P+12>>2];R=y;S=A;T=C;U=B;V=D;break a}while(0);if(!G)if(F>>>0<d>>>0)X=F;else X=(F>>>0)%(d>>>0)|0;else X=E&F;K=f[J+(X<<2)>>2]|0;if(!K){Y=X;Z=d;_=0;aa=40}else{if(G){L=K;while(1){L=f[L>>2]|0;if(!L){Y=X;Z=d;_=0;aa=40;break a}M=f[L+4>>2]|0;if(!((M|0)==(F|0)|(M&E|0)==(X|0))){Y=X;Z=d;_=0;aa=40;break a}if((f[L+8>>2]|0)==(q|0)){aa=55;break a}}}else ba=K;while(1){ba=f[ba>>2]|0;if(!ba){Y=X;Z=d;_=0;aa=40;break a}L=f[ba+4>>2]|0;if((L|0)!=(F|0)){if(L>>>0<d>>>0)ca=L;else ca=(L>>>0)%(d>>>0)|0;if((ca|0)!=(X|0)){Y=X;Z=d;_=0;aa=40;break a}}if((f[ba+8>>2]|0)==(q|0)){aa=55;break}}}}else{Y=0;Z=0;_=1;aa=40}while(0);if((aa|0)==40){aa=0;K=yn(16)|0;f[K+8>>2]=q;f[K+12>>2]=A;f[K+4>>2]=F;f[K>>2]=0;da=$(((f[s>>2]|0)+1|0)>>>0);ea=$(Z>>>0);fa=$(n[k>>2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0)):0){f[R>>2]=D+(~((D+-4-B|0)>>>2)<<2);na=ka}else na=ka;else{zh(U,ka-T|0,1332);na=f[l>>2]|0}T=f[j>>2]|0;if(!na)ma=T;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[T+(a<<2)>>2];a=a+1|0}while(a>>>0<na>>>0);ma=T}}f[l>>2]=S;la=ma}if(!la)oa=S;else{ma=f[o>>2]|0;if((ma|0)!=(la|0))f[o>>2]=ma+(~((ma+-4-la|0)>>>2)<<2);ur(la);oa=S}}else oa=0;S=f[g+8>>2]|0;if(S|0){la=S;do{S=la;la=f[la>>2]|0;ur(S)}while((la|0)!=0)}la=f[g>>2]|0;f[g>>2]=0;if(!la){u=e;return oa|0}ur(la);u=e;return oa|0}function gc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0;e=u;u=u+96|0;g=e+92|0;h=e+88|0;i=e+72|0;j=e+48|0;k=e+24|0;l=e;m=a+16|0;n=f[m>>2]|0;o=f[c>>2]|0;f[i>>2]=n;f[i+4>>2]=o;c=i+8|0;f[c>>2]=o;b[i+12>>0]=1;p=f[(f[n+28>>2]|0)+(o<<2)>>2]|0;n=a+20|0;q=f[n>>2]|0;r=f[q>>2]|0;if((f[q+4>>2]|0)-r>>2>>>0<=p>>>0)Fq(q);q=a+8|0;s=f[(f[q>>2]|0)+(f[r+(p<<2)>>2]<<2)>>2]|0;p=a+4|0;r=f[p>>2]|0;if(!(b[r+84>>0]|0))t=f[(f[r+68>>2]|0)+(s<<2)>>2]|0;else t=s;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;f[j+16>>2]=0;f[j+20>>2]=0;f[h>>2]=t;t=b[r+24>>0]|0;f[g>>2]=f[h>>2];vb(r,g,t,j)|0;t=a+28|0;a=(f[t>>2]|0)==0;a:do if((o|0)!=-1){r=k+8|0;s=j+8|0;v=k+16|0;w=j+16|0;x=l+8|0;y=l+16|0;z=o;A=o;B=0;C=0;D=0;E=0;F=0;G=0;H=a;J=o;while(1){do if(H){K=J+1|0;if((J|0)!=-1){L=((K>>>0)%3|0|0)==0?J+-2|0:K;if((z|0)!=-1)if(!((z>>>0)%3|0)){M=z;N=z+2|0;O=L;P=z;break}else{M=z;N=z+-1|0;O=L;P=z;break}else{M=-1;N=-1;O=L;P=-1}}else{M=z;N=-1;O=-1;P=-1}}else{L=A+1|0;K=((L>>>0)%3|0|0)==0?A+-2|0:L;if(!((A>>>0)%3|0)){M=z;N=A+2|0;O=K;P=J;break}else{M=z;N=A+-1|0;O=K;P=J;break}}while(0);K=f[(f[(f[m>>2]|0)+28>>2]|0)+(O<<2)>>2]|0;Q=f[n>>2]|0;L=f[Q>>2]|0;if((f[Q+4>>2]|0)-L>>2>>>0<=K>>>0){R=17;break}S=f[(f[q>>2]|0)+(f[L+(K<<2)>>2]<<2)>>2]|0;K=f[p>>2]|0;if(!(b[K+84>>0]|0))T=f[(f[K+68>>2]|0)+(S<<2)>>2]|0;else T=S;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[h>>2]=T;S=b[K+24>>0]|0;f[g>>2]=f[h>>2];vb(K,g,S,k)|0;S=f[(f[(f[m>>2]|0)+28>>2]|0)+(N<<2)>>2]|0;U=f[n>>2]|0;K=f[U>>2]|0;if((f[U+4>>2]|0)-K>>2>>>0<=S>>>0){R=21;break}L=f[(f[q>>2]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;break a}else{z=M;B=ga;C=Z;D=$;E=ca;F=X;G=L;H=K;J=P}}if((R|0)==17)Fq(Q);else if((R|0)==21)Fq(U)}else{ia=a;ja=0;ka=0;la=0;ma=0;na=0;oa=0}while(0);a=(ja|0)>-1|(ja|0)==-1&ka>>>0>4294967295;U=no(0,0,ka|0,ja|0)|0;R=a?ja:I;Q=(la|0)>-1|(la|0)==-1&ma>>>0>4294967295;P=no(0,0,ma|0,la|0)|0;M=Q?la:I;t=(na|0)>-1|(na|0)==-1&oa>>>0>4294967295;c=no(0,0,oa|0,na|0)|0;i=lo((Q?ma:P)|0,M|0,(t?oa:c)|0,(t?na:I)|0)|0;t=lo(i|0,I|0,(a?ka:U)|0,R|0)|0;R=I;if(ia){if((t|0)<=536870912){pa=ka;qa=ma;ra=oa;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}ia=oo(t|0,R|0,29)|0;U=ia&7;ia=Ok(ka|0,ja|0,U|0,0)|0;a=Ok(ma|0,la|0,U|0,0)|0;i=Ok(oa|0,na|0,U|0,0)|0;pa=ia;qa=a;ra=i;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}else{if(!((R|0)>0|(R|0)==0&t>>>0>536870912)){pa=ka;qa=ma;ra=oa;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}i=oo(t|0,R|0,29)|0;R=I;t=Ok(ka|0,ja|0,i|0,R|0)|0;ja=Ok(ma|0,la|0,i|0,R|0)|0;la=Ok(oa|0,na|0,i|0,R|0)|0;pa=t;qa=ja;ra=la;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}}function hc(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,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else N=K&L;O=f[(f[i>>2]|0)+(N<<2)>>2]|0;if((O|0)!=0?(P=f[O>>2]|0,(P|0)!=0):0){if(M){M=P;while(1){O=f[M+4>>2]|0;if(!((O|0)==(K|0)|(O&L|0)==(N|0))){Q=N;R=31;break a}O=M+8|0;if((((d[O>>1]|0)==A<<16>>16?(d[O+2>>1]|0)==F<<16>>16:0)?(d[M+12>>1]|0)==G<<16>>16:0)?(d[O+6>>1]|0)==J<<16>>16:0)break a;M=f[M>>2]|0;if(!M){Q=N;R=31;break a}}}else S=P;while(1){M=f[S+4>>2]|0;if((M|0)!=(K|0)){if(M>>>0<H>>>0)T=M;else T=(M>>>0)%(H>>>0)|0;if((T|0)!=(N|0)){Q=N;R=31;break a}}M=S+8|0;if((((d[M>>1]|0)==A<<16>>16?(d[M+2>>1]|0)==F<<16>>16:0)?(d[S+12>>1]|0)==G<<16>>16:0)?(d[M+6>>1]|0)==J<<16>>16:0)break a;S=f[S>>2]|0;if(!S){Q=N;R=31;break}}}else{Q=N;R=31}}else{Q=0;R=31}while(0);if((R|0)==31){R=0;J=yn(20)|0;G=J+8|0;F=G;d[F>>1]=B;d[F+2>>1]=B>>>16;F=G+4|0;d[F>>1]=D;d[F+2>>1]=D>>>16;f[J+16>>2]=z;f[J+4>>2]=K;f[J>>2]=0;U=$(((f[p>>2]|0)+1|0)>>>0);V=$(H>>>0);X=$(n[m>>2]);do if(E|$(X*V)<U){F=H<<1|(H>>>0<3|(H+-1&H|0)!=0)&1;G=~~$(W($(U/X)))>>>0;Qh(i,F>>>0<G>>>0?G:F);F=f[s>>2]|0;G=F+-1|0;if(!(G&F)){Y=F;Z=G&K;break}if(K>>>0<F>>>0){Y=F;Z=K}else{Y=F;Z=(K>>>0)%(F>>>0)|0}}else{Y=H;Z=Q}while(0);H=(f[i>>2]|0)+(Z<<2)|0;K=f[H>>2]|0;if(!K){f[J>>2]=f[v>>2];f[v>>2]=J;f[H>>2]=v;H=f[J>>2]|0;if(H|0){E=f[H+4>>2]|0;H=Y+-1|0;if(H&Y)if(E>>>0<Y>>>0)_=E;else _=(E>>>0)%(Y>>>0)|0;else _=E&H;aa=(f[i>>2]|0)+(_<<2)|0;R=44}}else{f[J>>2]=f[K>>2];aa=K;R=44}if((R|0)==44){R=0;f[aa>>2]=J}f[p>>2]=(f[p>>2]|0)+1}K=w;H=f[K>>2]|0;E=In(H|0,f[K+4>>2]|0,z|0,0)|0;eh((f[f[x>>2]>>2]|0)+E|0,j|0,H|0)|0;H=f[l>>2]|0;f[H+(y<<2)>>2]=z;ba=z+1|0;ca=H}else{H=f[l>>2]|0;f[H+(y<<2)>>2]=f[C+16>>2];ba=z;ca=H}y=y+1|0;da=f[o>>2]|0;if(y>>>0>=da>>>0)break;else z=ba}if((ba|0)==(da|0))ea=ca;else{z=a+84|0;if(!(b[z>>0]|0)){y=f[a+72>>2]|0;j=f[a+68>>2]|0;x=j;if((y|0)==(j|0))fa=ca;else{w=y-j>>2;j=0;do{y=x+(j<<2)|0;f[y>>2]=f[ca+(f[y>>2]<<2)>>2];j=j+1|0}while(j>>>0<w>>>0);fa=ca}}else{b[z>>0]=0;z=a+68|0;ca=a+72|0;w=f[ca>>2]|0;j=f[z>>2]|0;x=w-j>>2;y=j;j=w;if(da>>>0<=x>>>0)if(da>>>0<x>>>0?(w=y+(da<<2)|0,(w|0)!=(j|0)):0){f[ca>>2]=j+(~((j+-4-w|0)>>>2)<<2);ga=da}else ga=da;else{zh(z,da-x|0,1332);ga=f[o>>2]|0}x=f[l>>2]|0;if(!ga)fa=x;else{l=f[a+68>>2]|0;a=0;do{f[l+(a<<2)>>2]=f[x+(a<<2)>>2];a=a+1|0}while(a>>>0<ga>>>0);fa=x}}f[o>>2]=ba;ea=fa}if(!ea)ha=ba;else{fa=f[q>>2]|0;if((fa|0)!=(ea|0))f[q>>2]=fa+(~((fa+-4-ea|0)>>>2)<<2);ur(ea);ha=ba}}else ha=0;ba=f[i+8>>2]|0;if(ba|0){ea=ba;do{ba=ea;ea=f[ea>>2]|0;ur(ba)}while((ea|0)!=0)}ea=f[i>>2]|0;f[i>>2]=0;if(!ea){u=g;return ha|0}ur(ea);u=g;return ha|0}function ic(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;c=u;u=u+16|0;d=c+8|0;e=c;g=c+4|0;h=a+16|0;i=f[h>>2]|0;j=a+20|0;k=f[j>>2]|0;if((k|0)==(i|0))l=i;else{m=k+(~((k+-4-i|0)>>>2)<<2)|0;f[j>>2]=m;l=m}m=a+24|0;if((l|0)==(f[m>>2]|0)){Oi(h,b);n=f[h>>2]|0;o=f[j>>2]|0}else{f[l>>2]=f[b>>2];k=l+4|0;f[j>>2]=k;n=i;o=k}k=f[a+8>>2]|0;i=(f[k+100>>2]|0)-(f[k+96>>2]|0)|0;k=(i|0)/12|0;if((n|0)==(o|0)){u=c;return 1}n=a+28|0;l=(i|0)>0;i=a+164|0;p=a+12|0;q=a+76|0;r=a+80|0;s=a+72|0;t=a+152|0;v=a+84|0;w=a+272|0;x=a+276|0;y=a+268|0;z=a+168|0;A=a+140|0;B=a+120|0;C=o;do{o=f[C+-4>>2]|0;f[b>>2]=o;a:do if((o|0)!=-1?(D=(o>>>0)/3|0,E=f[n>>2]|0,(f[E+(D>>>5<<2)>>2]&1<<(D&31)|0)==0):0){if(l){D=0;F=E;b:while(1){E=D+1|0;f[i>>2]=(f[i>>2]|0)+1;G=f[b>>2]|0;H=(G|0)==-1?-1:(G>>>0)/3|0;G=F+(H>>>5<<2)|0;f[G>>2]=1<<(H&31)|f[G>>2];G=f[q>>2]|0;if((G|0)==(f[r>>2]|0))Oi(s,b);else{f[G>>2]=f[b>>2];f[q>>2]=G+4}G=f[b>>2]|0;if((G|0)==-1)I=-1;else I=f[(f[f[p>>2]>>2]|0)+(G<<2)>>2]|0;J=(f[(f[t>>2]|0)+(I<<2)>>2]|0)!=-1;K=(f[v>>2]|0)+(I>>>5<<2)|0;L=1<<(I&31);M=f[K>>2]|0;do if(!(M&L)){f[K>>2]=M|L;if(J){N=f[b>>2]|0;O=30;break}f[d>>2]=0;P=f[w>>2]|0;if((P|0)==(f[x>>2]|0))Oi(y,d);else{f[P>>2]=0;f[w>>2]=P+4}P=f[b>>2]|0;Q=P+1|0;if((P|0)!=-1?(R=((Q>>>0)%3|0|0)==0?P+-2|0:Q,(R|0)!=-1):0)S=f[(f[(f[p>>2]|0)+12>>2]|0)+(R<<2)>>2]|0;else S=-1;f[b>>2]=S}else{N=G;O=30}while(0);if((O|0)==30){O=0;G=N+1|0;if((N|0)==-1){O=35;break}L=((G>>>0)%3|0|0)==0?N+-2|0:G;if((L|0)==-1)T=-1;else T=f[(f[(f[p>>2]|0)+12>>2]|0)+(L<<2)>>2]|0;f[e>>2]=T;L=(((N>>>0)%3|0|0)==0?2:-1)+N|0;if((L|0)==-1)U=-1;else U=f[(f[(f[p>>2]|0)+12>>2]|0)+(L<<2)>>2]|0;L=(T|0)==-1;M=L?-1:(T>>>0)/3|0;V=(U|0)==-1;W=V?-1:(U>>>0)/3|0;K=((G>>>0)%3|0|0)==0?N+-2|0:G;if(((K|0)!=-1?(G=f[(f[p>>2]|0)+12>>2]|0,R=f[G+(K<<2)>>2]|0,(R|0)!=-1):0)?(K=(R>>>0)/3|0,R=f[n>>2]|0,(f[R+(K>>>5<<2)>>2]&1<<(K&31)|0)==0):0){K=(((N>>>0)%3|0|0)==0?2:-1)+N|0;do if((K|0)!=-1){Q=f[G+(K<<2)>>2]|0;if((Q|0)==-1)break;P=(Q>>>0)/3|0;if(!(f[R+(P>>>5<<2)>>2]&1<<(P&31))){O=63;break b}}while(0);if(!V)yf(a,f[i>>2]|0,H,0,W);f[d>>2]=3;R=f[w>>2]|0;if((R|0)==(f[x>>2]|0))Oi(y,d);else{f[R>>2]=3;f[w>>2]=R+4}X=f[e>>2]|0}else{if(!L){yf(a,f[i>>2]|0,H,1,M);R=f[b>>2]|0;if((R|0)==-1){O=44;break}else Y=R}else Y=N;R=(((Y>>>0)%3|0|0)==0?2:-1)+Y|0;if((R|0)==-1){O=44;break}K=f[(f[(f[p>>2]|0)+12>>2]|0)+(R<<2)>>2]|0;if((K|0)==-1){O=44;break}R=(K>>>0)/3|0;if(f[(f[n>>2]|0)+(R>>>5<<2)>>2]&1<<(R&31)|0){O=44;break}f[d>>2]=5;R=f[w>>2]|0;if((R|0)==(f[x>>2]|0))Oi(y,d);else{f[R>>2]=5;f[w>>2]=R+4}X=U}f[b>>2]=X}if((E|0)>=(k|0))break a;D=E;F=f[n>>2]|0}do if((O|0)==35){O=0;f[e>>2]=-1;O=46}else if((O|0)==44){O=0;if(V)O=46;else{yf(a,f[i>>2]|0,H,0,W);O=46}}else if((O|0)==63){O=0;f[d>>2]=1;F=f[w>>2]|0;if((F|0)==(f[x>>2]|0))Oi(y,d);else{f[F>>2]=1;f[w>>2]=F+4}f[z>>2]=(f[z>>2]|0)+1;if(J?(F=f[(f[t>>2]|0)+(I<<2)>>2]|0,(1<<(F&31)&f[(f[A>>2]|0)+(F>>>5<<2)>>2]|0)==0):0){f[g>>2]=f[b>>2];f[d>>2]=f[g>>2];Oe(a,d,0)|0}F=f[i>>2]|0;f[d>>2]=H;D=ce(B,d)|0;f[D>>2]=F;F=f[j>>2]|0;f[F+-4>>2]=U;if((F|0)==(f[m>>2]|0)){Oi(h,e);break}else{f[F>>2]=f[e>>2];f[j>>2]=F+4;break}}while(0);if((O|0)==46){O=0;f[d>>2]=7;F=f[w>>2]|0;if((F|0)==(f[x>>2]|0))Oi(y,d);else{f[F>>2]=7;f[w>>2]=F+4}f[j>>2]=(f[j>>2]|0)+-4}}}else O=11;while(0);if((O|0)==11){O=0;f[j>>2]=C+-4}C=f[j>>2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|0;else N=E&L;O=f[(f[g>>2]|0)+(N<<2)>>2]|0;if((O|0)!=0?(P=f[O>>2]|0,(P|0)!=0):0){if(M){M=P;while(1){O=f[M+4>>2]|0;if(!((O|0)==(E|0)|(O&L|0)==(N|0))){Q=N;R=31;break a}O=M+8|0;if((((b[O>>0]|0)==A<<24>>24?(b[O+1>>0]|0)==D<<24>>24:0)?(b[O+2>>0]|0)==F<<24>>24:0)?(b[O+3>>0]|0)==H<<24>>24:0)break a;M=f[M>>2]|0;if(!M){Q=N;R=31;break a}}}else S=P;while(1){M=f[S+4>>2]|0;if((M|0)!=(E|0)){if(M>>>0<G>>>0)T=M;else T=(M>>>0)%(G>>>0)|0;if((T|0)!=(N|0)){Q=N;R=31;break a}}M=S+8|0;if((((b[M>>0]|0)==A<<24>>24?(b[M+1>>0]|0)==D<<24>>24:0)?(b[M+2>>0]|0)==F<<24>>24:0)?(b[M+3>>0]|0)==H<<24>>24:0)break a;S=f[S>>2]|0;if(!S){Q=N;R=31;break}}}else{Q=N;R=31}}else{Q=0;R=31}while(0);if((R|0)==31){R=0;H=yn(16)|0;F=H+8|0;D=B&-16776961|C<<16|J<<8;b[F>>0]=D;b[F+1>>0]=D>>8;b[F+2>>0]=D>>16;b[F+3>>0]=D>>24;f[H+12>>2]=y;f[H+4>>2]=E;f[H>>2]=0;U=$(((f[o>>2]|0)+1|0)>>>0);V=$(G>>>0);X=$(n[l>>2]);do if(K|$(X*V)<U){D=G<<1|(G>>>0<3|(G+-1&G|0)!=0)&1;F=~~$(W($(U/X)))>>>0;Xh(g,D>>>0<F>>>0?F:D);D=f[r>>2]|0;F=D+-1|0;if(!(F&D)){Y=D;Z=F&E;break}if(E>>>0<D>>>0){Y=D;Z=E}else{Y=D;Z=(E>>>0)%(D>>>0)|0}}else{Y=G;Z=Q}while(0);G=(f[g>>2]|0)+(Z<<2)|0;E=f[G>>2]|0;if(!E){f[H>>2]=f[t>>2];f[t>>2]=H;f[G>>2]=t;G=f[H>>2]|0;if(G|0){K=f[G+4>>2]|0;G=Y+-1|0;if(G&Y)if(K>>>0<Y>>>0)_=K;else _=(K>>>0)%(Y>>>0)|0;else _=K&G;aa=(f[g>>2]|0)+(_<<2)|0;R=44}}else{f[H>>2]=f[E>>2];aa=E;R=44}if((R|0)==44){R=0;f[aa>>2]=H}f[o>>2]=(f[o>>2]|0)+1}E=v;G=f[E>>2]|0;K=In(G|0,f[E+4>>2]|0,y|0,0)|0;eh((f[f[w>>2]>>2]|0)+K|0,i|0,G|0)|0;G=f[k>>2]|0;f[G+(x<<2)>>2]=y;ba=y+1|0;ca=G}else{G=f[k>>2]|0;f[G+(x<<2)>>2]=f[z+12>>2];ba=y;ca=G}x=x+1|0;da=f[m>>2]|0;if(x>>>0>=da>>>0)break;else y=ba}if((ba|0)==(da|0))ea=ca;else{y=a+84|0;if(!(b[y>>0]|0)){x=f[a+72>>2]|0;i=f[a+68>>2]|0;w=i;if((x|0)==(i|0))fa=ca;else{v=x-i>>2;i=0;do{x=w+(i<<2)|0;f[x>>2]=f[ca+(f[x>>2]<<2)>>2];i=i+1|0}while(i>>>0<v>>>0);fa=ca}}else{b[y>>0]=0;y=a+68|0;ca=a+72|0;v=f[ca>>2]|0;i=f[y>>2]|0;w=v-i>>2;x=i;i=v;if(da>>>0<=w>>>0)if(da>>>0<w>>>0?(v=x+(da<<2)|0,(v|0)!=(i|0)):0){f[ca>>2]=i+(~((i+-4-v|0)>>>2)<<2);ga=da}else ga=da;else{zh(y,da-w|0,1332);ga=f[m>>2]|0}w=f[k>>2]|0;if(!ga)fa=w;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[w+(a<<2)>>2];a=a+1|0}while(a>>>0<ga>>>0);fa=w}}f[m>>2]=ba;ea=fa}if(!ea)ha=ba;else{fa=f[p>>2]|0;if((fa|0)!=(ea|0))f[p>>2]=fa+(~((fa+-4-ea|0)>>>2)<<2);ur(ea);ha=ba}}else ha=0;ba=f[g+8>>2]|0;if(ba|0){ea=ba;do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J|0)==0;a:do if(!K){L=J+-1|0;M=(L&J|0)==0;if(!M)if(H>>>0<J>>>0)N=H;else N=(H>>>0)%(J>>>0)|0;else N=H&L;O=f[(f[g>>2]|0)+(N<<2)>>2]|0;if((O|0)!=0?(P=f[O>>2]|0,(P|0)!=0):0){if(M){M=P;while(1){O=f[M+4>>2]|0;if(!((O|0)==(H|0)|(O&L|0)==(N|0))){Q=N;R=31;break a}if((((f[M+8>>2]|0)==(B|0)?(f[M+12>>2]|0)==(E|0):0)?(f[M+16>>2]|0)==(F|0):0)?(f[M+20>>2]|0)==(G|0):0)break a;M=f[M>>2]|0;if(!M){Q=N;R=31;break a}}}else S=P;while(1){M=f[S+4>>2]|0;if((M|0)!=(H|0)){if(M>>>0<J>>>0)T=M;else T=(M>>>0)%(J>>>0)|0;if((T|0)!=(N|0)){Q=N;R=31;break a}}if((((f[S+8>>2]|0)==(B|0)?(f[S+12>>2]|0)==(E|0):0)?(f[S+16>>2]|0)==(F|0):0)?(f[S+20>>2]|0)==(G|0):0)break a;S=f[S>>2]|0;if(!S){Q=N;R=31;break}}}else{Q=N;R=31}}else{Q=0;R=31}while(0);if((R|0)==31){R=0;D=yn(28)|0;f[D+8>>2]=B;f[D+12>>2]=E;f[D+16>>2]=F;f[D+20>>2]=G;f[D+24>>2]=z;f[D+4>>2]=H;f[D>>2]=0;U=$(((f[v>>2]|0)+1|0)>>>0);V=$(J>>>0);X=$(n[k>>2]);do if(K|$(X*V)<U){P=J<<1|(J>>>0<3|(J+-1&J|0)!=0)&1;M=~~$(W($(U/X)))>>>0;Uh(g,P>>>0<M>>>0?M:P);P=f[t>>2]|0;M=P+-1|0;if(!(M&P)){Y=P;Z=M&H;break}if(H>>>0<P>>>0){Y=P;Z=H}else{Y=P;Z=(H>>>0)%(P>>>0)|0}}else{Y=J;Z=Q}while(0);J=(f[g>>2]|0)+(Z<<2)|0;H=f[J>>2]|0;if(!H){f[D>>2]=f[w>>2];f[w>>2]=D;f[J>>2]=w;J=f[D>>2]|0;if(J|0){K=f[J+4>>2]|0;J=Y+-1|0;if(J&Y)if(K>>>0<Y>>>0)_=K;else _=(K>>>0)%(Y>>>0)|0;else _=K&J;aa=(f[g>>2]|0)+(_<<2)|0;R=44}}else{f[D>>2]=f[H>>2];aa=H;R=44}if((R|0)==44){R=0;f[aa>>2]=D}f[v>>2]=(f[v>>2]|0)+1}H=x;J=f[H>>2]|0;K=In(J|0,f[H+4>>2]|0,z|0,0)|0;eh((f[f[y>>2]>>2]|0)+K|0,h|0,J|0)|0;J=f[j>>2]|0;f[J+(A<<2)>>2]=z;ba=z+1|0;ca=J}else{J=f[j>>2]|0;f[J+(A<<2)>>2]=f[C+24>>2];ba=z;ca=J}A=A+1|0;da=f[l>>2]|0;if(A>>>0>=da>>>0)break;else z=ba}if((ba|0)==(da|0))ea=ca;else{z=a+84|0;if(!(b[z>>0]|0)){A=f[a+72>>2]|0;h=f[a+68>>2]|0;y=h;if((A|0)==(h|0))fa=ca;else{x=A-h>>2;h=0;do{A=y+(h<<2)|0;f[A>>2]=f[ca+(f[A>>2]<<2)>>2];h=h+1|0}while(h>>>0<x>>>0);fa=ca}}else{b[z>>0]=0;z=a+68|0;ca=a+72|0;x=f[ca>>2]|0;h=f[z>>2]|0;y=x-h>>2;A=h;h=x;if(da>>>0<=y>>>0)if(da>>>0<y>>>0?(x=A+(da<<2)|0,(x|0)!=(h|0)):0){f[ca>>2]=h+(~((h+-4-x|0)>>>2)<<2);ga=da}else ga=da;else{zh(z,da-y|0,1332);ga=f[l>>2]|0}y=f[j>>2]|0;if(!ga)fa=y;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[y+(a<<2)>>2];a=a+1|0}while(a>>>0<ga>>>0);fa=y}}f[l>>2]=ba;ea=fa}if(!ea)ha=ba;else{fa=f[o>>2]|0;if((fa|0)!=(ea|0))f[o>>2]=fa+(~((fa+-4-ea|0)>>>2)<<2);ur(ea);ha=ba}}else ha=0;ba=f[g+8>>2]|0;if(ba|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F=(((B^318)&65535)+239^C&65535)+239^E&65535;G=f[t>>2]|0;H=(G|0)==0;a:do if(!H){J=G+-1|0;K=(J&G|0)==0;if(!K)if(F>>>0<G>>>0)L=F;else L=(F>>>0)%(G>>>0)|0;else L=F&J;M=f[(f[h>>2]|0)+(L<<2)>>2]|0;if((M|0)!=0?(N=f[M>>2]|0,(N|0)!=0):0){if(K){K=N;while(1){M=f[K+4>>2]|0;if(!((M|0)==(F|0)|(M&J|0)==(L|0))){O=L;P=29;break a}M=K+8|0;if(((d[M>>1]|0)==B<<16>>16?(d[M+2>>1]|0)==C<<16>>16:0)?(d[K+12>>1]|0)==E<<16>>16:0)break a;K=f[K>>2]|0;if(!K){O=L;P=29;break a}}}else Q=N;while(1){K=f[Q+4>>2]|0;if((K|0)!=(F|0)){if(K>>>0<G>>>0)R=K;else R=(K>>>0)%(G>>>0)|0;if((R|0)!=(L|0)){O=L;P=29;break a}}K=Q+8|0;if(((d[K>>1]|0)==B<<16>>16?(d[K+2>>1]|0)==C<<16>>16:0)?(d[Q+12>>1]|0)==E<<16>>16:0)break a;Q=f[Q>>2]|0;if(!Q){O=L;P=29;break}}}else{O=L;P=29}}else{O=0;P=29}while(0);if((P|0)==29){P=0;N=yn(20)|0;d[N+8>>1]=B;d[N+10>>1]=C;d[N+12>>1]=E;f[N+16>>2]=z;f[N+4>>2]=F;f[N>>2]=0;S=$(((f[v>>2]|0)+1|0)>>>0);T=$(G>>>0);U=$(n[l>>2]);do if(H|$(U*T)<S){K=G<<1|(G>>>0<3|(G+-1&G|0)!=0)&1;J=~~$(W($(S/U)))>>>0;Rh(h,K>>>0<J>>>0?J:K);K=f[t>>2]|0;J=K+-1|0;if(!(J&K)){V=K;X=J&F;break}if(F>>>0<K>>>0){V=K;X=F}else{V=K;X=(F>>>0)%(K>>>0)|0}}else{V=G;X=O}while(0);G=(f[h>>2]|0)+(X<<2)|0;F=f[G>>2]|0;if(!F){f[N>>2]=f[w>>2];f[w>>2]=N;f[G>>2]=w;G=f[N>>2]|0;if(G|0){H=f[G+4>>2]|0;G=V+-1|0;if(G&V)if(H>>>0<V>>>0)Y=H;else Y=(H>>>0)%(V>>>0)|0;else Y=H&G;Z=(f[h>>2]|0)+(Y<<2)|0;P=42}}else{f[N>>2]=f[F>>2];Z=F;P=42}if((P|0)==42){P=0;f[Z>>2]=N}f[v>>2]=(f[v>>2]|0)+1}F=x;G=f[F>>2]|0;H=In(G|0,f[F+4>>2]|0,z|0,0)|0;eh((f[f[y>>2]>>2]|0)+H|0,i|0,G|0)|0;G=f[k>>2]|0;f[G+(A<<2)>>2]=z;_=z+1|0;aa=G}else{G=f[k>>2]|0;f[G+(A<<2)>>2]=f[D+16>>2];_=z;aa=G}A=A+1|0;ba=f[m>>2]|0;if(A>>>0>=ba>>>0)break;else z=_}if((_|0)==(ba|0))ca=aa;else{z=a+84|0;if(!(b[z>>0]|0)){A=f[a+72>>2]|0;i=f[a+68>>2]|0;y=i;if((A|0)==(i|0))da=aa;else{x=A-i>>2;i=0;do{A=y+(i<<2)|0;f[A>>2]=f[aa+(f[A>>2]<<2)>>2];i=i+1|0}while(i>>>0<x>>>0);da=aa}}else{b[z>>0]=0;z=a+68|0;aa=a+72|0;x=f[aa>>2]|0;i=f[z>>2]|0;y=x-i>>2;A=i;i=x;if(ba>>>0<=y>>>0)if(ba>>>0<y>>>0?(x=A+(ba<<2)|0,(x|0)!=(i|0)):0){f[aa>>2]=i+(~((i+-4-x|0)>>>2)<<2);ea=ba}else ea=ba;else{zh(z,ba-y|0,1332);ea=f[m>>2]|0}y=f[k>>2]|0;if(!ea)da=y;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[y+(a<<2)>>2];a=a+1|0}while(a>>>0<ea>>>0);da=y}}f[m>>2]=_;ca=da}if(!ca)fa=_;else{da=f[p>>2]|0;if((da|0)!=(ca|0))f[p>>2]=da+(~((da+-4-ca|0)>>>2)<<2);ur(ca);fa=_}}else fa=0;_=f[h+8>>2]|0;if(_|0){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=X(I,e)|0;I=X(K,e)|0;K=X(J,e)|0;if(q){J=0;do{f[k+(J<<2)>>2]=(f[b+(J+K<<2)>>2]|0)+(f[b+(J+I<<2)>>2]|0)-(f[b+(J+H<<2)>>2]|0);J=J+1|0}while((J|0)!=(e|0));if(q){J=0;do{H=j+(J<<2)|0;f[H>>2]=(f[H>>2]|0)+(f[k+(J<<2)>>2]|0);J=J+1|0}while((J|0)!=(e|0))}}N=D+1|0}else N=D}else N=D;J=(((E>>>0)%3|0|0)==0?2:-1)+E|0;do if((J|0)!=-1?(H=f[p+(J<<2)>>2]|0,(H|0)!=-1):0)if(!((H>>>0)%3|0)){O=H+2|0;break}else{O=H+-1|0;break}else O=-1;while(0);E=(O|0)==(z|0)?-1:O;if((E|0)==-1)break;else D=N}D=X(B,e)|0;if(N){if(q){E=0;do{z=j+(E<<2)|0;f[z>>2]=(f[z>>2]|0)/(N|0)|0;E=E+1|0}while((E|0)!=(e|0))}E=b+(D<<2)|0;z=c+(D<<2)|0;p=f[g>>2]|0;if((p|0)>0){J=0;H=j;I=p;while(1){if((I|0)>0){p=0;do{K=f[H+(p<<2)>>2]|0;G=f[r>>2]|0;if((K|0)>(G|0)){F=f[s>>2]|0;f[F+(p<<2)>>2]=G;P=F}else{F=f[t>>2]|0;G=f[s>>2]|0;f[G+(p<<2)>>2]=(K|0)<(F|0)?F:K;P=G}p=p+1|0}while((p|0)<(f[g>>2]|0));Q=P}else Q=f[s>>2]|0;p=(f[E+(J<<2)>>2]|0)-(f[Q+(J<<2)>>2]|0)|0;G=z+(J<<2)|0;f[G>>2]=p;if((p|0)>=(f[u>>2]|0)){if((p|0)>(f[w>>2]|0)){R=p-(f[v>>2]|0)|0;S=57}}else{R=(f[v>>2]|0)+p|0;S=57}if((S|0)==57){S=0;f[G>>2]=R}J=J+1|0;I=f[g>>2]|0;if((J|0)>=(I|0))break;else H=Q}}}else{T=D;S=30}}else{T=X(B,e)|0;S=30}if((S|0)==30?(S=0,H=b+(T<<2)|0,I=c+(T<<2)|0,J=f[g>>2]|0,(J|0)>0):0){z=0;E=b+((X(A+-2|0,e)|0)<<2)|0;G=J;while(1){if((G|0)>0){J=0;do{p=f[E+(J<<2)>>2]|0;K=f[r>>2]|0;if((p|0)>(K|0)){F=f[s>>2]|0;f[F+(J<<2)>>2]=K;U=F}else{F=f[t>>2]|0;K=f[s>>2]|0;f[K+(J<<2)>>2]=(p|0)<(F|0)?F:p;U=K}J=J+1|0}while((J|0)<(f[g>>2]|0));V=U}else V=f[s>>2]|0;J=(f[H+(z<<2)>>2]|0)-(f[V+(z<<2)>>2]|0)|0;K=I+(z<<2)|0;f[K>>2]=J;if((J|0)>=(f[u>>2]|0)){if((J|0)>(f[w>>2]|0)){W=J-(f[v>>2]|0)|0;S=42}}else{W=(f[v>>2]|0)+J|0;S=42}if((S|0)==42){S=0;f[K>>2]=W}z=z+1|0;G=f[g>>2]|0;if((z|0)>=(G|0))break;else E=V}}if((A|0)<=2)break a;C=f[i>>2]|0;E=B+-1|0;if((f[l>>2]|0)-C>>2>>>0<=E>>>0)break;else{G=B;B=E;A=G}}Fq(i)}while(0);if((e|0)>0)rj(j|0,0,e<<2|0)|0;e=f[g>>2]|0;if((e|0)<=0){sr(k);sr(j);return 1}i=a+16|0;A=a+32|0;B=a+12|0;C=a+28|0;l=a+20|0;V=a+24|0;a=0;W=j;U=e;while(1){if((U|0)>0){e=0;do{T=f[W+(e<<2)>>2]|0;Q=f[i>>2]|0;if((T|0)>(Q|0)){R=f[A>>2]|0;f[R+(e<<2)>>2]=Q;Y=R}else{R=f[B>>2]|0;Q=f[A>>2]|0;f[Q+(e<<2)>>2]=(T|0)<(R|0)?R:T;Y=Q}e=e+1|0}while((e|0)<(f[g>>2]|0));Z=Y}else Z=f[A>>2]|0;e=(f[b+(a<<2)>>2]|0)-(f[Z+(a<<2)>>2]|0)|0;Q=c+(a<<2)|0;f[Q>>2]=e;if((e|0)>=(f[C>>2]|0)){if((e|0)>(f[V>>2]|0)){_=e-(f[l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]|0)+8>>2]|0)+(c<<2)>>2]|0;f[g>>2]=-1;l=a+172|0;v=f[a+176>>2]|0;y=f[l>>2]|0;z=y;a:do if((v|0)==(y|0))B=-1;else{p=(v-y|0)/136|0;s=0;while(1){if((f[z+(s*136|0)>>2]|0)==(c|0))break;r=s+1|0;if(r>>>0<p>>>0)s=r;else{B=-1;break a}}f[g>>2]=s;B=s}while(0);b:do if(!(b[k>>0]|0)){y=(f[w+56>>2]|0)==0;do if(!((n|0)==0|y)){if((n|0)==1?b[z+(B*136|0)+28>>0]|0:0)break;v=z+(B*136|0)+104|0;p=z+(B*136|0)+4|0;r=(f[z+(B*136|0)+60>>2]|0)-(f[z+(B*136|0)+56>>2]|0)>>2;f[e>>2]=-1;fg(z+(B*136|0)+116|0,r,e);r=yn(80)|0;t=f[a+8>>2]|0;f[r+4>>2]=0;f[r>>2]=3740;o=r+8|0;m=r+12|0;x=m+44|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(x|0));f[o>>2]=3764;q=r+56|0;f[q>>2]=0;f[r+60>>2]=0;f[r+64>>2]=0;f[r+68>>2]=t;f[r+72>>2]=v;C=r+76|0;f[C>>2]=0;D=h+4|0;m=D+4|0;x=m+40|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(x|0));f[h>>2]=3764;m=h+48|0;f[m>>2]=0;x=h+52|0;f[x>>2]=0;f[h+56>>2]=0;f[D>>2]=p;E=f[z+(B*136|0)+68>>2]|0;F=((f[E+4>>2]|0)-(f[E>>2]|0)>>2>>>0)/3|0;b[e>>0]=0;kh(h+24|0,F,e);F=f[D>>2]|0;E=(f[F+56>>2]|0)-(f[F+52>>2]|0)>>2;b[e>>0]=0;kh(h+36|0,E,e);f[h+8>>2]=p;f[h+12>>2]=v;f[h+16>>2]=t;f[h+20>>2]=r;f[C>>2]=a+72;uf(o,h)|0;lg(q,f[m>>2]|0,f[x>>2]|0);E=r;f[h>>2]=3764;F=f[m>>2]|0;if(F|0){m=f[x>>2]|0;if((m|0)!=(F|0))f[x>>2]=m+(~((m+-4-F|0)>>>2)<<2);ur(F)}f[h>>2]=3784;F=f[h+36>>2]|0;if(F|0)ur(F);F=f[h+24>>2]|0;if(F|0)ur(F);G=0;H=E;I=42;break b}while(0);if(!y){s=f[a+12>>2]|0;E=(f[s+28>>2]|0)-(f[s+24>>2]|0)>>2;f[e>>2]=-1;fg(z+(B*136|0)+116|0,E,e);b[(f[l>>2]|0)+((f[g>>2]|0)*136|0)+100>>0]=0;J=z+(B*136|0)+104|0;I=26}else I=24}else I=24;while(0);if((I|0)==24){J=a+40|0;I=26}if((I|0)==26){B=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+48|0;do if((ki(f[B>>2]|0)|0)==0?(f[w+56>>2]|0)==0:0){if(b[k>>0]|0?(z=f[a+8>>2]|0,((f[z+12>>2]|0)-(f[z+8>>2]|0)|0)>=5):0){I=31;break}Jf(e,a,J);K=1;L=f[e>>2]|0}else I=31;while(0);if((I|0)==31){Xe(e,a,J);K=0;L=f[e>>2]|0}if(!L)M=0;else{G=K;H=L;I=42}}if((I|0)==42){I=f[g>>2]|0;if((I|0)==-1)N=a+68|0;else N=(f[l>>2]|0)+(I*136|0)+132|0;f[N>>2]=G;G=yn(76)|0;f[i>>2]=H;Bl(G,i,c);c=G;G=f[i>>2]|0;f[i>>2]=0;if(G|0)Va[f[(f[G>>2]|0)+4>>2]&255](G);G=a+188|0;i=f[G>>2]|0;if((i|0)==(f[a+192>>2]|0))Oi(a+184|0,g);else{f[i>>2]=f[g>>2];f[G>>2]=i+4}i=Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0;f[j>>2]=c;a=i+12|0;G=f[a>>2]|0;if(G>>>0<(f[i+16>>2]|0)>>>0){f[j>>2]=0;f[G>>2]=c;f[a>>2]=G+4;O=j}else{Ng(i+8|0,j);O=j}j=f[O>>2]|0;f[O>>2]=0;if(!j)M=1;else{Va[f[(f[j>>2]|0)+4>>2]&255](j);M=1}}A=M;u=d;return A|0}function oc(a,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z+(s*136|0)>>2]|0)==(c|0))break;r=s+1|0;if(r>>>0<p>>>0)s=r;else{B=-1;break a}}f[g>>2]=s;B=s}while(0);b:do if(!(b[k>>0]|0)){y=(f[w+56>>2]|0)==0;do if(!((n|0)==0|y)){if((n|0)==1?b[z+(B*136|0)+28>>0]|0:0)break;v=z+(B*136|0)+104|0;p=z+(B*136|0)+4|0;r=(f[z+(B*136|0)+60>>2]|0)-(f[z+(B*136|0)+56>>2]|0)>>2;f[e>>2]=-1;fg(z+(B*136|0)+116|0,r,e);r=yn(80)|0;t=f[a+8>>2]|0;f[r+4>>2]=0;f[r>>2]=3740;o=r+8|0;m=r+12|0;x=m+44|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(x|0));f[o>>2]=3764;q=r+56|0;f[q>>2]=0;f[r+60>>2]=0;f[r+64>>2]=0;f[r+68>>2]=t;f[r+72>>2]=v;C=r+76|0;f[C>>2]=0;D=h+4|0;m=D+4|0;x=m+40|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(x|0));f[h>>2]=3764;m=h+48|0;f[m>>2]=0;x=h+52|0;f[x>>2]=0;f[h+56>>2]=0;f[D>>2]=p;E=f[z+(B*136|0)+68>>2]|0;F=((f[E+4>>2]|0)-(f[E>>2]|0)>>2>>>0)/3|0;b[e>>0]=0;kh(h+24|0,F,e);F=f[D>>2]|0;E=(f[F+56>>2]|0)-(f[F+52>>2]|0)>>2;b[e>>0]=0;kh(h+36|0,E,e);f[h+8>>2]=p;f[h+12>>2]=v;f[h+16>>2]=t;f[h+20>>2]=r;f[C>>2]=a+72;uf(o,h)|0;lg(q,f[m>>2]|0,f[x>>2]|0);E=r;f[h>>2]=3764;F=f[m>>2]|0;if(F|0){m=f[x>>2]|0;if((m|0)!=(F|0))f[x>>2]=m+(~((m+-4-F|0)>>>2)<<2);ur(F)}f[h>>2]=3784;F=f[h+36>>2]|0;if(F|0)ur(F);F=f[h+24>>2]|0;if(F|0)ur(F);G=0;H=E;I=42;break b}while(0);if(!y){s=f[a+12>>2]|0;E=(f[s+28>>2]|0)-(f[s+24>>2]|0)>>2;f[e>>2]=-1;fg(z+(B*136|0)+116|0,E,e);b[(f[l>>2]|0)+((f[g>>2]|0)*136|0)+100>>0]=0;J=z+(B*136|0)+104|0;I=26}else I=24}else I=24;while(0);if((I|0)==24){J=a+40|0;I=26}if((I|0)==26){B=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+48|0;do if((ki(f[B>>2]|0)|0)==0?(f[w+56>>2]|0)==0:0){if(b[k>>0]|0?(z=f[a+8>>2]|0,((f[z+12>>2]|0)-(f[z+8>>2]|0)|0)>=5):0){I=31;break}Jf(e,a,J);K=1;L=f[e>>2]|0}else I=31;while(0);if((I|0)==31){Xe(e,a,J);K=0;L=f[e>>2]|0}if(!L)M=0;else{G=K;H=L;I=42}}if((I|0)==42){I=f[g>>2]|0;if((I|0)==-1)N=a+68|0;else N=(f[l>>2]|0)+(I*136|0)+132|0;f[N>>2]=G;G=yn(76)|0;f[i>>2]=H;Bl(G,i,c);c=G;G=f[i>>2]|0;f[i>>2]=0;if(G|0)Va[f[(f[G>>2]|0)+4>>2]&255](G);G=a+188|0;i=f[G>>2]|0;if((i|0)==(f[a+192>>2]|0))Oi(a+184|0,g);else{f[i>>2]=f[g>>2];f[G>>2]=i+4}i=Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0;f[j>>2]=c;a=i+12|0;G=f[a>>2]|0;if(G>>>0<(f[i+16>>2]|0)>>>0){f[j>>2]=0;f[G>>2]=c;f[a>>2]=G+4;O=j}else{Ng(i+8|0,j);O=j}j=f[O>>2]|0;f[O>>2]=0;if(!j)M=1;else{Va[f[(f[j>>2]|0)+4>>2]&255](j);M=1}}A=M;u=d;return A|0}function pc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A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!=(e|0))}}M=E+1|0}else M=E;K=(((F>>>0)%3|0|0)==0?2:-1)+F|0;do if(((K|0)!=-1?(f[p+(K>>>5<<2)>>2]&1<<(K&31)|0)==0:0)?(G=f[(f[(f[x>>2]|0)+12>>2]|0)+(K<<2)>>2]|0,(G|0)!=-1):0)if(!((G>>>0)%3|0)){N=G+2|0;break}else{N=G+-1|0;break}else N=-1;while(0);F=(N|0)==(A|0)?-1:N;if((F|0)==-1)break;else E=M}E=X(C,e)|0;if(M){if(q){F=0;do{A=j+(F<<2)|0;f[A>>2]=(f[A>>2]|0)/(M|0)|0;F=F+1|0}while((F|0)!=(e|0))}F=b+(E<<2)|0;A=c+(E<<2)|0;p=f[g>>2]|0;if((p|0)>0){K=0;G=j;J=p;while(1){if((J|0)>0){p=0;do{L=f[G+(p<<2)>>2]|0;H=f[r>>2]|0;if((L|0)>(H|0)){I=f[s>>2]|0;f[I+(p<<2)>>2]=H;O=I}else{I=f[t>>2]|0;H=f[s>>2]|0;f[H+(p<<2)>>2]=(L|0)<(I|0)?I:L;O=H}p=p+1|0}while((p|0)<(f[g>>2]|0));P=O}else P=f[s>>2]|0;p=(f[F+(K<<2)>>2]|0)-(f[P+(K<<2)>>2]|0)|0;H=A+(K<<2)|0;f[H>>2]=p;if((p|0)>=(f[u>>2]|0)){if((p|0)>(f[w>>2]|0)){Q=p-(f[v>>2]|0)|0;R=55}}else{Q=(f[v>>2]|0)+p|0;R=55}if((R|0)==55){R=0;f[H>>2]=Q}K=K+1|0;J=f[g>>2]|0;if((K|0)>=(J|0))break;else G=P}}}else{S=E;R=28}}else{S=X(C,e)|0;R=28}if((R|0)==28?(R=0,G=b+(S<<2)|0,J=c+(S<<2)|0,K=f[g>>2]|0,(K|0)>0):0){A=0;F=b+((X(B+-2|0,e)|0)<<2)|0;H=K;while(1){if((H|0)>0){K=0;do{p=f[F+(K<<2)>>2]|0;L=f[r>>2]|0;if((p|0)>(L|0)){I=f[s>>2]|0;f[I+(K<<2)>>2]=L;T=I}else{I=f[t>>2]|0;L=f[s>>2]|0;f[L+(K<<2)>>2]=(p|0)<(I|0)?I:p;T=L}K=K+1|0}while((K|0)<(f[g>>2]|0));U=T}else U=f[s>>2]|0;K=(f[G+(A<<2)>>2]|0)-(f[U+(A<<2)>>2]|0)|0;L=J+(A<<2)|0;f[L>>2]=K;if((K|0)>=(f[u>>2]|0)){if((K|0)>(f[w>>2]|0)){V=K-(f[v>>2]|0)|0;R=40}}else{V=(f[v>>2]|0)+K|0;R=40}if((R|0)==40){R=0;f[L>>2]=V}A=A+1|0;H=f[g>>2]|0;if((A|0)>=(H|0))break;else F=U}}if((B|0)<=2)break a;D=f[i>>2]|0;F=C+-1|0;if((f[l>>2]|0)-D>>2>>>0<=F>>>0)break;else{H=C;C=F;B=H}}Fq(i)}while(0);if((e|0)>0)rj(j|0,0,e<<2|0)|0;e=f[g>>2]|0;if((e|0)<=0){sr(k);sr(j);return 1}i=a+16|0;B=a+32|0;C=a+12|0;D=a+28|0;l=a+20|0;U=a+24|0;a=0;V=j;T=e;while(1){if((T|0)>0){e=0;do{S=f[V+(e<<2)>>2]|0;P=f[i>>2]|0;if((S|0)>(P|0)){Q=f[B>>2]|0;f[Q+(e<<2)>>2]=P;W=Q}else{Q=f[C>>2]|0;P=f[B>>2]|0;f[P+(e<<2)>>2]=(S|0)<(Q|0)?Q:S;W=P}e=e+1|0}while((e|0)<(f[g>>2]|0));Y=W}else Y=f[B>>2]|0;e=(f[b+(a<<2)>>2]|0)-(f[Y+(a<<2)>>2]|0)|0;P=c+(a<<2)|0;f[P>>2]=e;if((e|0)>=(f[D>>2]|0)){if((e|0)>(f[U>>2]|0)){Z=e-(f[l>>2]|0)|0;R=70}}else{Z=(f[l>>2]|0)+e|0;R=70}if((R|0)==70){R=0;f[P>>2]=Z}a=a+1|0;T=f[g>>2]|0;if((a|0)>=(T|0))break;else V=Y}sr(k);sr(j);return 1}function qc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;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if(((ba|ca|0)!=0?(P=(N|0)==(ba|0),!(H&P)):0)?(q=(N|0)==(ca|0),!(M&q)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(q&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);N=K<<1;M=b+(N<<2)|0;H=M+4|0;O=f[H>>2]|0;f[h>>2]=f[M>>2];f[x>>2]=O;f[i>>2]=$;f[y>>2]=aa;Pd(d,n,h,i);O=f[d>>2]|0;f[k>>2]=O;P=f[z>>2]|0;f[A>>2]=P;q=f[H>>2]|0;f[h>>2]=f[M>>2];f[B>>2]=q;f[i>>2]=da;f[C>>2]=ea;Pd(d,n,h,i);q=f[d>>2]|0;f[l>>2]=q;M=f[D>>2]|0;f[E>>2]=M;H=f[v>>2]|0;if((H|0)>=(O|0))if((O|0)<(0-H|0))fa=(f[F>>2]|0)+O|0;else fa=O;else fa=O-(f[F>>2]|0)|0;f[k>>2]=fa;if((H|0)>=(P|0))if((P|0)<(0-H|0))ga=(f[F>>2]|0)+P|0;else ga=P;else ga=P-(f[F>>2]|0)|0;f[a>>2]=ga;if((H|0)>=(q|0))if((q|0)<(0-H|0))ha=(f[F>>2]|0)+q|0;else ha=q;else ha=q-(f[F>>2]|0)|0;f[l>>2]=ha;if((H|0)>=(M|0))if((M|0)<(0-H|0))ia=(f[F>>2]|0)+M|0;else ia=M;else ia=M-(f[F>>2]|0)|0;f[G>>2]=ia;if((((ga|0)>-1?ga:0-ga|0)+((fa|0)>-1?fa:0-fa|0)|0)<(((ha|0)>-1?ha:0-ha|0)+((ia|0)>-1?ia:0-ia|0)|0)){ej(g,0);ja=k}else{ej(g,1);ja=l}M=f[ja>>2]|0;if((M|0)<0)ka=(f[F>>2]|0)+M|0;else ka=M;M=c+(N<<2)|0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2)|0,(n|0)!=(D|0)):0){f[q>>2]=D+(~((D+-4-n|0)>>>2)<<2);E=l;F=p;G=k}else{E=l;F=p;G=k}else{zh(d,r-B|0,e);E=f[d>>2]|0;F=f[j>>2]|0;G=f[a>>2]|0}x=E;y=E;z=G;A=F}B=y+(m<<2)|0;f[B>>2]=(f[B>>2]|0)+1;o=o+1|0;if(o>>>0>=A-z>>2>>>0){v=z;w=A;break}else{l=x;p=A;s=y;k=z;t=y}}}y=w-v|0;v=y>>2;f[e>>2]=0;w=e+4|0;f[w>>2]=0;f[e+8>>2]=0;if(!v){H=0;I=0}else{if(v>>>0>536870911)Fq(e);t=yn(y<<1)|0;f[w>>2]=t;f[e>>2]=t;y=t+(v<<3)|0;f[e+8>>2]=y;z=v;v=t;k=t;while(1){s=v;f[s>>2]=-1;f[s+4>>2]=-1;s=k+8|0;A=z+-1|0;if(!A)break;else{z=A;v=s;k=s}}f[w>>2]=y;H=t;I=t}t=f[q>>2]|0;y=f[d>>2]|0;k=t-y|0;v=k>>2;f[g>>2]=0;z=g+4|0;f[z>>2]=0;f[g+8>>2]=0;s=y;do if(v)if(v>>>0>1073741823)Fq(g);else{A=yn(k)|0;f[g>>2]=A;p=A+(v<<2)|0;f[g+8>>2]=p;rj(A|0,0,k|0)|0;f[z>>2]=p;J=A;K=p;L=A;break}else{J=0;K=0;L=0}while(0);if((t|0)!=(y|0)){y=0;t=0;while(1){f[J+(t<<2)>>2]=y;k=t+1|0;if(k>>>0<v>>>0){y=(f[s+(t<<2)>>2]|0)+y|0;t=k}else break}}t=f[j>>2]|0;j=f[a>>2]|0;y=j;if((t|0)!=(j|0)){k=a+40|0;a=t-j>>2;j=H;t=H;g=H;A=H;p=H;x=H;l=0;o=J;while(1){F=f[y+(l<<2)>>2]|0;G=l+1|0;E=((G>>>0)%3|0|0)==0?l+-2|0:G;if((E|0)==-1)M=-1;else M=f[y+(E<<2)>>2]|0;E=((l>>>0)%3|0|0)==0;G=(E?2:-1)+l|0;if((G|0)==-1)N=-1;else N=f[y+(G<<2)>>2]|0;if(E?(M|0)==(N|0)|((F|0)==(M|0)|(F|0)==(N|0)):0){f[k>>2]=(f[k>>2]|0)+1;O=j;P=t;Q=g;R=A;S=p;T=x;U=l+2|0;V=o}else W=51;a:do if((W|0)==51){W=0;E=f[s+(N<<2)>>2]|0;b:do if((E|0)>0){G=0;B=f[o+(N<<2)>>2]|0;while(1){m=f[p+(B<<3)>>2]|0;if((m|0)==-1){X=j;Y=t;Z=A;_=p;break b}if((m|0)==(M|0)){m=f[p+(B<<3)+4>>2]|0;if((m|0)==-1)$=-1;else $=f[y+(m<<2)>>2]|0;if((F|0)!=($|0))break}m=G+1|0;if((m|0)<(E|0)){G=m;B=B+1|0}else{X=j;Y=t;Z=A;_=p;break b}}m=f[A+(B<<3)+4>>2]|0;r=G;n=B;D=t;while(1){r=r+1|0;if((r|0)>=(E|0))break;C=n+1|0;f[D+(n<<3)>>2]=f[D+(C<<3)>>2];f[D+(n<<3)+4>>2]=f[D+(C<<3)+4>>2];if((f[j+(n<<3)>>2]|0)==-1)break;else{n=C;D=j}}f[g+(n<<3)>>2]=-1;if((m|0)==-1){X=g;Y=g;Z=g;_=g}else{D=f[i>>2]|0;f[D+(l<<2)>>2]=m;f[D+(m<<2)>>2]=l;O=g;P=g;Q=g;R=g;S=g;T=x;U=l;V=o;break a}}else{X=j;Y=t;Z=A;_=p}while(0);E=f[s+(M<<2)>>2]|0;if((E|0)>0){D=0;r=f[J+(M<<2)>>2]|0;while(1){aa=x+(r<<3)|0;if((f[aa>>2]|0)==-1)break;D=D+1|0;if((D|0)>=(E|0)){O=x;P=x;Q=x;R=x;S=x;T=x;U=l;V=J;break a}else r=r+1|0}f[aa>>2]=N;f[H+(r<<3)+4>>2]=l;O=H;P=H;Q=H;R=H;S=H;T=H;U=l;V=J}else{O=X;P=Y;Q=g;R=Z;S=_;T=x;U=l;V=o}}while(0);l=U+1|0;if(l>>>0>=a>>>0)break;else{j=O;t=P;g=Q;A=R;p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+1>>0]=b[C+1>>0]|0;b[h+2>>0]=b[C+2>>0]|0;pm(i|0,C|0,3)|0;C=hg(g,i)|0;if(!C){A=b[i>>0]|0;B=b[q>>0]|0;D=b[m>>0]|0;E=((A&255^318)+239^B&255)+239^D&255;F=f[s>>2]|0;G=(F|0)==0;a:do if(!G){H=F+-1|0;J=(H&F|0)==0;if(!J)if(E>>>0<F>>>0)K=E;else K=(E>>>0)%(F>>>0)|0;else K=E&H;L=f[(f[g>>2]|0)+(K<<2)>>2]|0;if((L|0)!=0?(M=f[L>>2]|0,(M|0)!=0):0){if(J){J=M;while(1){L=f[J+4>>2]|0;if(!((L|0)==(E|0)|(L&H|0)==(K|0))){N=K;O=29;break a}L=J+8|0;if(((b[L>>0]|0)==A<<24>>24?(b[L+1>>0]|0)==B<<24>>24:0)?(b[L+2>>0]|0)==D<<24>>24:0)break a;J=f[J>>2]|0;if(!J){N=K;O=29;break a}}}else P=M;while(1){J=f[P+4>>2]|0;if((J|0)!=(E|0)){if(J>>>0<F>>>0)Q=J;else Q=(J>>>0)%(F>>>0)|0;if((Q|0)!=(K|0)){N=K;O=29;break a}}J=P+8|0;if(((b[J>>0]|0)==A<<24>>24?(b[J+1>>0]|0)==B<<24>>24:0)?(b[J+2>>0]|0)==D<<24>>24:0)break a;P=f[P>>2]|0;if(!P){N=K;O=29;break}}}else{N=K;O=29}}else{N=0;O=29}while(0);if((O|0)==29){O=0;M=yn(16)|0;b[M+8>>0]=A;b[M+9>>0]=B;b[M+10>>0]=D;f[M+12>>2]=z;f[M+4>>2]=E;f[M>>2]=0;R=$(((f[t>>2]|0)+1|0)>>>0);S=$(F>>>0);T=$(n[k>>2]);do if(G|$(T*S)<R){J=F<<1|(F>>>0<3|(F+-1&F|0)!=0)&1;H=~~$(W($(R/T)))>>>0;Yh(g,J>>>0<H>>>0?H:J);J=f[s>>2]|0;H=J+-1|0;if(!(H&J)){U=J;V=H&E;break}if(E>>>0<J>>>0){U=J;V=E}else{U=J;V=(E>>>0)%(J>>>0)|0}}else{U=F;V=N}while(0);F=(f[g>>2]|0)+(V<<2)|0;E=f[F>>2]|0;if(!E){f[M>>2]=f[v>>2];f[v>>2]=M;f[F>>2]=v;F=f[M>>2]|0;if(F|0){G=f[F+4>>2]|0;F=U+-1|0;if(F&U)if(G>>>0<U>>>0)X=G;else X=(G>>>0)%(U>>>0)|0;else X=G&F;Y=(f[g>>2]|0)+(X<<2)|0;O=42}}else{f[M>>2]=f[E>>2];Y=E;O=42}if((O|0)==42){O=0;f[Y>>2]=M}f[t>>2]=(f[t>>2]|0)+1}E=w;F=f[E>>2]|0;G=In(F|0,f[E+4>>2]|0,z|0,0)|0;eh((f[f[x>>2]>>2]|0)+G|0,h|0,F|0)|0;F=f[j>>2]|0;f[F+(y<<2)>>2]=z;Z=z+1|0;_=F}else{F=f[j>>2]|0;f[F+(y<<2)>>2]=f[C+12>>2];Z=z;_=F}y=y+1|0;aa=f[l>>2]|0;if(y>>>0>=aa>>>0)break;else z=Z}if((Z|0)==(aa|0))ba=_;else{z=a+84|0;if(!(b[z>>0]|0)){y=f[a+72>>2]|0;h=f[a+68>>2]|0;x=h;if((y|0)==(h|0))ca=_;else{w=y-h>>2;h=0;do{y=x+(h<<2)|0;f[y>>2]=f[_+(f[y>>2]<<2)>>2];h=h+1|0}while(h>>>0<w>>>0);ca=_}}else{b[z>>0]=0;z=a+68|0;_=a+72|0;w=f[_>>2]|0;h=f[z>>2]|0;x=w-h>>2;y=h;h=w;if(aa>>>0<=x>>>0)if(aa>>>0<x>>>0?(w=y+(aa<<2)|0,(w|0)!=(h|0)):0){f[_>>2]=h+(~((h+-4-w|0)>>>2)<<2);da=aa}else da=aa;else{zh(z,aa-x|0,1332);da=f[l>>2]|0}x=f[j>>2]|0;if(!da)ca=x;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[x+(a<<2)>>2];a=a+1|0}while(a>>>0<da>>>0);ca=x}}f[l>>2]=Z;ba=ca}if(!ba)ea=Z;else{ca=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z|0)?(T<<1)-Z|0:Z;aa=0}else{$=Z;aa=Y}}else{$=Z;aa=Z}}else{$=Y;aa=Y}}else{$=N;aa=N}while(0);P=0-S|0;M=0-_|0;f[j>>2]=0-O;f[r>>2]=P;f[t>>2]=M;if((O|0)<1){ba=T-_|0;ca=T-S|0}else{H=(_|0)<1?M:_;M=(S|0)<1?P:S;ba=(_|0)>0?M:N-M|0;ca=(S|0)>0?H:N-H|0}H=(ca|0)==0;M=(ba|0)==0;do if(((ba|ca|0)!=0?(P=(N|0)==(ba|0),!(H&P)):0)?(q=(N|0)==(ca|0),!(M&q)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(q&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);N=K<<1;M=b+(N<<2)|0;H=M+4|0;O=f[H>>2]|0;f[h>>2]=f[M>>2];f[x>>2]=O;f[i>>2]=$;f[y>>2]=aa;Pd(d,n,h,i);O=f[d>>2]|0;f[k>>2]=O;P=f[z>>2]|0;f[A>>2]=P;q=f[H>>2]|0;f[h>>2]=f[M>>2];f[B>>2]=q;f[i>>2]=da;f[C>>2]=ea;Pd(d,n,h,i);q=f[d>>2]|0;f[l>>2]=q;M=f[D>>2]|0;f[E>>2]=M;H=f[v>>2]|0;if((H|0)>=(O|0))if((O|0)<(0-H|0))fa=(f[F>>2]|0)+O|0;else fa=O;else fa=O-(f[F>>2]|0)|0;f[k>>2]=fa;if((H|0)>=(P|0))if((P|0)<(0-H|0))ga=(f[F>>2]|0)+P|0;else ga=P;else ga=P-(f[F>>2]|0)|0;f[a>>2]=ga;if((H|0)>=(q|0))if((q|0)<(0-H|0))ha=(f[F>>2]|0)+q|0;else ha=q;else ha=q-(f[F>>2]|0)|0;f[l>>2]=ha;if((H|0)>=(M|0))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0;v=g+8|0;w=a+40|0;x=a+64|0;y=0;z=0;while(1){A=d;B=f[A>>2]|0;C=f[A+4>>2]|0;A=p;D=In(f[A>>2]|0,f[A+4>>2]|0,r+z|0,0)|0;A=lo(D|0,I|0,B|0,C|0)|0;C=(f[f[c>>2]>>2]|0)+A|0;A=h;B=C;D=A+12|0;do{b[A>>0]=b[B>>0]|0;A=A+1|0;B=B+1|0}while((A|0)<(D|0));pm(i|0,C|0,12)|0;B=ng(g,i)|0;if(!B){A=f[i>>2]|0;D=f[q>>2]|0;E=f[m>>2]|0;F=((A^318)+239^D)+239^E;G=f[s>>2]|0;H=(G|0)==0;a:do if(!H){J=G+-1|0;K=(J&G|0)==0;if(!K)if(F>>>0<G>>>0)L=F;else L=(F>>>0)%(G>>>0)|0;else L=F&J;M=f[(f[g>>2]|0)+(L<<2)>>2]|0;if((M|0)!=0?(N=f[M>>2]|0,(N|0)!=0):0){if(K){K=N;while(1){M=f[K+4>>2]|0;if(!((M|0)==(F|0)|(M&J|0)==(L|0))){O=L;P=29;break a}if(((f[K+8>>2]|0)==(A|0)?(f[K+12>>2]|0)==(D|0):0)?(f[K+16>>2]|0)==(E|0):0)break a;K=f[K>>2]|0;if(!K){O=L;P=29;break a}}}else Q=N;while(1){K=f[Q+4>>2]|0;if((K|0)!=(F|0)){if(K>>>0<G>>>0)R=K;else R=(K>>>0)%(G>>>0)|0;if((R|0)!=(L|0)){O=L;P=29;break a}}if(((f[Q+8>>2]|0)==(A|0)?(f[Q+12>>2]|0)==(D|0):0)?(f[Q+16>>2]|0)==(E|0):0)break a;Q=f[Q>>2]|0;if(!Q){O=L;P=29;break}}}else{O=L;P=29}}else{O=0;P=29}while(0);if((P|0)==29){P=0;C=yn(24)|0;f[C+8>>2]=A;f[C+12>>2]=D;f[C+16>>2]=E;f[C+20>>2]=y;f[C+4>>2]=F;f[C>>2]=0;S=$(((f[t>>2]|0)+1|0)>>>0);T=$(G>>>0);U=$(n[k>>2]);do if(H|$(U*T)<S){N=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(y,ba-x|0,1332);ea=f[l>>2]|0}x=f[j>>2]|0;if(!ea)da=x;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[x+(a<<2)>>2];a=a+1|0}while(a>>>0<ea>>>0);da=x}}f[l>>2]=_;ca=da}if(!ca)fa=_;else{da=f[o>>2]|0;if((da|0)!=(ca|0))f[o>>2]=da+(~((da+-4-ca|0)>>>2)<<2);ur(ca);fa=_}}else fa=0;_=f[g+8>>2]|0;if(_|0){ca=_;do{_=ca;ca=f[ca>>2]|0;ur(_)}while((ca|0)!=0)}ca=f[g>>2]|0;f[g>>2]=0;if(!ca){u=e;return fa|0}ur(ca);u=e;return fa|0}
+function di(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=u;u=u+16|0;e=d;Ee(e,a+40|0,f[a+8>>2]|0,b,c);fj(a,e);a=f[e>>2]|0;f[e>>2]=0;if(!a){u=d;return 1}e=a+88|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0){e=f[c+8>>2]|0;if(e|0){b=c+12|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;ur(e)}ur(c)}c=f[a+68>>2]|0;if(c|0){e=a+72|0;b=f[e>>2]|0;if((b|0)!=(c|0))f[e>>2]=b+(~((b+-4-c|0)>>>2)<<2);ur(c)}c=a+64|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0){c=f[b>>2]|0;if(c|0){e=b+4|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;ur(c)}ur(b)}ur(a);u=d;return 1}function ei(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d;do{d=g+-4|0;f[c>>2]=d;h=f[d>>2]|0;f[d>>2]=0;if(h|0){d=h+88|0;i=f[d>>2]|0;f[d>>2]=0;if(i|0){d=f[i+8>>2]|0;if(d|0){j=i+12|0;if((f[j>>2]|0)!=(d|0))f[j>>2]=d;ur(d)}ur(i)}i=f[h+68>>2]|0;if(i|0){d=h+72|0;j=f[d>>2]|0;if((j|0)!=(i|0))f[d>>2]=j+(~((j+-4-i|0)>>>2)<<2);ur(i)}i=h+64|0;j=f[i>>2]|0;f[i>>2]=0;if(j|0){i=f[j>>2]|0;if(i|0){d=j+4|0;if((f[d>>2]|0)!=(i|0))f[d>>2]=i;ur(i)}ur(j)}ur(h)}g=f[c>>2]|0}while((g|0)!=(b|0));e=f[a>>2]|0}ur(e);return}function fi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=(d|0)<0;do if(!b){if(e){g=0;return g|0}h=a+4|0;i=f[h>>2]|0;j=f[a>>2]|0;k=i-j|0;if(k>>>0<c>>>0){Di(a,c-k|0);break}if(k>>>0>c>>>0?(k=j+c|0,(k|0)!=(i|0)):0)f[h>>2]=k}else{if(e){g=0;return g|0}k=a+4|0;h=f[k>>2]|0;i=f[a>>2]|0;j=h-i|0;do if(0<(d|0)|0==(d|0)&j>>>0<c>>>0){if(j>>>0<c>>>0){Di(a,c-j|0);break}if(j>>>0>c>>>0?(l=i+c|0,(l|0)!=(h|0)):0){f[k>>2]=l;m=15}else m=15}else m=15;while(0);if((m|0)==15?(c|0)==0:0)break;pm(f[a>>2]|0,b|0,c|0)|0}while(0);c=a+24|0;a=c;b=lo(f[a>>2]|0,f[a+4>>2]|0,1,0)|0;a=c;f[a>>2]=b;f[a+4>>2]=I;g=1;return g|0}function gi(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;if(!(He(a,c)|0)){i=0;u=d;return i|0}j=a+36|0;k=a+40|0;a=f[j>>2]|0;if((f[k>>2]|0)==(a|0)){i=1;u=d;return i|0}l=c+16|0;m=c+4|0;n=h+1|0;o=0;p=a;do{a=f[p+(o<<2)>>2]|0;q=Qa[f[(f[a>>2]|0)+32>>2]&127](a)|0;b[h>>0]=q;q=l;a=f[q+4>>2]|0;if(!((a|0)>0|(a|0)==0&(f[q>>2]|0)>>>0>0)){f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];Ke(c,e,h,n)|0}o=o+1|0;p=f[j>>2]|0}while(o>>>0<(f[k>>2]|0)-p>>2>>>0);i=1;u=d;return i|0}function hi(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=u;u=u+16|0;d=c;Pp(a);f[a+16>>2]=0;f[a+20>>2]=0;f[a+12>>2]=a+16;e=a+24|0;Pp(e);f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;a=yn(32)|0;f[d>>2]=a;f[d+8>>2]=-2147483616;f[d+4>>2]=20;g=a;h=15029;i=g+20|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[a+20>>0]=0;Yj(e,d,1);if((b[d+11>>0]|0)<0)ur(f[d>>2]|0);f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;a=yn(32)|0;f[d>>2]=a;f[d+8>>2]=-2147483616;f[d+4>>2]=22;g=a;h=15050;i=g+22|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[a+22>>0]=0;Yj(e,d,1);if((b[d+11>>0]|0)>=0){u=c;return}ur(f[d>>2]|0);u=c;return}function ii(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=f[a+4>>2]|0;c=a+8|0;d=f[c>>2]|0;if((d|0)!=(b|0)){e=d;do{d=e+-4|0;f[c>>2]=d;g=f[d>>2]|0;f[d>>2]=0;if(g|0){d=g+88|0;h=f[d>>2]|0;f[d>>2]=0;if(h|0){d=f[h+8>>2]|0;if(d|0){i=h+12|0;if((f[i>>2]|0)!=(d|0))f[i>>2]=d;ur(d)}ur(h)}h=f[g+68>>2]|0;if(h|0){d=g+72|0;i=f[d>>2]|0;if((i|0)!=(h|0))f[d>>2]=i+(~((i+-4-h|0)>>>2)<<2);ur(h)}h=g+64|0;i=f[h>>2]|0;f[h>>2]=0;if(i|0){h=f[i>>2]|0;if(h|0){d=i+4|0;if((f[d>>2]|0)!=(h|0))f[d>>2]=h;ur(h)}ur(i)}ur(g)}e=f[c>>2]|0}while((e|0)!=(b|0))}b=f[a>>2]|0;if(!b)return;ur(b);return}function ji(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+20>>2];if((l|0)>0|(l|0)==0&m>>>0>0){u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;u=c;return 1}function ki(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=u;u=u+16|0;d=c;e=yn(16)|0;f[d>>2]=e;f[d+8>>2]=-2147483632;f[d+4>>2]=14;g=e;h=14903;i=g+14|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[e+14>>0]=0;e=Nk(a,d,-1)|0;if((b[d+11>>0]|0)<0)ur(f[d>>2]|0);j=yn(16)|0;f[d>>2]=j;f[d+8>>2]=-2147483632;f[d+4>>2]=14;g=j;h=14918;i=g+14|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[j+14>>0]=0;j=Nk(a,d,-1)|0;if((b[d+11>>0]|0)>=0){k=(e|0)<(j|0);l=k?j:e;m=(l|0)==-1;n=m?5:l;u=c;return n|0}ur(f[d>>2]|0);k=(e|0)<(j|0);l=k?j:e;m=(l|0)==-1;n=m?5:l;u=c;return n|0}function li(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+16>>2];if((l|0)>0|(l|0)==0&m>>>0>0){u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Ke(b,d,g,g+4|0)|0;u=c;return 1}function mi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=yn(32)|0;f[a>>2]=g;f[a+4>>2]=c+8;c=a+8|0;b[c>>0]=0;h=g+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;h=g+20|0;i=e+12|0;f[h>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;g=e+16|0;e=f[g>>2]|0;j=f[i>>2]|0;k=e-j|0;if(!k){l=j;m=e;n=0}else{Di(h,k);l=f[i>>2]|0;m=f[g>>2]|0;n=f[h>>2]|0}eh(n|0,l|0,m-l|0)|0;b[c>>0]=1;c=f[a>>2]|0;f[c+4>>2]=d;f[c>>2]=0;return}function ni(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0;b=a+32|0;nd(a,b);c=a+80|0;d=f[c>>2]|0;if((d|0?(e=a+84|0,(f[e>>2]|0)>0):0)?(nd(d,b),(f[e>>2]|0)>1):0){d=1;do{nd((f[c>>2]|0)+(d<<5)|0,b);d=d+1|0}while((d|0)<(f[e>>2]|0))}e=a+136|0;d=a+140|0;a=f[e>>2]|0;if((f[d>>2]|0)==(a|0))return;c=0;g=a;while(1){a=g;$h((f[a+(c*12|0)+4>>2]|0)-(f[a+(c*12|0)>>2]|0)>>2,b)|0;a=f[e>>2]|0;h=f[a+(c*12|0)>>2]|0;i=(f[a+(c*12|0)+4>>2]|0)-h>>2;if(!i)j=a;else{Mc(h,i,1,0,b)|0;j=f[e>>2]|0}c=c+1|0;if(c>>>0>=(((f[d>>2]|0)-j|0)/12|0)>>>0)break;else g=j}return}function oi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=d+16|0;g=f[e>>2]|0;if(!g)if(!(Fl(d)|0)){h=f[e>>2]|0;i=5}else j=0;else{h=g;i=5}a:do if((i|0)==5){g=d+20|0;e=f[g>>2]|0;k=e;if((h-e|0)>>>0<c>>>0){j=Sa[f[d+36>>2]&31](d,a,c)|0;break}b:do if((b[d+75>>0]|0)>-1){e=c;while(1){if(!e){l=0;m=a;n=c;o=k;break b}p=e+-1|0;if((b[a+p>>0]|0)==10)break;else e=p}p=Sa[f[d+36>>2]&31](d,a,e)|0;if(p>>>0<e>>>0){j=p;break a}l=e;m=a+e|0;n=c-e|0;o=f[g>>2]|0}else{l=0;m=a;n=c;o=k}while(0);eh(o|0,m|0,n|0)|0;f[g>>2]=(f[g>>2]|0)+n;j=l+n|0}while(0);return j|0}function pi(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+12|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d+28>>2]|0;if(c|0){e=c;do{c=e;e=f[e>>2]|0;pi(c+8|0);ur(c)}while((e|0)!=0)}e=d+20|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0)ur(c);c=f[d+8>>2]|0;if(c|0){e=c;do{c=e;e=f[e>>2]|0;g=c+8|0;h=f[c+20>>2]|0;if(h|0){i=c+24|0;if((f[i>>2]|0)!=(h|0))f[i>>2]=h;ur(h)}if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);ur(c)}while((e|0)!=0)}e=f[d>>2]|0;f[d>>2]=0;if(e|0)ur(e);ur(d)}if((b[a+11>>0]|0)>=0)return;ur(f[a>>2]|0);return}function qi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0;g=u;u=u+32|0;h=g+12|0;i=g;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;if((e|0)>0){j=i+11|0;k=i+4|0;l=0;do{if((l|0)>0)Pn(h,14818)|0;sl(i,$(n[d+(l<<2)>>2]));m=b[j>>0]|0;o=m<<24>>24<0;kj(h,o?f[i>>2]|0:i,o?f[k>>2]|0:m&255)|0;if((b[j>>0]|0)<0)ur(f[i>>2]|0);l=l+1|0}while((l|0)<(e|0))}im(yi(a,c)|0,h)|0;if((b[h+11>>0]|0)>=0){u=g;return}ur(f[h>>2]|0);u=g;return}function ri(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+16|0;d=c;if((Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)<=0){e=1;u=c;return e|0}g=a+4|0;h=a+20|0;i=a+24|0;j=a+16|0;a=0;while(1){k=f[(f[g>>2]|0)+4>>2]|0;l=lm(k,Ra[f[(f[b>>2]|0)+24>>2]&127](b,a)|0)|0;f[d>>2]=l;if((l|0)==-1)break;k=f[h>>2]|0;if((k|0)==(f[i>>2]|0))Oi(j,d);else{f[k>>2]=l;f[h>>2]=k+4}ql(f[g>>2]|0,f[d>>2]|0)|0;a=a+1|0;if((a|0)>=(Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)){e=1;m=9;break}}if((m|0)==9){u=c;return e|0}e=0;u=c;return e|0}function si(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;f[a>>2]=1404;ei(a+60|0);b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=a+36|0;d=f[b>>2]|0;if(d|0){c=a+40|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-24|0;f[c>>2]=e;Va[f[f[e>>2]>>2]&255](e);h=f[c>>2]|0}while((h|0)!=(d|0));g=f[b>>2]|0}ur(g)}f[a>>2]=1344;g=f[a+16>>2]|0;if(g|0){b=a+20|0;d=f[b>>2]|0;if((d|0)!=(g|0))f[b>>2]=d+(~((d+-4-g|0)>>>2)<<2);ur(g)}g=f[a+4>>2]|0;if(!g)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(g|0))f[d>>2]=a+(~((a+-4-g|0)>>>2)<<2);ur(g);return}function ti(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=u;u=u+32|0;d=c+16|0;e=c+8|0;g=c;h=a+8|0;if(f[h>>2]<<5>>>0>=b>>>0){u=c;return}f[d>>2]=0;i=d+4|0;f[i>>2]=0;j=d+8|0;f[j>>2]=0;if((b|0)<0)Fq(d);k=((b+-1|0)>>>5)+1|0;b=yn(k<<2)|0;f[d>>2]=b;f[i>>2]=0;f[j>>2]=k;k=f[a>>2]|0;f[e>>2]=k;f[e+4>>2]=0;b=a+4|0;l=f[b>>2]|0;f[g>>2]=k+(l>>>5<<2);f[g+4>>2]=l&31;xg(d,e,g);g=f[a>>2]|0;f[a>>2]=f[d>>2];f[d>>2]=g;d=f[b>>2]|0;f[b>>2]=f[i>>2];f[i>>2]=d;d=f[h>>2]|0;f[h>>2]=f[j>>2];f[j>>2]=d;if(g|0)ur(g);u=c;return}function ui(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=a+136|0;c=f[b>>2]|0;if(c|0){d=a+140|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);ur(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}ur(g)}g=f[a+104>>2]|0;if(g|0){b=a+108|0;j=f[b>>2]|0;if((j|0)!=(g|0))f[b>>2]=j+(~((j+-4-g|0)>>>2)<<2);ur(g)}g=f[a+92>>2]|0;if(!g){uj(a);return}j=a+96|0;b=f[j>>2]|0;if((b|0)!=(g|0))f[j>>2]=b+(~((b+-4-g|0)>>>2)<<2);ur(g);uj(a);return}function vi(a){a=a|0;var c=0,d=0,e=0,g=0;f[a>>2]=3916;c=a+72|0;d=a+136|0;e=a+4|0;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));e=c;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));n[d>>2]=$(1.0);d=a+140|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[a+164>>2]=-1;d=a+168|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[d+24>>2]=0;Ln(a+200|0);Wn(a+232|0);d=a+316|0;e=a+264|0;g=e+52|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f[d>>2]=-1;f[a+320>>2]=-1;f[a+324>>2]=0;f[a+328>>2]=2;f[a+332>>2]=7;f[a+336>>2]=0;f[a+340>>2]=0;f[a+344>>2]=0;b[a+352>>0]=0;return}function wi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d|0;g=(e|0)/12|0;h=g+1|0;if(h>>>0>357913941)Fq(a);i=a+8|0;j=((f[i>>2]|0)-d|0)/12|0;k=j<<1;l=j>>>0<178956970?(k>>>0<h>>>0?h:k):357913941;do if(l)if(l>>>0>357913941){k=ra(8)|0;op(k,16742);f[k>>2]=7520;va(k|0,1208,126)}else{m=yn(l*12|0)|0;break}else m=0;while(0);k=m+(g*12|0)|0;f[k>>2]=f[b>>2];f[k+4>>2]=f[b+4>>2];f[k+8>>2]=f[b+8>>2];b=k+(((e|0)/-12|0)*12|0)|0;if((e|0)>0)eh(b|0,d|0,e|0)|0;f[a>>2]=b;f[c>>2]=k+12;f[i>>2]=m+(l*12|0);if(!d)return;ur(d);return}function xi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=a+16|0;h=g;i=f[h+4>>2]|0;if((d|0)<0|(d|0)==0&c>>>0<1|((i|0)>0|(i|0)==0&(f[h>>2]|0)>>>0>0)){j=0;return j|0}b[a+24>>0]=e&1;h=lo(c|0,d|0,7,0)|0;d=Ok(h|0,I|0,8,0)|0;h=I;c=g;f[c>>2]=d;f[c+4>>2]=h;c=a+4|0;g=f[c>>2]|0;i=f[a>>2]|0;k=g-i|0;l=lo(k|0,0,8,0)|0;m=e?l:k;l=lo(m|0,(e?I:0)|0,d|0,h|0)|0;h=i;i=g;if(k>>>0>=l>>>0)if(k>>>0>l>>>0?(g=h+l|0,(g|0)!=(i|0)):0){f[c>>2]=g;n=h}else n=h;else{Di(a,l-k|0);n=f[a>>2]|0}k=yn(8)|0;f[k>>2]=n+m;f[k+4>>2]=0;m=a+12|0;a=f[m>>2]|0;f[m>>2]=k;if(!a){j=1;return j|0}ur(a);j=1;return j|0}function yi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=u;u=u+16|0;d=c;e=wg(a,d,b)|0;g=f[e>>2]|0;if(g|0){h=g;i=h+28|0;u=c;return i|0}g=yn(40)|0;oj(g+16|0,b);b=g+28|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;b=f[d>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=b;f[e>>2]=g;b=f[f[a>>2]>>2]|0;if(!b)j=g;else{f[a>>2]=b;j=f[e>>2]|0}Me(f[a+4>>2]|0,j);j=a+8|0;f[j>>2]=(f[j>>2]|0)+1;h=g;i=h+28|0;u=c;return i|0}function zi(a,c,d,e,g,h,i,j){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0;k=u;u=u+16|0;l=k;if((-18-c|0)>>>0<d>>>0)Fq(a);if((b[a+11>>0]|0)<0)m=f[a>>2]|0;else m=a;if(c>>>0<2147483623){n=d+c|0;d=c<<1;o=n>>>0<d>>>0?d:n;p=o>>>0<11?11:o+16&-16}else p=-17;o=yn(p)|0;if(g|0)cp(o,m,g)|0;if(i|0)cp(o+g|0,j,i)|0;j=e-h|0;e=j-g|0;if(e|0)cp(o+g+i|0,m+g+h|0,e)|0;if((c|0)!=10)ur(m);f[a>>2]=o;f[a+8>>2]=p|-2147483648;p=j+i|0;f[a+4>>2]=p;b[l>>0]=0;_p(o+p|0,l);u=k;return}function Ai(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;if(d-g>>2>>>0>=b>>>0){rj(g|0,0,b<<2|0)|0;f[e>>2]=g+(b<<2);return}h=f[a>>2]|0;i=g-h|0;g=i>>2;j=g+b|0;if(j>>>0>1073741823)Fq(a);k=d-h|0;d=k>>1;l=k>>2>>>0<536870911?(d>>>0<j>>>0?j:d):1073741823;do if(l)if(l>>>0>1073741823){d=ra(8)|0;op(d,16742);f[d>>2]=7520;va(d|0,1208,126)}else{d=yn(l<<2)|0;m=d;n=d;break}else{m=0;n=0}while(0);d=m+(g<<2)|0;rj(d|0,0,b<<2|0)|0;if((i|0)>0)eh(n|0,h|0,i|0)|0;f[a>>2]=m;f[e>>2]=d+(b<<2);f[c>>2]=m+(l<<2);if(!h)return;ur(h);return}function Bi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=yn(32)|0;f[a>>2]=g;f[a+4>>2]=c+8;c=a+8|0;b[c>>0]=0;oj(g+8|0,e);h=g+20|0;i=e+12|0;f[h>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;g=e+16|0;e=f[g>>2]|0;j=f[i>>2]|0;k=e-j|0;if(!k){l=j;m=e;n=0}else{Di(h,k);l=f[i>>2]|0;m=f[g>>2]|0;n=f[h>>2]|0}eh(n|0,l|0,m-l|0)|0;b[c>>0]=1;c=f[a>>2]|0;f[c+4>>2]=d;f[c>>2]=0;return}function Ci(a,c,d){a=a|0;c=c|0;d=$(d);var e=0,g=0,h=0,i=0,j=0,k=0.0,l=0,m=0,n=0,o=0;e=u;u=u+16|0;g=e;h=c+11|0;i=b[h>>0]|0;if(i<<24>>24<0)j=f[c+4>>2]|0;else j=i&255;k=+d;l=j;j=i;while(1){if(j<<24>>24<0)m=f[c>>2]|0;else m=c;p[g>>3]=k;n=Qn(m,l+1|0,19269,g)|0;if((n|0)>-1)if(n>>>0>l>>>0)o=n;else break;else o=l<<1|1;Hj(c,o,0);l=o;j=b[h>>0]|0}Hj(c,n,0);f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];a=0;while(1){if((a|0)==3)break;f[c+(a<<2)>>2]=0;a=a+1|0}u=e;return}function Di(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if((e-h|0)>>>0>=c>>>0){i=c;j=h;do{b[j>>0]=0;j=(f[g>>2]|0)+1|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=h-i|0;h=j+c|0;if((h|0)<0)Fq(a);k=e-i|0;i=k<<1;e=k>>>0<1073741823?(i>>>0<h>>>0?h:i):2147483647;if(!e)l=0;else l=yn(e)|0;i=l+j|0;j=l+e|0;e=c;c=i;l=i;do{b[l>>0]=0;l=c+1|0;c=l;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;l=(f[g>>2]|0)-e|0;h=i+(0-l)|0;if((l|0)>0)eh(h|0,e|0,l|0)|0;f[a>>2]=h;f[g>>2]=c;f[d>>2]=j;if(!e)return;ur(e);return}function Ei(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=(d-e|0)/136|0;h=d;if(g>>>0<b>>>0){Fe(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+(b*136|0)|0;if((g|0)==(h|0))return;else i=h;do{f[c>>2]=i+-136;h=f[i+-20>>2]|0;if(h|0){b=i+-16|0;e=f[b>>2]|0;if((e|0)!=(h|0))f[b>>2]=e+(~((e+-4-h|0)>>>2)<<2);ur(h)}h=f[i+-32>>2]|0;if(h|0){e=i+-28|0;b=f[e>>2]|0;if((b|0)!=(h|0))f[e>>2]=b+(~((b+-4-h|0)>>>2)<<2);ur(h)}Ki(i+-132|0);i=f[c>>2]|0}while((i|0)!=(g|0));return}function Fi(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Td(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0<g>>>0?g:c;if(e>>>0>=b>>>0)return;Td(a,e);return}function Gi(a){a=a|0;var b=0,c=0,d=0;b=f[a+76>>2]|0;if(b|0){c=a+80|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+64>>2]|0;if(b|0){d=a+68|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;ur(b)}b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+24>>2]|0;if(b|0){c=a+28|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+12>>2]|0;if(b|0){d=a+16|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a>>2]|0;if(!b)return;c=a+4|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);ur(b);return}function Hi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=u;u=u+16|0;g=e;h=c+11|0;i=b[h>>0]|0;if(i<<24>>24<0)j=f[c+4>>2]|0;else j=i&255;k=j;j=i;while(1){if(j<<24>>24<0)l=f[c>>2]|0;else l=c;f[g>>2]=d;m=Qn(l,k+1|0,19266,g)|0;if((m|0)>-1)if(m>>>0>k>>>0)n=m;else break;else n=k<<1|1;Hj(c,n,0);k=n;j=b[h>>0]|0}Hj(c,m,0);f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];a=0;while(1){if((a|0)==3)break;f[c+(a<<2)>>2]=0;a=a+1|0}u=e;return}function Ii(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;b=a+8|0;c=f[b>>2]|0;if((c|0)<0){d=0;return d|0}e=a+4|0;a=f[e>>2]|0;g=a+4|0;h=f[g>>2]|0;i=f[a>>2]|0;j=h-i>>2;k=i;i=h;if(c>>>0<=j>>>0)if(c>>>0<j>>>0?(h=k+(c<<2)|0,(h|0)!=(i|0)):0){f[g>>2]=i+(~((i+-4-h|0)>>>2)<<2);l=c}else l=c;else{Ai(a,c-j|0);l=f[b>>2]|0}if((l|0)<=0){d=1;return d|0}b=f[e>>2]|0;e=f[b>>2]|0;j=(f[b+4>>2]|0)-e>>2;c=e;e=0;while(1){if(j>>>0<=e>>>0){m=10;break}f[c+(e<<2)>>2]=e;e=e+1|0;if((e|0)>=(l|0)){d=1;m=12;break}}if((m|0)==10)Fq(b);else if((m|0)==12)return d|0;return 0}function Ji(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;g=yn(32)|0;f[e>>2]=g;f[e+8>>2]=-2147483616;f[e+4>>2]=30;h=g;i=16592;j=h+30|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[g+30>>0]=0;g=a+4|0;Yj(g,e,c);if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);a=yn(32)|0;f[e>>2]=a;f[e+8>>2]=-2147483616;f[e+4>>2]=29;h=a;i=16279;j=h+29|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[a+29>>0]=0;Yj(g,e,c);if((b[e+11>>0]|0)>=0){u=d;return}ur(f[e>>2]|0);u=d;return}function Ki(a){a=a|0;var b=0,c=0,d=0;b=f[a+84>>2]|0;if(b|0){c=a+88|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+72>>2]|0;if(b|0){d=a+76|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;ur(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+40>>2]|0;if(b|0){c=a+44|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+28>>2]|0;if(b|0){d=a+32|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+12>>2]|0;if(b|0)ur(b);b=f[a>>2]|0;if(!b)return;ur(b);return}function Li(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=1464;b=a+32|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=c+88|0;d=f[b>>2]|0;f[b>>2]=0;if(d|0){b=f[d+8>>2]|0;if(b|0){e=d+12|0;if((f[e>>2]|0)!=(b|0))f[e>>2]=b;ur(b)}ur(d)}d=f[c+68>>2]|0;if(d|0){b=c+72|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2);ur(d)}d=c+64|0;e=f[d>>2]|0;f[d>>2]=0;if(e|0){d=f[e>>2]|0;if(d|0){b=e+4|0;if((f[b>>2]|0)!=(d|0))f[b>>2]=d;ur(d)}ur(e)}ur(c)}c=f[a+16>>2]|0;if(!c)return;e=a+20|0;a=f[e>>2]|0;if((a|0)!=(c|0))f[e>>2]=a+(~((a+-4-c|0)>>>2)<<2);ur(c);return}function Mi(){var a=0,b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;a=u;u=u+48|0;b=a+32|0;c=a+24|0;d=a+16|0;e=a;g=a+36|0;a=Gn()|0;if(a|0?(h=f[a>>2]|0,h|0):0){a=h+48|0;i=f[a>>2]|0;j=f[a+4>>2]|0;if(!((i&-256|0)==1126902528&(j|0)==1129074247)){f[c>>2]=19408;Xn(19358,c)}if((i|0)==1126902529&(j|0)==1129074247)k=f[h+44>>2]|0;else k=h+80|0;f[g>>2]=k;k=f[h>>2]|0;h=f[k+4>>2]|0;if(Sa[f[(f[282]|0)+16>>2]&31](1128,k,g)|0){k=f[g>>2]|0;g=Qa[f[(f[k>>2]|0)+8>>2]&127](k)|0;f[e>>2]=19408;f[e+4>>2]=h;f[e+8>>2]=g;Xn(19272,e)}else{f[d>>2]=19408;f[d+4>>2]=h;Xn(19317,d)}}Xn(19396,b)}function Ni(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;do if(a){if(c>>>0<128){b[a>>0]=c;e=1;break}d=(pr()|0)+188|0;if(!(f[f[d>>2]>>2]|0))if((c&-128|0)==57216){b[a>>0]=c;e=1;break}else{d=Br()|0;f[d>>2]=84;e=-1;break}if(c>>>0<2048){b[a>>0]=c>>>6|192;b[a+1>>0]=c&63|128;e=2;break}if(c>>>0<55296|(c&-8192|0)==57344){b[a>>0]=c>>>12|224;b[a+1>>0]=c>>>6&63|128;b[a+2>>0]=c&63|128;e=3;break}if((c+-65536|0)>>>0<1048576){b[a>>0]=c>>>18|240;b[a+1>>0]=c>>>12&63|128;b[a+2>>0]=c>>>6&63|128;b[a+3>>0]=c&63|128;e=4;break}else{d=Br()|0;f[d>>2]=84;e=-1;break}}else e=1;while(0);return e|0}function Oi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d|0;g=e>>2;h=g+1|0;if(h>>>0>1073741823)Fq(a);i=a+8|0;j=(f[i>>2]|0)-d|0;k=j>>1;l=j>>2>>>0<536870911?(k>>>0<h>>>0?h:k):1073741823;do if(l)if(l>>>0>1073741823){k=ra(8)|0;op(k,16742);f[k>>2]=7520;va(k|0,1208,126)}else{k=yn(l<<2)|0;m=k;n=k;break}else{m=0;n=0}while(0);k=m+(g<<2)|0;f[k>>2]=f[b>>2];if((e|0)>0)eh(n|0,d|0,e|0)|0;f[a>>2]=m;f[c>>2]=k+4;f[i>>2]=m+(l<<2);if(!d)return;ur(d);return}function Pi(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=a+104|0;d=f[c>>2]|0;if((d|0)!=0?(f[a+108>>2]|0)>=(d|0):0)e=4;else{d=jn(a)|0;if((d|0)>=0){g=f[c>>2]|0;c=a+8|0;if(g){i=f[c>>2]|0;j=f[a+4>>2]|0;k=g-(f[a+108>>2]|0)|0;g=i;if((i-j|0)<(k|0)){l=g;m=g}else{l=j+(k+-1)|0;m=g}}else{g=f[c>>2]|0;l=g;m=g}f[a+100>>2]=l;l=a+4|0;if(!m)n=f[l>>2]|0;else{g=f[l>>2]|0;l=a+108|0;f[l>>2]=m+1-g+(f[l>>2]|0);n=g}g=n+-1|0;if((d|0)==(h[g>>0]|0|0))o=d;else{b[g>>0]=d;o=d}}else e=4}if((e|0)==4){f[a+100>>2]=0;o=-1}return o|0}function Qi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;f[a>>2]=1656;f[a+4>>2]=b;b=a+8|0;f[b>>2]=f[c>>2];f[b+4>>2]=f[c+4>>2];f[b+8>>2]=f[c+8>>2];f[b+12>>2]=f[c+12>>2];f[b+16>>2]=f[c+16>>2];f[b+20>>2]=f[c+20>>2];kk(a+32|0,c+24|0);f[a>>2]=2496;c=a+44|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];f[a>>2]=2552;d=a+112|0;c=a+60|0;b=c+52|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(b|0));ln(d);f[a+152>>2]=0;f[a+156>>2]=0;f[a+160>>2]=0;return}function Ri(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e;h=yn(16)|0;f[g>>2]=h;f[g+8>>2]=-2147483632;f[g+4>>2]=14;i=h;j=14903;k=i+14|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[h+14>>0]=0;Zj(a,g,c);if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);c=yn(16)|0;f[g>>2]=c;f[g+8>>2]=-2147483632;f[g+4>>2]=14;i=c;j=14918;k=i+14|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[c+14>>0]=0;Zj(a,g,d);if((b[g+11>>0]|0)>=0){u=e;return}ur(f[g>>2]|0);u=e;return}function Si(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3896;b=f[a+88>>2]|0;if(b|0){c=a+92|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+72>>2]|0;if(b|0){d=a+76|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+60>>2]|0;if(b|0){c=a+64|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}f[a>>2]=3852;b=f[a+36>>2]|0;if(b|0)ur(b);b=f[a+24>>2]|0;if(!b)return;ur(b);return}function Ti(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;f[a>>2]=1656;f[a+4>>2]=b;b=a+8|0;f[b>>2]=f[c>>2];f[b+4>>2]=f[c+4>>2];f[b+8>>2]=f[c+8>>2];f[b+12>>2]=f[c+12>>2];f[b+16>>2]=f[c+16>>2];f[b+20>>2]=f[c+20>>2];kk(a+32|0,c+24|0);f[a>>2]=2076;c=a+44|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];f[a>>2]=2132;d=a+112|0;c=a+60|0;b=c+52|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(b|0));ln(d);f[a+152>>2]=0;f[a+156>>2]=0;f[a+160>>2]=0;return}function Ui(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2552;b=f[a+152>>2]|0;if(b|0){c=a+156|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+112>>2]|0;if(b|0){d=a+116|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+96>>2]|0;if(b|0)ur(b);b=f[a+84>>2]|0;if(b|0)ur(b);b=f[a+72>>2]|0;if(b|0)ur(b);b=f[a+60>>2]|0;if(b|0)ur(b);f[a>>2]=1656;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);ur(b);return}function Vi(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;d=u;u=u+16|0;e=d;g=f[(f[c+4>>2]|0)+4>>2]|0;if(!g){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=d;return}if(!(Cj(d+12|0,f[c+44>>2]|0,g)|0)){g=yn(32)|0;f[e>>2]=g;f[e+8>>2]=-2147483616;f[e+4>>2]=26;c=g;h=16623;i=c+26|0;do{b[c>>0]=b[h>>0]|0;c=c+1|0;h=h+1|0}while((c|0)<(i|0));b[g+26>>0]=0;f[a>>2]=-1;oj(a+4|0,e);if((b[e+11>>0]|0)<0)ur(f[e>>2]|0)}else{f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}u=d;return}function Wi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=b+48|0;if((ki(f[c>>2]|0)|0)>9){d=0;return d|0}if((Qa[f[(f[b>>2]|0)+8>>2]&127](b)|0)!=1){d=0;return d|0}e=b+4|0;b=(f[(f[(f[e>>2]|0)+8>>2]|0)+(a<<2)>>2]|0)+56|0;a=f[b>>2]|0;do if((a|0)==3)if((ki(f[c>>2]|0)|0)<4){d=5;return d|0}else{g=f[b>>2]|0;break}else g=a;while(0);a=ki(f[c>>2]|0)|0;if((g|0)==1){d=(a|0)<4?6:0;return d|0}if((a|0)>7){d=0;return d|0}if((ki(f[c>>2]|0)|0)>1){d=1;return d|0}else return ((f[(f[e>>2]|0)+80>>2]|0)>>>0<40?1:4)|0;return 0}function Xi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2132;b=f[a+152>>2]|0;if(b|0){c=a+156|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+112>>2]|0;if(b|0){d=a+116|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+96>>2]|0;if(b|0)ur(b);b=f[a+84>>2]|0;if(b|0)ur(b);b=f[a+72>>2]|0;if(b|0)ur(b);b=f[a+60>>2]|0;if(b|0)ur(b);f[a>>2]=1656;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);ur(b);return}function Yi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=u;u=u+128|0;h=g+124|0;i=g;j=i;k=6860;l=j+124|0;do{f[j>>2]=f[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(l|0));if((c+-1|0)>>>0>2147483646)if(!c){m=h;n=1;o=4}else{h=Br()|0;f[h>>2]=75;p=-1}else{m=a;n=c;o=4}if((o|0)==4){o=-2-m|0;c=n>>>0>o>>>0?o:n;f[i+48>>2]=c;n=i+20|0;f[n>>2]=m;f[i+44>>2]=m;o=m+c|0;m=i+16|0;f[m>>2]=o;f[i+28>>2]=o;o=wh(i,d,e)|0;if(!c)p=o;else{c=f[n>>2]|0;b[c+(((c|0)==(f[m>>2]|0))<<31>>31)>>0]=0;p=o}}u=g;return p|0}function Zi(a){a=a|0;var c=0,d=0,e=0,g=0;f[a>>2]=3656;c=a+72|0;d=a+136|0;e=a+4|0;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));e=c;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));n[d>>2]=$(1.0);d=a+140|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[a+164>>2]=-1;d=a+168|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[d+24>>2]=0;Ln(a+200|0);Wn(a+232|0);d=a+264|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;b[d+24>>0]=0;return}function _i(a,c,d,e){a=a|0;c=c|0;d=d|0;e=+e;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a=u;u=u+16|0;g=a;if(!c){h=0;u=a;return h|0}f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;i=Gj(d)|0;if(i>>>0>4294967279)Fq(g);if(i>>>0<11){b[g+11>>0]=i;if(!i)j=g;else{k=g;l=7}}else{m=i+16&-16;n=yn(m)|0;f[g>>2]=n;f[g+8>>2]=m|-2147483648;f[g+4>>2]=i;k=n;l=7}if((l|0)==7){eh(k|0,d|0,i|0)|0;j=k}b[j+i>>0]=0;gm(c,g,e);if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);h=1;u=a;return h|0}function $i(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a=u;u=u+16|0;g=a;if(!c){h=0;u=a;return h|0}f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;i=Gj(d)|0;if(i>>>0>4294967279)Fq(g);if(i>>>0<11){b[g+11>>0]=i;if(!i)j=g;else{k=g;l=7}}else{m=i+16&-16;n=yn(m)|0;f[g>>2]=n;f[g+8>>2]=m|-2147483648;f[g+4>>2]=i;k=n;l=7}if((l|0)==7){eh(k|0,d|0,i|0)|0;j=k}b[j+i>>0]=0;hm(c,g,e);if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);h=1;u=a;return h|0}function aj(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;c=f[a+28>>2]|0;if(c|0){d=c;do{c=d;d=f[d>>2]|0;e=c+8|0;g=c+20|0;h=f[g>>2]|0;f[g>>2]=0;if(h|0){aj(h);ur(h)}if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);ur(c)}while((d|0)!=0)}d=a+20|0;c=f[d>>2]|0;f[d>>2]=0;if(c|0)ur(c);c=f[a+8>>2]|0;if(c|0){d=c;do{c=d;d=f[d>>2]|0;e=c+8|0;h=f[c+20>>2]|0;if(h|0){g=c+24|0;if((f[g>>2]|0)!=(h|0))f[g>>2]=h;ur(h)}if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);ur(c)}while((d|0)!=0)}d=f[a>>2]|0;f[a>>2]=0;if(!d)return;ur(d);return}function bj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0;e=u;u=u+16|0;g=e;h=f[c+48>>2]|0;if(!h){i=yn(32)|0;f[g>>2]=i;f[g+8>>2]=-2147483616;f[g+4>>2]=23;j=i;k=16439;l=j+23|0;do{b[j>>0]=b[k>>0]|0;j=j+1|0;k=k+1|0}while((j|0)<(l|0));b[i+23>>0]=0;f[a>>2]=-1;oj(a+4|0,g);if((b[g+11>>0]|0)<0)ur(f[g>>2]|0);u=e;return}g=f[c+52>>2]|0;if(!g){Qc(a,c,h,d);u=e;return}else{yg(a,c,g,d);u=e;return}}function cj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;yk(a);b=a+84|0;c=f[b>>2]|0;if((c|0)<=0)return;d=c<<5;e=rr(c>>>0>134217727|d>>>0>4294967291?-1:d+4|0)|0;f[e>>2]=c;d=e+4|0;e=d+(c<<5)|0;c=d;do{Ln(c);c=c+32|0}while((c|0)!=(e|0));e=a+80|0;a=f[e>>2]|0;f[e>>2]=d;if(a|0){d=a+-4|0;c=f[d>>2]|0;if(c|0){g=a+(c<<5)|0;do{g=g+-32|0;Ej(g)}while((g|0)!=(a|0))}sr(d)}if((f[b>>2]|0)>0)h=0;else return;do{yk((f[e>>2]|0)+(h<<5)|0);h=h+1|0}while((h|0)<(f[b>>2]|0));return}function dj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;if(!b){d=0;return d|0}if(f[b+4>>2]|0){d=0;return d|0}a=yn(52)|0;Vb(a,c);f[a+40>>2]=0;f[a+44>>2]=0;f[a+48>>2]=0;c=b+4|0;b=f[c>>2]|0;f[c>>2]=a;if(!b){d=1;return d|0}a=b+40|0;c=f[a>>2]|0;if(c|0){e=b+44|0;g=f[e>>2]|0;if((g|0)==(c|0))h=c;else{i=g;do{g=i+-4|0;f[e>>2]=g;j=f[g>>2]|0;f[g>>2]=0;if(j|0){aj(j);ur(j)}i=f[e>>2]|0}while((i|0)!=(c|0));h=f[a>>2]|0}ur(h)}aj(b);ur(b);d=1;return d|0}function ej(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=f[a>>2]|0;if(b){b=c+8|0;d=b;e=lo(f[d>>2]|0,f[d+4>>2]|0,1,0)|0;d=b;f[d>>2]=e;f[d+4>>2]=I;d=a+28|0;e=f[d>>2]|0;b=a+24|0;f[b>>2]=f[b>>2]|1<<e;g=d;h=e}else{e=c;d=lo(f[e>>2]|0,f[e+4>>2]|0,1,0)|0;e=c;f[e>>2]=d;f[e+4>>2]=I;e=a+28|0;g=e;h=f[e>>2]|0}e=h+1|0;f[g>>2]=e;if((e|0)!=32)return;e=a+24|0;h=a+16|0;d=f[h>>2]|0;if((d|0)==(f[a+20>>2]|0))Oi(a+12|0,e);else{f[d>>2]=f[e>>2];f[h>>2]=d+4}f[g>>2]=0;f[e>>2]=0;return}function fj(a,b){a=a|0;b=b|0;var c=0,d=0;c=a+32|0;a=f[b>>2]|0;f[b>>2]=0;b=f[c>>2]|0;f[c>>2]=a;if(!b)return;a=b+88|0;c=f[a>>2]|0;f[a>>2]=0;if(c|0){a=f[c+8>>2]|0;if(a|0){d=c+12|0;if((f[d>>2]|0)!=(a|0))f[d>>2]=a;ur(a)}ur(c)}c=f[b+68>>2]|0;if(c|0){a=b+72|0;d=f[a>>2]|0;if((d|0)!=(c|0))f[a>>2]=d+(~((d+-4-c|0)>>>2)<<2);ur(c)}c=b+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){a=d+4|0;if((f[a>>2]|0)!=(c|0))f[a>>2]=c;ur(c)}ur(d)}ur(b);return}function gj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;if(c|0){h=a+11|0;i=b[h>>0]|0;if(i<<24>>24<0){j=f[a+4>>2]|0;k=(f[a+8>>2]&2147483647)+-1|0}else{j=i&255;k=10}if((k-j|0)>>>0<c>>>0){wj(a,k,c-k+j|0,j,j,0,0);l=b[h>>0]|0}else l=i;if(l<<24>>24<0)m=f[a>>2]|0;else m=a;go(m+j|0,c,d)|0;d=j+c|0;if((b[h>>0]|0)<0)f[a+4>>2]=d;else b[h>>0]=d;b[g>>0]=0;_p(m+d|0,g)}u=e;return a|0}function hj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+48|0;e=d+4|0;g=d;h=f[b+12>>2]|0;i=f[b+4>>2]|0;b=e;j=b+36|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));vh(g,c,h,i,e);i=f[e+24>>2]|0;if(!i){k=f[g>>2]|0;f[a>>2]=k;u=d;return}h=e+28|0;e=f[h>>2]|0;if((e|0)!=(i|0))f[h>>2]=e+(~((e+-4-i|0)>>>2)<<2);ur(i);k=f[g>>2]|0;f[a>>2]=k;u=d;return}function ij(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j)k=(f[a+8>>2]&2147483647)+-1|0;else k=10;do if(k>>>0>=d>>>0){if(j)l=f[a>>2]|0;else l=a;ap(l,c,d)|0;b[g>>0]=0;_p(l+d|0,g);if((b[h>>0]|0)<0){f[a+4>>2]=d;break}else{b[h>>0]=d;break}}else{if(j)m=f[a+4>>2]|0;else m=i&255;zi(a,k,d-k|0,m,0,m,d,c)}while(0);u=e;return a|0}function jj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d;do{f[c>>2]=g+-136;d=f[g+-20>>2]|0;if(d|0){h=g+-16|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);ur(d)}d=f[g+-32>>2]|0;if(d|0){i=g+-28|0;h=f[i>>2]|0;if((h|0)!=(d|0))f[i>>2]=h+(~((h+-4-d|0)>>>2)<<2);ur(d)}Ki(g+-132|0);g=f[c>>2]|0}while((g|0)!=(b|0));e=f[a>>2]|0}ur(e);return}function kj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j){k=f[a+4>>2]|0;l=(f[a+8>>2]&2147483647)+-1|0}else{k=i&255;l=10}if((l-k|0)>>>0>=d>>>0){if(d|0){if(j)m=f[a>>2]|0;else m=a;cp(m+k|0,c,d)|0;j=k+d|0;if((b[h>>0]|0)<0)f[a+4>>2]=j;else b[h>>0]=j;b[g>>0]=0;_p(m+j|0,g)}}else zi(a,l,d-l+k|0,k,k,0,d,c);u=e;return a|0}function lj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;f[a>>2]=4184;b=f[a+32>>2]|0;if(b|0){c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+20>>2]|0;if(b|0){d=a+24|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=a+8|0;c=f[b>>2]|0;if(!c)return;d=a+12|0;a=f[d>>2]|0;if((a|0)==(c|0))e=c;else{g=a;do{a=g+-4|0;f[d>>2]=a;h=f[a>>2]|0;f[a>>2]=0;if(h|0)Va[f[(f[h>>2]|0)+4>>2]&255](h);g=f[d>>2]|0}while((g|0)!=(c|0));e=f[b>>2]|0}ur(e);return}function mj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;if((Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)<=0){d=1;return d|0}a=0;while(1){e=f[(f[c>>2]|0)+4>>2]|0;g=lm(e,Ra[f[(f[b>>2]|0)+24>>2]&127](b,a)|0)|0;if((g|0)==-1){d=0;h=6;break}e=f[(f[b>>2]|0)+28>>2]|0;i=pl(f[c>>2]|0,g)|0;a=a+1|0;if(!(Ra[e&127](b,i)|0)){d=0;h=6;break}if((a|0)>=(Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)){d=1;h=6;break}}if((h|0)==6)return d|0;return 0}function nj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;if(!(Fo(a,b,c)|0)){d=0;return d|0}if(!(Qa[f[(f[a>>2]|0)+52>>2]&127](a)|0)){d=0;return d|0}c=a+4|0;e=a+8|0;g=f[c>>2]|0;if((f[e>>2]|0)==(g|0)){d=1;return d|0}h=a+36|0;a=0;i=g;while(1){g=f[(f[h>>2]|0)+(a<<2)>>2]|0;if(!(Sa[f[(f[g>>2]|0)+8>>2]&31](g,b,f[i+(a<<2)>>2]|0)|0)){d=0;j=7;break}a=a+1|0;i=f[c>>2]|0;if(a>>>0>=(f[e>>2]|0)-i>>2>>>0){d=1;j=7;break}}if((j|0)==7)return d|0;return 0}function oj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;if((b[c+11>>0]|0)<0){g=f[c>>2]|0;h=f[c+4>>2]|0;if(h>>>0>4294967279)Fq(a);if(h>>>0<11){b[a+11>>0]=h;i=a}else{j=h+16&-16;k=yn(j)|0;f[a>>2]=k;f[a+8>>2]=j|-2147483648;f[a+4>>2]=h;i=k}cp(i,g,h)|0;b[e>>0]=0;_p(i+h|0,e)}else{f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2]}u=d;return}function pj(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0;b[c+53>>0]=1;do if((f[c+4>>2]|0)==(e|0)){b[c+52>>0]=1;a=c+16|0;h=f[a>>2]|0;if(!h){f[a>>2]=d;f[c+24>>2]=g;f[c+36>>2]=1;if(!((g|0)==1?(f[c+48>>2]|0)==1:0))break;b[c+54>>0]=1;break}if((h|0)!=(d|0)){h=c+36|0;f[h>>2]=(f[h>>2]|0)+1;b[c+54>>0]=1;break}h=c+24|0;a=f[h>>2]|0;if((a|0)==2){f[h>>2]=g;i=g}else i=a;if((i|0)==1?(f[c+48>>2]|0)==1:0)b[c+54>>0]=1}while(0);return}function qj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=a+36|0;d=a+40|0;e=f[c>>2]|0;if((f[d>>2]|0)!=(e|0)){g=0;h=e;do{tg(h+(g*24|0)|0,b)|0;g=g+1|0;h=f[c>>2]|0}while(g>>>0<(((f[d>>2]|0)-h|0)/24|0)>>>0)}h=a+48|0;d=a+52|0;a=f[h>>2]|0;if((f[d>>2]|0)==(a|0))return 1;else{i=0;j=a}do{a=f[j+(i<<2)>>2]|0;$h(a<<1^a>>31,b)|0;i=i+1|0;j=f[h>>2]|0}while(i>>>0<(f[d>>2]|0)-j>>2>>>0);return 1}function rj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=a+d|0;c=c&255;if((d|0)>=67){while(a&3){b[a>>0]=c;a=a+1|0}g=e&-4|0;h=g-64|0;i=c|c<<8|c<<16|c<<24;while((a|0)<=(h|0)){f[a>>2]=i;f[a+4>>2]=i;f[a+8>>2]=i;f[a+12>>2]=i;f[a+16>>2]=i;f[a+20>>2]=i;f[a+24>>2]=i;f[a+28>>2]=i;f[a+32>>2]=i;f[a+36>>2]=i;f[a+40>>2]=i;f[a+44>>2]=i;f[a+48>>2]=i;f[a+52>>2]=i;f[a+56>>2]=i;f[a+60>>2]=i;a=a+64|0}while((a|0)<(g|0)){f[a>>2]=i;a=a+4|0}}while((a|0)<(e|0)){b[a>>0]=c;a=a+1|0}return e-d|0}function sj(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0;do if(!(Jp(a,f[c+8>>2]|0,g)|0)){if(Jp(a,f[c>>2]|0,g)|0){if((f[c+16>>2]|0)!=(d|0)?(h=c+20|0,(f[h>>2]|0)!=(d|0)):0){f[c+32>>2]=e;f[h>>2]=d;h=c+40|0;f[h>>2]=(f[h>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0)b[c+54>>0]=1;f[c+44>>2]=4;break}if((e|0)==1)f[c+32>>2]=1}}else gn(0,c,d,e);while(0);return}function tj(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;if(!(Qa[f[(f[a>>2]|0)+64>>2]&127](a)|0)){e=0;u=c;return e|0}g=f[a+48>>2]|0;h=yn(32)|0;f[d>>2]=h;f[d+8>>2]=-2147483616;f[d+4>>2]=29;i=h;j=16279;k=i+29|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[h+29>>0]=0;h=_j(g,d,0)|0;if((b[d+11>>0]|0)<0)ur(f[d>>2]|0);if(!h){e=1;u=c;return e|0}Va[f[(f[a>>2]|0)+68>>2]&255](a);e=1;u=c;return e|0}function uj(a){a=a|0;var b=0,c=0,d=0,e=0;b=a+80|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=c+-4|0;d=f[b>>2]|0;if(d|0){e=c+(d<<5)|0;do{e=e+-32|0;Ej(e)}while((e|0)!=(c|0))}sr(b)}b=f[a+68>>2]|0;if(b|0){c=a+72|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);ur(b)}b=a+44|0;e=f[b>>2]|0;f[b>>2]=0;if(e|0)ur(e);e=f[a+32>>2]|0;if(!e){Ej(a);return}b=a+36|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;ur(e);Ej(a);return}function vj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3204;b=f[a+136>>2]|0;if(b|0){c=a+140|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+76>>2]|0;if(b|0)ur(b);b=f[a+64>>2]|0;if(b|0)ur(b);b=f[a+52>>2]|0;if(b|0)ur(b);b=f[a+40>>2]|0;if(!b)return;ur(b);return}function wj(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0;if((-17-c|0)>>>0<d>>>0)Fq(a);if((b[a+11>>0]|0)<0)j=f[a>>2]|0;else j=a;if(c>>>0<2147483623){k=d+c|0;d=c<<1;l=k>>>0<d>>>0?d:k;m=l>>>0<11?11:l+16&-16}else m=-17;l=yn(m)|0;if(g|0)cp(l,j,g)|0;k=e-h-g|0;if(k|0)cp(l+g+i|0,j+g+h|0,k)|0;if((c|0)!=10)ur(j);f[a>>2]=l;f[a+8>>2]=m|-2147483648;return}function xj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2840;b=f[a+136>>2]|0;if(b|0){c=a+140|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b)}b=f[a+76>>2]|0;if(b|0)ur(b);b=f[a+64>>2]|0;if(b|0)ur(b);b=f[a+52>>2]|0;if(b|0)ur(b);b=f[a+40>>2]|0;if(!b)return;ur(b);return}function yj(a,b){a=a|0;b=b|0;if(!b)return;else{yj(a,f[b>>2]|0);yj(a,f[b+4>>2]|0);Dj(b+20|0,f[b+24>>2]|0);ur(b);return}}function zj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;Xf(a,b,c);c=f[a+100>>2]|0;d=f[a+96>>2]|0;a=d;if((c|0)==(d|0))return;e=f[b>>2]|0;b=(c-d|0)/12|0;d=0;do{c=a+(d*12|0)|0;f[c>>2]=f[e+(f[c>>2]<<2)>>2];c=a+(d*12|0)+4|0;f[c>>2]=f[e+(f[c>>2]<<2)>>2];c=a+(d*12|0)+8|0;f[c>>2]=f[e+(f[c>>2]<<2)>>2];d=d+1|0}while(d>>>0<b>>>0);return}function Aj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=a+64|0;if((f[d>>2]|0)==0?(e=yn(32)|0,Nn(e),g=f[d>>2]|0,f[d>>2]=e,g|0):0){e=f[g>>2]|0;if(e|0){h=g+4|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;ur(e)}ur(g)}g=dm(f[a+28>>2]|0)|0;e=X(g,b[a+24>>0]|0)|0;g=((e|0)<0)<<31>>31;h=f[d>>2]|0;i=In(e|0,g|0,c|0,0)|0;if(!(fi(h,0,i,I)|0)){j=0;return j|0}Qk(a,f[d>>2]|0,e,g,0,0);f[a+80>>2]=c;j=1;return j|0}function Bj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+64|0;e=d;if(!(Jp(a,b,0)|0))if((b|0)!=0?(g=Bh(b,1152,1136,0)|0,(g|0)!=0):0){b=e+4|0;h=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(h|0));f[e>>2]=g;f[e+8>>2]=a;f[e+12>>2]=-1;f[e+48>>2]=1;Ya[f[(f[g>>2]|0)+28>>2]&7](g,e,f[c>>2]|0,1);if((f[e+24>>2]|0)==1){f[c>>2]=f[e+16>>2];i=1}else i=0;j=i}else j=0;else j=1;u=d;return j|0}function Cj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;if(!c){d=0;return d|0}e=c+40|0;g=c+44|0;$h((f[g>>2]|0)-(f[e>>2]|0)>>2,b)|0;h=f[e>>2]|0;e=f[g>>2]|0;if((h|0)!=(e|0)){g=h;do{h=f[g>>2]|0;if(h|0){$h(f[h+40>>2]|0,b)|0;jg(a,b,h)|0}g=g+4|0}while((g|0)!=(e|0))}jg(a,b,c)|0;d=1;return d|0}function Dj(a,c){a=a|0;c=c|0;var d=0;if(!c)return;Dj(a,f[c>>2]|0);Dj(a,f[c+4>>2]|0);a=c+16|0;d=c+28|0;if((b[d+11>>0]|0)<0)ur(f[d>>2]|0);if((b[a+11>>0]|0)<0)ur(f[a>>2]|0);ur(c);return}function Ej(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=u;u=u+16|0;c=b;d=c;f[d>>2]=0;f[d+4>>2]=0;sf(a,2,c);c=f[a+12>>2]|0;d=a+16|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e+(~((e+-4-c|0)>>>2)<<2)|0;f[d>>2]=h;g=h}f[a+24>>2]=0;f[a+28>>2]=0;if(c|0){if((g|0)!=(c|0))f[d>>2]=g+(~((g+-4-c|0)>>>2)<<2);ur(c)}c=f[a>>2]|0;if(!c){u=b;return}g=a+4|0;a=f[g>>2]|0;if((a|0)!=(c|0))f[g>>2]=a+(~((a+-8-c|0)>>>3)<<3);ur(c);u=b;return}function Fj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=c;i=f[c+64>>2]|0;c=((f[i+4>>2]|0)-(f[i>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;kh(a+24|0,c,g);c=f[h>>2]|0;h=(f[c+56>>2]|0)-(f[c+52>>2]|0)>>2;b[g>>0]=0;kh(a+36|0,h,g);g=a+8|0;f[g>>2]=f[d>>2];f[g+4>>2]=f[d+4>>2];f[g+8>>2]=f[d+8>>2];f[g+12>>2]=f[d+12>>2];u=e;return}function Gj(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a;a:do if(!(c&3)){d=a;e=4}else{g=a;h=c;while(1){if(!(b[g>>0]|0)){i=h;break a}j=g+1|0;h=j;if(!(h&3)){d=j;e=4;break}else g=j}}while(0);if((e|0)==4){e=d;while(1){k=f[e>>2]|0;if(!((k&-2139062144^-2139062144)&k+-16843009))e=e+4|0;else break}if(!((k&255)<<24>>24))l=e;else{k=e;while(1){e=k+1|0;if(!(b[e>>0]|0)){l=e;break}else k=e}}i=l}return i-c|0}function Hj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j)k=f[a+4>>2]|0;else k=i&255;do if(k>>>0>=c>>>0)if(j){i=(f[a>>2]|0)+c|0;b[g>>0]=0;_p(i,g);f[a+4>>2]=c;break}else{b[g>>0]=0;_p(a+c|0,g);b[h>>0]=c;break}else gj(a,c-k|0,d)|0;while(0);u=e;return}function Ij(a){a=a|0;var b=0,c=0,d=0;if(!a)return;b=a+88|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=f[c+8>>2]|0;if(b|0){d=c+12|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;ur(b)}ur(c)}c=f[a+68>>2]|0;if(c|0){b=a+72|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);ur(c)}c=a+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){b=d+4|0;if((f[b>>2]|0)!=(c|0))f[b>>2]=c;ur(c)}ur(d)}ur(a);return}function Jj(a,c,d,e,g,h,i,j,k,l){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0;f[a>>2]=d;if(d|0){m=d+16|0;n=f[m+4>>2]|0;o=a+8|0;f[o>>2]=f[m>>2];f[o+4>>2]=n;n=d+24|0;d=f[n+4>>2]|0;o=a+16|0;f[o>>2]=f[n>>2];f[o+4>>2]=d}b[a+24>>0]=e;f[a+28>>2]=g;b[a+32>>0]=h&1;h=a+40|0;f[h>>2]=i;f[h+4>>2]=j;j=a+48|0;f[j>>2]=k;f[j+4>>2]=l;f[a+56>>2]=c;return}function Kj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;if((f[c+76>>2]|0)>=0?(zr(c)|0)!=0:0){d=a&255;e=a&255;if((e|0)!=(b[c+75>>0]|0)?(g=c+20|0,h=f[g>>2]|0,h>>>0<(f[c+16>>2]|0)>>>0):0){f[g>>2]=h+1;b[h>>0]=d;i=e}else i=Mj(c,a)|0;yr(c);j=i}else k=3;do if((k|0)==3){i=a&255;e=a&255;if((e|0)!=(b[c+75>>0]|0)?(d=c+20|0,h=f[d>>2]|0,h>>>0<(f[c+16>>2]|0)>>>0):0){f[d>>2]=h+1;b[h>>0]=i;j=e;break}j=Mj(c,a)|0}while(0);return j|0}function Lj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;i=f[a+4>>2]|0;if((i|0)==-1){j=0;u=d;return j|0}b[h>>0]=i;i=c+16|0;a=f[i+4>>2]|0;if(!((a|0)>0|(a|0)==0&(f[i>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Ke(c,e,h,h+1|0)|0}j=1;u=d;return j|0}function Mj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;d=u;u=u+16|0;e=d;g=c&255;b[e>>0]=g;i=a+16|0;j=f[i>>2]|0;if(!j)if(!(Fl(a)|0)){k=f[i>>2]|0;l=4}else m=-1;else{k=j;l=4}do if((l|0)==4){j=a+20|0;i=f[j>>2]|0;if(i>>>0<k>>>0?(n=c&255,(n|0)!=(b[a+75>>0]|0)):0){f[j>>2]=i+1;b[i>>0]=g;m=n;break}if((Sa[f[a+36>>2]&31](a,e,1)|0)==1)m=h[e>>0]|0;else m=-1}while(0);u=d;return m|0}function Nj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=yn(88)|0;d=c+60|0;e=c;g=e+60|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f[d>>2]=c;d=c+64|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;d=dg(c,b)|0;f[a>>2]=d?c:0;a=d?0:c;if(d)return;Gi(a);ur(a);return}function Oj(a,b){a=a|0;b=b|0;if(!b)return;else{Oj(a,f[b>>2]|0);Oj(a,f[b+4>>2]|0);Dj(b+20|0,f[b+24>>2]|0);ur(b);return}}function Pj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=c;i=((f[c+4>>2]|0)-(f[c>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;kh(a+24|0,i,g);i=f[h>>2]|0;h=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;b[g>>0]=0;kh(a+36|0,h,g);g=a+8|0;f[g>>2]=f[d>>2];f[g+4>>2]=f[d+4>>2];f[g+8>>2]=f[d+8>>2];f[g+12>>2]=f[d+12>>2];u=e;return}function Qj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e;h=e+4|0;f[g>>2]=c;c=a+4|0;a=yn(32)|0;f[h>>2]=a;f[h+8>>2]=-2147483616;f[h+4>>2]=17;i=a;j=14860;k=i+17|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[a+17>>0]=0;Zj(Jd(c,g)|0,h,d);if((b[h+11>>0]|0)>=0){u=e;return}ur(f[h>>2]|0);u=e;return}function Rj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){d=0;return d|0}e=f[c+(b<<2)>>2]|0;if((e|0)<0){d=0;return d|0}b=a+48|0;if((f[a+52>>2]|0)>>>0<=e>>>0)Be(b,e+1|0,0);c=(f[b>>2]|0)+(e>>>5<<2)|0;f[c>>2]=f[c>>2]|1<<(e&31);c=f[a+36>>2]|0;if((f[a+40>>2]|0)-c>>2>>>0<=e>>>0){d=1;return d|0}gq(f[c+(e<<2)>>2]|0);d=1;return d|0}function Sj(a){a=a|0;if(!a)return;f[a>>2]=1264;Dj(a+28|0,f[a+32>>2]|0);yj(a+16|0,f[a+20>>2]|0);Dj(a+4|0,f[a+8>>2]|0);ur(a);return}function Tj(a){a=a|0;f[a>>2]=1264;Dj(a+28|0,f[a+32>>2]|0);yj(a+16|0,f[a+20>>2]|0);Dj(a+4|0,f[a+8>>2]|0);return}function Uj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;if(c>>>0>0|(c|0)==0&a>>>0>4294967295){e=d;f=a;g=c;while(1){c=vn(f|0,g|0,10,0)|0;e=e+-1|0;b[e>>0]=c&255|48;c=f;f=Np(f|0,g|0,10,0)|0;if(!(g>>>0>9|(g|0)==9&c>>>0>4294967295))break;else g=I}h=f;i=e}else{h=a;i=d}if(!h)j=i;else{d=h;h=i;while(1){i=h+-1|0;b[i>>0]=(d>>>0)%10|0|48;if(d>>>0<10){j=i;break}else{d=(d>>>0)/10|0;h=i}}}return j|0}function Vj(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=a;while(1){d=c+1|0;if(!(Mq(b[c>>0]|0)|0))break;else c=d}a=b[c>>0]|0;switch(a<<24>>24|0){case 45:{e=1;f=5;break}case 43:{e=0;f=5;break}default:{g=0;h=c;i=a}}if((f|0)==5){g=e;h=d;i=b[d>>0]|0}if(!(gr(i<<24>>24)|0))j=0;else{i=0;d=h;while(1){h=(i*10|0)+48-(b[d>>0]|0)|0;d=d+1|0;if(!(gr(b[d>>0]|0)|0)){j=h;break}else i=h}}return (g|0?j:0-j|0)|0}function Wj(a,c,d){a=a|0;c=c|0;d=$(d);var e=0,g=0,h=0;e=u;u=u+16|0;g=e;sl(g,d);h=yi(a,c)|0;c=h+11|0;if((b[c>>0]|0)<0){b[f[h>>2]>>0]=0;f[h+4>>2]=0}else{b[h>>0]=0;b[c>>0]=0}ah(h,0);f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];u=e;return}function Xj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=u;u=u+16|0;c=b+8|0;d=b+4|0;e=b;f[e>>2]=f[(f[a+4>>2]|0)+80>>2];g=f[a+44>>2]|0;a=g+16|0;h=f[a+4>>2]|0;if((h|0)>0|(h|0)==0&(f[a>>2]|0)>>>0>0){u=b;return 1}f[d>>2]=f[g+4>>2];f[c>>2]=f[d>>2];Ke(g,c,e,e+4|0)|0;u=b;return 1}function Yj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;vl(g,d&1);d=yi(a,c)|0;c=d+11|0;if((b[c>>0]|0)<0){b[f[d>>2]>>0]=0;f[d+4>>2]=0}else{b[d>>0]=0;b[c>>0]=0}ah(d,0);f[d>>2]=f[g>>2];f[d+4>>2]=f[g+4>>2];f[d+8>>2]=f[g+8>>2];u=e;return}function Zj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;vl(g,d);d=yi(a,c)|0;c=d+11|0;if((b[c>>0]|0)<0){b[f[d>>2]>>0]=0;f[d+4>>2]=0}else{b[d>>0]=0;b[c>>0]=0}ah(d,0);f[d>>2]=f[g>>2];f[d+4>>2]=f[g+4>>2];f[d+8>>2]=f[g+8>>2];u=e;return}function _j(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=Og(a,c)|0;if((e|0)==(a+4|0)){g=-1;h=(g|0)==-1;i=(g|0)!=0;j=h?d:i;return j|0}a=e+28|0;if((b[a+11>>0]|0)<0)k=f[a>>2]|0;else k=a;g=Vj(k)|0;h=(g|0)==-1;i=(g|0)!=0;j=h?d:i;return j|0}function $j(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;if(c>>>0>10){g=0;u=d;return g|0}h=yn(48)|0;f[e>>2]=h;f[e+8>>2]=-2147483600;f[e+4>>2]=33;i=h;j=14995;k=i+33|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[h+33>>0]=0;Zj(a,e,c);if((b[e+11>>0]|0)<0)ur(f[e>>2]|0);g=1;u=d;return g|0}function ak(a){a=a|0;f[a>>2]=1264;Dj(a+28|0,f[a+32>>2]|0);yj(a+16|0,f[a+20>>2]|0);Dj(a+4|0,f[a+8>>2]|0);ur(a);return}function bk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=f[b>>2]|0;if((c|0)==-1)return 1;b=c*3|0;if((b|0)==-1)return 1;c=f[a>>2]|0;a=f[c+(b<<2)>>2]|0;d=b+1|0;e=((d>>>0)%3|0|0)==0?b+-2|0:d;if((e|0)==-1)g=-1;else g=f[c+(e<<2)>>2]|0;e=(((b>>>0)%3|0|0)==0?2:-1)+b|0;if((e|0)==-1)h=-1;else h=f[c+(e<<2)>>2]|0;if((a|0)==(g|0))return 1;else return (a|0)==(h|0)|(g|0)==(h|0)|0;return 0}function ck(a){a=a|0;f[a>>2]=3544;Dj(a+28|0,f[a+32>>2]|0);Oj(a+16|0,f[a+20>>2]|0);Dj(a+4|0,f[a+8>>2]|0);return}function dk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0;d=0;while(1){if((h[17361+d>>0]|0)==(a|0)){e=2;break}g=d+1|0;if((g|0)==87){i=17449;j=87;e=5;break}else d=g}if((e|0)==2)if(!d)k=17449;else{i=17449;j=d;e=5}if((e|0)==5)while(1){e=0;d=i;do{a=d;d=d+1|0}while((b[a>>0]|0)!=0);j=j+-1|0;if(!j){k=d;break}else{i=d;e=5}}return Rq(k,f[c+20>>2]|0)|0}function ek(a,b){a=+a;b=b|0;var c=0,d=0,e=0,g=0.0,h=0.0,i=0,j=0.0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;e=oo(c|0,d|0,52)|0;switch(e&2047){case 0:{if(a!=0.0){g=+ek(a*18446744073709551616.0,b);h=g;i=(f[b>>2]|0)+-64|0}else{h=a;i=0}f[b>>2]=i;j=h;break}case 2047:{j=a;break}default:{f[b>>2]=(e&2047)+-1022;f[s>>2]=c;f[s+4>>2]=d&-2146435073|1071644672;j=+p[s>>3]}}return +j}function fk(a){a=a|0;f[a>>2]=3544;Dj(a+28|0,f[a+32>>2]|0);Oj(a+16|0,f[a+20>>2]|0);Dj(a+4|0,f[a+8>>2]|0);ur(a);return}function gk(a,b){a=+a;b=b|0;var c=0.0,d=0,e=0,g=0.0,h=0;if((b|0)<=1023)if((b|0)<-1022){c=a*2.2250738585072014e-308;d=(b|0)<-2044;e=b+2044|0;g=d?c*2.2250738585072014e-308:c;h=d?((e|0)>-1022?e:-1022):b+1022|0}else{g=a;h=b}else{c=a*8988465674311579538646525.0e283;e=(b|0)>2046;d=b+-2046|0;g=e?c*8988465674311579538646525.0e283:c;h=e?((d|0)<1023?d:1023):b+-1023|0}b=jo(h+1023|0,0,52)|0;h=I;f[s>>2]=b;f[s+4>>2]=h;return +(g*+p[s>>3])}function hk(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;if(!(f[a+80>>2]|0)){b=0;return b|0}c=a+8|0;d=a+12|0;a=f[c>>2]|0;if(((f[d>>2]|0)-a|0)>0){e=0;g=a}else{b=1;return b|0}while(1){a=f[g+(e<<2)>>2]|0;e=e+1|0;if(!(Ql(a,a)|0)){b=0;h=5;break}g=f[c>>2]|0;if((e|0)>=((f[d>>2]|0)-g>>2|0)){b=1;h=5;break}}if((h|0)==5)return b|0;return 0}function ik(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=a+36|0;d=a+40|0;e=f[c>>2]|0;if((f[d>>2]|0)==(e|0)){g=1;return g|0}h=a+60|0;a=0;i=e;while(1){e=f[i+(a<<2)>>2]|0;a=a+1|0;if(!(Sa[f[(f[e>>2]|0)+20>>2]&31](e,h,b)|0)){g=0;j=5;break}i=f[c>>2]|0;if(a>>>0>=(f[d>>2]|0)-i>>2>>>0){g=1;j=5;break}}if((j|0)==5)return g|0;return 0}function jk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+36|0;d=a+40|0;a=f[c>>2]|0;if((f[d>>2]|0)==(a|0)){e=1;return e|0}else{g=0;h=a}while(1){a=f[h+(g<<2)>>2]|0;g=g+1|0;if(!(Ra[f[(f[a>>2]|0)+24>>2]&127](a,b)|0)){e=0;i=4;break}h=f[c>>2]|0;if(g>>>0>=(f[d>>2]|0)-h>>2>>>0){e=1;i=4;break}}if((i|0)==4)return e|0;return 0}function kk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;f[a>>2]=0;c=a+4|0;f[c>>2]=0;f[a+8>>2]=0;d=b+4|0;e=(f[d>>2]|0)-(f[b>>2]|0)|0;g=e>>2;if(!g)return;if(g>>>0>1073741823)Fq(a);h=yn(e)|0;f[c>>2]=h;f[a>>2]=h;f[a+8>>2]=h+(g<<2);g=f[b>>2]|0;b=(f[d>>2]|0)-g|0;if((b|0)<=0)return;eh(h|0,g|0,b|0)|0;f[c>>2]=h+(b>>>2<<2);return}function lk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=a+8|0;d=f[a>>2]|0;if((f[c>>2]|0)-d>>2>>>0>=b>>>0)return;e=a+4|0;if(b>>>0>1073741823){g=ra(8)|0;op(g,16742);f[g>>2]=7520;va(g|0,1208,126)}g=(f[e>>2]|0)-d|0;h=yn(b<<2)|0;if((g|0)>0)eh(h|0,d|0,g|0)|0;f[a>>2]=h;f[e>>2]=h+(g>>2<<2);f[c>>2]=h+(b<<2);if(!d)return;ur(d);return}function mk(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=a+36|0;c=a+40|0;d=f[b>>2]|0;if((f[c>>2]|0)==(d|0)){e=1;return e|0}g=a+60|0;a=0;h=d;while(1){d=f[h+(a<<2)>>2]|0;a=a+1|0;if(!(Ra[f[(f[d>>2]|0)+16>>2]&127](d,g)|0)){e=0;i=5;break}h=f[b>>2]|0;if(a>>>0>=(f[c>>2]|0)-h>>2>>>0){e=1;i=5;break}}if((i|0)==5)return e|0;return 0}function nk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;g=yn(16)|0;f[e>>2]=g;f[e+8>>2]=-2147483632;f[e+4>>2]=15;h=g;i=14844;j=h+15|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[g+15>>0]=0;Zj(a+4|0,e,c);if((b[e+11>>0]|0)>=0){u=d;return}ur(f[e>>2]|0);u=d;return}function ok(a,b){a=a|0;b=b|0;var c=0,d=0;f[a>>2]=0;f[a+4>>2]=b;if(b|0?(c=Bh(b,1120,1104,0)|0,c|0):0){d=yn(56)|0;_m(d,c);c=f[a>>2]|0;f[a>>2]=d;if(!c)return;Va[f[(f[c>>2]|0)+4>>2]&255](c);return}c=yn(56)|0;Vm(c,b);b=f[a>>2]|0;f[a>>2]=c;if(!b)return;Va[f[(f[b>>2]|0)+4>>2]&255](b);return}function pk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0;d=f[a+176>>2]|0;e=f[a+172>>2]|0;a=e;if((d|0)==(e|0))return 0;g=(d-e|0)/136|0;e=0;while(1){if((f[a+(e*136|0)>>2]|0)==(c|0)){h=4;break}d=e+1|0;if(d>>>0<g>>>0)e=d;else{h=6;break}}if((h|0)==4)return ((b[a+(e*136|0)+100>>0]|0)==0?0:a+(e*136|0)+4|0)|0;else if((h|0)==6)return 0;return 0}function qk(a,b){a=a|0;b=b|0;var c=0,d=0;c=f[a+72>>2]|0;if(!c){d=0;return d|0}f[c+4>>2]=a+60;if(!(Qa[f[(f[c>>2]|0)+12>>2]&127](c)|0)){d=0;return d|0}if(!(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)){d=0;return d|0}if(!(Ra[f[(f[a>>2]|0)+44>>2]&127](a,b)|0)){d=0;return d|0}d=Ra[f[(f[a>>2]|0)+48>>2]&127](a,b)|0;return d|0}function rk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;f[a>>2]=0;d=a+4|0;f[d>>2]=0;f[a+8>>2]=0;if(!b)return;if(b>>>0>357913941)Fq(a);e=yn(b*12|0)|0;f[d>>2]=e;f[a>>2]=e;f[a+8>>2]=e+(b*12|0);a=b;b=e;do{kk(b,c);b=(f[d>>2]|0)+12|0;f[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function sk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=f[b>>2]|0;if(!c){d=0;return d|0}e=a+44|0;g=f[e>>2]|0;if(g>>>0<(f[a+48>>2]|0)>>>0){f[b>>2]=0;f[g>>2]=c;f[e>>2]=(f[e>>2]|0)+4;d=1;return d|0}else{Qg(a+40|0,b);d=1;return d|0}return 0}function tk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3456;f[a+40>>2]=1308;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}f[a>>2]=1588;b=a+36|0;d=f[b>>2]|0;f[b>>2]=0;if(!d){Li(a);ur(a);return}Va[f[(f[d>>2]|0)+4>>2]&255](d);Li(a);ur(a);return}function uk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0;f[c>>2]=2;d=a+4|0;a=c+8|0;e=f[a>>2]|0;g=(f[c+12>>2]|0)-e|0;if(g>>>0<4294967292){Rk(a,g+4|0,0);i=f[a>>2]|0}else i=e;e=i+g|0;g=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[e>>0]=g;b[e+1>>0]=g>>8;b[e+2>>0]=g>>16;b[e+3>>0]=g>>24;return}function vk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2300;b=f[a+76>>2]|0;if(b|0)ur(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)sr(c);f[a>>2]=1656;c=f[a+32>>2]|0;if(!c){ur(a);return}b=a+36|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);ur(c);ur(a);return}function wk(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3740;b=a+8|0;f[b>>2]=3764;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);ur(c)}f[b>>2]=3784;b=f[a+44>>2]|0;if(b|0)ur(b);b=f[a+32>>2]|0;if(!b){ur(a);return}ur(b);ur(a);return}function xk(a,c,d){a=a|0;c=c|0;d=$(d);var e=0,g=Oa,h=0;e=Og(a,c)|0;if((e|0)==(a+4|0)){g=d;return $(g)}a=e+28|0;if((b[a+11>>0]|0)<0)h=f[a>>2]|0;else h=a;g=$(+or(h));return $(g)}function yk(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=u;u=u+16|0;c=b;d=c;f[d>>2]=0;f[d+4>>2]=0;sf(a,2,c);c=f[a+12>>2]|0;d=a+16|0;e=f[d>>2]|0;if((e|0)==(c|0)){g=a+24|0;f[g>>2]=0;h=a+28|0;f[h>>2]=0;u=b;return}f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);g=a+24|0;f[g>>2]=0;h=a+28|0;f[h>>2]=0;u=b;return}function zk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=f[a+176>>2]|0;d=f[a+172>>2]|0;e=d;a:do if((c|0)!=(d|0)){g=(c-d|0)/136|0;h=0;while(1){if((f[e+(h*136|0)>>2]|0)==(b|0))break;i=h+1|0;if(i>>>0<g>>>0)h=i;else break a}j=e+(h*136|0)+104|0;return j|0}while(0);j=a+40|0;return j|0}function Ak(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1880;b=f[a+76>>2]|0;if(b|0)ur(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)sr(c);f[a>>2]=1656;c=f[a+32>>2]|0;if(!c){ur(a);return}b=a+36|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);ur(c);ur(a);return}function Bk(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3808;b=a+8|0;f[b>>2]=3832;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);ur(c)}f[b>>2]=3852;b=f[a+44>>2]|0;if(b|0)ur(b);b=f[a+32>>2]|0;if(!b){ur(a);return}ur(b);ur(a);return}function Ck(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3456;f[a+40>>2]=1308;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}f[a>>2]=1588;b=a+36|0;d=f[b>>2]|0;f[b>>2]=0;if(!d){Li(a);return}Va[f[(f[d>>2]|0)+4>>2]&255](d);Li(a);return}function Dk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;Nc(a,b);if((b|0)<=-1)return;c=a+88|0;d=f[c>>2]|0;e=f[a+84>>2]|0;if((d-e>>2|0)<=(b|0))return;a=e+(b<<2)|0;b=a+4|0;e=d-b|0;g=e>>2;if(!g)h=d;else{pm(a|0,b|0,e|0)|0;h=f[c>>2]|0}e=a+(g<<2)|0;if((h|0)==(e|0))return;f[c>>2]=h+(~((h+-4-e|0)>>>2)<<2);return}function Ek(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=f[a+32>>2]|0;c=f[a+36>>2]|0;if((b|0)==(c|0)){d=1;return d|0}e=a+8|0;g=a+44|0;a=b;while(1){b=f[(f[e>>2]|0)+(f[a>>2]<<2)>>2]|0;a=a+4|0;if(!(Ra[f[(f[b>>2]|0)+20>>2]&127](b,f[g>>2]|0)|0)){d=0;h=5;break}if((a|0)==(c|0)){d=1;h=5;break}}if((h|0)==5)return d|0;return 0}function Fk(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3740;b=a+8|0;f[b>>2]=3764;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);ur(c)}f[b>>2]=3784;b=f[a+44>>2]|0;if(b|0)ur(b);b=f[a+32>>2]|0;if(!b)return;ur(b);return}function Gk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0.0;d=u;u=u+128|0;e=d;g=e;h=g+124|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(h|0));g=e+4|0;f[g>>2]=a;h=e+8|0;f[h>>2]=-1;f[e+44>>2]=a;f[e+76>>2]=-1;kn(e,0);i=+Tc(e,c,1);c=(f[g>>2]|0)-(f[h>>2]|0)+(f[e+108>>2]|0)|0;if(b|0)f[b>>2]=c|0?a+c|0:a;u=d;return +i}function Hk(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0;a=c+16|0;g=f[a>>2]|0;do if(g){if((g|0)!=(d|0)){h=c+36|0;f[h>>2]=(f[h>>2]|0)+1;f[c+24>>2]=2;b[c+54>>0]=1;break}h=c+24|0;if((f[h>>2]|0)==2)f[h>>2]=e}else{f[a>>2]=d;f[c+24>>2]=e;f[c+36>>2]=1}while(0);return}function Ik(a){a=a|0;var b=0,c=0;f[a>>2]=2300;b=f[a+76>>2]|0;if(b|0)ur(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)sr(c);f[a>>2]=1656;c=f[a+32>>2]|0;if(!c)return;b=a+36|0;a=f[b>>2]|0;if((a|0)!=(c|0))f[b>>2]=a+(~((a+-4-c|0)>>>2)<<2);ur(c);return}function Jk(a){a=a|0;var c=0,d=0,e=0;c=a+74|0;d=b[c>>0]|0;b[c>>0]=d+255|d;d=a+20|0;c=a+28|0;if((f[d>>2]|0)>>>0>(f[c>>2]|0)>>>0)Sa[f[a+36>>2]&31](a,0,0)|0;f[a+16>>2]=0;f[c>>2]=0;f[d>>2]=0;d=f[a>>2]|0;if(!(d&4)){c=(f[a+44>>2]|0)+(f[a+48>>2]|0)|0;f[a+8>>2]=c;f[a+4>>2]=c;e=d<<27>>31}else{f[a>>2]=d|32;e=-1}return e|0}function Kk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;d=Og(a,c)|0;if((d|0)==(a+4|0)){e=0;return e|0}a=d+28|0;if((b[a+11>>0]|0)<0)g=f[a>>2]|0;else g=a;e=((Vj(g)|0)+1|0)>>>0>1;return e|0}function Lk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=6416;b=f[a+96>>2]|0;if(b|0){c=a+100|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);ur(b)}b=f[a+84>>2]|0;if(!b){Lg(a);ur(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b);Lg(a);ur(a);return}function Mk(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3808;b=a+8|0;f[b>>2]=3832;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);ur(c)}f[b>>2]=3852;b=f[a+44>>2]|0;if(b|0)ur(b);b=f[a+32>>2]|0;if(!b)return;ur(b);return}function Nk(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0;e=Og(a,c)|0;if((e|0)==(a+4|0)){g=d;return g|0}d=e+28|0;if((b[d+11>>0]|0)<0)h=f[d>>2]|0;else h=d;g=Vj(h)|0;return g|0}function Ok(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;g=d>>31|((d|0)<0?-1:0)<<1;h=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;i=no(e^a|0,f^b|0,e|0,f|0)|0;b=I;a=g^e;e=h^f;return no((Nd(i,b,no(g^c|0,h^d|0,g|0,h|0)|0,I,0)|0)^a|0,I^e|0,a|0,e|0)|0}function Pk(a){a=a|0;var b=0,c=0;f[a>>2]=1880;b=f[a+76>>2]|0;if(b|0)ur(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)sr(c);f[a>>2]=1656;c=f[a+32>>2]|0;if(!c)return;b=a+36|0;a=f[b>>2]|0;if((a|0)!=(c|0))f[b>>2]=a+(~((a+-4-c|0)>>>2)<<2);ur(c);return}function Qk(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0;f[a>>2]=b;h=b+16|0;i=f[h+4>>2]|0;j=a+8|0;f[j>>2]=f[h>>2];f[j+4>>2]=i;i=b+24|0;b=f[i+4>>2]|0;j=a+16|0;f[j>>2]=f[i>>2];f[j+4>>2]=b;b=a+40|0;f[b>>2]=c;f[b+4>>2]=d;d=a+48|0;f[d>>2]=e;f[d+4>>2]=g;return}function Rk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e|0;h=e;e=d;if(g>>>0>=b>>>0){if(g>>>0>b>>>0?(d=h+b|0,(d|0)!=(e|0)):0)f[c>>2]=d}else Di(a,b-g|0);g=a+24|0;a=g;b=lo(f[a>>2]|0,f[a+4>>2]|0,1,0)|0;a=g;f[a>>2]=b;f[a+4>>2]=I;return}function Sk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;d=Og(a,c)|0;if((d|0)==(a+4|0)){e=-1;return e|0}a=d+28|0;if((b[a+11>>0]|0)<0)g=f[a>>2]|0;else g=a;e=Vj(g)|0;return e|0}function Tk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=6416;b=f[a+96>>2]|0;if(b|0){c=a+100|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);ur(b)}b=f[a+84>>2]|0;if(!b){Lg(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);ur(b);Lg(a);return}function Uk(a){a=a|0;var c=0,d=0,e=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;b[a+24>>0]=1;c=a+68|0;d=a+28|0;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));f[c>>2]=a;c=a+72|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;return}function Vk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3764;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}f[a>>2]=3784;b=f[a+36>>2]|0;if(b|0)ur(b);b=f[a+24>>2]|0;if(!b){ur(a);return}ur(b);ur(a);return}function Wk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2356;b=f[a+76>>2]|0;if(b|0)ur(b);f[a>>2]=1656;b=f[a+32>>2]|0;if(!b){ur(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b);ur(a);return}function Xk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=u;u=u+256|0;g=f;if((c|0)>(d|0)&(e&73728|0)==0){e=c-d|0;rj(g|0,b<<24>>24|0,(e>>>0<256?e:256)|0)|0;if(e>>>0>255){b=c-d|0;d=e;do{xp(a,g,256);d=d+-256|0}while(d>>>0>255);h=b&255}else h=e;xp(a,g,h)}u=f;return}function Yk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3832;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}f[a>>2]=3852;b=f[a+36>>2]|0;if(b|0)ur(b);b=f[a+24>>2]|0;if(!b){ur(a);return}ur(b);ur(a);return}function Zk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1936;b=f[a+76>>2]|0;if(b|0)ur(b);f[a>>2]=1656;b=f[a+32>>2]|0;if(!b){ur(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b);ur(a);return}function _k(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0;if(Jp(a,f[b+8>>2]|0,g)|0)pj(0,b,c,d,e);else{h=f[a+8>>2]|0;_a[f[(f[h>>2]|0)+20>>2]&3](h,b,c,d,e,g)}return}function $k(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3764;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}f[a>>2]=3784;b=f[a+36>>2]|0;if(b|0)ur(b);b=f[a+24>>2]|0;if(!b)return;ur(b);return}function al(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2412;Ej(a+108|0);f[a>>2]=1656;b=f[a+32>>2]|0;if(!b){ur(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b);ur(a);return}function bl(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3832;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}f[a>>2]=3852;b=f[a+36>>2]|0;if(b|0)ur(b);b=f[a+24>>2]|0;if(!b)return;ur(b);return}function cl(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1992;Ej(a+108|0);f[a>>2]=1656;b=f[a+32>>2]|0;if(!b){ur(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b);ur(a);return}function dl(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;a:do if(!d)e=0;else{f=a;g=d;h=c;while(1){i=b[f>>0]|0;j=b[h>>0]|0;if(i<<24>>24!=j<<24>>24)break;g=g+-1|0;if(!g){e=0;break a}else{f=f+1|0;h=h+1|0}}e=(i&255)-(j&255)|0}while(0);return e|0}function el(a){a=a|0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+24>>2]|0))return 0;if(!(f[a+28>>2]|0))return 0;if(!(f[a+32>>2]|0))return 0;else return (f[a+36>>2]|0)!=0|0;return 0}function fl(a){a=a|0;var b=0,c=0;f[a>>2]=2356;b=f[a+76>>2]|0;if(b|0)ur(b);f[a>>2]=1656;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);ur(b);return}function gl(a){a=a|0;var c=0,d=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;c=0;while(1){if((c|0)==3)break;f[a+(c<<2)>>2]=0;c=c+1|0}if((b[a+11>>0]|0)<0)d=(f[a+8>>2]&2147483647)+-1|0;else d=10;Hj(a,d,0);return}function hl(a){a=a|0;var b=0,c=0,d=0,e=0.0,g=0.0;b=f[a+8>>2]|0;if((b|0)<2){c=0;d=0;I=c;return d|0}e=+(b|0);g=+Ug(e)*e;e=+W(+(g-+p[a>>3]));c=+K(e)>=1.0?(e>0.0?~~+Y(+J(e/4294967296.0),4294967295.0)>>>0:~~+W((e-+(~~e>>>0))/4294967296.0)>>>0):0;d=~~e>>>0;I=c;return d|0}function il(a){a=a|0;var b=0,c=0;f[a>>2]=1936;b=f[a+76>>2]|0;if(b|0)ur(b);f[a>>2]=1656;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);ur(b);return}function jl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){d=0;return d|0}e=f[c+(b<<2)>>2]|0;if((e|0)<0){d=0;return d|0}b=f[(f[a+36>>2]|0)+(e<<2)>>2]|0;e=f[b+32>>2]|0;if(e|0){d=e;return d|0}d=f[b+8>>2]|0;return d|0}function kl(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1344;b=f[a+16>>2]|0;if(b|0){c=a+20|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b)}b=f[a+4>>2]|0;if(!b)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(b|0))f[d>>2]=a+(~((a+-4-b|0)>>>2)<<2);ur(b);return}function ll(a){a=a|0;var b=0,c=0;f[a>>2]=2412;Ej(a+108|0);f[a>>2]=1656;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);ur(b);return}function ml(a){a=a|0;if(!(f[a+64>>2]|0))return 0;if(!(f[a+68>>2]|0))return 0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+52>>2]|0))return 0;else return (f[a+56>>2]|0)!=0|0;return 0}function nl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if(Jp(a,f[b+8>>2]|0,0)|0)Hk(0,b,c,d);else{e=f[a+8>>2]|0;Ya[f[(f[e>>2]|0)+28>>2]&7](e,b,c,d)}return}function ol(a){a=a|0;var b=0,c=0;f[a>>2]=1992;Ej(a+108|0);f[a>>2]=1656;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);ur(b);return}function pl(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)<0){c=0;return c|0}d=f[a+4>>2]|0;if(((f[d+12>>2]|0)-(f[d+8>>2]|0)>>2|0)<=(b|0)){c=0;return c|0}d=f[(f[a+8>>2]|0)+(f[(f[a+20>>2]|0)+(b<<2)>>2]<<2)>>2]|0;c=Ra[f[(f[d>>2]|0)+36>>2]&127](d,b)|0;return c|0}function ql(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)<0){c=0;return c|0}d=f[a+4>>2]|0;if(((f[d+12>>2]|0)-(f[d+8>>2]|0)>>2|0)<=(b|0)){c=0;return c|0}d=f[(f[a+8>>2]|0)+(f[(f[a+20>>2]|0)+(b<<2)>>2]<<2)>>2]|0;c=Ra[f[(f[d>>2]|0)+32>>2]&127](d,b)|0;return c|0}function rl(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0;d=b[a>>0]|0;e=b[c>>0]|0;if(d<<24>>24==0?1:d<<24>>24!=e<<24>>24){f=e;g=d}else{d=c;c=a;do{c=c+1|0;d=d+1|0;a=b[c>>0]|0;e=b[d>>0]|0}while(!(a<<24>>24==0?1:a<<24>>24!=e<<24>>24));f=e;g=a}return (g&255)-(f&255)|0}function sl(a,b){a=a|0;b=$(b);var c=0,d=0;c=u;u=u+16|0;d=c;gl(d);Ci(a,d,b);Zo(d);u=c;return}function tl(a){a=a|0;var b=0,c=0,d=0,e=0,g=0;b=f[a>>2]|0;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d+(~((d+-4-b|0)>>>2)<<2)|0;f[c>>2]=g;e=g}f[a+12>>2]=0;f[a+16>>2]=0;if(!b)return;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);ur(b);return}function ul(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=f[a+16>>2]|0;if(((f[a+20>>2]|0)-d>>2|0)<=(b|0)){e=-1;return e|0}g=f[d+(b<<2)>>2]|0;if((g|0)<0){e=-1;return e|0}e=f[(f[(f[(f[a+36>>2]|0)+(g<<2)>>2]|0)+16>>2]|0)+(c<<2)>>2]|0;return e|0}function vl(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;gl(d);Hi(a,d,b);Zo(d);u=c;return}function wl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;d=u;u=u+32|0;e=d;g=d+20|0;f[e>>2]=f[a+60>>2];f[e+4>>2]=0;f[e+8>>2]=b;f[e+12>>2]=g;f[e+16>>2]=c;if((Ko(za(140,e|0)|0)|0)<0){f[g>>2]=-1;h=-1}else h=f[g>>2]|0;u=d;return h|0}function xl(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)==-1|(b|0)>4){c=0;return c|0}d=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-d|0)<=0){c=0;return c|0}b=f[d>>2]|0;if((b|0)==-1){c=0;return c|0}c=f[(f[a+8>>2]|0)+(b<<2)>>2]|0;return c|0}function yl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){d=0;return d|0}e=f[c+(b<<2)>>2]|0;if((e|0)<0){d=0;return d|0}b=f[(f[a+36>>2]|0)+(e<<2)>>2]|0;d=(f[b+20>>2]|0)-(f[b+16>>2]|0)>>2;return d|0}function zl(a){a=a|0;if(!(f[a+40>>2]|0))return 0;if(!(f[a+24>>2]|0))return 0;if(!(f[a+28>>2]|0))return 0;if(!(f[a+32>>2]|0))return 0;else return (f[a+36>>2]|0)!=0|0;return 0}function Al(a){a=a|0;var b=0;if(!(f[a+24>>2]|0)){b=0;return b|0}if(!(f[a+28>>2]|0)){b=0;return b|0}if(!(f[a+32>>2]|0)){b=0;return b|0}b=(f[a+36>>2]|0)!=0;return b|0}function Bl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;fh(a,c);f[a>>2]=1520;c=a+72|0;d=a+36|0;a=d+36|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(a|0));d=f[b>>2]|0;f[b>>2]=0;f[c>>2]=d;return}function Cl(a){a=a|0;var b=0,c=0;f[a>>2]=3260;b=f[a+56>>2]|0;if(b|0)ur(b);b=a+48|0;c=f[b>>2]|0;f[b>>2]=0;if(!c){ur(a);return}sr(c);ur(a);return}function Dl(a,c){a=a|0;c=c|0;var d=0,e=0;d=a;e=c;c=d+64|0;do{f[d>>2]=f[e>>2];d=d+4|0;e=e+4|0}while((d|0)<(c|0));e=a+64|0;f[a+88>>2]=0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;b[e+20>>0]=0;return}function El(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;if((a|0)==0&(c|0)==0)f=d;else{g=d;d=c;c=a;while(1){a=g+-1|0;b[a>>0]=h[17343+(c&15)>>0]|0|e;c=oo(c|0,d|0,4)|0;d=I;if((c|0)==0&(d|0)==0){f=a;break}else g=a}}return f|0}function Fl(a){a=a|0;var c=0,d=0,e=0;c=a+74|0;d=b[c>>0]|0;b[c>>0]=d+255|d;d=f[a>>2]|0;if(!(d&8)){f[a+8>>2]=0;f[a+4>>2]=0;c=f[a+44>>2]|0;f[a+28>>2]=c;f[a+20>>2]=c;f[a+16>>2]=c+(f[a+48>>2]|0);e=0}else{f[a>>2]=d|32;e=-1}return e|0}function Gl(a){a=a|0;if(!(f[a+60>>2]|0))return 0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+52>>2]|0))return 0;else return (f[a+56>>2]|0)!=0|0;return 0}function Hl(a,b){a=a|0;b=b|0;var c=0,d=0;c=f[b+88>>2]|0;if(!c){d=0;return d|0}if((f[c>>2]|0)!=2){d=0;return d|0}b=f[c+8>>2]|0;f[a+4>>2]=h[b>>0]|h[b+1>>0]<<8|h[b+2>>0]<<16|h[b+3>>0]<<24;d=1;return d|0}function Il(a){a=a|0;var b=0;if(!(f[a+44>>2]|0)){b=0;return b|0}if(!(f[a+48>>2]|0)){b=0;return b|0}if(!(f[a+52>>2]|0)){b=0;return b|0}b=(f[a+56>>2]|0)!=0;return b|0}function Jl(a){a=a|0;vj(a);ur(a);return}function Kl(a){a=a|0;var b=0,c=0;f[a>>2]=2896;b=f[a+56>>2]|0;if(b|0)ur(b);b=a+48|0;c=f[b>>2]|0;f[b>>2]=0;if(!c){ur(a);return}sr(c);ur(a);return}function Ll(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+44>>2]=c;d=1;return d|0}function Ml(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e|0;if(g>>>0<b>>>0){Di(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+b|0;if((g|0)==(d|0))return;f[c>>2]=g;return}function Nl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=$(e);f[a+4>>2]=b;Yf(a+8|0,c,c+(d<<2)|0);n[a+20>>2]=e;return}function Ol(a,b){a=a|0;b=b|0;var c=0;if(!(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)){c=0;return c|0}if(!(Ra[f[(f[a>>2]|0)+44>>2]&127](a,b)|0)){c=0;return c|0}c=Ra[f[(f[a>>2]|0)+48>>2]&127](a,b)|0;return c|0}function Pl(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+40>>2]=c;d=1;return d|0}function Ql(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=u;u=u+16|0;d=c+4|0;e=c;f[e>>2]=0;f[d>>2]=f[e>>2];e=vc(a,b,d)|0;u=c;return e|0}function Rl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;d=f[c>>2]|0;c=a;e=b-a>>2;while(1){if(!e)break;a=(e|0)/2|0;b=c+(a<<2)|0;g=(f[b>>2]|0)>>>0<d>>>0;c=g?b+4|0:c;e=g?e+-1-a|0:a}return c|0}function Sl(a){a=a|0;var c=0;f[a>>2]=0;c=a+8|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;b[a+24>>0]=1;f[a+28>>2]=9;c=a+40|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[a+56>>2]=-1;f[a+60>>2]=0;return}function Tl(a){a=a|0;xj(a);ur(a);return}function Ul(a){a=a|0;var b=0;f[a>>2]=3260;b=f[a+56>>2]|0;if(b|0)ur(b);b=a+48|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;sr(a);return}function Vl(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;if(!(gr(b[f[a>>2]>>0]|0)|0))c=0;else{d=0;while(1){e=f[a>>2]|0;g=(d*10|0)+-48+(b[e>>0]|0)|0;h=e+1|0;f[a>>2]=h;if(!(gr(b[h>>0]|0)|0)){c=g;break}else d=g}}return c|0}function Wl(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+64>>2]=c;d=1;return d|0}function Xl(a){a=a|0;var b=0,c=0;b=f[r>>2]|0;c=b+a|0;if((a|0)>0&(c|0)<(b|0)|(c|0)<0){ea()|0;ya(12);return -1}f[r>>2]=c;if((c|0)>(da()|0)?(ca()|0)==0:0){f[r>>2]=b;ya(12);return -1}return b|0}function Yl(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0;if((a|0)==0&(c|0)==0)e=d;else{f=d;d=c;c=a;while(1){a=f+-1|0;b[a>>0]=c&7|48;c=oo(c|0,d|0,3)|0;d=I;if((c|0)==0&(d|0)==0){e=a;break}else f=a}}return e|0}function Zl(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+60>>2]=c;d=1;return d|0}function _l(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1656;b=f[a+32>>2]|0;if(!b){ur(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b);ur(a);return}function $l(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;if(Jp(a,f[b+8>>2]|0,g)|0)pj(0,b,c,d,e);return}function am(a){a=a|0;var b=0,c=0;b=f[a+64>>2]|0;if(!b)return;c=Qa[f[(f[b>>2]|0)+32>>2]&127](b)|0;if(!c)return;f[a+60>>2]=(((f[c+4>>2]|0)-(f[c>>2]|0)>>2>>>0)/3|0)-(f[c+40>>2]|0);return}function bm(a){a=a|0;var b=0;f[a>>2]=2896;b=f[a+56>>2]|0;if(b|0)ur(b);b=a+48|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;sr(a);return}function cm(a){a=a|0;Ui(a);ur(a);return}function dm(a){a=a|0;var b=0;switch(a|0){case 11:case 2:case 1:{b=1;break}case 4:case 3:{b=2;break}case 6:case 5:{b=4;break}case 8:case 7:{b=8;break}case 9:{b=4;break}case 10:{b=8;break}default:b=-1}return b|0}function em(){var a=0,b=0;a=yn(40)|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;n[a+16>>2]=$(1.0);b=a+20|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;n[a+36>>2]=$(1.0);return a|0}function fm(a,b){a=+a;b=+b;var c=0,d=0,e=0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;p[s>>3]=b;e=f[s+4>>2]&-2147483648|d&2147483647;f[s>>2]=c;f[s+4>>2]=e;return +(+p[s>>3])}function gm(a,b,c){a=a|0;b=b|0;c=+c;var d=0,e=0;d=u;u=u+16|0;e=d;p[e>>3]=c;$b(a,b,e);u=d;return}function hm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=u;u=u+16|0;e=d;f[e>>2]=c;dc(a,b,e);u=d;return}function im(a,c){a=a|0;c=c|0;var d=0,e=0;if((a|0)!=(c|0)){d=b[c+11>>0]|0;e=d<<24>>24<0;ij(a,e?f[c>>2]|0:c,e?f[c+4>>2]|0:d&255)|0}return a|0}function jm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=a&65535;d=b&65535;e=X(d,c)|0;f=a>>>16;a=(e>>>16)+(X(d,f)|0)|0;d=b>>>16;b=X(d,c)|0;return (I=(a>>>16)+(X(d,f)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|e&65535|0)|0}function km(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=Gj(b)|0;d=yn(c+13|0)|0;f[d>>2]=c;f[d+4>>2]=c;f[d+8>>2]=0;e=jq(d)|0;eh(e|0,b|0,c+1|0)|0;f[a>>2]=e;return}function lm(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)==-1|(b|0)>4){c=-1;return c|0}d=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-d|0)<=0){c=-1;return c|0}c=f[d>>2]|0;return c|0}function mm(a){a=a|0;Xi(a);ur(a);return}function nm(a){a=a|0;var b=0,c=0;f[a>>2]=1656;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);ur(b);return}function om(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(Jp(a,f[b+8>>2]|0,0)|0)Hk(0,b,c,d);return}function pm(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;if((c|0)<(a|0)&(a|0)<(c+d|0)){e=a;c=c+d|0;a=a+d|0;while((d|0)>0){a=a-1|0;c=c-1|0;d=d-1|0;b[a>>0]=b[c>>0]|0}a=e}else eh(a,c,d)|0;return a|0}function qm(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1308;b=f[a+8>>2]|0;if(!b){ur(a);return}c=a+12|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);ur(b);ur(a);return}function rm(a){a=a|0;var b=0;f[a>>2]=3316;b=f[a+56>>2]|0;if(!b){ur(a);return}ur(b);ur(a);return}function sm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=u;u=u+16|0;e=d;f[e>>2]=f[c>>2];g=Sa[f[(f[a>>2]|0)+16>>2]&31](a,b,e)|0;if(g)f[c>>2]=f[e>>2];u=d;return g&1|0}function tm(a,b){a=a|0;b=b|0;var c=0;if(b>>>0>=2){c=0;return c|0}f[a+28>>2]=b;c=1;return c|0}function um(a){a=a|0;var b=0,c=0;f[a>>2]=3576;b=a+64|0;c=f[b>>2]|0;f[b>>2]=0;if(!c){lj(a);return}Va[f[(f[c>>2]|0)+4>>2]&255](c);lj(a);return}function vm(){var a=0,b=0;a=Gn()|0;if((a|0?(b=f[a>>2]|0,b|0):0)?(a=b+48|0,(f[a>>2]&-256|0)==1126902528?(f[a+4>>2]|0)==1129074247:0):0)hp(f[b+12>>2]|0);hp(uq()|0)}function wm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Qf(a,b,c,d,e,f,6)|0}function xm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Pf(a,b,c,d,e,f,4)|0}function ym(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Vf(a,b,c,d,e,f,2)|0}function zm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Pf(a,b,c,d,e,f,3)|0}function Am(a){a=a|0;var b=0;f[a>>2]=2952;b=f[a+56>>2]|0;if(!b){ur(a);return}ur(b);ur(a);return}function Bm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Vf(a,b,c,d,e,f,1)|0}function Cm(a){a=a|0;var c=0;c=b[w+(a&255)>>0]|0;if((c|0)<8)return c|0;c=b[w+(a>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=b[w+(a>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return (b[w+(a>>>24)>>0]|0)+24|0}function Dm(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0.0,f=0.0;if(!a){c=0.0;return +c}if((b|0)==0|(a|0)==(b|0)){c=0.0;return +c}d=+(b>>>0)/+(a>>>0);e=1.0-d;f=d*+Ug(d);c=-(f+e*+Ug(e));return +c}function Em(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((b|0)>0)d=0;else return;do{e=f[a+(d<<2)>>2]|0;f[c+(d<<2)>>2]=e<<1^e>>31;d=d+1|0}while((d|0)!=(b|0));return}function Fm(a){a=a|0;var b=0;To(a);f[a>>2]=3456;f[a+40>>2]=1308;f[a+44>>2]=-1;b=a+48|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return}function Gm(a,c){a=a|0;c=c|0;var d=0;b[c+84>>0]=1;a=f[c+68>>2]|0;d=c+72|0;c=f[d>>2]|0;if((c|0)==(a|0))return 1;f[d>>2]=c+(~((c+-4-a|0)>>>2)<<2);return 1}function Hm(a){a=a|0;var b=0,c=0;if(Xq(a)|0?(b=qq(f[a>>2]|0)|0,a=b+8|0,c=f[a>>2]|0,f[a>>2]=c+-1,(c+-1|0)<0):0)ur(b);return}function Im(a){a=a|0;var b=0,c=0;b=f[a+16>>2]|0;c=(((f[a+12>>2]|0)+1-b|0)/64|0)+b<<3;a=b<<3;b=lo(c|0,((c|0)<0)<<31>>31|0,a|0,((a|0)<0)<<31>>31|0)|0;return b|0}function Jm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Qf(a,b,c,d,e,f,5)|0}function Km(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Qf(a,b,c,d,e,f,9)|0}function Lm(a){a=a|0;var b=0;f[a>>2]=3784;b=f[a+36>>2]|0;if(b|0)ur(b);b=f[a+24>>2]|0;if(!b){ur(a);return}ur(b);ur(a);return}function Mm(a){a=a|0;var b=0;f[a>>2]=3316;b=f[a+56>>2]|0;if(!b)return;ur(b);return}function Nm(a){a=a|0;var b=0,c=0;f[a>>2]=1588;b=a+36|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&255](c);Li(a);ur(a);return}function Om(a){a=a|0;var b=0,c=0;f[a>>2]=1308;b=f[a+8>>2]|0;if(!b)return;c=a+12|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);ur(b);return}function Pm(a){a=a|0;var b=0;f[a>>2]=3852;b=f[a+36>>2]|0;if(b|0)ur(b);b=f[a+24>>2]|0;if(!b){ur(a);return}ur(b);ur(a);return}function Qm(a){a=a|0;var c=0;f[a>>2]=1464;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=-1;c=a+16|0;f[a+32>>2]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;b[c+12>>0]=0;return}function Rm(a){a=a|0;f[a>>2]=3872;Si(a+8|0);ur(a);return}function Sm(a){a=a|0;var b=0;f[a>>2]=2952;b=f[a+56>>2]|0;if(!b)return;ur(b);return}function Tm(a){a=a|0;var b=0,c=0;f[a>>2]=1588;b=a+36|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&255](c);Li(a);return}function Um(a){a=a|0;var b=0,c=0;f[a>>2]=3576;b=a+64|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&255](c);lj(a);ur(a);return}function Vm(a,b){a=a|0;b=b|0;f[a>>2]=3544;hi(a+4|0);f[a+40>>2]=0;f[a+44>>2]=0;f[a>>2]=3560;f[a+48>>2]=b;f[a+52>>2]=0;return}function Wm(a){a=a|0;var b=0,c=0,d=0;b=f[a>>2]|0;c=a+4|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);f[a+12>>2]=0;f[a+16>>2]=0;return}function Xm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=a+20|0;e=f[d>>2]|0;g=(f[a+16>>2]|0)-e|0;a=g>>>0>c>>>0?c:g;eh(e|0,b|0,a|0)|0;f[d>>2]=(f[d>>2]|0)+a;return c|0}function Ym(a){a=a|0;var b=0;f[a>>2]=3784;b=f[a+36>>2]|0;if(b|0)ur(b);b=f[a+24>>2]|0;if(!b)return;ur(b);return}function Zm(a){a=a|0;f[a>>2]=3872;Si(a+8|0);return}function _m(a,b){a=a|0;b=b|0;f[a>>2]=3544;hi(a+4|0);f[a+40>>2]=0;f[a+44>>2]=0;f[a>>2]=3560;f[a+48>>2]=b;f[a+52>>2]=b;return}function $m(a){a=a|0;var b=0,c=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-8-b|0)>>>3)<<3);ur(b);return}function an(a){a=a|0;var b=0,c=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);ur(b);return}function bn(a,b){a=a|0;b=b|0;var c=0;c=f[b>>2]|0;return (1<<(c&31)&f[(f[a+28>>2]|0)+(c>>>5<<2)>>2]|0)!=0|0}function cn(a,b,c){a=a|0;b=b|0;c=c|0;return Sa[f[(f[a>>2]|0)+44>>2]&31](a,b,c)|0}function dn(a){a=a|0;var c=0;Sl(a);c=a+64|0;f[a+88>>2]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;b[c+20>>0]=0;return}function en(a){a=a|0;f[a>>2]=3372;Ej(a+88|0);ur(a);return}function fn(a){a=a|0;var b=0;f[a>>2]=3852;b=f[a+36>>2]|0;if(b|0)ur(b);b=f[a+24>>2]|0;if(!b)return;ur(b);return}function gn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((f[b+4>>2]|0)==(c|0)?(c=b+28|0,(f[c>>2]|0)!=1):0)f[c>>2]=d;return}function hn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=$(f);Eg(a,b,c,d,e,f);return}function jn(a){a=a|0;var b=0,c=0,d=0;b=u;u=u+16|0;c=b;if((Jk(a)|0)==0?(Sa[f[a+32>>2]&31](a,c,1)|0)==1:0)d=h[c>>0]|0;else d=-1;u=b;return d|0}function kn(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;f[a+104>>2]=b;c=f[a+8>>2]|0;d=f[a+4>>2]|0;e=c-d|0;f[a+108>>2]=e;f[a+100>>2]=(b|0)!=0&(e|0)>(b|0)?d+b|0:c;return}function ln(a){a=a|0;var b=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;b=a+16|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;return}function mn(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=$(g);Eg(f[a>>2]|0,b,c,d,e,g);return}function nn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=$(f);hn(a,b,c,d,e,f);return}function on(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return wm(a,b,c,d,e,f)|0}function pn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return xm(a,b,c,d,e,f)|0}function qn(a){a=a|0;var b=0,c=0;if(!a)return;b=f[a>>2]|0;if(b|0){c=a+4|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;ur(b)}ur(a);return}function rn(a){a=a|0;f[a>>2]=3008;Ej(a+88|0);ur(a);return}function sn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ym(a,b,c,d,e,f)|0}function tn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return zm(a,b,c,d,e,f)|0}function un(a){a=a|0;f[a>>2]=3372;Ej(a+88|0);return}function vn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e|0;Nd(a,b,c,d,g)|0;u=e;return (I=f[g+4>>2]|0,f[g>>2]|0)|0}function wn(a){a=a|0;var b=0;to(a);f[a>>2]=6416;b=a+84|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;return}function xn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Bm(a,b,c,d,e,f)|0}function yn(a){a=a|0;var b=0,c=0;b=(a|0)==0?1:a;while(1){a=$a(b)|0;if(a|0){c=a;break}a=sq()|0;if(!a){c=0;break}Ua[a&3]()}return c|0}function zn(a,b,c){a=a|0;b=b|0;c=c|0;bc(a,b,c);return}function An(a,b,c){a=a|0;b=b|0;c=c|0;f[a+4>>2]=b;f[a+8>>2]=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(c<<2)>>2];f[a+12>>2]=c;return 1}function Bn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Jm(a,b,c,d,e,f)|0}function Cn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Km(a,b,c,d,e,f)|0}function Dn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=$(f);mn(a,b,c,d,e,f);return}function En(a){a=a|0;f[a>>2]=3008;Ej(a+88|0);return}function Fn(a){a=a|0;var b=0,c=0,d=0;b=u;u=u+16|0;c=b;d=wr(f[a+60>>2]|0)|0;f[c>>2]=d;d=Ko(Ba(6,c|0)|0)|0;u=b;return d|0}function Gn(){var a=0,b=0;a=u;u=u+16|0;if(!(Ka(20412,3)|0)){b=Ia(f[5104]|0)|0;u=a;return b|0}else Xn(19547,a);return 0}function Hn(a){a=a|0;var b=0;if(!a)return;b=f[a>>2]|0;f[a>>2]=0;if(b|0)Va[f[(f[b>>2]|0)+4>>2]&255](b);ur(a);return}function In(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=jm(e,a)|0;f=I;return (I=(X(b,a)|0)+(X(d,e)|0)+f|f&0,c|0|0)|0}function Jn(a,b){a=a|0;b=b|0;fh(a,b);f[a>>2]=1404;b=a+36|0;a=b+40|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function Kn(a){a=a|0;Si(a);ur(a);return}function Ln(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;f[a+24>>2]=0;f[a+28>>2]=0;return}function Mn(a){a=a|0;var b=0;b=u;u=u+16|0;yc(a);if(!(La(f[5104]|0,0)|0)){u=b;return}else Xn(19646,b)}function Nn(a){a=a|0;var b=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;b=a+16|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return}function On(a,b){a=a|0;b=b|0;return tg(a+40|0,b)|0}function Pn(a,b){a=a|0;b=b|0;return kj(a,b,Tq(b)|0)|0}function Qn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;f[g>>2]=d;d=Yi(a,b,c,g)|0;u=e;return d|0}function Rn(a,b){a=a|0;b=b|0;return Lj(a+40|0,b)|0}function Sn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Nh(a,b,c,d)|0}function Tn(a){a=a|0;var b=0;f[a>>2]=4184;f[a+52>>2]=0;b=a+4|0;a=b+44|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function Un(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return oh(a,b,c,d)|0}function Vn(a,b){a=a|0;b=b|0;var c=0;c=f[a+64>>2]|0;return Ra[f[(f[c>>2]|0)+24>>2]&127](c,b)|0}function Wn(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;b[a+24>>0]=0;return}function Xn(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;f[d>>2]=b;b=f[1622]|0;wh(b,a,d)|0;Kj(10,b)|0;Ca()}function Yn(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return Ta[a&31](b|0,c|0,d|0,e|0,f|0,g|0)|0}function Zn(a){a=a|0;var b=0;b=f[a+56>>2]|0;f[a+60>>2]=((f[b+100>>2]|0)-(f[b+96>>2]|0)|0)/12|0;return}function _n(a,b){a=a|0;b=b|0;var c=0;c=f[a+64>>2]|0;return Ra[f[(f[c>>2]|0)+16>>2]&127](c,b)|0}function $n(a,b){a=a|0;b=b|0;var c=0;c=f[a+64>>2]|0;return Ra[f[(f[c>>2]|0)+20>>2]&127](c,b)|0}function ao(a,b){a=a|0;b=b|0;var c=0;c=f[a+64>>2]|0;return Ra[f[(f[c>>2]|0)+12>>2]&127](c,b)|0}function bo(){var a=0;a=u;u=u+16|0;if(!(Ja(20416,129)|0)){u=a;return}else Xn(19596,a)}function co(a){a=a|0;f[a>>2]=1264;hi(a+4|0);f[a+40>>2]=0;f[a+44>>2]=0;f[a>>2]=3520;return}function eo(a){a=a|0;ef(a);ur(a);return}function fo(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;_a[a&3](b|0,c|0,d|0,e|0,f|0,g|0)}function go(a,b,c){a=a|0;b=b|0;c=c|0;if(b|0)rj(a|0,(Sq(c)|0)&255|0,b|0)|0;return a|0}function ho(a){a=a|0;return 4}function io(a,b,c){a=a|0;b=b|0;c=c|0;return dj(0,b,c)|0}function jo(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b<<c|(a&(1<<c)-1<<32-c)>>>32-c;return a<<c}I=a<<c-32;return 0}function ko(){}function lo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+c>>>0;return (I=b+d+(e>>>0<a>>>0|0)>>>0,e|0)|0}function mo(a,b){a=a|0;b=b|0;var c=0;if(!b)c=0;else c=Ah(f[b>>2]|0,f[b+4>>2]|0,a)|0;return (c|0?c:a)|0}function no(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=b-d>>>0;e=b-d-(c>>>0>a>>>0|0)>>>0;return (I=e,a-c>>>0|0)|0}function oo(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b>>>c;return a>>>c|(b&(1<<c)-1)<<32-c}I=0;return b>>>c-32|0}function po(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ce(a,b,c,d)|0}function qo(a){a=a|0;hf(a);ur(a);return}function ro(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return _i(a,b,c,d)|0}function so(a){a=a|0;return 5}function to(a){a=a|0;var b=0;f[a>>2]=6456;b=a+4|0;a=b+80|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function uo(a){a=a|0;return 6}function vo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return $i(a,b,c,d)|0}function wo(a,b,c){a=a|0;b=b|0;c=c|0;Qj(a,b,c);return}function xo(a,b){a=a|0;b=b|0;Ji(f[a>>2]|0,b);return}function yo(a,b,c){a=a|0;b=b|0;c=c|0;wo(a,b,c);return}function zo(a){a=a|0;var b=0;b=f[a+64>>2]|0;return Qa[f[(f[b>>2]|0)+28>>2]&127](b)|0}function Ao(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Te(a,b,c,d,1);return}function Bo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Te(a,b,c,d,0);return}function Co(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Tg(a,b,c,d)|0}function Do(a,b,c){a=a|0;b=b|0;c=c|0;return ci(a,b,c)|0}function Eo(a){a=a|0;var b=0;b=f[a+64>>2]|0;return Qa[f[(f[b>>2]|0)+32>>2]&127](b)|0}function Fo(a,b,c){a=a|0;b=b|0;c=c|0;f[a+28>>2]=b;f[a+32>>2]=c;return 1}function Go(a,b,c){a=a|0;b=b|0;c=c|0;Qj(f[a>>2]|0,b,c);return}function Ho(a,b,c){a=a|0;b=b|0;c=c|0;return dj(a,b,c)|0}function Io(a,b,c){a=a|0;b=b|0;c=c|0;return io(a,b,c)|0}function Jo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Za[a&3](b|0,c|0,d|0,e|0,f|0)}function Ko(a){a=a|0;var b=0,c=0;if(a>>>0>4294963200){b=Br()|0;f[b>>2]=0-a;c=-1}else c=a;return c|0}function Lo(a,b,c){a=a|0;b=b|0;c=c|0;return Gh(a,b,c)|0}function Mo(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;return}function No(a,b){a=a|0;b=b|0;f[a+8>>2]=b;f[a+12>>2]=-1;return 1}function Oo(a,b){a=a|0;b=b|0;f[a+56>>2]=b;Mp(a,b);return}function Po(a,b,c){a=a|0;b=b|0;c=c|0;Go(a,b,c);return}function Qo(a){a=+a;var b=0;p[s>>3]=a;b=f[s>>2]|0;I=f[s+4>>2]|0;return b|0}function Ro(a,b,c){a=a|0;b=$(b);c=c|0;var d=Oa;d=$($(c|0)/b);n[a>>2]=d;return}function So(a,b){a=a|0;b=b|0;Ji(a,b);return}function To(a){a=a|0;Qm(a);f[a>>2]=1588;f[a+36>>2]=0;return}function Uo(a){a=a|0;var b=0;if(!a)b=0;else b=(Bh(a,1152,1240,0)|0)!=0&1;return b|0}function Vo(a){a=a|0;Tn(a);f[a>>2]=4e3;f[a+56>>2]=0;f[a+60>>2]=0;return}function Wo(a,b,c){a=a|0;b=b|0;c=c|0;Xo(f[a>>2]|0,b,c);return}function Xo(a,b,c){a=a|0;b=b|0;c=c|0;Ri(a+4|0,b,c);return}function Yo(a){a=a|0;var b=0;b=yn(8)|0;ok(b,a);return b|0}function Zo(a){a=a|0;if((b[a+11>>0]|0)<0)ur(f[a>>2]|0);return}function _o(a){a=a|0;if(!a)return;Va[f[(f[a>>2]|0)+4>>2]&255](a);return}function $o(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Ya[a&7](b|0,c|0,d|0,e|0)}function ap(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)pm(a|0,b|0,c|0)|0;return a|0}function bp(a,b,c){a=a|0;b=b|0;c=c|0;Wo(a,b,c);return}function cp(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)eh(a|0,b|0,c|0)|0;return a|0}function dp(a){a=a|0;f[a+52>>2]=f[(f[a+4>>2]|0)+80>>2];return}function ep(a,b){a=a|0;b=b|0;xo(a,b);return}function fp(a){a=a|0;f[a+52>>2]=f[(f[a+56>>2]|0)+80>>2];return}function gp(a,b){a=a|0;b=b|0;return -1}function hp(a){a=a|0;var b=0;b=u;u=u+16|0;Ua[a&3]();Xn(19699,b)}function ip(a){a=a|0;Kh(a);ur(a);return}function jp(a,b,c){a=a|0;b=b|0;c=c|0;sp(a,b,c);return}function kp(a,b){a=a|0;b=b|0;nk(f[a>>2]|0,b);return}function lp(a){a=a|0;Vo(a);f[a>>2]=3576;f[a+64>>2]=0;return}function mp(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Sa[a&31](b|0,c|0,d|0)|0}function np(a,b){a=a|0;b=b|0;return (aq(a,b)|0)<<24>>24|0}function op(a,b){a=a|0;b=b|0;f[a>>2]=7500;km(a+4|0,b);return}function pp(a,b){a=a|0;b=b|0;var c=0;if(!a)c=0;else c=Ni(a,b,0)|0;return c|0}function qp(a,b){a=a|0;b=b|0;So(a,b);return}function rp(a){a=a|0;return f[a+12>>2]|0}function sp(a,b,c){a=a|0;b=b|0;c=c|0;Xo(a,b,c);return}function tp(){var a=0;a=yn(64)|0;Sl(a);return a|0}function up(a,b){a=a|0;b=b|0;kp(a,b);return}function vp(a){a=a|0;if(!a)return;aj(a);ur(a);return}function wp(a){a=a|0;return f[a+4>>2]|0}function xp(a,b,c){a=a|0;b=b|0;c=c|0;if(!(f[a>>2]&32))oi(b,c,a)|0;return}function yp(a){a=a|0;return dq(a)|0}function zp(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Xa[a&15](b|0,c|0,d|0)}function Ap(){var a=0;a=yn(96)|0;dn(a);return a|0}function Bp(a){a=a|0;return eq(a)|0}function Cp(a){a=a|0;var b=0;b=u;u=u+a|0;u=u+15&-16;return b|0}function Dp(a){a=a|0;var b=0;b=(pr()|0)+188|0;return dk(a,f[b>>2]|0)|0}function Ep(a){a=a|0;return ((f[a+100>>2]|0)-(f[a+96>>2]|0)|0)/12|0|0}function Fp(a,b){a=a|0;b=b|0;Op(a,b);return}function Gp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(3);return 0}function Hp(){var a=0;a=yn(12)|0;Up(a);return a|0}function Ip(a){a=a|0;Li(a);ur(a);return}function Jp(a,b,c){a=a|0;b=b|0;c=c|0;return (a|0)==(b|0)|0}function Kp(a,b){a=a|0;b=b|0;var c=0;c=Yp(a|0)|0;return ((b|0)==0?a:c)|0}function Lp(a){a=a|0;return (f[a+12>>2]|0)-(f[a+8>>2]|0)>>2|0}function Mp(a,b){a=a|0;b=b|0;f[a+4>>2]=b;return}function Np(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Nd(a,b,c,d,0)|0}function Op(a,b){a=a|0;b=b|0;nk(a,b);return}function Pp(a){a=a|0;f[a+4>>2]=0;f[a+8>>2]=0;f[a>>2]=a+4;return}function Qp(a){a=a|0;return Gq(a)|0}function Rp(){var a=0;a=yn(84)|0;to(a);return a|0}function Sp(a){a=a|0;si(a);ur(a);return}function Tp(a){a=a|0;return Hq(a)|0}function Up(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;return}function Vp(a){a=a|0;f[a>>2]=7500;Hm(a+4|0);return}function Wp(a,b,c){a=a|0;b=b|0;c=c|0;return Ra[a&127](b|0,c|0)|0}function Xp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(10)}function Yp(a){a=a|0;return (a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function Zp(a){a=a|0;Vo(a);f[a>>2]=4080;return}function _p(a,c){a=a|0;c=c|0;b[a>>0]=b[c>>0]|0;return}function $p(a,b,c){a=a|0;b=b|0;c=c|0;return -1}function aq(a,c){a=a|0;c=c|0;return b[(f[a>>2]|0)+c>>0]|0}function bq(a){a=a|0;return (f[a+4>>2]|0)-(f[a>>2]|0)|0}function cq(a){a=a|0;lj(a);ur(a);return}function dq(a){a=a|0;return f[(f[a>>2]|0)+40>>2]|0}function eq(a){a=a|0;return f[(f[a>>2]|0)+44>>2]|0}function fq(a){a=a|0;if(!a)return;ur(a);return}function gq(a){a=a|0;b[a+28>>0]=1;return}function hq(a,b){a=a|0;b=b|0;if(!x){x=a;y=b}}function iq(a,b){a=a|0;b=b|0;return 1}function jq(a){a=a|0;return a+12|0}function kq(a,b){a=a|0;b=b|0;f[a+80>>2]=b;return}function lq(a,b,c){a=a|0;b=b|0;c=c|0;Wa[a&7](b|0,c|0)}function mq(){var a=0;a=yn(48)|0;Yq(a);return a|0}function nq(a){a=a|0;return Oq(a+4|0)|0}function oq(){var a=0;a=yn(108)|0;wn(a);return a|0}function pq(a){a=a|0;return (b[a+32>>0]|0)!=0|0}function qq(a){a=a|0;return a+-12|0}function rq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;aa(9)}function sq(){var a=0;a=f[5105]|0;f[5105]=a+0;return a|0}function tq(a){a=a|0;return f[a+56>>2]|0}function uq(){var a=0;a=f[1852]|0;f[1852]=a+0;return a|0}function vq(a){a=a|0;Lg(a);ur(a);return}function wq(a){a=a|0;yr(a);ur(a);return}function xq(a){a=a|0;return b[a+24>>0]|0}function yq(a,b){a=a|0;b=b|0;return 0}function zq(a){a=a|0;return f[a+48>>2]|0}function Aq(a,b){a=a|0;b=b|0;return Qa[a&127](b|0)|0}function Bq(a){a=a|0;return f[a+60>>2]|0}function Cq(a){a=a|0;return f[a+28>>2]|0}function Dq(a){a=a|0;sa(a|0)|0;vm()}function Eq(a){a=a|0;Vp(a);ur(a);return}function Fq(a){a=a|0;Ca()}function Gq(a){a=a|0;return f[a+40>>2]|0}function Hq(a){a=a|0;return f[a+44>>2]|0}function Iq(a,b){a=a|0;b=b|0;return $(+Gk(a,b,0))}function Jq(a){a=a|0;return 3}function Kq(a,b){a=a|0;b=b|0;u=a;v=b}function Lq(a){a=a|0;n[a>>2]=$(1.0);return}function Mq(a){a=a|0;return ((a|0)==32|(a+-9|0)>>>0<5)&1|0}function Nq(a){a=a|0;return f[a+80>>2]|0}function Oq(a){a=a|0;return f[a>>2]|0}function Pq(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;aa(8)}function Qq(a,b){a=a|0;b=b|0;Va[a&255](b|0)}function Rq(a,b){a=a|0;b=b|0;return mo(a,b)|0}function Sq(a){a=a|0;return a&255|0}function Tq(a){a=a|0;return Gj(a)|0}function Uq(a,b){a=a|0;b=b|0;return +(+Gk(a,b,1))}function Vq(a,b,c){a=a|0;b=b|0;c=c|0;aa(2);return 0}function Wq(a){a=a|0;return 2}function Xq(a){a=a|0;return 1}function Yq(a){a=a|0;co(a);return}function Zq(a,b){a=+a;b=+b;return +(+fm(a,b))}function _q(a,b){a=+a;b=b|0;return +(+gk(a,b))}function $q(a,b){a=+a;b=b|0;return +(+ek(a,b))}function ar(){return 3}function br(a,b,c){a=a|0;b=b|0;c=c|0;aa(7)}function cr(){return 0}function dr(){return -1}function er(){return yn(1)|0}function fr(){return 4}function gr(a){a=a|0;return (a+-48|0)>>>0<10|0}function hr(){return 1}function ir(){return 2}function jr(a,b){a=+a;b=+b;return +(+zd(a,b))}function kr(a,b){a=a|0;b=b|0;aa(1);return 0}function lr(a){a=a|0;Ha()}function mr(a){a=a|0;Ua[a&3]()}function nr(){ua()}function or(a){a=a|0;return +(+Uq(a,0))}function pr(){return Er()|0}function qr(a,b){a=a|0;b=b|0;aa(6)}function rr(a){a=a|0;return yn(a)|0}function sr(a){a=a|0;ur(a);return}function tr(a){a=a|0;u=a}function ur(a){a=a|0;yc(a);return}function vr(a){a=a|0;I=a}function wr(a){a=a|0;return a|0}function xr(a){a=a|0;aa(0);return 0}function yr(a){a=a|0;return}function zr(a){a=a|0;return 0}function Ar(){return I|0}function Br(){return 20344}function Cr(){return u|0}function Dr(a){a=a|0;aa(5)}function Er(){return 6616}function Fr(){aa(4)}
+
+// EMSCRIPTEN_END_FUNCS
+var Qa=[xr,Wq,Xq,Xq,Wq,gb,zr,zr,zr,mk,ig,Xq,wp,zr,zr,Xq,zr,Xq,Xq,Il,Wq,Il,Jq,Gl,Xq,so,Gl,Xq,uo,ml,Xq,Cq,ho,Il,Xq,Il,Wq,Il,Jq,Gl,Xq,so,Gl,Xq,uo,ml,Xq,C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xa_is_pointer_type:Uo,___divdi3:Ok,___muldi3:In,___udivdi3:Np,___uremdi3:vn,_bitshift64Lshr:oo,_bitshift64Shl:jo,_emscripten_bind_DracoInt8Array_DracoInt8Array_0:Hp,_emscripten_bind_DracoInt8Array_GetValue_1:np,_emscripten_bind_DracoInt8Array___destroy___0:qn,_emscripten_bind_DracoInt8Array_size_0:bq,_emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2:Do,_emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3:Un,_emscripten_bind_Encoder_Encoder_0:mq,_emscripten_bind_Encoder_GetNumberOfEncodedFaces_0:Tp,_emscripten_bind_Encoder_GetNumberOfEncodedPoints_0:Qp,_emscripten_bind_Encoder_SetAttributeExplicitQuantization_5:nn,_emscripten_bind_Encoder_SetAttributeQuantization_2:yo,_emscripten_bind_Encoder_SetEncodingMethod_1:Fp,_emscripten_bind_Encoder_SetSpeedOptions_2:jp,_emscripten_bind_Encoder_SetTrackEncodedProperties_1:qp,_emscripten_bind_Encoder___destroy___0:Sj,_emscripten_bind_ExpertEncoder_EncodeToDracoBuffer_2:Lo,_emscripten_bind_ExpertEncoder_ExpertEncoder_1:Yo,_emscripten_bind_ExpertEncoder_GetNumberOfEncodedFaces_0:Bp,_emscripten_bind_ExpertEncoder_GetNumberOfEncodedPoints_0:yp,_emscripten_bind_ExpertEncoder_SetAttributeExplicitQuantization_5:Dn,_emscripten_bind_ExpertEncoder_SetAttributeQuantization_2:Po,_emscripten_bind_ExpertEncoder_SetEncodingMethod_1:up,_emscripten_bind_ExpertEncoder_SetSpeedOptions_2:bp,_emscripten_bind_ExpertEncoder_SetTrackEncodedProperties_1:ep,_emscripten_bind_ExpertEncoder___destroy___0:Hn,_emscripten_bind_GeometryAttribute_GeometryAttribute_0:tp,_emscripten_bind_GeometryAttribute___destroy___0:fq,_emscripten_bind_MeshBuilder_AddFacesToMesh_3:Co,_emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5:Cn,_emscripten_bind_MeshBuilder_AddFloatAttribute_5:Cn,_emscripten_bind_MeshBuilder_AddInt16Attribute_5:tn,_emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5:Bn,_emscripten_bind_MeshBuilder_AddInt32Attribute_5:Bn,_emscripten_bind_MeshBuilder_AddInt8Attribute_5:xn,_emscripten_bind_MeshBuilder_AddMetadataToMesh_2:Io,_emscripten_bind_MeshBuilder_AddMetadata_2:Ho,_emscripten_bind_MeshBuilder_AddUInt16Attribute_5:pn,_emscripten_bind_MeshBuilder_AddUInt32Attribute_5:on,_emscripten_bind_MeshBuilder_AddUInt8Attribute_5:sn,_emscripten_bind_MeshBuilder_MeshBuilder_0:er,_emscripten_bind_MeshBuilder_SetMetadataForAttribute_3:Sn,_emscripten_bind_MeshBuilder___destroy___0:fq,_emscripten_bind_Mesh_Mesh_0:oq,_emscripten_bind_Mesh___destroy___0:_o,_emscripten_bind_Mesh_num_attributes_0:Lp,_emscripten_bind_Mesh_num_faces_0:Ep,_emscripten_bind_Mesh_num_points_0:Nq,_emscripten_bind_Mesh_set_num_points_1:kq,_emscripten_bind_MetadataBuilder_AddDoubleEntry_3:ro,_emscripten_bind_MetadataBuilder_AddIntEntry_3:vo,_emscripten_bind_MetadataBuilder_AddStringEntry_3:po,_emscripten_bind_MetadataBuilder_MetadataBuilder_0:er,_emscripten_bind_MetadataBuilder___destroy___0:fq,_emscripten_bind_Metadata_Metadata_0:em,_emscripten_bind_Metadata___destroy___0:vp,_emscripten_bind_PointAttribute_PointAttribute_0:Ap,_emscripten_bind_PointAttribute___destroy___0:Ij,_emscripten_bind_PointAttribute_attribute_type_0:tq,_emscripten_bind_PointAttribute_byte_offset_0:zq,_emscripten_bind_PointAttribute_byte_stride_0:Gq,_emscripten_bind_PointAttribute_data_type_0:Cq,_emscripten_bind_PointAttribute_normalized_0:pq,_emscripten_bind_PointAttribute_num_components_0:xq,_emscripten_bind_PointAttribute_size_0:Nq,_emscripten_bind_PointAttribute_unique_id_0:Bq,_emscripten_bind_PointCloudBuilder_AddFloatAttribute_5:Cn,_emscripten_bind_PointCloudBuilder_AddInt16Attribute_5:tn,_emscripten_bind_PointCloudBuilder_AddInt32Attribute_5:Bn,_emscripten_bind_PointCloudBuilder_AddInt8Attribute_5:xn,_emscripten_bind_PointCloudBuilder_AddMetadata_2:Ho,_emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5:pn,_emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5:on,_emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5:sn,_emscripten_bind_PointCloudBuilder_PointCloudBuilder_0:er,_emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3:Sn,_emscripten_bind_PointCloudBuilder___destroy___0:fq,_emscripten_bind_PointCloud_PointCloud_0:Rp,_emscripten_bind_PointCloud___destroy___0:_o,_emscripten_bind_PointCloud_num_attributes_0:Lp,_emscripten_bind_PointCloud_num_points_0:Nq,_emscripten_bind_VoidPtr___destroy___0:fq,_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE:dr,_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD:cr,_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH:hr,_emscripten_enum_draco_GeometryAttribute_Type_COLOR:ir,_emscripten_enum_draco_GeometryAttribute_Type_GENERIC:fr,_emscripten_enum_draco_GeometryAttribute_Type_INVALID:dr,_emscripten_enum_draco_GeometryAttribute_Type_NORMAL:hr,_emscripten_enum_draco_GeometryAttribute_Type_POSITION:cr,_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD:ar,_emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING:hr,_emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING:cr,_emscripten_replace_memory:Pa,_free:yc,_i64Add:lo,_i64Subtract:no,_llvm_bswap_i32:Yp,_malloc:$a,_memcpy:eh,_memmove:pm,_memset:rj,_sbrk:Xl,dynCall_ii:Aq,dynCall_iii:Wp,dynCall_iiii:mp,dynCall_iiiiiii:Yn,dynCall_v:mr,dynCall_vi:Qq,dynCall_vii:lq,dynCall_viii:zp,dynCall_viiii:$o,dynCall_viiiii:Jo,dynCall_viiiiii:fo,establishStackSpace:Kq,getTempRet0:Ar,runPostSets:ko,setTempRet0:vr,setThrew:hq,stackAlloc:Cp,stackRestore:tr,stackSave:Cr}})
+
+
+// EMSCRIPTEN_END_ASM
+(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var ___cxa_can_catch=Module["___cxa_can_catch"]=asm["___cxa_can_catch"];var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=asm["___cxa_is_pointer_type"];var ___divdi3=Module["___divdi3"]=asm["___divdi3"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var ___udivdi3=Module["___udivdi3"]=asm["___udivdi3"];var ___uremdi3=Module["___uremdi3"]=asm["___uremdi3"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _emscripten_bind_DracoInt8Array_DracoInt8Array_0=Module["_emscripten_bind_DracoInt8Array_DracoInt8Array_0"]=asm["_emscripten_bind_DracoInt8Array_DracoInt8Array_0"];var _emscripten_bind_DracoInt8Array_GetValue_1=Module["_emscripten_bind_DracoInt8Array_GetValue_1"]=asm["_emscripten_bind_DracoInt8Array_GetValue_1"];var _emscripten_bind_DracoInt8Array___destroy___0=Module["_emscripten_bind_DracoInt8Array___destroy___0"]=asm["_emscripten_bind_DracoInt8Array___destroy___0"];var _emscripten_bind_DracoInt8Array_size_0=Module["_emscripten_bind_DracoInt8Array_size_0"]=asm["_emscripten_bind_DracoInt8Array_size_0"];var _emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2=Module["_emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2"]=asm["_emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2"];var _emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3=Module["_emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3"]=asm["_emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3"];var _emscripten_bind_Encoder_Encoder_0=Module["_emscripten_bind_Encoder_Encoder_0"]=asm["_emscripten_bind_Encoder_Encoder_0"];var _emscripten_bind_Encoder_GetNumberOfEncodedFaces_0=Module["_emscripten_bind_Encoder_GetNumberOfEncodedFaces_0"]=asm["_emscripten_bind_Encoder_GetNumberOfEncodedFaces_0"];var _emscripten_bind_Encoder_GetNumberOfEncodedPoints_0=Module["_emscripten_bind_Encoder_GetNumberOfEncodedPoints_0"]=asm["_emscripten_bind_Encoder_GetNumberOfEncodedPoints_0"];var _emscripten_bind_Encoder_SetAttributeExplicitQuantization_5=Module["_emscripten_bind_Encoder_SetAttributeExplicitQuantization_5"]=asm["_emscripten_bind_Encoder_SetAttributeExplicitQuantization_5"];var _emscripten_bind_Encoder_SetAttributeQuantization_2=Module["_emscripten_bind_Encoder_SetAttributeQuantization_2"]=asm["_emscripten_bind_Encoder_SetAttributeQuantization_2"];var _emscripten_bind_Encoder_SetEncodingMethod_1=Module["_emscripten_bind_Encoder_SetEncodingMethod_1"]=asm["_emscripten_bind_Encoder_SetEncodingMethod_1"];var _emscripten_bind_Encoder_SetSpeedOptions_2=Module["_emscripten_bind_Encoder_SetSpeedOptions_2"]=asm["_emscripten_bind_Encoder_SetSpeedOptions_2"];var _emscripten_bind_Encoder_SetTrackEncodedProperties_1=Module["_emscripten_bind_Encoder_SetTrackEncodedProperties_1"]=asm["_emscripten_bind_Encoder_SetTrackEncodedProperties_1"];var _emscripten_bind_Encoder___destroy___0=Module["_emscripten_bind_Encoder___destroy___0"]=asm["_emscripten_bind_Encoder___destroy___0"];var _emscripten_bind_ExpertEncoder_EncodeToDracoBuffer_2=Module["_emscripten_bind_ExpertEncoder_EncodeToDracoBuffer_2"]=asm["_emscripten_bind_ExpertEncoder_EncodeToDracoBuffer_2"];var _emscripten_bind_ExpertEncoder_ExpertEncoder_1=Module["_emscripten_bind_ExpertEncoder_ExpertEncoder_1"]=asm["_emscripten_bind_ExpertEncoder_ExpertEncoder_1"];var _emscripten_bind_ExpertEncoder_GetNumberOfEncodedFaces_0=Module["_emscripten_bind_ExpertEncoder_GetNumberOfEncodedFaces_0"]=asm["_emscripten_bind_ExpertEncoder_GetNumberOfEncodedFaces_0"];var _emscripten_bind_ExpertEncoder_GetNumberOfEncodedPoints_0=Module["_emscripten_bind_ExpertEncoder_GetNumberOfEncodedPoints_0"]=asm["_emscripten_bind_ExpertEncoder_GetNumberOfEncodedPoints_0"];var _emscripten_bind_ExpertEncoder_SetAttributeExplicitQuantization_5=Module["_emscripten_bind_ExpertEncoder_SetAttributeExplicitQuantization_5"]=asm["_emscripten_bind_ExpertEncoder_SetAttributeExplicitQuantization_5"];var _emscripten_bind_ExpertEncoder_SetAttributeQuantization_2=Module["_emscripten_bind_ExpertEncoder_SetAttributeQuantization_2"]=asm["_emscripten_bind_ExpertEncoder_SetAttributeQuantization_2"];var _emscripten_bind_ExpertEncoder_SetEncodingMethod_1=Module["_emscripten_bind_ExpertEncoder_SetEncodingMethod_1"]=asm["_emscripten_bind_ExpertEncoder_SetEncodingMethod_1"];var _emscripten_bind_ExpertEncoder_SetSpeedOptions_2=Module["_emscripten_bind_ExpertEncoder_SetSpeedOptions_2"]=asm["_emscripten_bind_ExpertEncoder_SetSpeedOptions_2"];var _emscripten_bind_ExpertEncoder_SetTrackEncodedProperties_1=Module["_emscripten_bind_ExpertEncoder_SetTrackEncodedProperties_1"]=asm["_emscripten_bind_ExpertEncoder_SetTrackEncodedProperties_1"];var _emscripten_bind_ExpertEncoder___destroy___0=Module["_emscripten_bind_ExpertEncoder___destroy___0"]=asm["_emscripten_bind_ExpertEncoder___destroy___0"];var _emscripten_bind_GeometryAttribute_GeometryAttribute_0=Module["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"]=asm["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"];var _emscripten_bind_GeometryAttribute___destroy___0=Module["_emscripten_bind_GeometryAttribute___destroy___0"]=asm["_emscripten_bind_GeometryAttribute___destroy___0"];var _emscripten_bind_MeshBuilder_AddFacesToMesh_3=Module["_emscripten_bind_MeshBuilder_AddFacesToMesh_3"]=asm["_emscripten_bind_MeshBuilder_AddFacesToMesh_3"];var _emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5=Module["_emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5"]=asm["_emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5"];var _emscripten_bind_MeshBuilder_AddFloatAttribute_5=Module["_emscripten_bind_MeshBuilder_AddFloatAttribute_5"]=asm["_emscripten_bind_MeshBuilder_AddFloatAttribute_5"];var _emscripten_bind_MeshBuilder_AddInt16Attribute_5=Module["_emscripten_bind_MeshBuilder_AddInt16Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddInt16Attribute_5"];var _emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5=Module["_emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5"]=asm["_emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5"];var _emscripten_bind_MeshBuilder_AddInt32Attribute_5=Module["_emscripten_bind_MeshBuilder_AddInt32Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddInt32Attribute_5"];var _emscripten_bind_MeshBuilder_AddInt8Attribute_5=Module["_emscripten_bind_MeshBuilder_AddInt8Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddInt8Attribute_5"];var _emscripten_bind_MeshBuilder_AddMetadataToMesh_2=Module["_emscripten_bind_MeshBuilder_AddMetadataToMesh_2"]=asm["_emscripten_bind_MeshBuilder_AddMetadataToMesh_2"];var _emscripten_bind_MeshBuilder_AddMetadata_2=Module["_emscripten_bind_MeshBuilder_AddMetadata_2"]=asm["_emscripten_bind_MeshBuilder_AddMetadata_2"];var _emscripten_bind_MeshBuilder_AddUInt16Attribute_5=Module["_emscripten_bind_MeshBuilder_AddUInt16Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddUInt16Attribute_5"];var _emscripten_bind_MeshBuilder_AddUInt32Attribute_5=Module["_emscripten_bind_MeshBuilder_AddUInt32Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddUInt32Attribute_5"];var _emscripten_bind_MeshBuilder_AddUInt8Attribute_5=Module["_emscripten_bind_MeshBuilder_AddUInt8Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddUInt8Attribute_5"];var _emscripten_bind_MeshBuilder_MeshBuilder_0=Module["_emscripten_bind_MeshBuilder_MeshBuilder_0"]=asm["_emscripten_bind_MeshBuilder_MeshBuilder_0"];var _emscripten_bind_MeshBuilder_SetMetadataForAttribute_3=Module["_emscripten_bind_MeshBuilder_SetMetadataForAttribute_3"]=asm["_emscripten_bind_MeshBuilder_SetMetadataForAttribute_3"];var _emscripten_bind_MeshBuilder___destroy___0=Module["_emscripten_bind_MeshBuilder___destroy___0"]=asm["_emscripten_bind_MeshBuilder___destroy___0"];var _emscripten_bind_Mesh_Mesh_0=Module["_emscripten_bind_Mesh_Mesh_0"]=asm["_emscripten_bind_Mesh_Mesh_0"];var _emscripten_bind_Mesh___destroy___0=Module["_emscripten_bind_Mesh___destroy___0"]=asm["_emscripten_bind_Mesh___destroy___0"];var _emscripten_bind_Mesh_num_attributes_0=Module["_emscripten_bind_Mesh_num_attributes_0"]=asm["_emscripten_bind_Mesh_num_attributes_0"];var _emscripten_bind_Mesh_num_faces_0=Module["_emscripten_bind_Mesh_num_faces_0"]=asm["_emscripten_bind_Mesh_num_faces_0"];var _emscripten_bind_Mesh_num_points_0=Module["_emscripten_bind_Mesh_num_points_0"]=asm["_emscripten_bind_Mesh_num_points_0"];var _emscripten_bind_Mesh_set_num_points_1=Module["_emscripten_bind_Mesh_set_num_points_1"]=asm["_emscripten_bind_Mesh_set_num_points_1"];var _emscripten_bind_MetadataBuilder_AddDoubleEntry_3=Module["_emscripten_bind_MetadataBuilder_AddDoubleEntry_3"]=asm["_emscripten_bind_MetadataBuilder_AddDoubleEntry_3"];var _emscripten_bind_MetadataBuilder_AddIntEntry_3=Module["_emscripten_bind_MetadataBuilder_AddIntEntry_3"]=asm["_emscripten_bind_MetadataBuilder_AddIntEntry_3"];var _emscripten_bind_MetadataBuilder_AddStringEntry_3=Module["_emscripten_bind_MetadataBuilder_AddStringEntry_3"]=asm["_emscripten_bind_MetadataBuilder_AddStringEntry_3"];var _emscripten_bind_MetadataBuilder_MetadataBuilder_0=Module["_emscripten_bind_MetadataBuilder_MetadataBuilder_0"]=asm["_emscripten_bind_MetadataBuilder_MetadataBuilder_0"];var _emscripten_bind_MetadataBuilder___destroy___0=Module["_emscripten_bind_MetadataBuilder___destroy___0"]=asm["_emscripten_bind_MetadataBuilder___destroy___0"];var _emscripten_bind_Metadata_Metadata_0=Module["_emscripten_bind_Metadata_Metadata_0"]=asm["_emscripten_bind_Metadata_Metadata_0"];var _emscripten_bind_Metadata___destroy___0=Module["_emscripten_bind_Metadata___destroy___0"]=asm["_emscripten_bind_Metadata___destroy___0"];var _emscripten_bind_PointAttribute_PointAttribute_0=Module["_emscripten_bind_PointAttribute_PointAttribute_0"]=asm["_emscripten_bind_PointAttribute_PointAttribute_0"];var _emscripten_bind_PointAttribute___destroy___0=Module["_emscripten_bind_PointAttribute___destroy___0"]=asm["_emscripten_bind_PointAttribute___destroy___0"];var _emscripten_bind_PointAttribute_attribute_type_0=Module["_emscripten_bind_PointAttribute_attribute_type_0"]=asm["_emscripten_bind_PointAttribute_attribute_type_0"];var _emscripten_bind_PointAttribute_byte_offset_0=Module["_emscripten_bind_PointAttribute_byte_offset_0"]=asm["_emscripten_bind_PointAttribute_byte_offset_0"];var _emscripten_bind_PointAttribute_byte_stride_0=Module["_emscripten_bind_PointAttribute_byte_stride_0"]=asm["_emscripten_bind_PointAttribute_byte_stride_0"];var _emscripten_bind_PointAttribute_data_type_0=Module["_emscripten_bind_PointAttribute_data_type_0"]=asm["_emscripten_bind_PointAttribute_data_type_0"];var _emscripten_bind_PointAttribute_normalized_0=Module["_emscripten_bind_PointAttribute_normalized_0"]=asm["_emscripten_bind_PointAttribute_normalized_0"];var _emscripten_bind_PointAttribute_num_components_0=Module["_emscripten_bind_PointAttribute_num_components_0"]=asm["_emscripten_bind_PointAttribute_num_components_0"];var _emscripten_bind_PointAttribute_size_0=Module["_emscripten_bind_PointAttribute_size_0"]=asm["_emscripten_bind_PointAttribute_size_0"];var _emscripten_bind_PointAttribute_unique_id_0=Module["_emscripten_bind_PointAttribute_unique_id_0"]=asm["_emscripten_bind_PointAttribute_unique_id_0"];var _emscripten_bind_PointCloudBuilder_AddFloatAttribute_5=Module["_emscripten_bind_PointCloudBuilder_AddFloatAttribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddFloatAttribute_5"];var _emscripten_bind_PointCloudBuilder_AddInt16Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddInt16Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddInt16Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddInt32Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddInt32Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddInt32Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddInt8Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddInt8Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddInt8Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddMetadata_2=Module["_emscripten_bind_PointCloudBuilder_AddMetadata_2"]=asm["_emscripten_bind_PointCloudBuilder_AddMetadata_2"];var _emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5"];var _emscripten_bind_PointCloudBuilder_PointCloudBuilder_0=Module["_emscripten_bind_PointCloudBuilder_PointCloudBuilder_0"]=asm["_emscripten_bind_PointCloudBuilder_PointCloudBuilder_0"];var _emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3=Module["_emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3"]=asm["_emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3"];var _emscripten_bind_PointCloudBuilder___destroy___0=Module["_emscripten_bind_PointCloudBuilder___destroy___0"]=asm["_emscripten_bind_PointCloudBuilder___destroy___0"];var _emscripten_bind_PointCloud_PointCloud_0=Module["_emscripten_bind_PointCloud_PointCloud_0"]=asm["_emscripten_bind_PointCloud_PointCloud_0"];var _emscripten_bind_PointCloud___destroy___0=Module["_emscripten_bind_PointCloud___destroy___0"]=asm["_emscripten_bind_PointCloud___destroy___0"];var _emscripten_bind_PointCloud_num_attributes_0=Module["_emscripten_bind_PointCloud_num_attributes_0"]=asm["_emscripten_bind_PointCloud_num_attributes_0"];var _emscripten_bind_PointCloud_num_points_0=Module["_emscripten_bind_PointCloud_num_points_0"]=asm["_emscripten_bind_PointCloud_num_points_0"];var _emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=asm["_emscripten_bind_VoidPtr___destroy___0"];var _emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=Module["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"]=asm["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"];var _emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=Module["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"]=asm["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"];var _emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=Module["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"]=asm["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"];var _emscripten_enum_draco_GeometryAttribute_Type_COLOR=Module["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"];var _emscripten_enum_draco_GeometryAttribute_Type_GENERIC=Module["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"];var _emscripten_enum_draco_GeometryAttribute_Type_INVALID=Module["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"];var _emscripten_enum_draco_GeometryAttribute_Type_NORMAL=Module["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"];var _emscripten_enum_draco_GeometryAttribute_Type_POSITION=Module["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"];var _emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=Module["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"];var _emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING=Module["_emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING"]=asm["_emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING"];var _emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING=Module["_emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING"]=asm["_emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING"];var _emscripten_replace_memory=Module["_emscripten_replace_memory"]=asm["_emscripten_replace_memory"];var _free=Module["_free"]=asm["_free"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var _malloc=Module["_malloc"]=asm["_malloc"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _memmove=Module["_memmove"]=asm["_memmove"];var _memset=Module["_memset"]=asm["_memset"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var getTempRet0=Module["getTempRet0"]=asm["getTempRet0"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var setTempRet0=Module["setTempRet0"]=asm["setTempRet0"];var setThrew=Module["setThrew"]=asm["setThrew"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var stackSave=Module["stackSave"]=asm["stackSave"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];Module["asm"]=asm;if(memoryInitializer){if(!isDataURI(memoryInitializer)){if(typeof Module["locateFile"]==="function"){memoryInitializer=Module["locateFile"](memoryInitializer)}else if(Module["memoryInitializerPrefixURL"]){memoryInitializer=Module["memoryInitializerPrefixURL"]+memoryInitializer}}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,GLOBAL_BASE)}else{addRunDependency("memory initializer");var applyMemoryInitializer=(function(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,GLOBAL_BASE);if(Module["memoryInitializerRequest"])delete Module["memoryInitializerRequest"].response;removeRunDependency("memory initializer")});function doBrowserLoad(){Module["readAsync"](memoryInitializer,applyMemoryInitializer,(function(){throw"could not load memory initializer "+memoryInitializer}))}var memoryInitializerBytes=tryParseAsDataURI(memoryInitializer);if(memoryInitializerBytes){applyMemoryInitializer(memoryInitializerBytes.buffer)}else if(Module["memoryInitializerRequest"]){function useRequest(){var request=Module["memoryInitializerRequest"];var response=request.response;if(request.status!==200&&request.status!==0){var data=tryParseAsDataURI(Module["memoryInitializerRequestURL"]);if(data){response=data.buffer}else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+request.status+", retrying "+memoryInitializer);doBrowserLoad();return}}applyMemoryInitializer(response)}if(Module["memoryInitializerRequest"].response){setTimeout(useRequest,0)}else{Module["memoryInitializerRequest"].addEventListener("load",useRequest)}}else{doBrowserLoad()}}}Module["then"]=(function(func){if(Module["calledRun"]){func(Module)}else{var old=Module["onRuntimeInitialized"];Module["onRuntimeInitialized"]=(function(){if(old)old();func(Module)})}return Module});function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};function run(args){args=args||Module["arguments"];if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]&&status===0){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["exit"](status)}Module["quit"](status,new ExitStatus(status))}Module["exit"]=exit;function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}Module["noExitRuntime"]=true;run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return(__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw"Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr]}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:(function(){if(ensureCache.needed){for(var i=0;i<ensureCache.temps.length;i++){Module["_free"](ensureCache.temps[i])}ensureCache.temps.length=0;Module["_free"](ensureCache.buffer);ensureCache.buffer=0;ensureCache.size+=ensureCache.needed;ensureCache.needed=0}if(!ensureCache.buffer){ensureCache.size+=128;ensureCache.buffer=Module["_malloc"](ensureCache.size);assert(ensureCache.buffer)}ensureCache.pos=0}),alloc:(function(array,view){assert(ensureCache.buffer);var bytes=view.BYTES_PER_ELEMENT;var len=array.length*bytes;len=len+7&-8;var ret;if(ensureCache.pos+len>=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret)}else{ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len}return ret}),copy:(function(array,view,offset){var offsetShifted=offset;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offsetShifted>>=1;break;case 4:offsetShifted>>=2;break;case 8:offsetShifted>>=3;break}for(var i=0;i<array.length;i++){view[offsetShifted+i]=array[i]}})};function ensureString(value){if(typeof value==="string"){var intArray=intArrayFromString(value);var offset=ensureCache.alloc(intArray,HEAP8);ensureCache.copy(intArray,HEAP8,offset);return offset}return value}function ensureInt8(value){if(typeof value==="object"){var offset=ensureCache.alloc(value,HEAP8);ensureCache.copy(value,HEAP8,offset);return offset}return value}function ensureInt16(value){if(typeof value==="object"){var offset=ensureCache.alloc(value,HEAP16);ensureCache.copy(value,HEAP16,offset);return offset}return value}function ensureInt32(value){if(typeof value==="object"){var offset=ensureCache.alloc(value,HEAP32);ensureCache.copy(value,HEAP32,offset);return offset}return value}function ensureFloat32(value){if(typeof value==="object"){var offset=ensureCache.alloc(value,HEAPF32);ensureCache.copy(value,HEAPF32,offset);return offset}return value}function PointCloud(){this.ptr=_emscripten_bind_PointCloud_PointCloud_0();getCache(PointCloud)[this.ptr]=this}PointCloud.prototype=Object.create(WrapperObject.prototype);PointCloud.prototype.constructor=PointCloud;PointCloud.prototype.__class__=PointCloud;PointCloud.__cache__={};Module["PointCloud"]=PointCloud;PointCloud.prototype["num_attributes"]=PointCloud.prototype.num_attributes=(function(){var self=this.ptr;return _emscripten_bind_PointCloud_num_attributes_0(self)});PointCloud.prototype["num_points"]=PointCloud.prototype.num_points=(function(){var self=this.ptr;return _emscripten_bind_PointCloud_num_points_0(self)});PointCloud.prototype["__destroy__"]=PointCloud.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_PointCloud___destroy___0(self)});function ExpertEncoder(arg0){if(arg0&&typeof arg0==="object")arg0=arg0.ptr;this.ptr=_emscripten_bind_ExpertEncoder_ExpertEncoder_1(arg0);getCache(ExpertEncoder)[this.ptr]=this}ExpertEncoder.prototype=Object.create(WrapperObject.prototype);ExpertEncoder.prototype.constructor=ExpertEncoder;ExpertEncoder.prototype.__class__=ExpertEncoder;ExpertEncoder.__cache__={};Module["ExpertEncoder"]=ExpertEncoder;ExpertEncoder.prototype["SetEncodingMethod"]=ExpertEncoder.prototype.SetEncodingMethod=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ExpertEncoder_SetEncodingMethod_1(self,arg0)});ExpertEncoder.prototype["SetAttributeQuantization"]=ExpertEncoder.prototype.SetAttributeQuantization=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;_emscripten_bind_ExpertEncoder_SetAttributeQuantization_2(self,arg0,arg1)});ExpertEncoder.prototype["SetAttributeExplicitQuantization"]=ExpertEncoder.prototype.SetAttributeExplicitQuantization=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(typeof arg3=="object"){arg3=ensureFloat32(arg3)}if(arg4&&typeof arg4==="object")arg4=arg4.ptr;_emscripten_bind_ExpertEncoder_SetAttributeExplicitQuantization_5(self,arg0,arg1,arg2,arg3,arg4)});ExpertEncoder.prototype["SetSpeedOptions"]=ExpertEncoder.prototype.SetSpeedOptions=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;_emscripten_bind_ExpertEncoder_SetSpeedOptions_2(self,arg0,arg1)});ExpertEncoder.prototype["SetTrackEncodedProperties"]=ExpertEncoder.prototype.SetTrackEncodedProperties=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ExpertEncoder_SetTrackEncodedProperties_1(self,arg0)});ExpertEncoder.prototype["EncodeToDracoBuffer"]=ExpertEncoder.prototype.EncodeToDracoBuffer=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return _emscripten_bind_ExpertEncoder_EncodeToDracoBuffer_2(self,arg0,arg1)});ExpertEncoder.prototype["GetNumberOfEncodedPoints"]=ExpertEncoder.prototype.GetNumberOfEncodedPoints=(function(){var self=this.ptr;return _emscripten_bind_ExpertEncoder_GetNumberOfEncodedPoints_0(self)});ExpertEncoder.prototype["GetNumberOfEncodedFaces"]=ExpertEncoder.prototype.GetNumberOfEncodedFaces=(function(){var self=this.ptr;return _emscripten_bind_ExpertEncoder_GetNumberOfEncodedFaces_0(self)});ExpertEncoder.prototype["__destroy__"]=ExpertEncoder.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_ExpertEncoder___destroy___0(self)});function PointAttribute(){this.ptr=_emscripten_bind_PointAttribute_PointAttribute_0();getCache(PointAttribute)[this.ptr]=this}PointAttribute.prototype=Object.create(WrapperObject.prototype);PointAttribute.prototype.constructor=PointAttribute;PointAttribute.prototype.__class__=PointAttribute;PointAttribute.__cache__={};Module["PointAttribute"]=PointAttribute;PointAttribute.prototype["size"]=PointAttribute.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_size_0(self)});PointAttribute.prototype["attribute_type"]=PointAttribute.prototype.attribute_type=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_attribute_type_0(self)});PointAttribute.prototype["data_type"]=PointAttribute.prototype.data_type=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_data_type_0(self)});PointAttribute.prototype["num_components"]=PointAttribute.prototype.num_components=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_num_components_0(self)});PointAttribute.prototype["normalized"]=PointAttribute.prototype.normalized=(function(){var self=this.ptr;return!!_emscripten_bind_PointAttribute_normalized_0(self)});PointAttribute.prototype["byte_stride"]=PointAttribute.prototype.byte_stride=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_byte_stride_0(self)});PointAttribute.prototype["byte_offset"]=PointAttribute.prototype.byte_offset=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_byte_offset_0(self)});PointAttribute.prototype["unique_id"]=PointAttribute.prototype.unique_id=(function(){var self=this.ptr;return _emscripten_bind_PointAttribute_unique_id_0(self)});PointAttribute.prototype["__destroy__"]=PointAttribute.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_PointAttribute___destroy___0(self)});function Encoder(){this.ptr=_emscripten_bind_Encoder_Encoder_0();getCache(Encoder)[this.ptr]=this}Encoder.prototype=Object.create(WrapperObject.prototype);Encoder.prototype.constructor=Encoder;Encoder.prototype.__class__=Encoder;Encoder.__cache__={};Module["Encoder"]=Encoder;Encoder.prototype["SetEncodingMethod"]=Encoder.prototype.SetEncodingMethod=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_Encoder_SetEncodingMethod_1(self,arg0)});Encoder.prototype["SetAttributeQuantization"]=Encoder.prototype.SetAttributeQuantization=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;_emscripten_bind_Encoder_SetAttributeQuantization_2(self,arg0,arg1)});Encoder.prototype["SetAttributeExplicitQuantization"]=Encoder.prototype.SetAttributeExplicitQuantization=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(typeof arg3=="object"){arg3=ensureFloat32(arg3)}if(arg4&&typeof arg4==="object")arg4=arg4.ptr;_emscripten_bind_Encoder_SetAttributeExplicitQuantization_5(self,arg0,arg1,arg2,arg3,arg4)});Encoder.prototype["SetSpeedOptions"]=Encoder.prototype.SetSpeedOptions=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;_emscripten_bind_Encoder_SetSpeedOptions_2(self,arg0,arg1)});Encoder.prototype["SetTrackEncodedProperties"]=Encoder.prototype.SetTrackEncodedProperties=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_Encoder_SetTrackEncodedProperties_1(self,arg0)});Encoder.prototype["EncodeMeshToDracoBuffer"]=Encoder.prototype.EncodeMeshToDracoBuffer=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return _emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2(self,arg0,arg1)});Encoder.prototype["EncodePointCloudToDracoBuffer"]=Encoder.prototype.EncodePointCloudToDracoBuffer=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return _emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3(self,arg0,arg1,arg2)});Encoder.prototype["GetNumberOfEncodedPoints"]=Encoder.prototype.GetNumberOfEncodedPoints=(function(){var self=this.ptr;return _emscripten_bind_Encoder_GetNumberOfEncodedPoints_0(self)});Encoder.prototype["GetNumberOfEncodedFaces"]=Encoder.prototype.GetNumberOfEncodedFaces=(function(){var self=this.ptr;return _emscripten_bind_Encoder_GetNumberOfEncodedFaces_0(self)});Encoder.prototype["__destroy__"]=Encoder.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_Encoder___destroy___0(self)});function MeshBuilder(){this.ptr=_emscripten_bind_MeshBuilder_MeshBuilder_0();getCache(MeshBuilder)[this.ptr]=this}MeshBuilder.prototype=Object.create(WrapperObject.prototype);MeshBuilder.prototype.constructor=MeshBuilder;MeshBuilder.prototype.__class__=MeshBuilder;MeshBuilder.__cache__={};Module["MeshBuilder"]=MeshBuilder;MeshBuilder.prototype["AddFacesToMesh"]=MeshBuilder.prototype.AddFacesToMesh=(function(arg0,arg1,arg2){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(typeof arg2=="object"){arg2=ensureInt32(arg2)}return!!_emscripten_bind_MeshBuilder_AddFacesToMesh_3(self,arg0,arg1,arg2)});MeshBuilder.prototype["AddFloatAttributeToMesh"]=MeshBuilder.prototype.AddFloatAttributeToMesh=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureFloat32(arg4)}return _emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5(self,arg0,arg1,arg2,arg3,arg4)});MeshBuilder.prototype["AddInt32AttributeToMesh"]=MeshBuilder.prototype.AddInt32AttributeToMesh=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt32(arg4)}return _emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5(self,arg0,arg1,arg2,arg3,arg4)});MeshBuilder.prototype["AddMetadataToMesh"]=MeshBuilder.prototype.AddMetadataToMesh=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return!!_emscripten_bind_MeshBuilder_AddMetadataToMesh_2(self,arg0,arg1)});MeshBuilder.prototype["AddFloatAttribute"]=MeshBuilder.prototype.AddFloatAttribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureFloat32(arg4)}return _emscripten_bind_MeshBuilder_AddFloatAttribute_5(self,arg0,arg1,arg2,arg3,arg4)});MeshBuilder.prototype["AddInt8Attribute"]=MeshBuilder.prototype.AddInt8Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt8(arg4)}return _emscripten_bind_MeshBuilder_AddInt8Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});MeshBuilder.prototype["AddUInt8Attribute"]=MeshBuilder.prototype.AddUInt8Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt8(arg4)}return _emscripten_bind_MeshBuilder_AddUInt8Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});MeshBuilder.prototype["AddInt16Attribute"]=MeshBuilder.prototype.AddInt16Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt16(arg4)}return _emscripten_bind_MeshBuilder_AddInt16Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});MeshBuilder.prototype["AddUInt16Attribute"]=MeshBuilder.prototype.AddUInt16Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt16(arg4)}return _emscripten_bind_MeshBuilder_AddUInt16Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});MeshBuilder.prototype["AddInt32Attribute"]=MeshBuilder.prototype.AddInt32Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt32(arg4)}return _emscripten_bind_MeshBuilder_AddInt32Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});MeshBuilder.prototype["AddUInt32Attribute"]=MeshBuilder.prototype.AddUInt32Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt32(arg4)}return _emscripten_bind_MeshBuilder_AddUInt32Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});MeshBuilder.prototype["AddMetadata"]=MeshBuilder.prototype.AddMetadata=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return!!_emscripten_bind_MeshBuilder_AddMetadata_2(self,arg0,arg1)});MeshBuilder.prototype["SetMetadataForAttribute"]=MeshBuilder.prototype.SetMetadataForAttribute=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_MeshBuilder_SetMetadataForAttribute_3(self,arg0,arg1,arg2)});MeshBuilder.prototype["__destroy__"]=MeshBuilder.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_MeshBuilder___destroy___0(self)});function DracoInt8Array(){this.ptr=_emscripten_bind_DracoInt8Array_DracoInt8Array_0();getCache(DracoInt8Array)[this.ptr]=this}DracoInt8Array.prototype=Object.create(WrapperObject.prototype);DracoInt8Array.prototype.constructor=DracoInt8Array;DracoInt8Array.prototype.__class__=DracoInt8Array;DracoInt8Array.__cache__={};Module["DracoInt8Array"]=DracoInt8Array;DracoInt8Array.prototype["GetValue"]=DracoInt8Array.prototype.GetValue=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return _emscripten_bind_DracoInt8Array_GetValue_1(self,arg0)});DracoInt8Array.prototype["size"]=DracoInt8Array.prototype.size=(function(){var self=this.ptr;return _emscripten_bind_DracoInt8Array_size_0(self)});DracoInt8Array.prototype["__destroy__"]=DracoInt8Array.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_DracoInt8Array___destroy___0(self)});function MetadataBuilder(){this.ptr=_emscripten_bind_MetadataBuilder_MetadataBuilder_0();getCache(MetadataBuilder)[this.ptr]=this}MetadataBuilder.prototype=Object.create(WrapperObject.prototype);MetadataBuilder.prototype.constructor=MetadataBuilder;MetadataBuilder.prototype.__class__=MetadataBuilder;MetadataBuilder.__cache__={};Module["MetadataBuilder"]=MetadataBuilder;MetadataBuilder.prototype["AddStringEntry"]=MetadataBuilder.prototype.AddStringEntry=(function(arg0,arg1,arg2){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);if(arg2&&typeof arg2==="object")arg2=arg2.ptr;else arg2=ensureString(arg2);return!!_emscripten_bind_MetadataBuilder_AddStringEntry_3(self,arg0,arg1,arg2)});MetadataBuilder.prototype["AddIntEntry"]=MetadataBuilder.prototype.AddIntEntry=(function(arg0,arg1,arg2){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_MetadataBuilder_AddIntEntry_3(self,arg0,arg1,arg2)});MetadataBuilder.prototype["AddDoubleEntry"]=MetadataBuilder.prototype.AddDoubleEntry=(function(arg0,arg1,arg2){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_MetadataBuilder_AddDoubleEntry_3(self,arg0,arg1,arg2)});MetadataBuilder.prototype["__destroy__"]=MetadataBuilder.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_MetadataBuilder___destroy___0(self)});function GeometryAttribute(){this.ptr=_emscripten_bind_GeometryAttribute_GeometryAttribute_0();getCache(GeometryAttribute)[this.ptr]=this}GeometryAttribute.prototype=Object.create(WrapperObject.prototype);GeometryAttribute.prototype.constructor=GeometryAttribute;GeometryAttribute.prototype.__class__=GeometryAttribute;GeometryAttribute.__cache__={};Module["GeometryAttribute"]=GeometryAttribute;GeometryAttribute.prototype["__destroy__"]=GeometryAttribute.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_GeometryAttribute___destroy___0(self)});function Mesh(){this.ptr=_emscripten_bind_Mesh_Mesh_0();getCache(Mesh)[this.ptr]=this}Mesh.prototype=Object.create(WrapperObject.prototype);Mesh.prototype.constructor=Mesh;Mesh.prototype.__class__=Mesh;Mesh.__cache__={};Module["Mesh"]=Mesh;Mesh.prototype["num_faces"]=Mesh.prototype.num_faces=(function(){var self=this.ptr;return _emscripten_bind_Mesh_num_faces_0(self)});Mesh.prototype["num_attributes"]=Mesh.prototype.num_attributes=(function(){var self=this.ptr;return _emscripten_bind_Mesh_num_attributes_0(self)});Mesh.prototype["num_points"]=Mesh.prototype.num_points=(function(){var self=this.ptr;return _emscripten_bind_Mesh_num_points_0(self)});Mesh.prototype["set_num_points"]=Mesh.prototype.set_num_points=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_Mesh_set_num_points_1(self,arg0)});Mesh.prototype["__destroy__"]=Mesh.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_Mesh___destroy___0(self)});function PointCloudBuilder(){this.ptr=_emscripten_bind_PointCloudBuilder_PointCloudBuilder_0();getCache(PointCloudBuilder)[this.ptr]=this}PointCloudBuilder.prototype=Object.create(WrapperObject.prototype);PointCloudBuilder.prototype.constructor=PointCloudBuilder;PointCloudBuilder.prototype.__class__=PointCloudBuilder;PointCloudBuilder.__cache__={};Module["PointCloudBuilder"]=PointCloudBuilder;PointCloudBuilder.prototype["AddFloatAttribute"]=PointCloudBuilder.prototype.AddFloatAttribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureFloat32(arg4)}return _emscripten_bind_PointCloudBuilder_AddFloatAttribute_5(self,arg0,arg1,arg2,arg3,arg4)});PointCloudBuilder.prototype["AddInt8Attribute"]=PointCloudBuilder.prototype.AddInt8Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt8(arg4)}return _emscripten_bind_PointCloudBuilder_AddInt8Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});PointCloudBuilder.prototype["AddUInt8Attribute"]=PointCloudBuilder.prototype.AddUInt8Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt8(arg4)}return _emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});PointCloudBuilder.prototype["AddInt16Attribute"]=PointCloudBuilder.prototype.AddInt16Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt16(arg4)}return _emscripten_bind_PointCloudBuilder_AddInt16Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});PointCloudBuilder.prototype["AddUInt16Attribute"]=PointCloudBuilder.prototype.AddUInt16Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt16(arg4)}return _emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});PointCloudBuilder.prototype["AddInt32Attribute"]=PointCloudBuilder.prototype.AddInt32Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt32(arg4)}return _emscripten_bind_PointCloudBuilder_AddInt32Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});PointCloudBuilder.prototype["AddUInt32Attribute"]=PointCloudBuilder.prototype.AddUInt32Attribute=(function(arg0,arg1,arg2,arg3,arg4){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;if(arg3&&typeof arg3==="object")arg3=arg3.ptr;if(typeof arg4=="object"){arg4=ensureInt32(arg4)}return _emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5(self,arg0,arg1,arg2,arg3,arg4)});PointCloudBuilder.prototype["AddMetadata"]=PointCloudBuilder.prototype.AddMetadata=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;return!!_emscripten_bind_PointCloudBuilder_AddMetadata_2(self,arg0,arg1)});PointCloudBuilder.prototype["SetMetadataForAttribute"]=PointCloudBuilder.prototype.SetMetadataForAttribute=(function(arg0,arg1,arg2){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;if(arg2&&typeof arg2==="object")arg2=arg2.ptr;return!!_emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3(self,arg0,arg1,arg2)});PointCloudBuilder.prototype["__destroy__"]=PointCloudBuilder.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_PointCloudBuilder___destroy___0(self)});function VoidPtr(){throw"cannot construct a VoidPtr, no constructor in IDL"}VoidPtr.prototype=Object.create(WrapperObject.prototype);VoidPtr.prototype.constructor=VoidPtr;VoidPtr.prototype.__class__=VoidPtr;VoidPtr.__cache__={};Module["VoidPtr"]=VoidPtr;VoidPtr.prototype["__destroy__"]=VoidPtr.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_VoidPtr___destroy___0(self)});function Metadata(){this.ptr=_emscripten_bind_Metadata_Metadata_0();getCache(Metadata)[this.ptr]=this}Metadata.prototype=Object.create(WrapperObject.prototype);Metadata.prototype.constructor=Metadata;Metadata.prototype.__class__=Metadata;Metadata.__cache__={};Module["Metadata"]=Metadata;Metadata.prototype["__destroy__"]=Metadata.prototype.__destroy__=(function(){var self=this.ptr;_emscripten_bind_Metadata___destroy___0(self)});((function(){function setupEnums(){Module["MESH_SEQUENTIAL_ENCODING"]=_emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING();Module["MESH_EDGEBREAKER_ENCODING"]=_emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING();Module["INVALID_GEOMETRY_TYPE"]=_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE();Module["POINT_CLOUD"]=_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD();Module["TRIANGULAR_MESH"]=_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH();Module["INVALID"]=_emscripten_enum_draco_GeometryAttribute_Type_INVALID();Module["POSITION"]=_emscripten_enum_draco_GeometryAttribute_Type_POSITION();Module["NORMAL"]=_emscripten_enum_draco_GeometryAttribute_Type_NORMAL();Module["COLOR"]=_emscripten_enum_draco_GeometryAttribute_Type_COLOR();Module["TEX_COORD"]=_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD();Module["GENERIC"]=_emscripten_enum_draco_GeometryAttribute_Type_GENERIC()}if(Module["calledRun"])setupEnums();else addOnPreMain(setupEnums)}))();if(typeof Module["onModuleParsed"]==="function"){Module["onModuleParsed"]()}
+
+
+
+
+
+
+ return DracoEncoderModule;
+};
+if (typeof exports === 'object' && typeof module === 'object')
+ module.exports = DracoEncoderModule;
+else if (typeof define === 'function' && define['amd'])
+ define([], function() { return DracoEncoderModule; });
+else if (typeof exports === 'object')
+ exports["DracoEncoderModule"] = DracoEncoderModule;
diff --git a/site/public/assets/js/vendor/draco/draco_wasm_wrapper.js b/site/public/assets/js/vendor/draco/draco_wasm_wrapper.js
new file mode 100644
index 00000000..912727c7
--- /dev/null
+++ b/site/public/assets/js/vendor/draco/draco_wasm_wrapper.js
@@ -0,0 +1,119 @@
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(d,k,f){d!=Array.prototype&&d!=Object.prototype&&(d[k]=f.value)};$jscomp.getGlobal=function(d){return"undefined"!=typeof window&&window===d?d:"undefined"!=typeof global&&null!=global?global:d};$jscomp.global=$jscomp.getGlobal(this);
+$jscomp.polyfill=function(d,k,f,v){if(k){f=$jscomp.global;d=d.split(".");for(v=0;v<d.length-1;v++){var h=d[v];h in f||(f[h]={});f=f[h]}d=d[d.length-1];v=f[d];k=k(v);k!=v&&null!=k&&$jscomp.defineProperty(f,d,{configurable:!0,writable:!0,value:k})}};$jscomp.polyfill("Math.imul",function(d){return d?d:function(d,f){d=Number(d);f=Number(f);var k=d&65535,h=f&65535;return k*h+((d>>>16&65535)*h+k*(f>>>16&65535)<<16>>>0)|0}},"es6","es3");
+$jscomp.polyfill("Math.clz32",function(d){return d?d:function(d){d=Number(d)>>>0;if(0===d)return 32;var f=0;0===(d&4294901760)&&(d<<=16,f+=16);0===(d&4278190080)&&(d<<=8,f+=8);0===(d&4026531840)&&(d<<=4,f+=4);0===(d&3221225472)&&(d<<=2,f+=2);0===(d&2147483648)&&f++;return f}},"es6","es3");$jscomp.polyfill("Math.trunc",function(d){return d?d:function(d){d=Number(d);if(isNaN(d)||Infinity===d||-Infinity===d||0===d)return d;var f=Math.floor(Math.abs(d));return 0>d?-f:f}},"es6","es3");
+$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var d=0;return function(k){return $jscomp.SYMBOL_PREFIX+(k||"")+d++}}();
+$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var d=$jscomp.global.Symbol.iterator;d||(d=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[d]&&$jscomp.defineProperty(Array.prototype,d,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(d){var k=0;return $jscomp.iteratorPrototype(function(){return k<d.length?{done:!1,value:d[k++]}:{done:!0}})};
+$jscomp.iteratorPrototype=function(d){$jscomp.initSymbolIterator();d={next:d};d[$jscomp.global.Symbol.iterator]=function(){return this};return d};$jscomp.makeIterator=function(d){$jscomp.initSymbolIterator();var k=d[Symbol.iterator];return k?k.call(d):$jscomp.arrayIterator(d)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
+$jscomp.polyfill("Promise",function(d){function k(){this.batch_=null}function f(d){return d instanceof h?d:new h(function(r,f){r(d)})}if(d&&!$jscomp.FORCE_POLYFILL_PROMISE)return d;k.prototype.asyncExecute=function(d){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(d);return this};k.prototype.asyncExecuteBatch_=function(){var d=this;this.asyncExecuteFunction(function(){d.executeBatch_()})};var v=$jscomp.global.setTimeout;k.prototype.asyncExecuteFunction=function(d){v(d,
+0)};k.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var d=this.batch_;this.batch_=[];for(var B=0;B<d.length;++B){var f=d[B];delete d[B];try{f()}catch(w){this.asyncThrow_(w)}}}this.batch_=null};k.prototype.asyncThrow_=function(d){this.asyncExecuteFunction(function(){throw d;})};var h=function(d){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var r=this.createResolveAndReject_();try{d(r.resolve,r.reject)}catch(Y){r.reject(Y)}};h.prototype.createResolveAndReject_=
+function(){function d(d){return function(r){h||(h=!0,d.call(f,r))}}var f=this,h=!1;return{resolve:d(this.resolveTo_),reject:d(this.reject_)}};h.prototype.resolveTo_=function(d){if(d===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(d instanceof h)this.settleSameAsPromise_(d);else{a:switch(typeof d){case "object":var f=null!=d;break a;case "function":f=!0;break a;default:f=!1}f?this.resolveToNonPromiseObj_(d):this.fulfill_(d)}};h.prototype.resolveToNonPromiseObj_=function(d){var f=
+void 0;try{f=d.then}catch(Y){this.reject_(Y);return}"function"==typeof f?this.settleSameAsThenable_(f,d):this.fulfill_(d)};h.prototype.reject_=function(d){this.settle_(2,d)};h.prototype.fulfill_=function(d){this.settle_(1,d)};h.prototype.settle_=function(d,f){if(0!=this.state_)throw Error("Cannot settle("+d+", "+f|"): Promise already settled in state"+this.state_);this.state_=d;this.result_=f;this.executeOnSettledCallbacks_()};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var d=
+this.onSettledCallbacks_,f=0;f<d.length;++f)d[f].call(),d[f]=null;this.onSettledCallbacks_=null}};var ha=new k;h.prototype.settleSameAsPromise_=function(d){var f=this.createResolveAndReject_();d.callWhenSettled_(f.resolve,f.reject)};h.prototype.settleSameAsThenable_=function(d,f){var h=this.createResolveAndReject_();try{d.call(f,h.resolve,h.reject)}catch(w){h.reject(w)}};h.prototype.then=function(d,f){function k(d,f){return"function"==typeof d?function(f){try{w(d(f))}catch(O){r(O)}}:f}var w,r,B=new h(function(d,
+f){w=d;r=f});this.callWhenSettled_(k(d,w),k(f,r));return B};h.prototype.catch=function(d){return this.then(void 0,d)};h.prototype.callWhenSettled_=function(d,f){function h(){switch(k.state_){case 1:d(k.result_);break;case 2:f(k.result_);break;default:throw Error("Unexpected state: "+k.state_);}}var k=this;null==this.onSettledCallbacks_?ha.asyncExecute(h):this.onSettledCallbacks_.push(function(){ha.asyncExecute(h)})};h.resolve=f;h.reject=function(d){return new h(function(f,h){h(d)})};h.race=function(d){return new h(function(h,
+k){for(var w=$jscomp.makeIterator(d),r=w.next();!r.done;r=w.next())f(r.value).callWhenSettled_(h,k)})};h.all=function(d){var k=$jscomp.makeIterator(d),r=k.next();return r.done?f([]):new h(function(d,h){function w(f){return function(h){v[f]=h;B--;0==B&&d(v)}}var v=[],B=0;do v.push(void 0),B++,f(r.value).callWhenSettled_(w(v.length-1),h),r=k.next();while(!r.done)})};return h},"es6","es3");
+var DracoDecoderModule=function(d){function k(a,b){b||(b=16);return Math.ceil(a/b)*b}function f(a,b){a||O("Assertion failed: "+b)}function v(a,b){if(0===b||!a)return"";for(var c=0,e,d=0;;){e=W[a+d>>0];c|=e;if(0==e&&!b)break;d++;if(b&&d==b)break}b||(b=d);e="";if(128>c){for(;0<b;)c=String.fromCharCode.apply(String,W.subarray(a,a+Math.min(b,1024))),e=e?e+c:c,a+=1024,b-=1024;return e}return h(W,a)}function h(a,b){for(var c=b;a[c];)++c;if(16<c-b&&a.subarray&&Ia)return Ia.decode(a.subarray(b,c));for(c=
+"";;){var e=a[b++];if(!e)return c;if(e&128){var d=a[b++]&63;if(192==(e&224))c+=String.fromCharCode((e&31)<<6|d);else{var f=a[b++]&63;if(224==(e&240))e=(e&15)<<12|d<<6|f;else{var g=a[b++]&63;if(240==(e&248))e=(e&7)<<18|d<<12|f<<6|g;else{var h=a[b++]&63;if(248==(e&252))e=(e&3)<<24|d<<18|f<<12|g<<6|h;else{var k=a[b++]&63;e=(e&1)<<30|d<<24|f<<18|g<<12|h<<6|k}}}65536>e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else c+=String.fromCharCode(e)}}function ha(a,b){0<
+a%b&&(a+=b-a%b);return a}function r(){a.HEAP8=ia=new Int8Array(D);a.HEAP16=Ja=new Int16Array(D);a.HEAP32=E=new Int32Array(D);a.HEAPU8=W=new Uint8Array(D);a.HEAPU16=new Uint16Array(D);a.HEAPU32=new Uint32Array(D);a.HEAPF32=new Float32Array(D);a.HEAPF64=new Float64Array(D)}function B(e){for(;0<e.length;){var b=e.shift();if("function"==typeof b)b();else{var c=b.func;"number"===typeof c?void 0===b.arg?a.dynCall_v(c):a.dynCall_vi(c,b.arg):c(void 0===b.arg?null:b.arg)}}}function Y(a){return String.prototype.startsWith?
+a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}function w(){return!!w.uncaught_exception}function la(){var e=y.last;if(!e)return(sa(0),0)|0;var b=y.infos[e],c=b.type;if(!c)return(sa(0),e)|0;var p=Array.prototype.slice.call(arguments);a.___cxa_is_pointer_type(c);la.buffer||(la.buffer=Ka(4));E[la.buffer>>2]=e;e=la.buffer;for(var d=0;d<p.length;d++)if(p[d]&&a.___cxa_can_catch(p[d],c,e))return e=E[e>>2],b.adjusted=e,(sa(p[d]),e)|0;e=E[e>>2];
+return(sa(c),e)|0}function Z(e,b){u.varargs=b;try{var c=u.get(),p=u.get(),d=u.get();e=0;Z.buffers||(Z.buffers=[null,[],[]],Z.printChar=function(b,c){var e=Z.buffers[b];f(e);0===c||10===c?((1===b?a.print:a.printErr)(h(e,0)),e.length=0):e.push(c)});for(b=0;b<d;b++){for(var g=E[p+8*b>>2],k=E[p+(8*b+4)>>2],l=0;l<k;l++)Z.printChar(c,W[g+l]);e+=k}return e}catch(ya){return"undefined"!==typeof FS&&ya instanceof FS.ErrnoError||O(ya),-ya.errno}}function ma(e,b){ma.seen||(ma.seen={});e in ma.seen||(a.dynCall_v(b),
+ma.seen[e]=1)}function na(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function wa(e){function b(){if(!a.calledRun&&(a.calledRun=!0,!oa)){La||(La=!0,B(Ma));B(Na);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Oa.unshift(a.postRun.shift());B(Oa)}}if(!(0<ea)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Pa.unshift(a.preRun.shift());
+B(Pa);0<ea||a.calledRun||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}function O(e){if(a.onAbort)a.onAbort(e);void 0!==e?(a.print(e),a.printErr(e),e=JSON.stringify(e)):e="";oa=!0;throw"abort("+e+"). Build with -s ASSERTIONS=1 for more info.";}function m(){}function t(a){return(a||m).__cache__}function T(a,b){var c=t(b),e=c[a];if(e)return e;e=Object.create((b||m).prototype);e.ptr=a;return c[a]=e}function U(a){if("string"===typeof a){for(var b=
+0,c=0;c<a.length;++c){var e=a.charCodeAt(c);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++c)&1023);127>=e?++b:b=2047>=e?b+2:65535>=e?b+3:2097151>=e?b+4:67108863>=e?b+5:b+6}b=Array(b+1);c=0;e=b.length;if(0<e){e=c+e-1;for(var d=0;d<a.length;++d){var f=a.charCodeAt(d);55296<=f&&57343>=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++d)&1023);if(127>=f){if(c>=e)break;b[c++]=f}else{if(2047>=f){if(c+1>=e)break;b[c++]=192|f>>6}else{if(65535>=f){if(c+2>=e)break;b[c++]=224|f>>12}else{if(2097151>=f){if(c+
+3>=e)break;b[c++]=240|f>>18}else{if(67108863>=f){if(c+4>=e)break;b[c++]=248|f>>24}else{if(c+5>=e)break;b[c++]=252|f>>30;b[c++]=128|f>>24&63}b[c++]=128|f>>18&63}b[c++]=128|f>>12&63}b[c++]=128|f>>6&63}b[c++]=128|f&63}}b[c]=0}a=l.alloc(b,ia);l.copy(b,ia,a)}return a}function z(){throw"cannot construct a Status, no constructor in IDL";}function F(){this.ptr=Wa();t(F)[this.ptr]=this}function G(){this.ptr=Xa();t(G)[this.ptr]=this}function H(){this.ptr=Ya();t(H)[this.ptr]=this}function I(){this.ptr=Za();
+t(I)[this.ptr]=this}function J(){this.ptr=$a();t(J)[this.ptr]=this}function n(){this.ptr=ab();t(n)[this.ptr]=this}function P(){this.ptr=bb();t(P)[this.ptr]=this}function x(){this.ptr=cb();t(x)[this.ptr]=this}function K(){this.ptr=db();t(K)[this.ptr]=this}function q(){this.ptr=eb();t(q)[this.ptr]=this}function L(){this.ptr=fb();t(L)[this.ptr]=this}function M(){this.ptr=gb();t(M)[this.ptr]=this}function V(){this.ptr=hb();t(V)[this.ptr]=this}function Q(){this.ptr=ib();t(Q)[this.ptr]=this}function g(){this.ptr=
+jb();t(g)[this.ptr]=this}function C(){this.ptr=kb();t(C)[this.ptr]=this}function X(){throw"cannot construct a VoidPtr, no constructor in IDL";}function N(){this.ptr=lb();t(N)[this.ptr]=this}function R(){this.ptr=mb();t(R)[this.ptr]=this}d=d||{};var a="undefined"!==typeof d?d:{},Qa=!1,Ra=!1;a.onRuntimeInitialized=function(){Qa=!0;if(Ra&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ra=!0;if(Qa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=
+function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3<a.length?!1:1==a[0]&&0<=a[1]&&3>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};var pa={},aa;for(aa in a)a.hasOwnProperty(aa)&&(pa[aa]=a[aa]);a.arguments=[];a.thisProgram="./this.program";a.quit=function(a,b){throw b;};a.preRun=[];a.postRun=[];var ja=!1,fa=!1,qa=!1,za=!1;if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)ja=!0;else if("WORKER"===a.ENVIRONMENT)fa=!0;else if("NODE"===a.ENVIRONMENT)qa=!0;else if("SHELL"===a.ENVIRONMENT)za=!0;else throw Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.");
+else ja="object"===typeof window,fa="function"===typeof importScripts,qa="object"===typeof process&&"function"===typeof require&&!ja&&!fa,za=!ja&&!qa&&!fa;if(qa){var Aa,Ba;a.read=function(a,b){Aa||(Aa=require("fs"));Ba||(Ba=require("path"));a=Ba.normalize(a);a=Aa.readFileSync(a);return b?a:a.toString()};a.readBinary=function(e){e=a.read(e,!0);e.buffer||(e=new Uint8Array(e));f(e.buffer);return e};1<process.argv.length&&(a.thisProgram=process.argv[1].replace(/\\/g,"/"));a.arguments=process.argv.slice(2);
+process.on("uncaughtException",function(a){if(!(a instanceof na))throw a;});process.on("unhandledRejection",function(a,b){process.exit(1)});a.inspect=function(){return"[Emscripten Module object]"}}else if(za)"undefined"!=typeof read&&(a.read=function(a){return read(a)}),a.readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");f("object"===typeof a);return a},"undefined"!=typeof scriptArgs?a.arguments=scriptArgs:"undefined"!=typeof arguments&&
+(a.arguments=arguments),"function"===typeof quit&&(a.quit=function(a,b){quit(a)});else if(ja||fa)a.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},fa&&(a.readBinary=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),a.readAsync=function(a,b,c){var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){200==e.status||0==e.status&&e.response?
+b(e.response):c()};e.onerror=c;e.send(null)},a.setWindowTitle=function(a){document.title=a};a.print="undefined"!==typeof console?console.log.bind(console):"undefined"!==typeof print?print:null;a.printErr="undefined"!==typeof printErr?printErr:"undefined"!==typeof console&&console.warn.bind(console)||a.print;a.print=a.print;a.printErr=a.printErr;for(aa in pa)pa.hasOwnProperty(aa)&&(a[aa]=pa[aa]);pa=void 0;var oa=0,Ia="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&
+new TextDecoder("utf-16le");var ia,W,Ja,E,ba,Ca,ta,ua,Da,ka;var Ea=ba=Ca=ta=ua=Da=ka=0;var Sa=!1;a.reallocBuffer||(a.reallocBuffer=function(a){try{if(ArrayBuffer.transfer)var b=ArrayBuffer.transfer(D,a);else{var c=ia;b=new ArrayBuffer(a);(new Int8Array(b)).set(c)}}catch(p){return!1}return nb(b)?b:!1});try{var Ta=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Ta(new ArrayBuffer(4))}catch(e){Ta=function(a){return a.byteLength}}var Fa=a.TOTAL_STACK||
+5242880,A=a.TOTAL_MEMORY||16777216;A<Fa&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+A+"! (TOTAL_STACK="+Fa+")");if(a.buffer)var D=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:A/65536}),D=a.wasmMemory.buffer):D=new ArrayBuffer(A),a.buffer=D;r();E[0]=1668509029;Ja[1]=25459;if(115!==W[2]||99!==W[3])throw"Runtime error: expected the system to be little-endian!";var Pa=[],Ma=[],Na=[],ob=[],Oa=[],
+La=!1,pb=Math.floor,ea=0,Ga=null,ra=null;a.preloadedImages={};a.preloadedAudios={};(function(){function e(){try{if(a.wasmBinary)return new Uint8Array(a.wasmBinary);if(a.readBinary)return a.readBinary(f);throw"on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)";}catch(Va){O(Va)}}function b(){return a.wasmBinary||!ja&&!fa||"function"!==typeof fetch?new Promise(function(a,b){a(e())}):fetch(f,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+
+f+"'";return a.arrayBuffer()}).catch(function(){return e()})}function c(c,e,d){function p(b,c){k=b.exports;k.memory&&(b=k.memory,c=a.buffer,b.byteLength<c.byteLength&&a.printErr("the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here"),c=new Int8Array(c),(new Int8Array(b)).set(c),a.buffer=D=b,r());a.asm=k;a.usingWasm=!0;ea--;a.monitorRunDependencies&&a.monitorRunDependencies(ea);0==ea&&(null!==Ga&&(clearInterval(Ga),Ga=null),ra&&(b=ra,ra=null,b()))}
+function g(a){p(a.instance,a.module)}function S(c){b().then(function(a){return WebAssembly.instantiate(a,h)}).then(c).catch(function(b){a.printErr("failed to asynchronously prepare wasm: "+b);O(b)})}if("object"!==typeof WebAssembly)return a.printErr("no native wasm support detected"),!1;if(!(a.wasmMemory instanceof WebAssembly.Memory))return a.printErr("no native wasm Memory in use"),!1;e.memory=a.wasmMemory;h.global={NaN:NaN,Infinity:Infinity};h["global.Math"]=Math;h.env=e;ea++;a.monitorRunDependencies&&
+a.monitorRunDependencies(ea);if(a.instantiateWasm)try{return a.instantiateWasm(h,p)}catch(qb){return a.printErr("Module.instantiateWasm callback failed with error: "+qb),!1}a.wasmBinary||"function"!==typeof WebAssembly.instantiateStreaming||Y(f)||"function"!==typeof fetch?S(g):WebAssembly.instantiateStreaming(fetch(f,{credentials:"same-origin"}),h).then(g).catch(function(b){a.printErr("wasm streaming compile failed: "+b);a.printErr("falling back to ArrayBuffer instantiation");S(g)});return{}}var d=
+"draco_decoder.wast",f="draco_decoder.wasm",g="draco_decoder.temp.asm.js";"function"===typeof a.locateFile&&(Y(d)||(d=a.locateFile(d)),Y(f)||(f=a.locateFile(f)),Y(g)||(g=a.locateFile(g)));var h={global:null,env:null,asm2wasm:{"f64-rem":function(a,b){return a%b},"debugger":function(){debugger}},parent:a},k=null;a.asmPreload=a.asm;var l=a.reallocBuffer;a.reallocBuffer=function(b){if("asmjs"===m)var c=l(b);else a:{b=ha(b,a.usingWasm?65536:16777216);var e=a.buffer.byteLength;if(a.usingWasm)try{c=-1!==
+a.wasmMemory.grow((b-e)/65536)?a.buffer=a.wasmMemory.buffer:null;break a}catch(vd){c=null;break a}c=void 0}return c};var m="";a.asm=function(b,e,d){if(!e.table){var p=a.wasmTableSize;void 0===p&&(p=1024);var f=a.wasmMaxTableSize;e.table="object"===typeof WebAssembly&&"function"===typeof WebAssembly.Table?void 0!==f?new WebAssembly.Table({initial:p,maximum:f,element:"anyfunc"}):new WebAssembly.Table({initial:p,element:"anyfunc"}):Array(p);a.wasmTable=e.table}e.memoryBase||(e.memoryBase=a.STATIC_BASE);
+e.tableBase||(e.tableBase=0);(b=c(b,e,d))||O("no binaryen method succeeded. consider enabling more options, like interpreting, if you want that: https://github.com/kripken/emscripten/wiki/WebAssembly#binaryen-methods");return b}})();Ea=1024;ba=Ea+19408;Ma.push();a.STATIC_BASE=Ea;a.STATIC_BUMP=19408;var rb=ba;ba+=16;var y={last:0,caught:[],infos:{},deAdjust:function(a){if(!a||y.infos[a])return a;for(var b in y.infos)if(y.infos[b].adjusted===a)return b;return a},addRef:function(a){a&&y.infos[a].refcount++},
+decRef:function(e){if(e){var b=y.infos[e];f(0<b.refcount);b.refcount--;0!==b.refcount||b.rethrown||(b.destructor&&a.dynCall_vi(b.destructor,e),delete y.infos[e],___cxa_free_exception(e))}},clearRef:function(a){a&&(y.infos[a].refcount=0)}},u={varargs:0,get:function(a){u.varargs+=4;return E[u.varargs-4>>2]},getStr:function(){return v(u.get())},get64:function(){var a=u.get(),b=u.get();0<=a?f(0===b):f(-1===b);return a},getZero:function(){f(0===u.get())}},va={},Ha=1;ka=function(a){f(!Sa);var b=ba;ba=ba+
+a+15&-16;return b}(4);Ca=ta=k(ba);ua=Ca+Fa;Da=k(ua);E[ka>>2]=Da;Sa=!0;a.wasmTableSize=492;a.wasmMaxTableSize=492;a.asmGlobalArg={};a.asmLibraryArg={abort:O,assert:f,enlargeMemory:function(){var e=a.usingWasm?65536:16777216,b=2147483648-e;if(E[ka>>2]>b)return!1;var c=A;for(A=Math.max(A,16777216);A<E[ka>>2];)A=536870912>=A?ha(2*A,e):Math.min(ha((3*A+2147483648)/4,e),b);e=a.reallocBuffer(A);if(!e||e.byteLength!=A)return A=c,!1;a.buffer=D=e;r();return!0},getTotalMemory:function(){return A},abortOnCannotGrowMemory:function(){O("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+
+A+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},invoke_ii:function(e,b){try{return a.dynCall_ii(e,b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_iii:function(e,b,c){try{return a.dynCall_iii(e,b,c)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_iiii:function(e,b,c,d){try{return a.dynCall_iiii(e,
+b,c,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_iiiiiii:function(e,b,c,d,f,g,h){try{return a.dynCall_iiiiiii(e,b,c,d,f,g,h)}catch(da){if("number"!==typeof da&&"longjmp"!==da)throw da;a.setThrew(1,0)}},invoke_v:function(e){try{a.dynCall_v(e)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;a.setThrew(1,0)}},invoke_vi:function(e,b){try{a.dynCall_vi(e,b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_vii:function(e,b,c){try{a.dynCall_vii(e,
+b,c)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_viii:function(e,b,c,d){try{a.dynCall_viii(e,b,c,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_viiii:function(e,b,c,d,f){try{a.dynCall_viiii(e,b,c,d,f)}catch(xa){if("number"!==typeof xa&&"longjmp"!==xa)throw xa;a.setThrew(1,0)}},invoke_viiiii:function(e,b,c,d,f,g){try{a.dynCall_viiiii(e,b,c,d,f,g)}catch(ca){if("number"!==typeof ca&&"longjmp"!==ca)throw ca;a.setThrew(1,0)}},invoke_viiiiii:function(e,
+b,c,d,f,g,h){try{a.dynCall_viiiiii(e,b,c,d,f,g,h)}catch(da){if("number"!==typeof da&&"longjmp"!==da)throw da;a.setThrew(1,0)}},__ZSt18uncaught_exceptionv:w,___cxa_allocate_exception:function(a){return Ka(a)},___cxa_begin_catch:function(a){var b=y.infos[a];b&&!b.caught&&(b.caught=!0,w.uncaught_exception--);b&&(b.rethrown=!1);y.caught.push(a);y.addRef(y.deAdjust(a));return a},___cxa_find_matching_catch:la,___cxa_pure_virtual:function(){oa=!0;throw"Pure virtual function called!";},___cxa_throw:function(a,
+b,c){y.infos[a]={ptr:a,adjusted:a,type:b,destructor:c,refcount:0,caught:!1,rethrown:!1};y.last=a;"uncaught_exception"in w?w.uncaught_exception++:w.uncaught_exception=1;throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";},___gxx_personality_v0:function(){},___resumeException:function(a){y.last||(y.last=a);throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";
+},___setErrNo:function(d){a.___errno_location&&(E[a.___errno_location()>>2]=d);return d},___syscall140:function(a,b){u.varargs=b;try{var c=u.getStreamFromFD();u.get();var d=u.get(),e=u.get(),f=u.get();FS.llseek(c,d,f);E[e>>2]=c.position;c.getdents&&0===d&&0===f&&(c.getdents=null);return 0}catch(ca){return"undefined"!==typeof FS&&ca instanceof FS.ErrnoError||O(ca),-ca.errno}},___syscall146:Z,___syscall54:function(a,b){u.varargs=b;return 0},___syscall6:function(a,b){u.varargs=b;try{var c=u.getStreamFromFD();
+FS.close(c);return 0}catch(p){return"undefined"!==typeof FS&&p instanceof FS.ErrnoError||O(p),-p.errno}},_abort:function(){a.abort()},_emscripten_memcpy_big:function(a,b,c){W.set(W.subarray(b,b+c),a);return a},_llvm_floor_f64:pb,_llvm_trap:function(){O("trap!")},_pthread_getspecific:function(a){return va[a]||0},_pthread_key_create:function(a,b){if(0==a)return 22;E[a>>2]=Ha;va[Ha]=0;Ha++;return 0},_pthread_once:ma,_pthread_setspecific:function(a,b){if(!(a in va))return 22;va[a]=b;return 0},flush_NO_FILESYSTEM:function(){var d=
+a._fflush;d&&d(0);if(d=Z.printChar){var b=Z.buffers;b[1].length&&d(1,10);b[2].length&&d(2,10)}},DYNAMICTOP_PTR:ka,tempDoublePtr:rb,ABORT:oa,STACKTOP:ta,STACK_MAX:ua};var Ua=a.asm(a.asmGlobalArg,a.asmLibraryArg,D);a.asm=Ua;a.___cxa_can_catch=function(){return a.asm.___cxa_can_catch.apply(null,arguments)};a.___cxa_is_pointer_type=function(){return a.asm.___cxa_is_pointer_type.apply(null,arguments)};var $a=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,
+arguments)},sb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},tb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},ub=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,
+arguments)},cb=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},wb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,
+arguments)},xb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},yb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},zb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,
+arguments)},bb=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return a.asm._emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,arguments)},Ab=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm._emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},Bb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm._emscripten_bind_AttributeTransformData_transform_type_0.apply(null,
+arguments)},ib=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return a.asm._emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,arguments)},Cb=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm._emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},Db=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return a.asm._emscripten_bind_DecoderBuffer___destroy___0.apply(null,arguments)},Eb=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null,
+arguments)},Fb=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,arguments)},jb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm._emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},Gb=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},Hb=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=
+function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Ib=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Jb=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},Kb=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,
+arguments)},Lb=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeId_2.apply(null,arguments)},Mb=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3.apply(null,arguments)},Nb=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3.apply(null,arguments)},Ob=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=
+function(){return a.asm._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3.apply(null,arguments)},Pb=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null,arguments)},Qb=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null,arguments)},Rb=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3.apply(null,
+arguments)},Sb=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3.apply(null,arguments)},Tb=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3.apply(null,arguments)},Ub=a._emscripten_bind_Decoder_GetAttribute_2=function(){return a.asm._emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},Vb=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=
+function(){return a.asm._emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)},Wb=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm._emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},Xb=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm._emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},Yb=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return a.asm._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,
+arguments)},Zb=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return a.asm._emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},$b=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm._emscripten_bind_Decoder___destroy___0.apply(null,arguments)},gb=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null,arguments)},ac=a._emscripten_bind_DracoFloat32Array_GetValue_1=
+function(){return a.asm._emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},bc=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},cc=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_size_0.apply(null,arguments)},fb=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return a.asm._emscripten_bind_DracoInt16Array_DracoInt16Array_0.apply(null,
+arguments)},dc=a._emscripten_bind_DracoInt16Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoInt16Array_GetValue_1.apply(null,arguments)},ec=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return a.asm._emscripten_bind_DracoInt16Array___destroy___0.apply(null,arguments)},fc=a._emscripten_bind_DracoInt16Array_size_0=function(){return a.asm._emscripten_bind_DracoInt16Array_size_0.apply(null,arguments)},lb=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm._emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,
+arguments)},gc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},hc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},ic=a._emscripten_bind_DracoInt32Array_size_0=function(){return a.asm._emscripten_bind_DracoInt32Array_size_0.apply(null,arguments)},db=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return a.asm._emscripten_bind_DracoInt8Array_DracoInt8Array_0.apply(null,
+arguments)},jc=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoInt8Array_GetValue_1.apply(null,arguments)},kc=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return a.asm._emscripten_bind_DracoInt8Array___destroy___0.apply(null,arguments)},lc=a._emscripten_bind_DracoInt8Array_size_0=function(){return a.asm._emscripten_bind_DracoInt8Array_size_0.apply(null,arguments)},Wa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return a.asm._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0.apply(null,
+arguments)},mc=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoUInt16Array_GetValue_1.apply(null,arguments)},nc=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return a.asm._emscripten_bind_DracoUInt16Array___destroy___0.apply(null,arguments)},oc=a._emscripten_bind_DracoUInt16Array_size_0=function(){return a.asm._emscripten_bind_DracoUInt16Array_size_0.apply(null,arguments)},Za=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return a.asm._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0.apply(null,
+arguments)},pc=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoUInt32Array_GetValue_1.apply(null,arguments)},qc=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoUInt32Array___destroy___0.apply(null,arguments)},rc=a._emscripten_bind_DracoUInt32Array_size_0=function(){return a.asm._emscripten_bind_DracoUInt32Array_size_0.apply(null,arguments)},Ya=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return a.asm._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0.apply(null,
+arguments)},sc=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoUInt8Array_GetValue_1.apply(null,arguments)},tc=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm._emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},uc=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm._emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},hb=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm._emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,
+arguments)},vc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm._emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},kb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm._emscripten_bind_Mesh_Mesh_0.apply(null,arguments)},wc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm._emscripten_bind_Mesh___destroy___0.apply(null,arguments)},xc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm._emscripten_bind_Mesh_num_attributes_0.apply(null,
+arguments)},yc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm._emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},zc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm._emscripten_bind_Mesh_num_points_0.apply(null,arguments)},Ac=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},Bc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,
+arguments)},Cc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Dc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},Ec=a._emscripten_bind_MetadataQuerier_HasDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasDoubleEntry_2.apply(null,arguments)},Fc=a._emscripten_bind_MetadataQuerier_HasEntry_2=
+function(){return a.asm._emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},Gc=a._emscripten_bind_MetadataQuerier_HasIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasIntEntry_2.apply(null,arguments)},Hc=a._emscripten_bind_MetadataQuerier_HasStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasStringEntry_2.apply(null,arguments)},eb=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm._emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,
+arguments)},Ic=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm._emscripten_bind_MetadataQuerier_NumEntries_1.apply(null,arguments)},Jc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm._emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},mb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm._emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},Kc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm._emscripten_bind_Metadata___destroy___0.apply(null,
+arguments)},Lc=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm._emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},ab=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return a.asm._emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Mc=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm._emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Nc=a._emscripten_bind_PointAttribute_attribute_type_0=
+function(){return a.asm._emscripten_bind_PointAttribute_attribute_type_0.apply(null,arguments)},Oc=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Pc=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_stride_0.apply(null,arguments)},Qc=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm._emscripten_bind_PointAttribute_data_type_0.apply(null,
+arguments)},Rc=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm._emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Sc=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm._emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Tc=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm._emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Uc=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm._emscripten_bind_PointAttribute_unique_id_0.apply(null,
+arguments)},Xa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm._emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},Vc=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Wc=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm._emscripten_bind_PointCloud_num_attributes_0.apply(null,arguments)},Xc=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm._emscripten_bind_PointCloud_num_points_0.apply(null,
+arguments)},Yc=a._emscripten_bind_Status___destroy___0=function(){return a.asm._emscripten_bind_Status___destroy___0.apply(null,arguments)},Zc=a._emscripten_bind_Status_code_0=function(){return a.asm._emscripten_bind_Status_code_0.apply(null,arguments)},$c=a._emscripten_bind_Status_error_msg_0=function(){return a.asm._emscripten_bind_Status_error_msg_0.apply(null,arguments)},ad=a._emscripten_bind_Status_ok_0=function(){return a.asm._emscripten_bind_Status_ok_0.apply(null,arguments)},bd=a._emscripten_bind_VoidPtr___destroy___0=
+function(){return a.asm._emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},cd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,arguments)},dd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},ed=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=
+function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,arguments)},fd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},gd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,
+arguments)},hd=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},id=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},jd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},kd=
+a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)},ld=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},md=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},nd=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=
+function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},od=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},pd=a._emscripten_enum_draco_StatusCode_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_ERROR.apply(null,arguments)},qd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm._emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,
+arguments)},rd=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},sd=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm._emscripten_enum_draco_StatusCode_OK.apply(null,arguments)},td=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},ud=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,
+arguments)},nb=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)};a._free=function(){return a.asm._free.apply(null,arguments)};a._llvm_bswap_i32=function(){return a.asm._llvm_bswap_i32.apply(null,arguments)};var Ka=a._malloc=function(){return a.asm._malloc.apply(null,arguments)};a._memcpy=function(){return a.asm._memcpy.apply(null,arguments)};a._memmove=function(){return a.asm._memmove.apply(null,arguments)};a._memset=function(){return a.asm._memset.apply(null,
+arguments)};a._sbrk=function(){return a.asm._sbrk.apply(null,arguments)};a.establishStackSpace=function(){return a.asm.establishStackSpace.apply(null,arguments)};a.getTempRet0=function(){return a.asm.getTempRet0.apply(null,arguments)};a.runPostSets=function(){return a.asm.runPostSets.apply(null,arguments)};var sa=a.setTempRet0=function(){return a.asm.setTempRet0.apply(null,arguments)};a.setThrew=function(){return a.asm.setThrew.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,
+arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,
+arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)};a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.asm=Ua;a.then=function(d){if(a.calledRun)d(a);
+else{var b=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){b&&b();d(a)}}return a};na.prototype=Error();na.prototype.constructor=na;ra=function b(){a.calledRun||wa();a.calledRun||(ra=b)};a.run=wa;a.exit=function(b,c){if(!c||!a.noExitRuntime||0!==b){if(!a.noExitRuntime&&(oa=!0,ta=void 0,B(ob),a.onExit))a.onExit(b);qa&&process.exit(b);a.quit(b,new na(b))}};a.abort=O;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();a.noExitRuntime=!0;
+wa();m.prototype=Object.create(m.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.WrapperObject=m;a.getCache=t;a.wrapPointer=T;a.castObject=function(a,c){return T(a.ptr,c)};a.NULL=T(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";a.__destroy__();delete t(a.__class__)[a.ptr]};a.compare=function(a,c){return a.ptr===c.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var l=
+{buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(l.needed){for(var b=0;b<l.temps.length;b++)a._free(l.temps[b]);l.temps.length=0;a._free(l.buffer);l.buffer=0;l.size+=l.needed;l.needed=0}l.buffer||(l.size+=128,l.buffer=a._malloc(l.size),f(l.buffer));l.pos=0},alloc:function(b,c){f(l.buffer);b=b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;l.pos+b>=l.size?(f(0<b),l.needed+=b,c=a._malloc(b),l.temps.push(c)):(c=l.buffer+l.pos,l.pos+=b);return c},copy:function(a,c,d){switch(c.BYTES_PER_ELEMENT){case 2:d>>=
+1;break;case 4:d>>=2;break;case 8:d>>=3}for(var b=0;b<a.length;b++)c[d+b]=a[b]}};z.prototype=Object.create(m.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.Status=z;z.prototype.code=z.prototype.code=function(){return Zc(this.ptr)};z.prototype.ok=z.prototype.ok=function(){return!!ad(this.ptr)};z.prototype.error_msg=z.prototype.error_msg=function(){return v($c(this.ptr))};z.prototype.__destroy__=z.prototype.__destroy__=function(){Yc(this.ptr)};F.prototype=Object.create(m.prototype);
+F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.DracoUInt16Array=F;F.prototype.GetValue=F.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return mc(b,a)};F.prototype.size=F.prototype.size=function(){return oc(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){nc(this.ptr)};G.prototype=Object.create(m.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.PointCloud=G;G.prototype.num_attributes=G.prototype.num_attributes=
+function(){return Wc(this.ptr)};G.prototype.num_points=G.prototype.num_points=function(){return Xc(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){Vc(this.ptr)};H.prototype=Object.create(m.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.DracoUInt8Array=H;H.prototype.GetValue=H.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return sc(b,a)};H.prototype.size=H.prototype.size=function(){return uc(this.ptr)};H.prototype.__destroy__=
+H.prototype.__destroy__=function(){tc(this.ptr)};I.prototype=Object.create(m.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoUInt32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return pc(b,a)};I.prototype.size=I.prototype.size=function(){return rc(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){qc(this.ptr)};J.prototype=Object.create(m.prototype);J.prototype.constructor=J;J.prototype.__class__=
+J;J.__cache__={};a.AttributeOctahedronTransform=J;J.prototype.InitFromAttribute=J.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!sb(b,a)};J.prototype.quantization_bits=J.prototype.quantization_bits=function(){return ub(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){tb(this.ptr)};n.prototype=Object.create(m.prototype);n.prototype.constructor=n;n.prototype.__class__=n;n.__cache__={};a.PointAttribute=n;n.prototype.size=n.prototype.size=
+function(){return Tc(this.ptr)};n.prototype.GetAttributeTransformData=n.prototype.GetAttributeTransformData=function(){return T(Lc(this.ptr),P)};n.prototype.attribute_type=n.prototype.attribute_type=function(){return Nc(this.ptr)};n.prototype.data_type=n.prototype.data_type=function(){return Qc(this.ptr)};n.prototype.num_components=n.prototype.num_components=function(){return Sc(this.ptr)};n.prototype.normalized=n.prototype.normalized=function(){return!!Rc(this.ptr)};n.prototype.byte_stride=n.prototype.byte_stride=
+function(){return Pc(this.ptr)};n.prototype.byte_offset=n.prototype.byte_offset=function(){return Oc(this.ptr)};n.prototype.unique_id=n.prototype.unique_id=function(){return Uc(this.ptr)};n.prototype.__destroy__=n.prototype.__destroy__=function(){Mc(this.ptr)};P.prototype=Object.create(m.prototype);P.prototype.constructor=P;P.prototype.__class__=P;P.__cache__={};a.AttributeTransformData=P;P.prototype.transform_type=P.prototype.transform_type=function(){return Bb(this.ptr)};P.prototype.__destroy__=
+P.prototype.__destroy__=function(){Ab(this.ptr)};x.prototype=Object.create(m.prototype);x.prototype.constructor=x;x.prototype.__class__=x;x.__cache__={};a.AttributeQuantizationTransform=x;x.prototype.InitFromAttribute=x.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!vb(b,a)};x.prototype.quantization_bits=x.prototype.quantization_bits=function(){return yb(this.ptr)};x.prototype.min_value=x.prototype.min_value=function(a){var b=this.ptr;a&&"object"===
+typeof a&&(a=a.ptr);return xb(b,a)};x.prototype.range=x.prototype.range=function(){return zb(this.ptr)};x.prototype.__destroy__=x.prototype.__destroy__=function(){wb(this.ptr)};K.prototype=Object.create(m.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoInt8Array=K;K.prototype.GetValue=K.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return jc(b,a)};K.prototype.size=K.prototype.size=function(){return lc(this.ptr)};K.prototype.__destroy__=
+K.prototype.__destroy__=function(){kc(this.ptr)};q.prototype=Object.create(m.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.MetadataQuerier=q;q.prototype.HasEntry=q.prototype.HasEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return!!Fc(b,a,c)};q.prototype.HasIntEntry=q.prototype.HasIntEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);
+return!!Gc(b,a,c)};q.prototype.GetIntEntry=q.prototype.GetIntEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return Cc(b,a,c)};q.prototype.HasDoubleEntry=q.prototype.HasDoubleEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return!!Ec(b,a,c)};q.prototype.GetDoubleEntry=q.prototype.GetDoubleEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=
+a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return Ac(b,a,c)};q.prototype.HasStringEntry=q.prototype.HasStringEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return!!Hc(b,a,c)};q.prototype.GetStringEntry=q.prototype.GetStringEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return v(Dc(b,a,c))};q.prototype.NumEntries=q.prototype.NumEntries=function(a){var b=this.ptr;
+a&&"object"===typeof a&&(a=a.ptr);return Ic(b,a)};q.prototype.GetEntryName=q.prototype.GetEntryName=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return v(Bc(b,a,c))};q.prototype.__destroy__=q.prototype.__destroy__=function(){Jc(this.ptr)};L.prototype=Object.create(m.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt16Array=L;L.prototype.GetValue=L.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&
+(a=a.ptr);return dc(b,a)};L.prototype.size=L.prototype.size=function(){return fc(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){ec(this.ptr)};M.prototype=Object.create(m.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DracoFloat32Array=M;M.prototype.GetValue=M.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ac(b,a)};M.prototype.size=M.prototype.size=function(){return cc(this.ptr)};M.prototype.__destroy__=M.prototype.__destroy__=
+function(){bc(this.ptr)};V.prototype=Object.create(m.prototype);V.prototype.constructor=V;V.prototype.__class__=V;V.__cache__={};a.GeometryAttribute=V;V.prototype.__destroy__=V.prototype.__destroy__=function(){vc(this.ptr)};Q.prototype=Object.create(m.prototype);Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.DecoderBuffer=Q;Q.prototype.Init=Q.prototype.Init=function(a,c){var b=this.ptr;l.prepare();if("object"==typeof a&&"object"===typeof a){var d=l.alloc(a,ia);l.copy(a,ia,d);a=
+d}c&&"object"===typeof c&&(c=c.ptr);Cb(b,a,c)};Q.prototype.__destroy__=Q.prototype.__destroy__=function(){Db(this.ptr)};g.prototype=Object.create(m.prototype);g.prototype.constructor=g;g.prototype.__class__=g;g.__cache__={};a.Decoder=g;g.prototype.GetEncodedGeometryType=g.prototype.GetEncodedGeometryType=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Vb(b,a)};g.prototype.DecodeBufferToPointCloud=g.prototype.DecodeBufferToPointCloud=function(a,c){var b=this.ptr;a&&"object"===typeof a&&
+(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Fb(b,a,c),z)};g.prototype.DecodeBufferToMesh=g.prototype.DecodeBufferToMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Eb(b,a,c),z)};g.prototype.GetAttributeId=g.prototype.GetAttributeId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return Lb(b,a,c)};g.prototype.GetAttributeIdByName=g.prototype.GetAttributeIdByName=function(a,c){var b=
+this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return Kb(b,a,c)};g.prototype.GetAttributeIdByMetadataEntry=g.prototype.GetAttributeIdByMetadataEntry=function(a,c,d){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);d=d&&"object"===typeof d?d.ptr:U(d);return Jb(b,a,c,d)};g.prototype.GetAttribute=g.prototype.GetAttribute=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=
+c.ptr);return T(Ub(b,a,c),n)};g.prototype.GetAttributeByUniqueId=g.prototype.GetAttributeByUniqueId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Gb(b,a,c),n)};g.prototype.GetMetadata=g.prototype.GetMetadata=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return T(Xb(b,a),R)};g.prototype.GetAttributeMetadata=g.prototype.GetAttributeMetadata=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&
+(c=c.ptr);return T(Qb(b,a,c),R)};g.prototype.GetFaceFromMesh=g.prototype.GetFaceFromMesh=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Wb(b,a,c,d)};g.prototype.GetTriangleStripsFromMesh=g.prototype.GetTriangleStripsFromMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return Yb(b,a,c)};g.prototype.GetAttributeFloat=g.prototype.GetAttributeFloat=function(a,
+c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ib(b,a,c,d)};g.prototype.GetAttributeFloatForAllPoints=g.prototype.GetAttributeFloatForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hb(b,a,c,d)};g.prototype.GetAttributeIntForAllPoints=g.prototype.GetAttributeIntForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===
+typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Pb(b,a,c,d)};g.prototype.GetAttributeInt8ForAllPoints=g.prototype.GetAttributeInt8ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ob(b,a,c,d)};g.prototype.GetAttributeUInt8ForAllPoints=g.prototype.GetAttributeUInt8ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===
+typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Tb(b,a,c,d)};g.prototype.GetAttributeInt16ForAllPoints=g.prototype.GetAttributeInt16ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Mb(b,a,c,d)};g.prototype.GetAttributeUInt16ForAllPoints=g.prototype.GetAttributeUInt16ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&
+"object"===typeof d&&(d=d.ptr);return!!Rb(b,a,c,d)};g.prototype.GetAttributeInt32ForAllPoints=g.prototype.GetAttributeInt32ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Nb(b,a,c,d)};g.prototype.GetAttributeUInt32ForAllPoints=g.prototype.GetAttributeUInt32ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=
+d.ptr);return!!Sb(b,a,c,d)};g.prototype.SkipAttributeTransform=g.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Zb(b,a)};g.prototype.__destroy__=g.prototype.__destroy__=function(){$b(this.ptr)};C.prototype=Object.create(m.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Mesh=C;C.prototype.num_faces=C.prototype.num_faces=function(){return yc(this.ptr)};C.prototype.num_attributes=C.prototype.num_attributes=function(){return xc(this.ptr)};
+C.prototype.num_points=C.prototype.num_points=function(){return zc(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){wc(this.ptr)};X.prototype=Object.create(m.prototype);X.prototype.constructor=X;X.prototype.__class__=X;X.__cache__={};a.VoidPtr=X;X.prototype.__destroy__=X.prototype.__destroy__=function(){bd(this.ptr)};N.prototype=Object.create(m.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.DracoInt32Array=N;N.prototype.GetValue=N.prototype.GetValue=
+function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return gc(b,a)};N.prototype.size=N.prototype.size=function(){return ic(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){hc(this.ptr)};R.prototype=Object.create(m.prototype);R.prototype.constructor=R;R.prototype.__class__=R;R.__cache__={};a.Metadata=R;R.prototype.__destroy__=R.prototype.__destroy__=function(){Kc(this.ptr)};(function(){function b(){a.OK=sd();a.ERROR=pd();a.IO_ERROR=rd();a.INVALID_PARAMETER=qd();a.UNSUPPORTED_VERSION=
+ud();a.UNKNOWN_VERSION=td();a.INVALID_GEOMETRY_TYPE=gd();a.POINT_CLOUD=hd();a.TRIANGULAR_MESH=id();a.ATTRIBUTE_INVALID_TRANSFORM=cd();a.ATTRIBUTE_NO_TRANSFORM=dd();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=fd();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=ed();a.INVALID=ld();a.POSITION=nd();a.NORMAL=md();a.COLOR=jd();a.TEX_COORD=od();a.GENERIC=kd()}a.calledRun?b():Na.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return d};
+"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
diff --git a/site/public/assets/js/vendor/draco/draco_wasm_wrapper_gltf.js b/site/public/assets/js/vendor/draco/draco_wasm_wrapper_gltf.js
new file mode 100644
index 00000000..d3332d2d
--- /dev/null
+++ b/site/public/assets/js/vendor/draco/draco_wasm_wrapper_gltf.js
@@ -0,0 +1,119 @@
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(d,k,f){d!=Array.prototype&&d!=Object.prototype&&(d[k]=f.value)};$jscomp.getGlobal=function(d){return"undefined"!=typeof window&&window===d?d:"undefined"!=typeof global&&null!=global?global:d};$jscomp.global=$jscomp.getGlobal(this);
+$jscomp.polyfill=function(d,k,f,u){if(k){f=$jscomp.global;d=d.split(".");for(u=0;u<d.length-1;u++){var h=d[u];h in f||(f[h]={});f=f[h]}d=d[d.length-1];u=f[d];k=k(u);k!=u&&null!=k&&$jscomp.defineProperty(f,d,{configurable:!0,writable:!0,value:k})}};$jscomp.polyfill("Math.imul",function(d){return d?d:function(d,f){d=Number(d);f=Number(f);var k=d&65535,h=f&65535;return k*h+((d>>>16&65535)*h+k*(f>>>16&65535)<<16>>>0)|0}},"es6","es3");
+$jscomp.polyfill("Math.clz32",function(d){return d?d:function(d){d=Number(d)>>>0;if(0===d)return 32;var f=0;0===(d&4294901760)&&(d<<=16,f+=16);0===(d&4278190080)&&(d<<=8,f+=8);0===(d&4026531840)&&(d<<=4,f+=4);0===(d&3221225472)&&(d<<=2,f+=2);0===(d&2147483648)&&f++;return f}},"es6","es3");$jscomp.polyfill("Math.trunc",function(d){return d?d:function(d){d=Number(d);if(isNaN(d)||Infinity===d||-Infinity===d||0===d)return d;var f=Math.floor(Math.abs(d));return 0>d?-f:f}},"es6","es3");
+$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var d=0;return function(k){return $jscomp.SYMBOL_PREFIX+(k||"")+d++}}();
+$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var d=$jscomp.global.Symbol.iterator;d||(d=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[d]&&$jscomp.defineProperty(Array.prototype,d,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(d){var k=0;return $jscomp.iteratorPrototype(function(){return k<d.length?{done:!1,value:d[k++]}:{done:!0}})};
+$jscomp.iteratorPrototype=function(d){$jscomp.initSymbolIterator();d={next:d};d[$jscomp.global.Symbol.iterator]=function(){return this};return d};$jscomp.makeIterator=function(d){$jscomp.initSymbolIterator();var k=d[Symbol.iterator];return k?k.call(d):$jscomp.arrayIterator(d)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
+$jscomp.polyfill("Promise",function(d){function k(){this.batch_=null}function f(d){return d instanceof h?d:new h(function(r,f){r(d)})}if(d&&!$jscomp.FORCE_POLYFILL_PROMISE)return d;k.prototype.asyncExecute=function(d){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(d);return this};k.prototype.asyncExecuteBatch_=function(){var d=this;this.asyncExecuteFunction(function(){d.executeBatch_()})};var u=$jscomp.global.setTimeout;k.prototype.asyncExecuteFunction=function(d){u(d,
+0)};k.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var d=this.batch_;this.batch_=[];for(var B=0;B<d.length;++B){var f=d[B];delete d[B];try{f()}catch(v){this.asyncThrow_(v)}}}this.batch_=null};k.prototype.asyncThrow_=function(d){this.asyncExecuteFunction(function(){throw d;})};var h=function(d){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var r=this.createResolveAndReject_();try{d(r.resolve,r.reject)}catch(Y){r.reject(Y)}};h.prototype.createResolveAndReject_=
+function(){function d(d){return function(r){h||(h=!0,d.call(f,r))}}var f=this,h=!1;return{resolve:d(this.resolveTo_),reject:d(this.reject_)}};h.prototype.resolveTo_=function(d){if(d===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(d instanceof h)this.settleSameAsPromise_(d);else{a:switch(typeof d){case "object":var f=null!=d;break a;case "function":f=!0;break a;default:f=!1}f?this.resolveToNonPromiseObj_(d):this.fulfill_(d)}};h.prototype.resolveToNonPromiseObj_=function(d){var f=
+void 0;try{f=d.then}catch(Y){this.reject_(Y);return}"function"==typeof f?this.settleSameAsThenable_(f,d):this.fulfill_(d)};h.prototype.reject_=function(d){this.settle_(2,d)};h.prototype.fulfill_=function(d){this.settle_(1,d)};h.prototype.settle_=function(d,f){if(0!=this.state_)throw Error("Cannot settle("+d+", "+f|"): Promise already settled in state"+this.state_);this.state_=d;this.result_=f;this.executeOnSettledCallbacks_()};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var d=
+this.onSettledCallbacks_,f=0;f<d.length;++f)d[f].call(),d[f]=null;this.onSettledCallbacks_=null}};var ha=new k;h.prototype.settleSameAsPromise_=function(d){var f=this.createResolveAndReject_();d.callWhenSettled_(f.resolve,f.reject)};h.prototype.settleSameAsThenable_=function(d,f){var h=this.createResolveAndReject_();try{d.call(f,h.resolve,h.reject)}catch(v){h.reject(v)}};h.prototype.then=function(d,f){function k(d,f){return"function"==typeof d?function(f){try{v(d(f))}catch(O){r(O)}}:f}var v,r,B=new h(function(d,
+f){v=d;r=f});this.callWhenSettled_(k(d,v),k(f,r));return B};h.prototype.catch=function(d){return this.then(void 0,d)};h.prototype.callWhenSettled_=function(d,f){function h(){switch(k.state_){case 1:d(k.result_);break;case 2:f(k.result_);break;default:throw Error("Unexpected state: "+k.state_);}}var k=this;null==this.onSettledCallbacks_?ha.asyncExecute(h):this.onSettledCallbacks_.push(function(){ha.asyncExecute(h)})};h.resolve=f;h.reject=function(d){return new h(function(f,h){h(d)})};h.race=function(d){return new h(function(h,
+k){for(var v=$jscomp.makeIterator(d),r=v.next();!r.done;r=v.next())f(r.value).callWhenSettled_(h,k)})};h.all=function(d){var k=$jscomp.makeIterator(d),r=k.next();return r.done?f([]):new h(function(d,h){function v(f){return function(h){u[f]=h;B--;0==B&&d(u)}}var u=[],B=0;do u.push(void 0),B++,f(r.value).callWhenSettled_(v(u.length-1),h),r=k.next();while(!r.done)})};return h},"es6","es3");
+var DracoDecoderModule=function(d){function k(a,c){c||(c=16);return Math.ceil(a/c)*c}function f(a,c){a||O("Assertion failed: "+c)}function u(a,c){if(0===c||!a)return"";for(var b=0,e,d=0;;){e=W[a+d>>0];b|=e;if(0==e&&!c)break;d++;if(c&&d==c)break}c||(c=d);e="";if(128>b){for(;0<c;)b=String.fromCharCode.apply(String,W.subarray(a,a+Math.min(c,1024))),e=e?e+b:b,a+=1024,c-=1024;return e}return h(W,a)}function h(a,c){for(var b=c;a[b];)++b;if(16<b-c&&a.subarray&&Ia)return Ia.decode(a.subarray(c,b));for(b=
+"";;){var e=a[c++];if(!e)return b;if(e&128){var d=a[c++]&63;if(192==(e&224))b+=String.fromCharCode((e&31)<<6|d);else{var f=a[c++]&63;if(224==(e&240))e=(e&15)<<12|d<<6|f;else{var g=a[c++]&63;if(240==(e&248))e=(e&7)<<18|d<<12|f<<6|g;else{var h=a[c++]&63;if(248==(e&252))e=(e&3)<<24|d<<18|f<<12|g<<6|h;else{var k=a[c++]&63;e=(e&1)<<30|d<<24|f<<18|g<<12|h<<6|k}}}65536>e?b+=String.fromCharCode(e):(e-=65536,b+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else b+=String.fromCharCode(e)}}function ha(a,c){0<
+a%c&&(a+=c-a%c);return a}function r(){a.HEAP8=ia=new Int8Array(D);a.HEAP16=Ja=new Int16Array(D);a.HEAP32=E=new Int32Array(D);a.HEAPU8=W=new Uint8Array(D);a.HEAPU16=new Uint16Array(D);a.HEAPU32=new Uint32Array(D);a.HEAPF32=new Float32Array(D);a.HEAPF64=new Float64Array(D)}function B(e){for(;0<e.length;){var c=e.shift();if("function"==typeof c)c();else{var b=c.func;"number"===typeof b?void 0===c.arg?a.dynCall_v(b):a.dynCall_vi(b,c.arg):b(void 0===c.arg?null:c.arg)}}}function Y(a){return String.prototype.startsWith?
+a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}function v(){return!!v.uncaught_exception}function la(){var e=y.last;if(!e)return(sa(0),0)|0;var c=y.infos[e],b=c.type;if(!b)return(sa(0),e)|0;var p=Array.prototype.slice.call(arguments);a.___cxa_is_pointer_type(b);la.buffer||(la.buffer=Ka(4));E[la.buffer>>2]=e;e=la.buffer;for(var d=0;d<p.length;d++)if(p[d]&&a.___cxa_can_catch(p[d],b,e))return e=E[e>>2],c.adjusted=e,(sa(p[d]),e)|0;e=E[e>>2];
+return(sa(b),e)|0}function Z(e,c){w.varargs=c;try{var b=w.get(),p=w.get(),d=w.get();e=0;Z.buffers||(Z.buffers=[null,[],[]],Z.printChar=function(c,b){var e=Z.buffers[c];f(e);0===b||10===b?((1===c?a.print:a.printErr)(h(e,0)),e.length=0):e.push(b)});for(c=0;c<d;c++){for(var g=E[p+8*c>>2],k=E[p+(8*c+4)>>2],l=0;l<k;l++)Z.printChar(b,W[g+l]);e+=k}return e}catch(ya){return"undefined"!==typeof FS&&ya instanceof FS.ErrnoError||O(ya),-ya.errno}}function ma(e,c){ma.seen||(ma.seen={});e in ma.seen||(a.dynCall_v(c),
+ma.seen[e]=1)}function na(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function wa(e){function c(){if(!a.calledRun&&(a.calledRun=!0,!oa)){La||(La=!0,B(Ma));B(Na);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Oa.unshift(a.postRun.shift());B(Oa)}}if(!(0<ea)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Pa.unshift(a.preRun.shift());
+B(Pa);0<ea||a.calledRun||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);c()},1)):c())}}function O(e){if(a.onAbort)a.onAbort(e);void 0!==e?(a.print(e),a.printErr(e),e=JSON.stringify(e)):e="";oa=!0;throw"abort("+e+"). Build with -s ASSERTIONS=1 for more info.";}function m(){}function t(a){return(a||m).__cache__}function T(a,c){var b=t(c),e=b[a];if(e)return e;e=Object.create((c||m).prototype);e.ptr=a;return b[a]=e}function U(a){if("string"===typeof a){for(var c=
+0,b=0;b<a.length;++b){var e=a.charCodeAt(b);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++b)&1023);127>=e?++c:c=2047>=e?c+2:65535>=e?c+3:2097151>=e?c+4:67108863>=e?c+5:c+6}c=Array(c+1);b=0;e=c.length;if(0<e){e=b+e-1;for(var d=0;d<a.length;++d){var f=a.charCodeAt(d);55296<=f&&57343>=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++d)&1023);if(127>=f){if(b>=e)break;c[b++]=f}else{if(2047>=f){if(b+1>=e)break;c[b++]=192|f>>6}else{if(65535>=f){if(b+2>=e)break;c[b++]=224|f>>12}else{if(2097151>=f){if(b+
+3>=e)break;c[b++]=240|f>>18}else{if(67108863>=f){if(b+4>=e)break;c[b++]=248|f>>24}else{if(b+5>=e)break;c[b++]=252|f>>30;c[b++]=128|f>>24&63}c[b++]=128|f>>18&63}c[b++]=128|f>>12&63}c[b++]=128|f>>6&63}c[b++]=128|f&63}}c[b]=0}a=l.alloc(c,ia);l.copy(c,ia,a)}return a}function z(){throw"cannot construct a Status, no constructor in IDL";}function F(){this.ptr=Wa();t(F)[this.ptr]=this}function G(){this.ptr=Xa();t(G)[this.ptr]=this}function H(){this.ptr=Ya();t(H)[this.ptr]=this}function I(){this.ptr=Za();
+t(I)[this.ptr]=this}function J(){this.ptr=$a();t(J)[this.ptr]=this}function n(){this.ptr=ab();t(n)[this.ptr]=this}function P(){this.ptr=bb();t(P)[this.ptr]=this}function x(){this.ptr=cb();t(x)[this.ptr]=this}function K(){this.ptr=db();t(K)[this.ptr]=this}function q(){this.ptr=eb();t(q)[this.ptr]=this}function L(){this.ptr=fb();t(L)[this.ptr]=this}function M(){this.ptr=gb();t(M)[this.ptr]=this}function V(){this.ptr=hb();t(V)[this.ptr]=this}function Q(){this.ptr=ib();t(Q)[this.ptr]=this}function g(){this.ptr=
+jb();t(g)[this.ptr]=this}function C(){this.ptr=kb();t(C)[this.ptr]=this}function X(){throw"cannot construct a VoidPtr, no constructor in IDL";}function N(){this.ptr=lb();t(N)[this.ptr]=this}function R(){this.ptr=mb();t(R)[this.ptr]=this}d=d||{};var a="undefined"!==typeof d?d:{},Qa=!1,Ra=!1;a.onRuntimeInitialized=function(){Qa=!0;if(Ra&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ra=!0;if(Qa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=
+function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3<a.length?!1:1==a[0]&&0<=a[1]&&3>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};var pa={},aa;for(aa in a)a.hasOwnProperty(aa)&&(pa[aa]=a[aa]);a.arguments=[];a.thisProgram="./this.program";a.quit=function(a,c){throw c;};a.preRun=[];a.postRun=[];var ja=!1,fa=!1,qa=!1,za=!1;if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)ja=!0;else if("WORKER"===a.ENVIRONMENT)fa=!0;else if("NODE"===a.ENVIRONMENT)qa=!0;else if("SHELL"===a.ENVIRONMENT)za=!0;else throw Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.");
+else ja="object"===typeof window,fa="function"===typeof importScripts,qa="object"===typeof process&&"function"===typeof require&&!ja&&!fa,za=!ja&&!qa&&!fa;if(qa){var Aa,Ba;a.read=function(a,c){Aa||(Aa=require("fs"));Ba||(Ba=require("path"));a=Ba.normalize(a);a=Aa.readFileSync(a);return c?a:a.toString()};a.readBinary=function(e){e=a.read(e,!0);e.buffer||(e=new Uint8Array(e));f(e.buffer);return e};1<process.argv.length&&(a.thisProgram=process.argv[1].replace(/\\/g,"/"));a.arguments=process.argv.slice(2);
+process.on("uncaughtException",function(a){if(!(a instanceof na))throw a;});process.on("unhandledRejection",function(a,c){process.exit(1)});a.inspect=function(){return"[Emscripten Module object]"}}else if(za)"undefined"!=typeof read&&(a.read=function(a){return read(a)}),a.readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");f("object"===typeof a);return a},"undefined"!=typeof scriptArgs?a.arguments=scriptArgs:"undefined"!=typeof arguments&&
+(a.arguments=arguments),"function"===typeof quit&&(a.quit=function(a,c){quit(a)});else if(ja||fa)a.read=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);return c.responseText},fa&&(a.readBinary=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.responseType="arraybuffer";c.send(null);return new Uint8Array(c.response)}),a.readAsync=function(a,c,b){var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){200==e.status||0==e.status&&e.response?
+c(e.response):b()};e.onerror=b;e.send(null)},a.setWindowTitle=function(a){document.title=a};a.print="undefined"!==typeof console?console.log.bind(console):"undefined"!==typeof print?print:null;a.printErr="undefined"!==typeof printErr?printErr:"undefined"!==typeof console&&console.warn.bind(console)||a.print;a.print=a.print;a.printErr=a.printErr;for(aa in pa)pa.hasOwnProperty(aa)&&(a[aa]=pa[aa]);pa=void 0;var oa=0,Ia="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&
+new TextDecoder("utf-16le");var ia,W,Ja,E,ba,Ca,ta,ua,Da,ka;var Ea=ba=Ca=ta=ua=Da=ka=0;var Sa=!1;a.reallocBuffer||(a.reallocBuffer=function(a){try{if(ArrayBuffer.transfer)var c=ArrayBuffer.transfer(D,a);else{var b=ia;c=new ArrayBuffer(a);(new Int8Array(c)).set(b)}}catch(p){return!1}return nb(c)?c:!1});try{var Ta=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Ta(new ArrayBuffer(4))}catch(e){Ta=function(a){return a.byteLength}}var Fa=a.TOTAL_STACK||
+5242880,A=a.TOTAL_MEMORY||16777216;A<Fa&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+A+"! (TOTAL_STACK="+Fa+")");if(a.buffer)var D=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:A/65536}),D=a.wasmMemory.buffer):D=new ArrayBuffer(A),a.buffer=D;r();E[0]=1668509029;Ja[1]=25459;if(115!==W[2]||99!==W[3])throw"Runtime error: expected the system to be little-endian!";var Pa=[],Ma=[],Na=[],ob=[],Oa=[],
+La=!1,ea=0,Ga=null,ra=null;a.preloadedImages={};a.preloadedAudios={};(function(){function e(){try{if(a.wasmBinary)return new Uint8Array(a.wasmBinary);if(a.readBinary)return a.readBinary(f);throw"on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)";}catch(Va){O(Va)}}function c(){return a.wasmBinary||!ja&&!fa||"function"!==typeof fetch?new Promise(function(a,c){a(e())}):fetch(f,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+
+f+"'";return a.arrayBuffer()}).catch(function(){return e()})}function b(b,e,d){function p(c,b){k=c.exports;k.memory&&(c=k.memory,b=a.buffer,c.byteLength<b.byteLength&&a.printErr("the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here"),b=new Int8Array(b),(new Int8Array(c)).set(b),a.buffer=D=c,r());a.asm=k;a.usingWasm=!0;ea--;a.monitorRunDependencies&&a.monitorRunDependencies(ea);0==ea&&(null!==Ga&&(clearInterval(Ga),Ga=null),ra&&(c=ra,ra=null,c()))}
+function g(a){p(a.instance,a.module)}function S(b){c().then(function(a){return WebAssembly.instantiate(a,h)}).then(b).catch(function(c){a.printErr("failed to asynchronously prepare wasm: "+c);O(c)})}if("object"!==typeof WebAssembly)return a.printErr("no native wasm support detected"),!1;if(!(a.wasmMemory instanceof WebAssembly.Memory))return a.printErr("no native wasm Memory in use"),!1;e.memory=a.wasmMemory;h.global={NaN:NaN,Infinity:Infinity};h["global.Math"]=Math;h.env=e;ea++;a.monitorRunDependencies&&
+a.monitorRunDependencies(ea);if(a.instantiateWasm)try{return a.instantiateWasm(h,p)}catch(pb){return a.printErr("Module.instantiateWasm callback failed with error: "+pb),!1}a.wasmBinary||"function"!==typeof WebAssembly.instantiateStreaming||Y(f)||"function"!==typeof fetch?S(g):WebAssembly.instantiateStreaming(fetch(f,{credentials:"same-origin"}),h).then(g).catch(function(c){a.printErr("wasm streaming compile failed: "+c);a.printErr("falling back to ArrayBuffer instantiation");S(g)});return{}}var d=
+"draco_decoder.wast",f="draco_decoder.wasm",g="draco_decoder.temp.asm.js";"function"===typeof a.locateFile&&(Y(d)||(d=a.locateFile(d)),Y(f)||(f=a.locateFile(f)),Y(g)||(g=a.locateFile(g)));var h={global:null,env:null,asm2wasm:{"f64-rem":function(a,c){return a%c},"debugger":function(){debugger}},parent:a},k=null;a.asmPreload=a.asm;var l=a.reallocBuffer;a.reallocBuffer=function(c){if("asmjs"===m)var b=l(c);else a:{c=ha(c,a.usingWasm?65536:16777216);var e=a.buffer.byteLength;if(a.usingWasm)try{b=-1!==
+a.wasmMemory.grow((c-e)/65536)?a.buffer=a.wasmMemory.buffer:null;break a}catch(ud){b=null;break a}b=void 0}return b};var m="";a.asm=function(c,e,d){if(!e.table){var p=a.wasmTableSize;void 0===p&&(p=1024);var f=a.wasmMaxTableSize;e.table="object"===typeof WebAssembly&&"function"===typeof WebAssembly.Table?void 0!==f?new WebAssembly.Table({initial:p,maximum:f,element:"anyfunc"}):new WebAssembly.Table({initial:p,element:"anyfunc"}):Array(p);a.wasmTable=e.table}e.memoryBase||(e.memoryBase=a.STATIC_BASE);
+e.tableBase||(e.tableBase=0);(c=b(c,e,d))||O("no binaryen method succeeded. consider enabling more options, like interpreting, if you want that: https://github.com/kripken/emscripten/wiki/WebAssembly#binaryen-methods");return c}})();Ea=1024;ba=Ea+14800;Ma.push();a.STATIC_BASE=Ea;a.STATIC_BUMP=14800;var qb=ba;ba+=16;var y={last:0,caught:[],infos:{},deAdjust:function(a){if(!a||y.infos[a])return a;for(var c in y.infos)if(y.infos[c].adjusted===a)return c;return a},addRef:function(a){a&&y.infos[a].refcount++},
+decRef:function(e){if(e){var c=y.infos[e];f(0<c.refcount);c.refcount--;0!==c.refcount||c.rethrown||(c.destructor&&a.dynCall_vi(c.destructor,e),delete y.infos[e],___cxa_free_exception(e))}},clearRef:function(a){a&&(y.infos[a].refcount=0)}},w={varargs:0,get:function(a){w.varargs+=4;return E[w.varargs-4>>2]},getStr:function(){return u(w.get())},get64:function(){var a=w.get(),c=w.get();0<=a?f(0===c):f(-1===c);return a},getZero:function(){f(0===w.get())}},va={},Ha=1;ka=function(a){f(!Sa);var c=ba;ba=ba+
+a+15&-16;return c}(4);Ca=ta=k(ba);ua=Ca+Fa;Da=k(ua);E[ka>>2]=Da;Sa=!0;a.wasmTableSize=476;a.wasmMaxTableSize=476;a.asmGlobalArg={};a.asmLibraryArg={abort:O,assert:f,enlargeMemory:function(){var e=a.usingWasm?65536:16777216,c=2147483648-e;if(E[ka>>2]>c)return!1;var b=A;for(A=Math.max(A,16777216);A<E[ka>>2];)A=536870912>=A?ha(2*A,e):Math.min(ha((3*A+2147483648)/4,e),c);e=a.reallocBuffer(A);if(!e||e.byteLength!=A)return A=b,!1;a.buffer=D=e;r();return!0},getTotalMemory:function(){return A},abortOnCannotGrowMemory:function(){O("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+
+A+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},invoke_ii:function(e,c){try{return a.dynCall_ii(e,c)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;a.setThrew(1,0)}},invoke_iii:function(e,c,b){try{return a.dynCall_iii(e,c,b)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_iiii:function(e,c,b,d){try{return a.dynCall_iiii(e,
+c,b,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_iiiiiii:function(e,c,b,d,f,g,h){try{return a.dynCall_iiiiiii(e,c,b,d,f,g,h)}catch(da){if("number"!==typeof da&&"longjmp"!==da)throw da;a.setThrew(1,0)}},invoke_v:function(e){try{a.dynCall_v(e)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_vi:function(e,c){try{a.dynCall_vi(e,c)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;a.setThrew(1,0)}},invoke_vii:function(e,c,b){try{a.dynCall_vii(e,
+c,b)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_viii:function(e,c,b,d){try{a.dynCall_viii(e,c,b,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_viiii:function(e,c,b,d,f){try{a.dynCall_viiii(e,c,b,d,f)}catch(xa){if("number"!==typeof xa&&"longjmp"!==xa)throw xa;a.setThrew(1,0)}},invoke_viiiii:function(e,c,b,d,f,g){try{a.dynCall_viiiii(e,c,b,d,f,g)}catch(ca){if("number"!==typeof ca&&"longjmp"!==ca)throw ca;a.setThrew(1,0)}},invoke_viiiiii:function(e,
+c,b,d,f,g,h){try{a.dynCall_viiiiii(e,c,b,d,f,g,h)}catch(da){if("number"!==typeof da&&"longjmp"!==da)throw da;a.setThrew(1,0)}},__ZSt18uncaught_exceptionv:v,___cxa_allocate_exception:function(a){return Ka(a)},___cxa_begin_catch:function(a){var c=y.infos[a];c&&!c.caught&&(c.caught=!0,v.uncaught_exception--);c&&(c.rethrown=!1);y.caught.push(a);y.addRef(y.deAdjust(a));return a},___cxa_find_matching_catch:la,___cxa_pure_virtual:function(){oa=!0;throw"Pure virtual function called!";},___cxa_throw:function(a,
+c,b){y.infos[a]={ptr:a,adjusted:a,type:c,destructor:b,refcount:0,caught:!1,rethrown:!1};y.last=a;"uncaught_exception"in v?v.uncaught_exception++:v.uncaught_exception=1;throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";},___gxx_personality_v0:function(){},___resumeException:function(a){y.last||(y.last=a);throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";
+},___setErrNo:function(d){a.___errno_location&&(E[a.___errno_location()>>2]=d);return d},___syscall140:function(a,c){w.varargs=c;try{var b=w.getStreamFromFD();w.get();var d=w.get(),e=w.get(),f=w.get();FS.llseek(b,d,f);E[e>>2]=b.position;b.getdents&&0===d&&0===f&&(b.getdents=null);return 0}catch(ca){return"undefined"!==typeof FS&&ca instanceof FS.ErrnoError||O(ca),-ca.errno}},___syscall146:Z,___syscall6:function(a,c){w.varargs=c;try{var b=w.getStreamFromFD();FS.close(b);return 0}catch(p){return"undefined"!==
+typeof FS&&p instanceof FS.ErrnoError||O(p),-p.errno}},_abort:function(){a.abort()},_emscripten_memcpy_big:function(a,c,b){W.set(W.subarray(c,c+b),a);return a},_llvm_trap:function(){O("trap!")},_pthread_getspecific:function(a){return va[a]||0},_pthread_key_create:function(a,c){if(0==a)return 22;E[a>>2]=Ha;va[Ha]=0;Ha++;return 0},_pthread_once:ma,_pthread_setspecific:function(a,c){if(!(a in va))return 22;va[a]=c;return 0},flush_NO_FILESYSTEM:function(){var d=a._fflush;d&&d(0);if(d=Z.printChar){var c=
+Z.buffers;c[1].length&&d(1,10);c[2].length&&d(2,10)}},DYNAMICTOP_PTR:ka,tempDoublePtr:qb,ABORT:oa,STACKTOP:ta,STACK_MAX:ua};var Ua=a.asm(a.asmGlobalArg,a.asmLibraryArg,D);a.asm=Ua;a.___cxa_can_catch=function(){return a.asm.___cxa_can_catch.apply(null,arguments)};a.___cxa_is_pointer_type=function(){return a.asm.___cxa_is_pointer_type.apply(null,arguments)};var $a=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,
+arguments)},rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},sb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},tb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,
+arguments)},cb=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},ub=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,
+arguments)},wb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},xb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},yb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,
+arguments)},bb=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return a.asm._emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,arguments)},zb=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm._emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},Ab=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm._emscripten_bind_AttributeTransformData_transform_type_0.apply(null,
+arguments)},ib=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return a.asm._emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,arguments)},Bb=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm._emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},Cb=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return a.asm._emscripten_bind_DecoderBuffer___destroy___0.apply(null,arguments)},Db=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null,
+arguments)},Eb=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm._emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,arguments)},jb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm._emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},Fb=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},Gb=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=
+function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Hb=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Ib=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},Jb=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,
+arguments)},Kb=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeId_2.apply(null,arguments)},Lb=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3.apply(null,arguments)},Mb=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3.apply(null,arguments)},Nb=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=
+function(){return a.asm._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3.apply(null,arguments)},Ob=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null,arguments)},Pb=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return a.asm._emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null,arguments)},Qb=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3.apply(null,
+arguments)},Rb=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3.apply(null,arguments)},Sb=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return a.asm._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3.apply(null,arguments)},Tb=a._emscripten_bind_Decoder_GetAttribute_2=function(){return a.asm._emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},Ub=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=
+function(){return a.asm._emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)},Vb=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm._emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},Wb=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm._emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},Xb=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return a.asm._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,
+arguments)},Yb=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return a.asm._emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},Zb=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm._emscripten_bind_Decoder___destroy___0.apply(null,arguments)},gb=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null,arguments)},$b=a._emscripten_bind_DracoFloat32Array_GetValue_1=
+function(){return a.asm._emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},ac=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},bc=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm._emscripten_bind_DracoFloat32Array_size_0.apply(null,arguments)},fb=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return a.asm._emscripten_bind_DracoInt16Array_DracoInt16Array_0.apply(null,
+arguments)},cc=a._emscripten_bind_DracoInt16Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoInt16Array_GetValue_1.apply(null,arguments)},dc=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return a.asm._emscripten_bind_DracoInt16Array___destroy___0.apply(null,arguments)},ec=a._emscripten_bind_DracoInt16Array_size_0=function(){return a.asm._emscripten_bind_DracoInt16Array_size_0.apply(null,arguments)},lb=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm._emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,
+arguments)},fc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},gc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},hc=a._emscripten_bind_DracoInt32Array_size_0=function(){return a.asm._emscripten_bind_DracoInt32Array_size_0.apply(null,arguments)},db=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return a.asm._emscripten_bind_DracoInt8Array_DracoInt8Array_0.apply(null,
+arguments)},ic=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoInt8Array_GetValue_1.apply(null,arguments)},jc=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return a.asm._emscripten_bind_DracoInt8Array___destroy___0.apply(null,arguments)},kc=a._emscripten_bind_DracoInt8Array_size_0=function(){return a.asm._emscripten_bind_DracoInt8Array_size_0.apply(null,arguments)},Wa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return a.asm._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0.apply(null,
+arguments)},lc=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoUInt16Array_GetValue_1.apply(null,arguments)},mc=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return a.asm._emscripten_bind_DracoUInt16Array___destroy___0.apply(null,arguments)},nc=a._emscripten_bind_DracoUInt16Array_size_0=function(){return a.asm._emscripten_bind_DracoUInt16Array_size_0.apply(null,arguments)},Za=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return a.asm._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0.apply(null,
+arguments)},oc=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoUInt32Array_GetValue_1.apply(null,arguments)},pc=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return a.asm._emscripten_bind_DracoUInt32Array___destroy___0.apply(null,arguments)},qc=a._emscripten_bind_DracoUInt32Array_size_0=function(){return a.asm._emscripten_bind_DracoUInt32Array_size_0.apply(null,arguments)},Ya=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return a.asm._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0.apply(null,
+arguments)},rc=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoUInt8Array_GetValue_1.apply(null,arguments)},sc=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm._emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},tc=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm._emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},hb=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm._emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,
+arguments)},uc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm._emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},kb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm._emscripten_bind_Mesh_Mesh_0.apply(null,arguments)},vc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm._emscripten_bind_Mesh___destroy___0.apply(null,arguments)},wc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm._emscripten_bind_Mesh_num_attributes_0.apply(null,
+arguments)},xc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm._emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},yc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm._emscripten_bind_Mesh_num_points_0.apply(null,arguments)},zc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},Ac=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,
+arguments)},Bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Cc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},Dc=a._emscripten_bind_MetadataQuerier_HasDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasDoubleEntry_2.apply(null,arguments)},Ec=a._emscripten_bind_MetadataQuerier_HasEntry_2=
+function(){return a.asm._emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},Fc=a._emscripten_bind_MetadataQuerier_HasIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasIntEntry_2.apply(null,arguments)},Gc=a._emscripten_bind_MetadataQuerier_HasStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasStringEntry_2.apply(null,arguments)},eb=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm._emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,
+arguments)},Hc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm._emscripten_bind_MetadataQuerier_NumEntries_1.apply(null,arguments)},Ic=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm._emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},mb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm._emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},Jc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm._emscripten_bind_Metadata___destroy___0.apply(null,
+arguments)},Kc=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm._emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},ab=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return a.asm._emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Lc=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm._emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Mc=a._emscripten_bind_PointAttribute_attribute_type_0=
+function(){return a.asm._emscripten_bind_PointAttribute_attribute_type_0.apply(null,arguments)},Nc=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Oc=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_stride_0.apply(null,arguments)},Pc=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm._emscripten_bind_PointAttribute_data_type_0.apply(null,
+arguments)},Qc=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm._emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Rc=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm._emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Sc=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm._emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Tc=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm._emscripten_bind_PointAttribute_unique_id_0.apply(null,
+arguments)},Xa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm._emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},Uc=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Vc=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm._emscripten_bind_PointCloud_num_attributes_0.apply(null,arguments)},Wc=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm._emscripten_bind_PointCloud_num_points_0.apply(null,
+arguments)},Xc=a._emscripten_bind_Status___destroy___0=function(){return a.asm._emscripten_bind_Status___destroy___0.apply(null,arguments)},Yc=a._emscripten_bind_Status_code_0=function(){return a.asm._emscripten_bind_Status_code_0.apply(null,arguments)},Zc=a._emscripten_bind_Status_error_msg_0=function(){return a.asm._emscripten_bind_Status_error_msg_0.apply(null,arguments)},$c=a._emscripten_bind_Status_ok_0=function(){return a.asm._emscripten_bind_Status_ok_0.apply(null,arguments)},ad=a._emscripten_bind_VoidPtr___destroy___0=
+function(){return a.asm._emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},bd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,arguments)},cd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},dd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=
+function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,arguments)},ed=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},fd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,
+arguments)},gd=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},hd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},id=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},jd=
+a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)},kd=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},ld=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},md=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=
+function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},nd=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_ERROR.apply(null,arguments)},pd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm._emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,
+arguments)},qd=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},rd=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm._emscripten_enum_draco_StatusCode_OK.apply(null,arguments)},sd=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},td=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,
+arguments)},nb=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)};a._free=function(){return a.asm._free.apply(null,arguments)};a._llvm_bswap_i32=function(){return a.asm._llvm_bswap_i32.apply(null,arguments)};var Ka=a._malloc=function(){return a.asm._malloc.apply(null,arguments)};a._memcpy=function(){return a.asm._memcpy.apply(null,arguments)};a._memmove=function(){return a.asm._memmove.apply(null,arguments)};a._memset=function(){return a.asm._memset.apply(null,
+arguments)};a._sbrk=function(){return a.asm._sbrk.apply(null,arguments)};a.establishStackSpace=function(){return a.asm.establishStackSpace.apply(null,arguments)};a.getTempRet0=function(){return a.asm.getTempRet0.apply(null,arguments)};a.runPostSets=function(){return a.asm.runPostSets.apply(null,arguments)};var sa=a.setTempRet0=function(){return a.asm.setTempRet0.apply(null,arguments)};a.setThrew=function(){return a.asm.setThrew.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,
+arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,
+arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)};a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.asm=Ua;a.then=function(d){if(a.calledRun)d(a);
+else{var c=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){c&&c();d(a)}}return a};na.prototype=Error();na.prototype.constructor=na;ra=function c(){a.calledRun||wa();a.calledRun||(ra=c)};a.run=wa;a.exit=function(c,b){if(!b||!a.noExitRuntime||0!==c){if(!a.noExitRuntime&&(oa=!0,ta=void 0,B(ob),a.onExit))a.onExit(c);qa&&process.exit(c);a.quit(c,new na(c))}};a.abort=O;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();a.noExitRuntime=!0;
+wa();m.prototype=Object.create(m.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.WrapperObject=m;a.getCache=t;a.wrapPointer=T;a.castObject=function(a,b){return T(a.ptr,b)};a.NULL=T(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";a.__destroy__();delete t(a.__class__)[a.ptr]};a.compare=function(a,b){return a.ptr===b.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var l=
+{buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(l.needed){for(var c=0;c<l.temps.length;c++)a._free(l.temps[c]);l.temps.length=0;a._free(l.buffer);l.buffer=0;l.size+=l.needed;l.needed=0}l.buffer||(l.size+=128,l.buffer=a._malloc(l.size),f(l.buffer));l.pos=0},alloc:function(c,b){f(l.buffer);c=c.length*b.BYTES_PER_ELEMENT;c=c+7&-8;l.pos+c>=l.size?(f(0<c),l.needed+=c,b=a._malloc(c),l.temps.push(b)):(b=l.buffer+l.pos,l.pos+=c);return b},copy:function(a,b,d){switch(b.BYTES_PER_ELEMENT){case 2:d>>=
+1;break;case 4:d>>=2;break;case 8:d>>=3}for(var c=0;c<a.length;c++)b[d+c]=a[c]}};z.prototype=Object.create(m.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.Status=z;z.prototype.code=z.prototype.code=function(){return Yc(this.ptr)};z.prototype.ok=z.prototype.ok=function(){return!!$c(this.ptr)};z.prototype.error_msg=z.prototype.error_msg=function(){return u(Zc(this.ptr))};z.prototype.__destroy__=z.prototype.__destroy__=function(){Xc(this.ptr)};F.prototype=Object.create(m.prototype);
+F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.DracoUInt16Array=F;F.prototype.GetValue=F.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return lc(c,a)};F.prototype.size=F.prototype.size=function(){return nc(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){mc(this.ptr)};G.prototype=Object.create(m.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.PointCloud=G;G.prototype.num_attributes=G.prototype.num_attributes=
+function(){return Vc(this.ptr)};G.prototype.num_points=G.prototype.num_points=function(){return Wc(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){Uc(this.ptr)};H.prototype=Object.create(m.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.DracoUInt8Array=H;H.prototype.GetValue=H.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return rc(c,a)};H.prototype.size=H.prototype.size=function(){return tc(this.ptr)};H.prototype.__destroy__=
+H.prototype.__destroy__=function(){sc(this.ptr)};I.prototype=Object.create(m.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoUInt32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return oc(c,a)};I.prototype.size=I.prototype.size=function(){return qc(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){pc(this.ptr)};J.prototype=Object.create(m.prototype);J.prototype.constructor=J;J.prototype.__class__=
+J;J.__cache__={};a.AttributeOctahedronTransform=J;J.prototype.InitFromAttribute=J.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!rb(c,a)};J.prototype.quantization_bits=J.prototype.quantization_bits=function(){return tb(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){sb(this.ptr)};n.prototype=Object.create(m.prototype);n.prototype.constructor=n;n.prototype.__class__=n;n.__cache__={};a.PointAttribute=n;n.prototype.size=n.prototype.size=
+function(){return Sc(this.ptr)};n.prototype.GetAttributeTransformData=n.prototype.GetAttributeTransformData=function(){return T(Kc(this.ptr),P)};n.prototype.attribute_type=n.prototype.attribute_type=function(){return Mc(this.ptr)};n.prototype.data_type=n.prototype.data_type=function(){return Pc(this.ptr)};n.prototype.num_components=n.prototype.num_components=function(){return Rc(this.ptr)};n.prototype.normalized=n.prototype.normalized=function(){return!!Qc(this.ptr)};n.prototype.byte_stride=n.prototype.byte_stride=
+function(){return Oc(this.ptr)};n.prototype.byte_offset=n.prototype.byte_offset=function(){return Nc(this.ptr)};n.prototype.unique_id=n.prototype.unique_id=function(){return Tc(this.ptr)};n.prototype.__destroy__=n.prototype.__destroy__=function(){Lc(this.ptr)};P.prototype=Object.create(m.prototype);P.prototype.constructor=P;P.prototype.__class__=P;P.__cache__={};a.AttributeTransformData=P;P.prototype.transform_type=P.prototype.transform_type=function(){return Ab(this.ptr)};P.prototype.__destroy__=
+P.prototype.__destroy__=function(){zb(this.ptr)};x.prototype=Object.create(m.prototype);x.prototype.constructor=x;x.prototype.__class__=x;x.__cache__={};a.AttributeQuantizationTransform=x;x.prototype.InitFromAttribute=x.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!ub(c,a)};x.prototype.quantization_bits=x.prototype.quantization_bits=function(){return xb(this.ptr)};x.prototype.min_value=x.prototype.min_value=function(a){var c=this.ptr;a&&"object"===
+typeof a&&(a=a.ptr);return wb(c,a)};x.prototype.range=x.prototype.range=function(){return yb(this.ptr)};x.prototype.__destroy__=x.prototype.__destroy__=function(){vb(this.ptr)};K.prototype=Object.create(m.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoInt8Array=K;K.prototype.GetValue=K.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ic(c,a)};K.prototype.size=K.prototype.size=function(){return kc(this.ptr)};K.prototype.__destroy__=
+K.prototype.__destroy__=function(){jc(this.ptr)};q.prototype=Object.create(m.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.MetadataQuerier=q;q.prototype.HasEntry=q.prototype.HasEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return!!Ec(c,a,b)};q.prototype.HasIntEntry=q.prototype.HasIntEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);
+return!!Fc(c,a,b)};q.prototype.GetIntEntry=q.prototype.GetIntEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return Bc(c,a,b)};q.prototype.HasDoubleEntry=q.prototype.HasDoubleEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return!!Dc(c,a,b)};q.prototype.GetDoubleEntry=q.prototype.GetDoubleEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=
+a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return zc(c,a,b)};q.prototype.HasStringEntry=q.prototype.HasStringEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return!!Gc(c,a,b)};q.prototype.GetStringEntry=q.prototype.GetStringEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return u(Cc(c,a,b))};q.prototype.NumEntries=q.prototype.NumEntries=function(a){var c=this.ptr;
+a&&"object"===typeof a&&(a=a.ptr);return Hc(c,a)};q.prototype.GetEntryName=q.prototype.GetEntryName=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return u(Ac(c,a,b))};q.prototype.__destroy__=q.prototype.__destroy__=function(){Ic(this.ptr)};L.prototype=Object.create(m.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt16Array=L;L.prototype.GetValue=L.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&
+(a=a.ptr);return cc(c,a)};L.prototype.size=L.prototype.size=function(){return ec(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){dc(this.ptr)};M.prototype=Object.create(m.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DracoFloat32Array=M;M.prototype.GetValue=M.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return $b(c,a)};M.prototype.size=M.prototype.size=function(){return bc(this.ptr)};M.prototype.__destroy__=M.prototype.__destroy__=
+function(){ac(this.ptr)};V.prototype=Object.create(m.prototype);V.prototype.constructor=V;V.prototype.__class__=V;V.__cache__={};a.GeometryAttribute=V;V.prototype.__destroy__=V.prototype.__destroy__=function(){uc(this.ptr)};Q.prototype=Object.create(m.prototype);Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.DecoderBuffer=Q;Q.prototype.Init=Q.prototype.Init=function(a,b){var c=this.ptr;l.prepare();if("object"==typeof a&&"object"===typeof a){var d=l.alloc(a,ia);l.copy(a,ia,d);a=
+d}b&&"object"===typeof b&&(b=b.ptr);Bb(c,a,b)};Q.prototype.__destroy__=Q.prototype.__destroy__=function(){Cb(this.ptr)};g.prototype=Object.create(m.prototype);g.prototype.constructor=g;g.prototype.__class__=g;g.__cache__={};a.Decoder=g;g.prototype.GetEncodedGeometryType=g.prototype.GetEncodedGeometryType=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Ub(c,a)};g.prototype.DecodeBufferToPointCloud=g.prototype.DecodeBufferToPointCloud=function(a,b){var c=this.ptr;a&&"object"===typeof a&&
+(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return T(Eb(c,a,b),z)};g.prototype.DecodeBufferToMesh=g.prototype.DecodeBufferToMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return T(Db(c,a,b),z)};g.prototype.GetAttributeId=g.prototype.GetAttributeId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return Kb(c,a,b)};g.prototype.GetAttributeIdByName=g.prototype.GetAttributeIdByName=function(a,b){var c=
+this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return Jb(c,a,b)};g.prototype.GetAttributeIdByMetadataEntry=g.prototype.GetAttributeIdByMetadataEntry=function(a,b,d){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);d=d&&"object"===typeof d?d.ptr:U(d);return Ib(c,a,b,d)};g.prototype.GetAttribute=g.prototype.GetAttribute=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=
+b.ptr);return T(Tb(c,a,b),n)};g.prototype.GetAttributeByUniqueId=g.prototype.GetAttributeByUniqueId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return T(Fb(c,a,b),n)};g.prototype.GetMetadata=g.prototype.GetMetadata=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return T(Wb(c,a),R)};g.prototype.GetAttributeMetadata=g.prototype.GetAttributeMetadata=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&
+(b=b.ptr);return T(Pb(c,a,b),R)};g.prototype.GetFaceFromMesh=g.prototype.GetFaceFromMesh=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Vb(c,a,b,d)};g.prototype.GetTriangleStripsFromMesh=g.prototype.GetTriangleStripsFromMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return Xb(c,a,b)};g.prototype.GetAttributeFloat=g.prototype.GetAttributeFloat=function(a,
+b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hb(c,a,b,d)};g.prototype.GetAttributeFloatForAllPoints=g.prototype.GetAttributeFloatForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Gb(c,a,b,d)};g.prototype.GetAttributeIntForAllPoints=g.prototype.GetAttributeIntForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===
+typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ob(c,a,b,d)};g.prototype.GetAttributeInt8ForAllPoints=g.prototype.GetAttributeInt8ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Nb(c,a,b,d)};g.prototype.GetAttributeUInt8ForAllPoints=g.prototype.GetAttributeUInt8ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===
+typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Sb(c,a,b,d)};g.prototype.GetAttributeInt16ForAllPoints=g.prototype.GetAttributeInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Lb(c,a,b,d)};g.prototype.GetAttributeUInt16ForAllPoints=g.prototype.GetAttributeUInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&
+"object"===typeof d&&(d=d.ptr);return!!Qb(c,a,b,d)};g.prototype.GetAttributeInt32ForAllPoints=g.prototype.GetAttributeInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Mb(c,a,b,d)};g.prototype.GetAttributeUInt32ForAllPoints=g.prototype.GetAttributeUInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=
+d.ptr);return!!Rb(c,a,b,d)};g.prototype.SkipAttributeTransform=g.prototype.SkipAttributeTransform=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Yb(c,a)};g.prototype.__destroy__=g.prototype.__destroy__=function(){Zb(this.ptr)};C.prototype=Object.create(m.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Mesh=C;C.prototype.num_faces=C.prototype.num_faces=function(){return xc(this.ptr)};C.prototype.num_attributes=C.prototype.num_attributes=function(){return wc(this.ptr)};
+C.prototype.num_points=C.prototype.num_points=function(){return yc(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){vc(this.ptr)};X.prototype=Object.create(m.prototype);X.prototype.constructor=X;X.prototype.__class__=X;X.__cache__={};a.VoidPtr=X;X.prototype.__destroy__=X.prototype.__destroy__=function(){ad(this.ptr)};N.prototype=Object.create(m.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.DracoInt32Array=N;N.prototype.GetValue=N.prototype.GetValue=
+function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return fc(b,a)};N.prototype.size=N.prototype.size=function(){return hc(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){gc(this.ptr)};R.prototype=Object.create(m.prototype);R.prototype.constructor=R;R.prototype.__class__=R;R.__cache__={};a.Metadata=R;R.prototype.__destroy__=R.prototype.__destroy__=function(){Jc(this.ptr)};(function(){function c(){a.OK=rd();a.ERROR=od();a.IO_ERROR=qd();a.INVALID_PARAMETER=pd();a.UNSUPPORTED_VERSION=
+td();a.UNKNOWN_VERSION=sd();a.INVALID_GEOMETRY_TYPE=fd();a.POINT_CLOUD=gd();a.TRIANGULAR_MESH=hd();a.ATTRIBUTE_INVALID_TRANSFORM=bd();a.ATTRIBUTE_NO_TRANSFORM=cd();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=ed();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=dd();a.INVALID=kd();a.POSITION=md();a.NORMAL=ld();a.COLOR=id();a.TEX_COORD=nd();a.GENERIC=jd()}a.calledRun?c():Na.unshift(c)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return d};
+"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
diff --git a/site/public/assets/js/vendor/oktween.js b/site/public/assets/js/vendor/oktween.js
new file mode 100644
index 00000000..b26d360e
--- /dev/null
+++ b/site/public/assets/js/vendor/oktween.js
@@ -0,0 +1,159 @@
+/*
+ oktween.add({
+ obj: el.style,
+ units: "px",
+ from: { left: 0 },
+ to: { left: 100 },
+ duration: 1000,
+ easing: oktween.easing.circ_out,
+ update: function(obj){
+ console.log(obj.left)
+ }
+ finished: function(){
+ console.log("done")
+ }
+ })
+*/
+
+var oktween = (function(){
+ var oktween = {}
+ var tweens = oktween.tweens = []
+ var last_t = 0
+ var id = 0
+ oktween.speed = 1
+ oktween.add = function(tween){
+ tween.id = id++
+ tween.obj = tween.obj || {}
+ if (tween.easing) {
+ if (typeof tween.easing == "string") {
+ tween.easing = oktween.easing[tween.easing]
+ }
+ }
+ else {
+ tween.easing = oktween.easing.linear
+ }
+ if (! ('from' in tween) && ! ('to' in tween)) {
+ tween.keys = []
+ }
+ else if (! ('from' in tween) ) {
+ tween.from = {}
+ tween.keys = Object.keys(tween.to)
+ tween.keys.forEach(function(prop){
+ tween.from[prop] = parseFloat(tween.obj[prop])
+ })
+ }
+ else {
+ tween.keys = Object.keys(tween.from)
+ }
+ tween.delay = tween.delay || 0
+ tween.start = last_t + tween.delay
+ tween.done = false
+ tween.after = tween.after || []
+ tween.then = function(fn){ tween.after.push(fn); return tween }
+ tween.tick = 0
+ tween.skip = tween.skip || 1
+ tween.dt = 0
+ tweens.push(tween)
+ return tween
+ }
+ oktween.update = function(t) {
+ requestAnimationFrame(oktween.update)
+ last_t = t * oktween.speed
+ if (tweens.length == 0) return
+ var done = false
+ tweens.forEach(function(tween, i){
+ var dt = Math.min(1.0, (t - tween.start) / tween.duration)
+ tween.tick++
+ if (dt < 0 || (dt < 1 && (tween.tick % tween.skip != 0))) return
+ var ddt = tween.dt = tween.easing(dt)
+ tween.keys.forEach(function(prop){
+ val = lerp( ddt, tween.from[prop], tween.to[prop] )
+ if (tween.round) val = Math.round(val)
+ if (tween.units) val = (Math.round(val)) + tween.units
+ tween.obj[prop] = val
+ })
+ tween.update && tween.update(tween.obj, dt)
+ if (dt == 1) {
+ tween.finished && tween.finished(tween)
+ if (tween.after.length) {
+ var twn = tween.after.shift()
+ twn.obj = twn.obj || tween.obj
+ twn.after = tween.after
+ oktween.add(twn)
+ }
+ if (tween.loop) {
+ tween.start = t + tween.delay
+ }
+ else {
+ done = tween.done = true
+ }
+ }
+ })
+ if (done) {
+ tweens = tweens.filter(function(tween){ return ! tween.done })
+ }
+ }
+ function lerp(n,a,b){ return (b-a)*n+a }
+
+ requestAnimationFrame(oktween.update)
+
+ oktween.easing = {
+ linear: function(t){
+ return t
+ },
+ circ_out: function(t) {
+ return Math.sqrt(1 - (t = t - 1) * t)
+ },
+ circ_in: function(t){
+ return -(Math.sqrt(1 - (t * t)) - 1)
+ },
+ circ_in_out: function(t) {
+ return ((t*=2) < 1) ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1)
+ },
+ quad_in: function(n){
+ return Math.pow(n, 2)
+ },
+ quad_out: function(n){
+ return n * (n - 2) * -1
+ },
+ quad_in_out: function(n){
+ n = n * 2
+ if(n < 1){ return Math.pow(n, 2) / 2 }
+ return -1 * ((--n) * (n - 2) - 1) / 2
+ },
+ cubic_bezier: function (mX1, mY1, mX2, mY2) {
+ function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
+ function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
+ function C(aA1) { return 3.0 * aA1; }
+
+ // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
+ function CalcBezier(aT, aA1, aA2) {
+ return ((A(aA1, aA2)*aT + B(aA1, aA2))*aT + C(aA1))*aT;
+ }
+
+ // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
+ function GetSlope(aT, aA1, aA2) {
+ return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
+ }
+
+ function GetTForX(aX) {
+ // Newton raphson iteration
+ var aGuessT = aX;
+ for (var i = 0; i < 10; ++i) {
+ var currentSlope = GetSlope(aGuessT, mX1, mX2);
+ if (currentSlope == 0.0) return aGuessT;
+ var currentX = CalcBezier(aGuessT, mX1, mX2) - aX;
+ aGuessT -= currentX / currentSlope;
+ }
+ return aGuessT;
+ }
+
+ return function(aX) {
+ if (mX1 == mY1 && mX2 == mY2) return aX; // linear
+ return CalcBezier(aX, mY1, mY2);
+ }
+ }
+ }
+
+ return oktween
+})() \ No newline at end of file
diff --git a/site/public/assets/js/vendor/three.meshline.js b/site/public/assets/js/vendor/three.meshline.js
new file mode 100644
index 00000000..c6e998e3
--- /dev/null
+++ b/site/public/assets/js/vendor/three.meshline.js
@@ -0,0 +1,486 @@
+;(function() {
+
+"use strict";
+
+var root = this
+
+var has_require = typeof require !== 'undefined'
+
+var THREE = root.THREE || has_require && require('three')
+if( !THREE )
+ throw new Error( 'MeshLine requires three.js' )
+
+function MeshLine() {
+
+ this.positions = [];
+
+ this.previous = [];
+ this.next = [];
+ this.side = [];
+ this.width = [];
+ this.indices_array = [];
+ this.uvs = [];
+ this.counters = [];
+ this.geometry = new THREE.BufferGeometry();
+
+ this.widthCallback = null;
+
+}
+
+MeshLine.prototype.setGeometry = function( g, c ) {
+
+ this.widthCallback = c;
+
+ this.positions = [];
+ this.counters = [];
+
+ if( g instanceof THREE.Geometry ) {
+ for( var j = 0; j < g.vertices.length; j++ ) {
+ var v = g.vertices[ j ];
+ var c = j/g.vertices.length;
+ this.positions.push( v.x, v.y, v.z );
+ this.positions.push( v.x, v.y, v.z );
+ this.counters.push(c);
+ this.counters.push(c);
+ }
+ }
+
+ if( g instanceof THREE.BufferGeometry ) {
+ // read attribute positions ?
+ }
+
+ if( g instanceof Float32Array || g instanceof Array ) {
+ for( var j = 0; j < g.length; j += 3 ) {
+ var c = j/g.length;
+ this.positions.push( g[ j ], g[ j + 1 ], g[ j + 2 ] );
+ this.positions.push( g[ j ], g[ j + 1 ], g[ j + 2 ] );
+ this.counters.push(c);
+ this.counters.push(c);
+ }
+ }
+
+ this.process();
+
+}
+
+MeshLine.prototype.compareV3 = function( a, b ) {
+
+ var aa = a * 6;
+ var ab = b * 6;
+ return ( this.positions[ aa ] === this.positions[ ab ] ) && ( this.positions[ aa + 1 ] === this.positions[ ab + 1 ] ) && ( this.positions[ aa + 2 ] === this.positions[ ab + 2 ] );
+
+}
+
+MeshLine.prototype.copyV3 = function( a ) {
+
+ var aa = a * 6;
+ return [ this.positions[ aa ], this.positions[ aa + 1 ], this.positions[ aa + 2 ] ];
+
+}
+
+MeshLine.prototype.process = function() {
+
+ var l = this.positions.length / 6;
+
+ this.previous = [];
+ this.next = [];
+ this.side = [];
+ this.width = [];
+ this.indices_array = [];
+ this.uvs = [];
+
+ for( var j = 0; j < l; j++ ) {
+ this.side.push( 1 );
+ this.side.push( -1 );
+ }
+
+ var w;
+ for( var j = 0; j < l; j++ ) {
+ if( this.widthCallback ) w = this.widthCallback( j / ( l -1 ) );
+ else w = 1;
+ this.width.push( w );
+ this.width.push( w );
+ }
+
+ for( var j = 0; j < l; j++ ) {
+ this.uvs.push( j / ( l - 1 ), 0 );
+ this.uvs.push( j / ( l - 1 ), 1 );
+ }
+
+ var v;
+
+ if( this.compareV3( 0, l - 1 ) ){
+ v = this.copyV3( l - 2 );
+ } else {
+ v = this.copyV3( 0 );
+ }
+ this.previous.push( v[ 0 ], v[ 1 ], v[ 2 ] );
+ this.previous.push( v[ 0 ], v[ 1 ], v[ 2 ] );
+ for( var j = 0; j < l - 1; j++ ) {
+ v = this.copyV3( j );
+ this.previous.push( v[ 0 ], v[ 1 ], v[ 2 ] );
+ this.previous.push( v[ 0 ], v[ 1 ], v[ 2 ] );
+ }
+
+ for( var j = 1; j < l; j++ ) {
+ v = this.copyV3( j );
+ this.next.push( v[ 0 ], v[ 1 ], v[ 2 ] );
+ this.next.push( v[ 0 ], v[ 1 ], v[ 2 ] );
+ }
+
+ if( this.compareV3( l - 1, 0 ) ){
+ v = this.copyV3( 1 );
+ } else {
+ v = this.copyV3( l - 1 );
+ }
+ this.next.push( v[ 0 ], v[ 1 ], v[ 2 ] );
+ this.next.push( v[ 0 ], v[ 1 ], v[ 2 ] );
+
+ for( var j = 0; j < l - 1; j++ ) {
+ var n = j * 2;
+ this.indices_array.push( n, n + 1, n + 2 );
+ this.indices_array.push( n + 2, n + 1, n + 3 );
+ }
+
+ if (!this.attributes) {
+ this.attributes = {
+ position: new THREE.BufferAttribute( new Float32Array( this.positions ), 3 ),
+ previous: new THREE.BufferAttribute( new Float32Array( this.previous ), 3 ),
+ next: new THREE.BufferAttribute( new Float32Array( this.next ), 3 ),
+ side: new THREE.BufferAttribute( new Float32Array( this.side ), 1 ),
+ width: new THREE.BufferAttribute( new Float32Array( this.width ), 1 ),
+ uv: new THREE.BufferAttribute( new Float32Array( this.uvs ), 2 ),
+ index: new THREE.BufferAttribute( new Uint16Array( this.indices_array ), 1 ),
+ counters: new THREE.BufferAttribute( new Float32Array( this.counters ), 1 )
+ }
+ } else {
+ this.attributes.position.copyArray(new Float32Array(this.positions));
+ this.attributes.position.needsUpdate = true;
+ this.attributes.previous.copyArray(new Float32Array(this.previous));
+ this.attributes.previous.needsUpdate = true;
+ this.attributes.next.copyArray(new Float32Array(this.next));
+ this.attributes.next.needsUpdate = true;
+ this.attributes.side.copyArray(new Float32Array(this.side));
+ this.attributes.side.needsUpdate = true;
+ this.attributes.width.copyArray(new Float32Array(this.width));
+ this.attributes.width.needsUpdate = true;
+ this.attributes.uv.copyArray(new Float32Array(this.uvs));
+ this.attributes.uv.needsUpdate = true;
+ this.attributes.index.copyArray(new Uint16Array(this.indices_array));
+ this.attributes.index.needsUpdate = true;
+ }
+
+ this.geometry.addAttribute( 'position', this.attributes.position );
+ this.geometry.addAttribute( 'previous', this.attributes.previous );
+ this.geometry.addAttribute( 'next', this.attributes.next );
+ this.geometry.addAttribute( 'side', this.attributes.side );
+ this.geometry.addAttribute( 'width', this.attributes.width );
+ this.geometry.addAttribute( 'uv', this.attributes.uv );
+ this.geometry.addAttribute( 'counters', this.attributes.counters );
+
+ this.geometry.setIndex( this.attributes.index );
+
+}
+
+function memcpy (src, srcOffset, dst, dstOffset, length) {
+ var i
+
+ src = src.subarray || src.slice ? src : src.buffer
+ dst = dst.subarray || dst.slice ? dst : dst.buffer
+
+ src = srcOffset ? src.subarray ?
+ src.subarray(srcOffset, length && srcOffset + length) :
+ src.slice(srcOffset, length && srcOffset + length) : src
+
+ if (dst.set) {
+ dst.set(src, dstOffset)
+ } else {
+ for (i=0; i<src.length; i++) {
+ dst[i + dstOffset] = src[i]
+ }
+ }
+
+ return dst
+}
+
+/**
+ * Fast method to advance the line by one position. The oldest position is removed.
+ * @param position
+ */
+MeshLine.prototype.advance = function(position) {
+
+ var positions = this.attributes.position.array;
+ var previous = this.attributes.previous.array;
+ var next = this.attributes.next.array;
+ var l = positions.length;
+
+ // PREVIOUS
+ memcpy( positions, 0, previous, 0, l );
+
+ // POSITIONS
+ memcpy( positions, 6, positions, 0, l - 6 );
+
+ positions[l - 6] = position.x;
+ positions[l - 5] = position.y;
+ positions[l - 4] = position.z;
+ positions[l - 3] = position.x;
+ positions[l - 2] = position.y;
+ positions[l - 1] = position.z;
+
+ // NEXT
+ memcpy( positions, 6, next, 0, l - 6 );
+
+ next[l - 6] = position.x;
+ next[l - 5] = position.y;
+ next[l - 4] = position.z;
+ next[l - 3] = position.x;
+ next[l - 2] = position.y;
+ next[l - 1] = position.z;
+
+ this.attributes.position.needsUpdate = true;
+ this.attributes.previous.needsUpdate = true;
+ this.attributes.next.needsUpdate = true;
+
+};
+
+function MeshLineMaterial( parameters ) {
+
+ var vertexShaderSource = [
+'precision highp float;',
+'',
+'attribute vec3 position;',
+'attribute vec3 previous;',
+'attribute vec3 next;',
+'attribute float side;',
+'attribute float width;',
+'attribute vec2 uv;',
+'attribute float counters;',
+'',
+'uniform mat4 projectionMatrix;',
+'uniform mat4 modelViewMatrix;',
+'uniform vec2 resolution;',
+'uniform float lineWidth;',
+'uniform vec3 color;',
+'uniform float opacity;',
+'uniform float near;',
+'uniform float far;',
+'uniform float sizeAttenuation;',
+'',
+'varying vec2 vUV;',
+'varying vec4 vColor;',
+'varying float vCounters;',
+'',
+'vec2 fix( vec4 i, float aspect ) {',
+'',
+' vec2 res = i.xy / i.w;',
+' res.x *= aspect;',
+' vCounters = counters;',
+' return res;',
+'',
+'}',
+'',
+'void main() {',
+'',
+' float aspect = resolution.x / resolution.y;',
+' float pixelWidthRatio = 1. / (resolution.x * projectionMatrix[0][0]);',
+'',
+' vColor = vec4( color, opacity );',
+' vUV = uv;',
+'',
+' mat4 m = projectionMatrix * modelViewMatrix;',
+' vec4 finalPosition = m * vec4( position, 1.0 );',
+' vec4 prevPos = m * vec4( previous, 1.0 );',
+' vec4 nextPos = m * vec4( next, 1.0 );',
+'',
+' vec2 currentP = fix( finalPosition, aspect );',
+' vec2 prevP = fix( prevPos, aspect );',
+' vec2 nextP = fix( nextPos, aspect );',
+'',
+' float pixelWidth = finalPosition.w * pixelWidthRatio;',
+' float w = 1.8 * pixelWidth * lineWidth * width;',
+'',
+' if( sizeAttenuation == 1. ) {',
+' w = 1.8 * lineWidth * width;',
+' }',
+'',
+' vec2 dir;',
+' if( nextP == currentP ) dir = normalize( currentP - prevP );',
+' else if( prevP == currentP ) dir = normalize( nextP - currentP );',
+' else {',
+' vec2 dir1 = normalize( currentP - prevP );',
+' vec2 dir2 = normalize( nextP - currentP );',
+' dir = normalize( dir1 + dir2 );',
+'',
+' vec2 perp = vec2( -dir1.y, dir1.x );',
+' vec2 miter = vec2( -dir.y, dir.x );',
+' //w = clamp( w / dot( miter, perp ), 0., 4. * lineWidth * width );',
+'',
+' }',
+'',
+' //vec2 normal = ( cross( vec3( dir, 0. ), vec3( 0., 0., 1. ) ) ).xy;',
+' vec2 normal = vec2( -dir.y, dir.x );',
+' normal.x /= aspect;',
+' normal *= .5 * w;',
+'',
+' vec4 offset = vec4( normal * side, 0.0, 1.0 );',
+' finalPosition.xy += offset.xy;',
+'',
+' gl_Position = finalPosition;',
+'',
+'}' ];
+
+ var fragmentShaderSource = [
+ '#extension GL_OES_standard_derivatives : enable',
+'precision mediump float;',
+'',
+'uniform sampler2D map;',
+'uniform sampler2D alphaMap;',
+'uniform float useMap;',
+'uniform float useAlphaMap;',
+'uniform float useDash;',
+'uniform float dashArray;',
+'uniform float dashOffset;',
+'uniform float dashRatio;',
+'uniform float visibility;',
+'uniform float alphaTest;',
+'uniform vec2 repeat;',
+'',
+'varying vec2 vUV;',
+'varying vec4 vColor;',
+'varying float vCounters;',
+'',
+'void main() {',
+'',
+' vec4 c = vColor;',
+' if( useMap == 1. ) c *= texture2D( map, vUV * repeat );',
+' if( useAlphaMap == 1. ) c.a *= texture2D( alphaMap, vUV * repeat ).a;',
+' if( c.a < alphaTest ) discard;',
+' if( useDash == 1. ){',
+' c.a *= ceil(mod(vCounters + dashOffset, dashArray) - (dashArray * dashRatio));',
+' }',
+' gl_FragColor = c;',
+' gl_FragColor.a *= step(vCounters, visibility);',
+'}' ];
+
+ function check( v, d ) {
+ if( v === undefined ) return d;
+ return v;
+ }
+
+ THREE.Material.call( this );
+
+ parameters = parameters || {};
+
+ this.lineWidth = check( parameters.lineWidth, 1 );
+ this.map = check( parameters.map, null );
+ this.useMap = check( parameters.useMap, 0 );
+ this.alphaMap = check( parameters.alphaMap, null );
+ this.useAlphaMap = check( parameters.useAlphaMap, 0 );
+ this.color = check( parameters.color, new THREE.Color( 0xffffff ) );
+ this.opacity = check( parameters.opacity, 1 );
+ this.resolution = check( parameters.resolution, new THREE.Vector2( 1, 1 ) );
+ this.sizeAttenuation = check( parameters.sizeAttenuation, 1 );
+ this.near = check( parameters.near, 1 );
+ this.far = check( parameters.far, 1 );
+ this.dashArray = check( parameters.dashArray, 0 );
+ this.dashOffset = check( parameters.dashOffset, 0 );
+ this.dashRatio = check( parameters.dashRatio, 0.5 );
+ this.useDash = ( this.dashArray !== 0 ) ? 1 : 0;
+ this.visibility = check( parameters.visibility, 1 );
+ this.alphaTest = check( parameters.alphaTest, 0 );
+ this.repeat = check( parameters.repeat, new THREE.Vector2( 1, 1 ) );
+
+ var material = new THREE.RawShaderMaterial( {
+ uniforms:{
+ lineWidth: { type: 'f', value: this.lineWidth },
+ map: { type: 't', value: this.map },
+ useMap: { type: 'f', value: this.useMap },
+ alphaMap: { type: 't', value: this.alphaMap },
+ useAlphaMap: { type: 'f', value: this.useAlphaMap },
+ color: { type: 'c', value: this.color },
+ opacity: { type: 'f', value: this.opacity },
+ resolution: { type: 'v2', value: this.resolution },
+ sizeAttenuation: { type: 'f', value: this.sizeAttenuation },
+ near: { type: 'f', value: this.near },
+ far: { type: 'f', value: this.far },
+ dashArray: { type: 'f', value: this.dashArray },
+ dashOffset: { type: 'f', value: this.dashOffset },
+ dashRatio: { type: 'f', value: this.dashRatio },
+ useDash: { type: 'f', value: this.useDash },
+ visibility: {type: 'f', value: this.visibility},
+ alphaTest: {type: 'f', value: this.alphaTest},
+ repeat: { type: 'v2', value: this.repeat }
+ },
+ vertexShader: vertexShaderSource.join( '\r\n' ),
+ fragmentShader: fragmentShaderSource.join( '\r\n' )
+ });
+
+ delete parameters.lineWidth;
+ delete parameters.map;
+ delete parameters.useMap;
+ delete parameters.alphaMap;
+ delete parameters.useAlphaMap;
+ delete parameters.color;
+ delete parameters.opacity;
+ delete parameters.resolution;
+ delete parameters.sizeAttenuation;
+ delete parameters.near;
+ delete parameters.far;
+ delete parameters.dashArray;
+ delete parameters.dashOffset;
+ delete parameters.dashRatio;
+ delete parameters.visibility;
+ delete parameters.alphaTest;
+ delete parameters.repeat;
+
+ material.type = 'MeshLineMaterial';
+
+ material.setValues( parameters );
+
+ return material;
+
+};
+
+MeshLineMaterial.prototype = Object.create( THREE.Material.prototype );
+MeshLineMaterial.prototype.constructor = MeshLineMaterial;
+
+MeshLineMaterial.prototype.copy = function ( source ) {
+
+ THREE.Material.prototype.copy.call( this, source );
+
+ this.lineWidth = source.lineWidth;
+ this.map = source.map;
+ this.useMap = source.useMap;
+ this.alphaMap = source.alphaMap;
+ this.useAlphaMap = source.useAlphaMap;
+ this.color.copy( source.color );
+ this.opacity = source.opacity;
+ this.resolution.copy( source.resolution );
+ this.sizeAttenuation = source.sizeAttenuation;
+ this.near = source.near;
+ this.far = source.far;
+ this.dashArray.copy( source.dashArray );
+ this.dashOffset.copy( source.dashOffset );
+ this.dashRatio.copy( source.dashRatio );
+ this.useDash = source.useDash;
+ this.visibility = source.visibility;
+ this.alphaTest = source.alphaTest;
+ this.repeat.copy( source.repeat );
+
+ return this;
+
+};
+
+if( typeof exports !== 'undefined' ) {
+ if( typeof module !== 'undefined' && module.exports ) {
+ exports = module.exports = { MeshLine: MeshLine, MeshLineMaterial: MeshLineMaterial };
+ }
+ exports.MeshLine = MeshLine;
+ exports.MeshLineMaterial = MeshLineMaterial;
+}
+else {
+ root.MeshLine = MeshLine;
+ root.MeshLineMaterial = MeshLineMaterial;
+}
+
+}).call(this); \ No newline at end of file
diff --git a/site/public/assets/js/vendor/three.min.js b/site/public/assets/js/vendor/three.min.js
new file mode 100644
index 00000000..56300150
--- /dev/null
+++ b/site/public/assets/js/vendor/three.min.js
@@ -0,0 +1,963 @@
+// threejs.org/license
+(function(l,ia){"object"===typeof exports&&"undefined"!==typeof module?ia(exports):"function"===typeof define&&define.amd?define(["exports"],ia):ia(l.THREE={})})(this,function(l){function ia(){}function z(a,b){this.x=a||0;this.y=b||0}function P(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function ja(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function p(a,
+b,c){this.x=a||0;this.y=b||0;this.z=c||0}function da(){this.elements=[1,0,0,0,1,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function W(a,b,c,d,e,f,g,h,k,m){Object.defineProperty(this,"id",{value:Kf++});this.uuid=R.generateUUID();this.name="";this.image=void 0!==a?a:W.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:W.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==
+e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==k?k:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new z(0,0);this.repeat=new z(1,1);this.center=new z(0,0);this.rotation=0;this.matrixAutoUpdate=!0;this.matrix=new da;this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function Z(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function kb(a,
+b,c){this.width=a;this.height=b;this.scissor=new Z(0,0,a,b);this.scissorTest=!1;this.viewport=new Z(0,0,a,b);c=c||{};void 0===c.minFilter&&(c.minFilter=1006);this.texture=new W(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,c.encoding);this.texture.generateMipmaps=void 0!==c.generateMipmaps?c.generateMipmaps:!0;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?
+c.depthTexture:null}function Jb(a,b,c){kb.call(this,a,b,c);this.activeMipMapLevel=this.activeCubeFace=0}function lb(a,b,c,d,e,f,g,h,k,m,q,n){W.call(this,null,f,g,h,k,m,d,e,q,n);this.image={data:a,width:b,height:c};this.magFilter=void 0!==k?k:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1}function Wa(a,b){this.min=void 0!==a?a:new p(Infinity,Infinity,Infinity);this.max=void 0!==b?b:new p(-Infinity,-Infinity,-Infinity)}function Ga(a,b){this.center=void 0!==
+a?a:new p;this.radius=void 0!==b?b:0}function Pa(a,b){this.normal=void 0!==a?a:new p(1,0,0);this.constant=void 0!==b?b:0}function rd(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Pa,void 0!==b?b:new Pa,void 0!==c?c:new Pa,void 0!==d?d:new Pa,void 0!==e?e:new Pa,void 0!==f?f:new Pa]}function G(a,b,c){return void 0===b&&void 0===c?this.set(a):this.setRGB(a,b,c)}function Xd(){function a(e,f){!1!==c&&(d(e,f),b.requestAnimationFrame(a))}var b=null,c=!1,d=null;return{start:function(){!0!==c&&null!==d&&(b.requestAnimationFrame(a),
+c=!0)},stop:function(){c=!1},setAnimationLoop:function(a){d=a},setContext:function(a){b=a}}}function Lf(a){function b(b,c){var d=b.array,e=b.dynamic?35048:35044,h=a.createBuffer();a.bindBuffer(c,h);a.bufferData(c,d,e);b.onUploadCallback();c=5126;d instanceof Float32Array?c=5126:d instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):d instanceof Uint16Array?c=5123:d instanceof Int16Array?c=5122:d instanceof Uint32Array?c=5125:d instanceof Int32Array?
+c=5124:d instanceof Int8Array?c=5120:d instanceof Uint8Array&&(c=5121);return{buffer:h,type:c,bytesPerElement:d.BYTES_PER_ELEMENT,version:b.version}}var c=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&&(a=a.data);return c.get(a)},remove:function(b){b.isInterleavedBufferAttribute&&(b=b.data);var d=c.get(b);d&&(a.deleteBuffer(d.buffer),c.delete(b))},update:function(d,e){d.isInterleavedBufferAttribute&&(d=d.data);var f=c.get(d);if(void 0===f)c.set(d,b(d,e));else if(f.version<d.version){var g=
+d,h=g.array,k=g.updateRange;a.bindBuffer(e,f.buffer);!1===g.dynamic?a.bufferData(e,h,35044):-1===k.count?a.bufferSubData(e,0,h):0===k.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(a.bufferSubData(e,k.offset*h.BYTES_PER_ELEMENT,h.subarray(k.offset,k.offset+k.count)),k.count=-1);f.version=d.version}}}}function Xa(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=
+d&&d.isVector3?d:new p;this.vertexNormals=Array.isArray(d)?d:[];this.color=e&&e.isColor?e:new G;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=void 0!==f?f:0}function mb(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||mb.DefaultOrder}function Yd(){this.mask=1}function D(){Object.defineProperty(this,"id",{value:Mf++});this.uuid=R.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=D.DefaultUp.clone();var a=new p,b=new mb,c=new ja,d=
+new p(1,1,1);b.onChange(function(){c.setFromEuler(b,!1)});c.onChange(function(){b.setFromQuaternion(c,void 0,!1)});Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:a},rotation:{configurable:!0,enumerable:!0,value:b},quaternion:{configurable:!0,enumerable:!0,value:c},scale:{configurable:!0,enumerable:!0,value:d},modelViewMatrix:{value:new P},normalMatrix:{value:new da}});this.matrix=new P;this.matrixWorld=new P;this.matrixAutoUpdate=D.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=
+!1;this.layers=new Yd;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function I(){Object.defineProperty(this,"id",{value:Nf+=2});this.uuid=R.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=
+this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function F(a,b,c){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="";this.array=a;this.itemSize=b;this.count=void 0!==a?a.length/b:0;this.normalized=!0===c;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function sc(a,b,c){F.call(this,new Int8Array(a),b,c)}function tc(a,b,c){F.call(this,new Uint8Array(a),b,
+c)}function uc(a,b,c){F.call(this,new Uint8ClampedArray(a),b,c)}function vc(a,b,c){F.call(this,new Int16Array(a),b,c)}function nb(a,b,c){F.call(this,new Uint16Array(a),b,c)}function wc(a,b,c){F.call(this,new Int32Array(a),b,c)}function ob(a,b,c){F.call(this,new Uint32Array(a),b,c)}function C(a,b,c){F.call(this,new Float32Array(a),b,c)}function xc(a,b,c){F.call(this,new Float64Array(a),b,c)}function Ie(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets=
+{};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function Je(a){if(0===a.length)return-Infinity;for(var b=a[0],c=1,d=a.length;c<d;++c)a[c]>b&&(b=a[c]);return b}function E(){Object.defineProperty(this,"id",{value:Of+=2});this.uuid=R.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=
+[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function Kb(a,b,c,d,e,f){I.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.fromBufferGeometry(new pb(a,b,c,d,e,f));this.mergeVertices()}function pb(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,l,X,B,Lb){var t=f/X,u=g/B,w=f/2,v=g/2,A=l/2;g=X+1;var y=B+1,H=f=0,N,z,C=new p;for(z=0;z<y;z++){var D=z*u-v;for(N=0;N<g;N++)C[a]=(N*
+t-w)*d,C[b]=D*e,C[c]=A,m.push(C.x,C.y,C.z),C[a]=0,C[b]=0,C[c]=0<l?1:-1,q.push(C.x,C.y,C.z),n.push(N/X),n.push(1-z/B),f+=1}for(z=0;z<B;z++)for(N=0;N<X;N++)a=r+N+g*(z+1),b=r+(N+1)+g*(z+1),c=r+(N+1)+g*z,k.push(r+N+g*z,a,c),k.push(a,b,c),H+=6;h.addGroup(x,H,Lb);x+=H;r+=f}E.call(this);this.type="BoxBufferGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};var h=this;a=a||1;b=b||1;c=c||1;d=Math.floor(d)||1;e=Math.floor(e)||1;f=Math.floor(f)||1;var k=[],
+m=[],q=[],n=[],r=0,x=0;g("z","y","x",-1,-1,c,b,a,f,e,0);g("z","y","x",1,-1,c,b,-a,f,e,1);g("x","z","y",1,1,a,c,b,d,f,2);g("x","z","y",1,-1,a,c,-b,d,f,3);g("x","y","z",1,-1,a,b,c,d,e,4);g("x","y","z",-1,-1,a,b,-c,d,e,5);this.setIndex(k);this.addAttribute("position",new C(m,3));this.addAttribute("normal",new C(q,3));this.addAttribute("uv",new C(n,2))}function yc(a,b,c,d){I.call(this);this.type="PlaneGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new qb(a,
+b,c,d));this.mergeVertices()}function qb(a,b,c,d){E.call(this);this.type="PlaneBufferGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};a=a||1;b=b||1;var e=a/2,f=b/2;c=Math.floor(c)||1;d=Math.floor(d)||1;var g=c+1,h=d+1,k=a/c,m=b/d,q=[],n=[],r=[],x=[];for(a=0;a<h;a++){var t=a*m-f;for(b=0;b<g;b++)n.push(b*k-e,-t,0),r.push(0,0,1),x.push(b/c),x.push(1-a/d)}for(a=0;a<d;a++)for(b=0;b<c;b++)e=b+g*(a+1),f=b+1+g*(a+1),h=b+1+g*a,q.push(b+g*a,e,h),q.push(e,f,h);this.setIndex(q);this.addAttribute("position",
+new C(n,3));this.addAttribute("normal",new C(r,3));this.addAttribute("uv",new C(x,2))}function L(){Object.defineProperty(this,"id",{value:Pf++});this.uuid=R.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=1;this.side=0;this.flatShading=!1;this.vertexColors=0;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=3;this.depthWrite=this.depthTest=
+!0;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.shadowSide=null;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;this.alphaTest=0;this.premultipliedAlpha=!1;this.visible=!0;this.userData={};this.needsUpdate=!0}function ka(a){L.call(this);this.type="ShaderMaterial";this.defines={};this.uniforms={};this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";
+this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";this.linewidth=1;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1;this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1};this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]};this.index0AttributeName=void 0;this.uniformsNeedUpdate=!1;void 0!==a&&(void 0!==a.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),
+this.setValues(a))}function rb(a,b){this.origin=void 0!==a?a:new p;this.direction=void 0!==b?b:new p}function ha(a,b,c){this.a=void 0!==a?a:new p;this.b=void 0!==b?b:new p;this.c=void 0!==c?c:new p}function Ea(a){L.call(this);this.type="MeshBasicMaterial";this.color=new G(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=
+1;this.wireframeLinejoin=this.wireframeLinecap="round";this.lights=this.morphTargets=this.skinning=!1;this.setValues(a)}function pa(a,b){D.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new E;this.material=void 0!==b?b:new Ea({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function Qf(a,b,c,d){function e(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,d)}var f=new G(0),g=0,h,k;return{getClearColor:function(){return f},setClearColor:function(a,b){f.set(a);g=void 0!==b?
+b:1;e(f,g)},getClearAlpha:function(){return g},setClearAlpha:function(a){g=a;e(f,g)},render:function(b,d,n,r){d=d.background;null===d?e(f,g):d&&d.isColor&&(e(d,1),r=!0);(a.autoClear||r)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil);d&&(d.isCubeTexture||d.isWebGLRenderTargetCube)?(void 0===k&&(k=new pa(new pb(1,1,1),new ka({type:"BackgroundCubeMaterial",uniforms:va.clone(Qa.cube.uniforms),vertexShader:Qa.cube.vertexShader,fragmentShader:Qa.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,
+fog:!1})),k.geometry.removeAttribute("normal"),k.geometry.removeAttribute("uv"),k.onBeforeRender=function(a,b,c){this.matrixWorld.copyPosition(c.matrixWorld)},c.update(k)),k.material.uniforms.tCube.value=d.isWebGLRenderTargetCube?d.texture:d,k.material.uniforms.tFlip.value=d.isWebGLRenderTargetCube?1:-1,b.push(k,k.geometry,k.material,0,null)):d&&d.isTexture&&(void 0===h&&(h=new pa(new qb(2,2),new ka({type:"BackgroundMaterial",uniforms:va.clone(Qa.background.uniforms),vertexShader:Qa.background.vertexShader,
+fragmentShader:Qa.background.fragmentShader,side:0,depthTest:!0,depthWrite:!1,fog:!1})),h.geometry.removeAttribute("normal"),c.update(h)),h.material.uniforms.t2D.value=d,!0===d.matrixAutoUpdate&&d.updateMatrix(),h.material.uniforms.uvTransform.value.copy(d.matrix),b.push(h,h.geometry,h.material,0,null))}}}function Rf(a,b,c,d){var e;this.setMode=function(a){e=a};this.render=function(b,d){a.drawArrays(e,b,d);c.update(d,e)};this.renderInstances=function(f,g,h){if(d.isWebGL2)var k=a;else if(k=b.get("ANGLE_instanced_arrays"),
+null===k){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}k[d.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](e,g,h,f.maxInstancedCount);c.update(h,e,f.maxInstancedCount)}}function Sf(a,b,c){function d(b){if("highp"===b){if(0<a.getShaderPrecisionFormat(35633,36338).precision&&0<a.getShaderPrecisionFormat(35632,36338).precision)return"highp";b="mediump"}return"mediump"===b&&0<a.getShaderPrecisionFormat(35633,
+36337).precision&&0<a.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var e,f="undefined"!==typeof WebGL2RenderingContext&&a instanceof WebGL2RenderingContext,g=void 0!==c.precision?c.precision:"highp",h=d(g);h!==g&&(console.warn("THREE.WebGLRenderer:",g,"not supported, using",h,"instead."),g=h);c=!0===c.logarithmicDepthBuffer;h=a.getParameter(34930);var k=a.getParameter(35660),m=a.getParameter(3379),q=a.getParameter(34076),n=a.getParameter(34921),r=a.getParameter(36347),x=a.getParameter(36348),
+t=a.getParameter(36349),l=0<k,w=f||!!b.get("OES_texture_float");return{isWebGL2:f,getMaxAnisotropy:function(){if(void 0!==e)return e;var c=b.get("EXT_texture_filter_anisotropic");return e=null!==c?a.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:d,precision:g,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:k,maxTextureSize:m,maxCubemapSize:q,maxAttributes:n,maxVertexUniforms:r,maxVaryings:x,maxFragmentUniforms:t,vertexTextures:l,floatFragmentTextures:w,floatVertexTextures:l&&
+w}}function Tf(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=0<e);c.numPlanes=e;c.numIntersection=0}function b(a,b,d,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=m.value;if(!0!==e||null===g){e=d+4*f;b=b.matrixWorldInverse;k.getNormalMatrix(b);if(null===g||g.length<e)g=new Float32Array(e);for(e=0;e!==f;++e,d+=4)h.copy(a[e]).applyMatrix4(b,k),h.normal.toArray(g,d),g[d+3]=h.constant}m.value=g;m.needsUpdate=!0}c.numPlanes=f;return g}var c=this,d=null,e=0,f=!1,g=!1,h=new Pa,k=new da,m={value:null,
+needsUpdate:!1};this.uniform=m;this.numIntersection=this.numPlanes=0;this.init=function(a,c,g){var h=0!==a.length||c||0!==e||f;f=c;d=b(a,g,0);e=a.length;return h};this.beginShadows=function(){g=!0;b(null)};this.endShadows=function(){g=!1;a()};this.setState=function(c,h,k,x,l,u){if(!f||null===c||0===c.length||g&&!k)g?b(null):a();else{k=g?0:e;var n=4*k,q=l.clippingState||null;m.value=q;q=b(c,x,n,u);for(c=0;c!==n;++c)q[c]=d[c];l.clippingState=q;this.numIntersection=h?this.numPlanes:0;this.numPlanes+=
+k}}}function Uf(a){var b={};return{get:function(c){if(void 0!==b[c])return b[c];switch(c){case "WEBGL_depth_texture":var d=a.getExtension("WEBGL_depth_texture")||a.getExtension("MOZ_WEBGL_depth_texture")||a.getExtension("WEBKIT_WEBGL_depth_texture");break;case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case "WEBGL_compressed_texture_s3tc":d=
+a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:d=a.getExtension(c)}null===d&&console.warn("THREE.WebGLRenderer: "+c+" extension not supported.");return b[c]=d}}}function Vf(a,b,c){function d(a){var g=a.target;a=e[g.id];null!==
+a.index&&b.remove(a.index);for(var k in a.attributes)b.remove(a.attributes[k]);g.removeEventListener("dispose",d);delete e[g.id];if(k=f[a.id])b.remove(k),delete f[a.id];c.memory.geometries--}var e={},f={};return{get:function(a,b){var f=e[b.id];if(f)return f;b.addEventListener("dispose",d);b.isBufferGeometry?f=b:b.isGeometry&&(void 0===b._bufferGeometry&&(b._bufferGeometry=(new E).setFromObject(a)),f=b._bufferGeometry);e[b.id]=f;c.memory.geometries++;return f},update:function(a){var c=a.index,d=a.attributes;
+null!==c&&b.update(c,34963);for(var e in d)b.update(d[e],34962);a=a.morphAttributes;for(e in a){c=a[e];d=0;for(var f=c.length;d<f;d++)b.update(c[d],34962)}},getWireframeAttribute:function(a){var c=f[a.id];if(c)return c;c=[];var d=a.index,e=a.attributes;if(null!==d){d=d.array;e=0;for(var g=d.length;e<g;e+=3){var n=d[e+0],r=d[e+1],x=d[e+2];c.push(n,r,r,x,x,n)}}else for(d=e.position.array,e=0,g=d.length/3-1;e<g;e+=3)n=e+0,r=e+1,x=e+2,c.push(n,r,r,x,x,n);c=new (65535<Je(c)?ob:nb)(c,1);b.update(c,34963);
+return f[a.id]=c}}}function Wf(a,b,c,d){var e,f,g;this.setMode=function(a){e=a};this.setIndex=function(a){f=a.type;g=a.bytesPerElement};this.render=function(b,d){a.drawElements(e,d,f,b*g);c.update(d,e)};this.renderInstances=function(h,k,m){if(d.isWebGL2)var q=a;else if(q=b.get("ANGLE_instanced_arrays"),null===q){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}q[d.isWebGL2?"drawElementsInstanced":
+"drawElementsInstancedANGLE"](e,m,f,k*g,h.maxInstancedCount);c.update(m,e,h.maxInstancedCount)}}function Xf(a){var b={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:b,programs:null,autoReset:!0,reset:function(){b.frame++;b.calls=0;b.triangles=0;b.points=0;b.lines=0},update:function(a,d,e){e=e||1;b.calls++;switch(d){case 4:b.triangles+=a/3*e;break;case 5:case 6:b.triangles+=e*(a-2);break;case 1:b.lines+=a/2*e;break;case 3:b.lines+=e*(a-1);break;case 2:b.lines+=
+e*a;break;case 0:b.points+=e*a;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",d)}}}}function Yf(a,b){return Math.abs(b[1])-Math.abs(a[1])}function Zf(a){var b={},c=new Float32Array(8);return{update:function(d,e,f,g){var h=d.morphTargetInfluences,k=h.length;d=b[e.id];if(void 0===d){d=[];for(var m=0;m<k;m++)d[m]=[m,0];b[e.id]=d}var q=f.morphTargets&&e.morphAttributes.position;f=f.morphNormals&&e.morphAttributes.normal;for(m=0;m<k;m++){var n=d[m];0!==n[1]&&(q&&e.removeAttribute("morphTarget"+
+m),f&&e.removeAttribute("morphNormal"+m))}for(m=0;m<k;m++)n=d[m],n[0]=m,n[1]=h[m];d.sort(Yf);for(m=0;8>m;m++){if(n=d[m])if(h=n[0],k=n[1]){q&&e.addAttribute("morphTarget"+m,q[h]);f&&e.addAttribute("morphNormal"+m,f[h]);c[m]=k;continue}c[m]=0}g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function $f(a,b){var c={};return{update:function(d){var e=b.render.frame,f=d.geometry,g=a.get(d,f);c[g.id]!==e&&(f.isGeometry&&g.updateFromObject(d),a.update(g),c[g.id]=e);return g},dispose:function(){c={}}}}
+function Ya(a,b,c,d,e,f,g,h,k,m){a=void 0!==a?a:[];W.call(this,a,void 0!==b?b:301,c,d,e,f,g,h,k,m);this.flipY=!1}function Mb(a,b,c,d){W.call(this,null);this.image={data:a,width:b,height:c,depth:d};this.minFilter=this.magFilter=1003;this.flipY=this.generateMipmaps=!1}function Nb(a,b,c){var d=a[0];if(0>=d||0<d)return a;var e=b*c,f=Ke[e];void 0===f&&(f=new Float32Array(e),Ke[e]=f);if(0!==b)for(d.toArray(f,0),d=1,e=0;d!==b;++d)e+=c,a[d].toArray(f,e);return f}function ea(a,b){if(a.length!==b.length)return!1;
+for(var c=0,d=a.length;c<d;c++)if(a[c]!==b[c])return!1;return!0}function sa(a,b){for(var c=0,d=b.length;c<d;c++)a[c]=b[c]}function Le(a,b){var c=Me[b];void 0===c&&(c=new Int32Array(b),Me[b]=c);for(var d=0;d!==b;++d)c[d]=a.allocTextureUnit();return c}function ag(a,b){var c=this.cache;c[0]!==b&&(a.uniform1f(this.addr,b),c[0]=b)}function bg(a,b){var c=this.cache;c[0]!==b&&(a.uniform1i(this.addr,b),c[0]=b)}function cg(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y)a.uniform2f(this.addr,
+b.x,b.y),c[0]=b.x,c[1]=b.y}else ea(c,b)||(a.uniform2fv(this.addr,b),sa(c,b))}function dg(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y||c[2]!==b.z)a.uniform3f(this.addr,b.x,b.y,b.z),c[0]=b.x,c[1]=b.y,c[2]=b.z}else if(void 0!==b.r){if(c[0]!==b.r||c[1]!==b.g||c[2]!==b.b)a.uniform3f(this.addr,b.r,b.g,b.b),c[0]=b.r,c[1]=b.g,c[2]=b.b}else ea(c,b)||(a.uniform3fv(this.addr,b),sa(c,b))}function eg(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y||c[2]!==b.z||c[3]!==b.w)a.uniform4f(this.addr,
+b.x,b.y,b.z,b.w),c[0]=b.x,c[1]=b.y,c[2]=b.z,c[3]=b.w}else ea(c,b)||(a.uniform4fv(this.addr,b),sa(c,b))}function fg(a,b){var c=this.cache,d=b.elements;void 0===d?ea(c,b)||(a.uniformMatrix2fv(this.addr,!1,b),sa(c,b)):ea(c,d)||(Ne.set(d),a.uniformMatrix2fv(this.addr,!1,Ne),sa(c,d))}function gg(a,b){var c=this.cache,d=b.elements;void 0===d?ea(c,b)||(a.uniformMatrix3fv(this.addr,!1,b),sa(c,b)):ea(c,d)||(Oe.set(d),a.uniformMatrix3fv(this.addr,!1,Oe),sa(c,d))}function hg(a,b){var c=this.cache,d=b.elements;
+void 0===d?ea(c,b)||(a.uniformMatrix4fv(this.addr,!1,b),sa(c,b)):ea(c,d)||(Pe.set(d),a.uniformMatrix4fv(this.addr,!1,Pe),sa(c,d))}function ig(a,b,c){var d=this.cache,e=c.allocTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture2D(b||Qe,e)}function jg(a,b,c){var d=this.cache,e=c.allocTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture3D(b||kg,e)}function lg(a,b,c){var d=this.cache,e=c.allocTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTextureCube(b||
+Re,e)}function Se(a,b){var c=this.cache;ea(c,b)||(a.uniform2iv(this.addr,b),sa(c,b))}function Te(a,b){var c=this.cache;ea(c,b)||(a.uniform3iv(this.addr,b),sa(c,b))}function Ue(a,b){var c=this.cache;ea(c,b)||(a.uniform4iv(this.addr,b),sa(c,b))}function mg(a){switch(a){case 5126:return ag;case 35664:return cg;case 35665:return dg;case 35666:return eg;case 35674:return fg;case 35675:return gg;case 35676:return hg;case 35678:case 36198:return ig;case 35679:return jg;case 35680:return lg;case 5124:case 35670:return bg;
+case 35667:case 35671:return Se;case 35668:case 35672:return Te;case 35669:case 35673:return Ue}}function ng(a,b){var c=this.cache;ea(c,b)||(a.uniform1fv(this.addr,b),sa(c,b))}function og(a,b){var c=this.cache;ea(c,b)||(a.uniform1iv(this.addr,b),sa(c,b))}function pg(a,b){var c=this.cache;b=Nb(b,this.size,2);ea(c,b)||(a.uniform2fv(this.addr,b),this.updateCache(b))}function qg(a,b){var c=this.cache;b=Nb(b,this.size,3);ea(c,b)||(a.uniform3fv(this.addr,b),this.updateCache(b))}function rg(a,b){var c=this.cache;
+b=Nb(b,this.size,4);ea(c,b)||(a.uniform4fv(this.addr,b),this.updateCache(b))}function sg(a,b){var c=this.cache;b=Nb(b,this.size,4);ea(c,b)||(a.uniformMatrix2fv(this.addr,!1,b),this.updateCache(b))}function tg(a,b){var c=this.cache;b=Nb(b,this.size,9);ea(c,b)||(a.uniformMatrix3fv(this.addr,!1,b),this.updateCache(b))}function ug(a,b){var c=this.cache;b=Nb(b,this.size,16);ea(c,b)||(a.uniformMatrix4fv(this.addr,!1,b),this.updateCache(b))}function vg(a,b,c){var d=this.cache,e=b.length,f=Le(c,e);!1===ea(d,
+f)&&(a.uniform1iv(this.addr,f),sa(d,f));for(a=0;a!==e;++a)c.setTexture2D(b[a]||Qe,f[a])}function wg(a,b,c){var d=this.cache,e=b.length,f=Le(c,e);!1===ea(d,f)&&(a.uniform1iv(this.addr,f),sa(d,f));for(a=0;a!==e;++a)c.setTextureCube(b[a]||Re,f[a])}function xg(a){switch(a){case 5126:return ng;case 35664:return pg;case 35665:return qg;case 35666:return rg;case 35674:return sg;case 35675:return tg;case 35676:return ug;case 35678:return vg;case 35680:return wg;case 5124:case 35670:return og;case 35667:case 35671:return Se;
+case 35668:case 35672:return Te;case 35669:case 35673:return Ue}}function yg(a,b,c){this.id=a;this.addr=c;this.cache=[];this.setValue=mg(b.type)}function Ve(a,b,c){this.id=a;this.addr=c;this.cache=[];this.size=b.size;this.setValue=xg(b.type)}function We(a){this.id=a;this.seq=[];this.map={}}function db(a,b,c){this.seq=[];this.map={};this.renderer=c;c=a.getProgramParameter(b,35718);for(var d=0;d<c;++d){var e=a.getActiveUniform(b,d),f=a.getUniformLocation(b,e.name),g=this,h=e.name,k=h.length;for($d.lastIndex=
+0;;){var m=$d.exec(h),q=$d.lastIndex,n=m[1],r=m[3];"]"===m[2]&&(n|=0);if(void 0===r||"["===r&&q+2===k){h=g;e=void 0===r?new yg(n,e,f):new Ve(n,e,f);h.seq.push(e);h.map[e.id]=e;break}else r=g.map[n],void 0===r&&(r=new We(n),n=g,g=r,n.seq.push(g),n.map[g.id]=g),g=r}}}function zg(a){a=a.split("\n");for(var b=0;b<a.length;b++)a[b]=b+1+": "+a[b];return a.join("\n")}function Xe(a,b,c){var d=a.createShader(b);a.shaderSource(d,c);a.compileShader(d);!1===a.getShaderParameter(d,35713)&&console.error("THREE.WebGLShader: Shader couldn't compile.");
+""!==a.getShaderInfoLog(d)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",35633===b?"vertex":"fragment",a.getShaderInfoLog(d),zg(c));return d}function Ye(a){switch(a){case 3E3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw Error("unsupported encoding: "+
+a);}}function td(a,b){b=Ye(b);return"vec4 "+a+"( vec4 value ) { return "+b[0]+"ToLinear"+b[1]+"; }"}function Ag(a,b){b=Ye(b);return"vec4 "+a+"( vec4 value ) { return LinearTo"+b[0]+b[1]+"; }"}function Bg(a,b){switch(b){case 1:b="Linear";break;case 2:b="Reinhard";break;case 3:b="Uncharted2";break;case 4:b="OptimizedCineon";break;default:throw Error("unsupported toneMapping: "+b);}return"vec3 "+a+"( vec3 color ) { return "+b+"ToneMapping( color ); }"}function Cg(a,b,c){a=a||{};return[a.derivatives||
+b.envMapCubeUV||b.bumpMap||b.normalMap&&!b.objectSpaceNormalMap||b.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(a.fragDepth||b.logarithmicDepthBuffer)&&c.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",a.drawBuffers&&c.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(a.shaderTextureLOD||b.envMap)&&c.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(zc).join("\n")}function Dg(a){var b=[],c;for(c in a){var d=
+a[c];!1!==d&&b.push("#define "+c+" "+d)}return b.join("\n")}function zc(a){return""!==a}function Ze(a,b){return a.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,b.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,b.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights)}function $e(a,b){return a.replace(/NUM_CLIPPING_PLANES/g,b.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,b.numClippingPlanes-b.numClipIntersection)}function ae(a){return a.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,
+function(a,c){a=K[c];if(void 0===a)throw Error("Can not resolve #include <"+c+">");return ae(a)})}function af(a){return a.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,c,d,e){a="";for(c=parseInt(c);c<parseInt(d);c++)a+=e.replace(/\[ i \]/g,"[ "+c+" ]");return a})}function Eg(a,b,c,d,e,f,g){var h=a.context,k=d.defines,m=e.vertexShader,q=e.fragmentShader,n="SHADOWMAP_TYPE_BASIC";1===f.shadowMapType?n="SHADOWMAP_TYPE_PCF":2===f.shadowMapType&&
+(n="SHADOWMAP_TYPE_PCF_SOFT");var r="ENVMAP_TYPE_CUBE",x="ENVMAP_MODE_REFLECTION",l="ENVMAP_BLENDING_MULTIPLY";if(f.envMap){switch(d.envMap.mapping){case 301:case 302:r="ENVMAP_TYPE_CUBE";break;case 306:case 307:r="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:r="ENVMAP_TYPE_EQUIREC";break;case 305:r="ENVMAP_TYPE_SPHERE"}switch(d.envMap.mapping){case 302:case 304:x="ENVMAP_MODE_REFRACTION"}switch(d.combine){case 0:l="ENVMAP_BLENDING_MULTIPLY";break;case 1:l="ENVMAP_BLENDING_MIX";break;case 2:l="ENVMAP_BLENDING_ADD"}}var u=
+0<a.gammaFactor?a.gammaFactor:1,w=g.isWebGL2?"":Cg(d.extensions,f,b),p=Dg(k),v=h.createProgram();d.isRawShaderMaterial?(k=[p].filter(zc).join("\n"),0<k.length&&(k+="\n"),b=[w,p].filter(zc).join("\n"),0<b.length&&(b+="\n")):(k=["precision "+f.precision+" float;","precision "+f.precision+" int;","#define SHADER_NAME "+e.name,p,f.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+u,"#define MAX_BONES "+f.maxBones,f.useFog&&f.fog?"#define USE_FOG":"",f.useFog&&f.fogExp?"#define FOG_EXP2":
+"",f.map?"#define USE_MAP":"",f.envMap?"#define USE_ENVMAP":"",f.envMap?"#define "+x:"",f.lightMap?"#define USE_LIGHTMAP":"",f.aoMap?"#define USE_AOMAP":"",f.emissiveMap?"#define USE_EMISSIVEMAP":"",f.bumpMap?"#define USE_BUMPMAP":"",f.normalMap?"#define USE_NORMALMAP":"",f.normalMap&&f.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",f.displacementMap&&f.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",f.specularMap?"#define USE_SPECULARMAP":"",f.roughnessMap?"#define USE_ROUGHNESSMAP":
+"",f.metalnessMap?"#define USE_METALNESSMAP":"",f.alphaMap?"#define USE_ALPHAMAP":"",f.vertexColors?"#define USE_COLOR":"",f.flatShading?"#define FLAT_SHADED":"",f.skinning?"#define USE_SKINNING":"",f.useVertexTexture?"#define BONE_TEXTURE":"",f.morphTargets?"#define USE_MORPHTARGETS":"",f.morphNormals&&!1===f.flatShading?"#define USE_MORPHNORMALS":"",f.doubleSided?"#define DOUBLE_SIDED":"",f.flipSided?"#define FLIP_SIDED":"",f.shadowMapEnabled?"#define USE_SHADOWMAP":"",f.shadowMapEnabled?"#define "+
+n:"",f.sizeAttenuation?"#define USE_SIZEATTENUATION":"",f.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",f.logarithmicDepthBuffer&&(g.isWebGL2||b.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;",
+"#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif",
+"#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(zc).join("\n"),b=[w,"precision "+f.precision+" float;","precision "+f.precision+" int;","#define SHADER_NAME "+e.name,p,f.alphaTest?"#define ALPHATEST "+f.alphaTest+(f.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+u,f.useFog&&f.fog?"#define USE_FOG":"",f.useFog&&f.fogExp?"#define FOG_EXP2":"",f.map?"#define USE_MAP":"",f.envMap?"#define USE_ENVMAP":"",f.envMap?"#define "+r:"",f.envMap?"#define "+
+x:"",f.envMap?"#define "+l:"",f.lightMap?"#define USE_LIGHTMAP":"",f.aoMap?"#define USE_AOMAP":"",f.emissiveMap?"#define USE_EMISSIVEMAP":"",f.bumpMap?"#define USE_BUMPMAP":"",f.normalMap?"#define USE_NORMALMAP":"",f.normalMap&&f.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",f.specularMap?"#define USE_SPECULARMAP":"",f.roughnessMap?"#define USE_ROUGHNESSMAP":"",f.metalnessMap?"#define USE_METALNESSMAP":"",f.alphaMap?"#define USE_ALPHAMAP":"",f.vertexColors?"#define USE_COLOR":"",f.gradientMap?
+"#define USE_GRADIENTMAP":"",f.flatShading?"#define FLAT_SHADED":"",f.doubleSided?"#define DOUBLE_SIDED":"",f.flipSided?"#define FLIP_SIDED":"",f.shadowMapEnabled?"#define USE_SHADOWMAP":"",f.shadowMapEnabled?"#define "+n:"",f.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",f.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",f.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",f.logarithmicDepthBuffer&&(g.isWebGL2||b.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"",f.envMap&&
+(g.isWebGL2||b.get("EXT_shader_texture_lod"))?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",0!==f.toneMapping?"#define TONE_MAPPING":"",0!==f.toneMapping?K.tonemapping_pars_fragment:"",0!==f.toneMapping?Bg("toneMapping",f.toneMapping):"",f.dithering?"#define DITHERING":"",f.outputEncoding||f.mapEncoding||f.matcapEncoding||f.envMapEncoding||f.emissiveMapEncoding?K.encodings_pars_fragment:"",f.mapEncoding?td("mapTexelToLinear",f.mapEncoding):"",f.matcapEncoding?
+td("matcapTexelToLinear",f.matcapEncoding):"",f.envMapEncoding?td("envMapTexelToLinear",f.envMapEncoding):"",f.emissiveMapEncoding?td("emissiveMapTexelToLinear",f.emissiveMapEncoding):"",f.outputEncoding?Ag("linearToOutputTexel",f.outputEncoding):"",f.depthPacking?"#define DEPTH_PACKING "+d.depthPacking:"","\n"].filter(zc).join("\n"));m=ae(m);m=Ze(m,f);m=$e(m,f);q=ae(q);q=Ze(q,f);q=$e(q,f);m=af(m);q=af(q);g.isWebGL2&&!d.isRawShaderMaterial&&(g=!1,n=/^\s*#version\s+300\s+es\s*\n/,d.isShaderMaterial&&
+null!==m.match(n)&&null!==q.match(n)&&(g=!0,m=m.replace(n,""),q=q.replace(n,"")),k="#version 300 es\n\n#define attribute in\n#define varying out\n#define texture2D texture\n"+k,b=["#version 300 es\n\n#define varying in",g?"":"out highp vec4 pc_fragColor;",g?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+
+"\n"+b);q=b+q;m=Xe(h,35633,k+m);q=Xe(h,35632,q);h.attachShader(v,m);h.attachShader(v,q);void 0!==d.index0AttributeName?h.bindAttribLocation(v,0,d.index0AttributeName):!0===f.morphTargets&&h.bindAttribLocation(v,0,"position");h.linkProgram(v);f=h.getProgramInfoLog(v).trim();g=h.getShaderInfoLog(m).trim();n=h.getShaderInfoLog(q).trim();x=r=!0;if(!1===h.getProgramParameter(v,35714))r=!1,console.error("THREE.WebGLProgram: shader error: ",h.getError(),"35715",h.getProgramParameter(v,35715),"gl.getProgramInfoLog",
+f,g,n);else if(""!==f)console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",f);else if(""===g||""===n)x=!1;x&&(this.diagnostics={runnable:r,material:d,programLog:f,vertexShader:{log:g,prefix:k},fragmentShader:{log:n,prefix:b}});h.deleteShader(m);h.deleteShader(q);var H;this.getUniforms=function(){void 0===H&&(H=new db(h,v,a));return H};var y;this.getAttributes=function(){if(void 0===y){for(var a={},b=h.getProgramParameter(v,35721),c=0;c<b;c++){var d=h.getActiveAttrib(v,c).name;a[d]=h.getAttribLocation(v,
+d)}y=a}return y};this.destroy=function(){h.deleteProgram(v);this.program=void 0};Object.defineProperties(this,{uniforms:{get:function(){console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms().");return this.getUniforms()}},attributes:{get:function(){console.warn("THREE.WebGLProgram: .attributes is now .getAttributes().");return this.getAttributes()}}});this.name=e.name;this.id=Fg++;this.code=c;this.usedTimes=1;this.program=v;this.vertexShader=m;this.fragmentShader=q;return this}function Gg(a,
+b,c){function d(a,b){if(a)a.isTexture?c=a.encoding:a.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),c=a.texture.encoding);else var c=3E3;3E3===c&&b&&(c=3007);return c}var e=[],f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",
+MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},g="precision supportsVertexTextures map mapEncoding matcapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap objectSpaceNormalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering".split(" ");
+this.getParameters=function(b,e,g,q,n,r,x){var h=f[b.type];if(x.isSkinnedMesh){var k=x.skeleton.bones;if(c.floatVertexTextures)k=1024;else{var m=Math.min(Math.floor((c.maxVertexUniforms-20)/4),k.length);m<k.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+k.length+" bones. This GPU supports "+m+"."),k=0):k=m}}else k=0;m=c.precision;null!==b.precision&&(m=c.getMaxPrecision(b.precision),m!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",m,"instead."));
+var l=a.getRenderTarget();return{shaderID:h,precision:m,supportsVertexTextures:c.vertexTextures,outputEncoding:d(l?l.texture:null,a.gammaOutput),map:!!b.map,mapEncoding:d(b.map,a.gammaInput),matcap:!!b.matcap,matcapEncoding:d(b.matcap,a.gammaInput),envMap:!!b.envMap,envMapMode:b.envMap&&b.envMap.mapping,envMapEncoding:d(b.envMap,a.gammaInput),envMapCubeUV:!!b.envMap&&(306===b.envMap.mapping||307===b.envMap.mapping),lightMap:!!b.lightMap,aoMap:!!b.aoMap,emissiveMap:!!b.emissiveMap,emissiveMapEncoding:d(b.emissiveMap,
+a.gammaInput),bumpMap:!!b.bumpMap,normalMap:!!b.normalMap,objectSpaceNormalMap:1===b.normalMapType,displacementMap:!!b.displacementMap,roughnessMap:!!b.roughnessMap,metalnessMap:!!b.metalnessMap,specularMap:!!b.specularMap,alphaMap:!!b.alphaMap,gradientMap:!!b.gradientMap,combine:b.combine,vertexColors:b.vertexColors,fog:!!q,useFog:b.fog,fogExp:q&&q.isFogExp2,flatShading:b.flatShading,sizeAttenuation:b.sizeAttenuation,logarithmicDepthBuffer:c.logarithmicDepthBuffer,skinning:b.skinning&&0<k,maxBones:k,
+useVertexTexture:c.floatVertexTextures,morphTargets:b.morphTargets,morphNormals:b.morphNormals,maxMorphTargets:a.maxMorphTargets,maxMorphNormals:a.maxMorphNormals,numDirLights:e.directional.length,numPointLights:e.point.length,numSpotLights:e.spot.length,numRectAreaLights:e.rectArea.length,numHemiLights:e.hemi.length,numClippingPlanes:n,numClipIntersection:r,dithering:b.dithering,shadowMapEnabled:a.shadowMap.enabled&&x.receiveShadow&&0<g.length,shadowMapType:a.shadowMap.type,toneMapping:a.toneMapping,
+physicallyCorrectLights:a.physicallyCorrectLights,premultipliedAlpha:b.premultipliedAlpha,alphaTest:b.alphaTest,doubleSided:2===b.side,flipSided:1===b.side,depthPacking:void 0!==b.depthPacking?b.depthPacking:!1}};this.getProgramCode=function(b,c){var d=[];c.shaderID?d.push(c.shaderID):(d.push(b.fragmentShader),d.push(b.vertexShader));if(void 0!==b.defines)for(var e in b.defines)d.push(e),d.push(b.defines[e]);for(e=0;e<g.length;e++)d.push(c[g[e]]);d.push(b.onBeforeCompile.toString());d.push(a.gammaOutput);
+d.push(a.gammaFactor);return d.join()};this.acquireProgram=function(d,f,g,q){for(var h,k=0,m=e.length;k<m;k++){var l=e[k];if(l.code===q){h=l;++h.usedTimes;break}}void 0===h&&(h=new Eg(a,b,q,d,f,g,c),e.push(h));return h};this.releaseProgram=function(a){if(0===--a.usedTimes){var b=e.indexOf(a);e[b]=e[e.length-1];e.pop();a.destroy()}};this.programs=e}function Hg(){var a=new WeakMap;return{get:function(b){var c=a.get(b);void 0===c&&(c={},a.set(b,c));return c},remove:function(b){a.delete(b)},update:function(b,
+c,d){a.get(b)[c]=d},dispose:function(){a=new WeakMap}}}function Ig(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.program&&b.program&&a.program!==b.program?a.program.id-b.program.id:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function Jg(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function Kg(){var a=[],b=0,c=[],d=[];return{opaque:c,transparent:d,init:function(){b=0;c.length=0;
+d.length=0},push:function(e,f,g,h,k){var m=a[b];void 0===m?(m={id:e.id,object:e,geometry:f,material:g,program:g.program,renderOrder:e.renderOrder,z:h,group:k},a[b]=m):(m.id=e.id,m.object=e,m.geometry=f,m.material=g,m.program=g.program,m.renderOrder=e.renderOrder,m.z=h,m.group=k);(!0===g.transparent?d:c).push(m);b++},sort:function(){1<c.length&&c.sort(Ig);1<d.length&&d.sort(Jg)}}}function Lg(){var a={};return{get:function(b,c){b=b.id+","+c.id;c=a[b];void 0===c&&(c=new Kg,a[b]=c);return c},dispose:function(){a=
+{}}}}function Mg(){var a={};return{get:function(b){if(void 0!==a[b.id])return a[b.id];switch(b.type){case "DirectionalLight":var c={direction:new p,color:new G,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new z};break;case "SpotLight":c={position:new p,direction:new p,color:new G,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new z};break;case "PointLight":c={position:new p,color:new G,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,
+shadowMapSize:new z,shadowCameraNear:1,shadowCameraFar:1E3};break;case "HemisphereLight":c={direction:new p,skyColor:new G,groundColor:new G};break;case "RectAreaLight":c={color:new G,position:new p,halfWidth:new p,halfHeight:new p}}return a[b.id]=c}}}function Ng(){var a=new Mg,b={id:Og++,hash:{stateID:-1,directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,shadowsLength:-1},ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],
+spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},c=new p,d=new P,e=new P;return{setup:function(f,g,h){var k=0,m=0,q=0,n=0,r=0,x=0,l=0,u=0;h=h.matrixWorldInverse;for(var w=0,p=f.length;w<p;w++){var v=f[w],H=v.color,y=v.intensity,N=v.distance,X=v.shadow&&v.shadow.map?v.shadow.map.texture:null;if(v.isAmbientLight)k+=H.r*y,m+=H.g*y,q+=H.b*y;else if(v.isDirectionalLight){var B=a.get(v);B.color.copy(v.color).multiplyScalar(v.intensity);B.direction.setFromMatrixPosition(v.matrixWorld);
+c.setFromMatrixPosition(v.target.matrixWorld);B.direction.sub(c);B.direction.transformDirection(h);if(B.shadow=v.castShadow)H=v.shadow,B.shadowBias=H.bias,B.shadowRadius=H.radius,B.shadowMapSize=H.mapSize;b.directionalShadowMap[n]=X;b.directionalShadowMatrix[n]=v.shadow.matrix;b.directional[n]=B;n++}else if(v.isSpotLight){B=a.get(v);B.position.setFromMatrixPosition(v.matrixWorld);B.position.applyMatrix4(h);B.color.copy(H).multiplyScalar(y);B.distance=N;B.direction.setFromMatrixPosition(v.matrixWorld);
+c.setFromMatrixPosition(v.target.matrixWorld);B.direction.sub(c);B.direction.transformDirection(h);B.coneCos=Math.cos(v.angle);B.penumbraCos=Math.cos(v.angle*(1-v.penumbra));B.decay=v.decay;if(B.shadow=v.castShadow)H=v.shadow,B.shadowBias=H.bias,B.shadowRadius=H.radius,B.shadowMapSize=H.mapSize;b.spotShadowMap[x]=X;b.spotShadowMatrix[x]=v.shadow.matrix;b.spot[x]=B;x++}else if(v.isRectAreaLight)B=a.get(v),B.color.copy(H).multiplyScalar(y),B.position.setFromMatrixPosition(v.matrixWorld),B.position.applyMatrix4(h),
+e.identity(),d.copy(v.matrixWorld),d.premultiply(h),e.extractRotation(d),B.halfWidth.set(.5*v.width,0,0),B.halfHeight.set(0,.5*v.height,0),B.halfWidth.applyMatrix4(e),B.halfHeight.applyMatrix4(e),b.rectArea[l]=B,l++;else if(v.isPointLight){B=a.get(v);B.position.setFromMatrixPosition(v.matrixWorld);B.position.applyMatrix4(h);B.color.copy(v.color).multiplyScalar(v.intensity);B.distance=v.distance;B.decay=v.decay;if(B.shadow=v.castShadow)H=v.shadow,B.shadowBias=H.bias,B.shadowRadius=H.radius,B.shadowMapSize=
+H.mapSize,B.shadowCameraNear=H.camera.near,B.shadowCameraFar=H.camera.far;b.pointShadowMap[r]=X;b.pointShadowMatrix[r]=v.shadow.matrix;b.point[r]=B;r++}else v.isHemisphereLight&&(B=a.get(v),B.direction.setFromMatrixPosition(v.matrixWorld),B.direction.transformDirection(h),B.direction.normalize(),B.skyColor.copy(v.color).multiplyScalar(y),B.groundColor.copy(v.groundColor).multiplyScalar(y),b.hemi[u]=B,u++)}b.ambient[0]=k;b.ambient[1]=m;b.ambient[2]=q;b.directional.length=n;b.spot.length=x;b.rectArea.length=
+l;b.point.length=r;b.hemi.length=u;b.hash.stateID=b.id;b.hash.directionalLength=n;b.hash.pointLength=r;b.hash.spotLength=x;b.hash.rectAreaLength=l;b.hash.hemiLength=u;b.hash.shadowsLength=g.length},state:b}}function bf(){var a=new Ng,b=[],c=[];return{init:function(){b.length=0;c.length=0},state:{lightsArray:b,shadowsArray:c,lights:a},setupLights:function(d){a.setup(b,c,d)},pushLight:function(a){b.push(a)},pushShadow:function(a){c.push(a)}}}function Pg(){var a={};return{get:function(b,c){if(void 0===
+a[b.id]){var d=new bf;a[b.id]={};a[b.id][c.id]=d}else void 0===a[b.id][c.id]?(d=new bf,a[b.id][c.id]=d):d=a[b.id][c.id];return d},dispose:function(){a={}}}}function eb(a){L.call(this);this.type="MeshDepthMaterial";this.depthPacking=3200;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.lights=this.fog=!1;this.setValues(a)}function fb(a){L.call(this);this.type="MeshDistanceMaterial";
+this.referencePosition=new p;this.nearDistance=1;this.farDistance=1E3;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.lights=this.fog=!1;this.setValues(a)}function cf(a,b,c){function d(b,c,d,e,f,g){var h=b.geometry;var k=n;var m=b.customDepthMaterial;d&&(k=r,m=b.customDistanceMaterial);m?k=m:(m=!1,c.morphTargets&&(h&&h.isBufferGeometry?m=h.morphAttributes&&h.morphAttributes.position&&0<h.morphAttributes.position.length:
+h&&h.isGeometry&&(m=h.morphTargets&&0<h.morphTargets.length)),b.isSkinnedMesh&&!1===c.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",b),b=b.isSkinnedMesh&&c.skinning,h=0,m&&(h|=1),b&&(h|=2),k=k[h]);a.localClippingEnabled&&!0===c.clipShadows&&0!==c.clippingPlanes.length&&(h=k.uuid,m=c.uuid,b=x[h],void 0===b&&(b={},x[h]=b),h=b[m],void 0===h&&(h=k.clone(),b[m]=h),k=h);k.visible=c.visible;k.wireframe=c.wireframe;k.side=null!=c.shadowSide?c.shadowSide:
+l[c.side];k.clipShadows=c.clipShadows;k.clippingPlanes=c.clippingPlanes;k.clipIntersection=c.clipIntersection;k.wireframeLinewidth=c.wireframeLinewidth;k.linewidth=c.linewidth;d&&k.isMeshDistanceMaterial&&(k.referencePosition.copy(e),k.nearDistance=f,k.farDistance=g);return k}function e(c,g,h,k){if(!1!==c.visible){if(c.layers.test(g.layers)&&(c.isMesh||c.isLine||c.isPoints)&&c.castShadow&&(!c.frustumCulled||f.intersectsObject(c))){c.modelViewMatrix.multiplyMatrices(h.matrixWorldInverse,c.matrixWorld);
+var m=b.update(c),n=c.material;if(Array.isArray(n))for(var r=m.groups,x=0,l=r.length;x<l;x++){var t=r[x],u=n[t.materialIndex];u&&u.visible&&(u=d(c,u,k,q,h.near,h.far),a.renderBufferDirect(h,null,m,u,c,t))}else n.visible&&(u=d(c,n,k,q,h.near,h.far),a.renderBufferDirect(h,null,m,u,c,null))}c=c.children;m=0;for(n=c.length;m<n;m++)e(c[m],g,h,k)}}var f=new rd,g=new P,h=new z,k=new z(c,c),m=new p,q=new p,n=Array(4),r=Array(4),x={},l={0:1,1:0,2:2},u=[new p(1,0,0),new p(-1,0,0),new p(0,0,1),new p(0,0,-1),
+new p(0,1,0),new p(0,-1,0)],w=[new p(0,1,0),new p(0,1,0),new p(0,1,0),new p(0,1,0),new p(0,0,1),new p(0,0,-1)],A=[new Z,new Z,new Z,new Z,new Z,new Z];for(c=0;4!==c;++c){var v=0!==(c&1),H=0!==(c&2),y=new eb({depthPacking:3201,morphTargets:v,skinning:H});n[c]=y;v=new fb({morphTargets:v,skinning:H});r[c]=v}var N=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(b,c,d){if(!1!==N.enabled&&(!1!==N.autoUpdate||!1!==N.needsUpdate)&&0!==b.length){var n=a.state;n.disable(3042);
+n.buffers.color.setClear(1,1,1,1);n.buffers.depth.setTest(!0);n.setScissorTest(!1);for(var r,x=0,l=b.length;x<l;x++){var t=b[x];r=t.shadow;var X=t&&t.isPointLight;if(void 0===r)console.warn("THREE.WebGLShadowMap:",t,"has no shadow.");else{var B=r.camera;h.copy(r.mapSize);h.min(k);if(X){var p=h.x,v=h.y;A[0].set(2*p,v,p,v);A[1].set(0,v,p,v);A[2].set(3*p,v,p,v);A[3].set(p,v,p,v);A[4].set(3*p,0,p,v);A[5].set(p,0,p,v);h.x*=4;h.y*=2}null===r.map&&(r.map=new kb(h.x,h.y,{minFilter:1003,magFilter:1003,format:1023}),
+r.map.texture.name=t.name+".shadowMap",B.updateProjectionMatrix());r.isSpotLightShadow&&r.update(t);p=r.map;v=r.matrix;q.setFromMatrixPosition(t.matrixWorld);B.position.copy(q);X?(r=6,v.makeTranslation(-q.x,-q.y,-q.z)):(r=1,m.setFromMatrixPosition(t.target.matrixWorld),B.lookAt(m),B.updateMatrixWorld(),v.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),v.multiply(B.projectionMatrix),v.multiply(B.matrixWorldInverse));a.setRenderTarget(p);a.clear();for(t=0;t<r;t++)X&&(m.copy(B.position),m.add(u[t]),B.up.copy(w[t]),
+B.lookAt(m),B.updateMatrixWorld(),n.viewport(A[t])),g.multiplyMatrices(B.projectionMatrix,B.matrixWorldInverse),f.setFromMatrix(g),e(c,d,B,X)}}N.needsUpdate=!1}}}function Qg(a,b,c,d){function e(b,c,d){var e=new Uint8Array(4),f=a.createTexture();a.bindTexture(b,f);a.texParameteri(b,10241,9728);a.texParameteri(b,10240,9728);for(b=0;b<d;b++)a.texImage2D(c+b,0,6408,1,1,0,6408,5121,e);return f}function f(c,e){p[c]=1;0===v[c]&&(a.enableVertexAttribArray(c),v[c]=1);H[c]!==e&&((d.isWebGL2?a:b.get("ANGLE_instanced_arrays"))[d.isWebGL2?
+"vertexAttribDivisor":"vertexAttribDivisorANGLE"](c,e),H[c]=e)}function g(b){!0!==y[b]&&(a.enable(b),y[b]=!0)}function h(b){!1!==y[b]&&(a.disable(b),y[b]=!1)}function k(b,d,e,f,k,m,n,q){if(0===b)B&&(h(3042),B=!1);else if(B||(g(3042),B=!0),5!==b){if(b!==Lb||q!==J){if(100!==z||100!==C)a.blendEquation(32774),C=z=100;if(q)switch(b){case 1:a.blendFuncSeparate(1,771,1,771);break;case 2:a.blendFunc(1,1);break;case 3:a.blendFuncSeparate(0,0,769,771);break;case 4:a.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",
+b)}else switch(b){case 1:a.blendFuncSeparate(770,771,1,771);break;case 2:a.blendFunc(770,1);break;case 3:a.blendFunc(0,769);break;case 4:a.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",b)}E=D=Y=Zd=null;Lb=b;J=q}}else{k=k||d;m=m||e;n=n||f;if(d!==z||k!==C)a.blendEquationSeparate(c.convert(d),c.convert(k)),z=d,C=k;if(e!==Zd||f!==Y||m!==D||n!==E)a.blendFuncSeparate(c.convert(e),c.convert(f),c.convert(m),c.convert(n)),Zd=e,Y=f,D=m,E=n;Lb=b;J=null}}function m(b){G!==
+b&&(b?a.frontFace(2304):a.frontFace(2305),G=b)}function q(b){0!==b?(g(2884),b!==Q&&(1===b?a.cullFace(1029):2===b?a.cullFace(1028):a.cullFace(1032))):h(2884);Q=b}function n(b,c,d){if(b){if(g(32823),I!==c||L!==d)a.polygonOffset(c,d),I=c,L=d}else h(32823)}function r(b){void 0===b&&(b=33984+R-1);K!==b&&(a.activeTexture(b),K=b)}var x=new function(){var b=!1,c=new Z,d=null,e=new Z(0,0,0,0);return{setMask:function(c){d===c||b||(a.colorMask(c,c,c,c),d=c)},setLocked:function(a){b=a},setClear:function(b,d,
+f,g,h){!0===h&&(b*=g,d*=g,f*=g);c.set(b,d,f,g);!1===e.equals(c)&&(a.clearColor(b,d,f,g),e.copy(c))},reset:function(){b=!1;d=null;e.set(-1,0,0,0)}}},l=new function(){var b=!1,c=null,d=null,e=null;return{setTest:function(a){a?g(2929):h(2929)},setMask:function(d){c===d||b||(a.depthMask(d),c=d)},setFunc:function(b){if(d!==b){if(b)switch(b){case 0:a.depthFunc(512);break;case 1:a.depthFunc(519);break;case 2:a.depthFunc(513);break;case 3:a.depthFunc(515);break;case 4:a.depthFunc(514);break;case 5:a.depthFunc(518);
+break;case 6:a.depthFunc(516);break;case 7:a.depthFunc(517);break;default:a.depthFunc(515)}else a.depthFunc(515);d=b}},setLocked:function(a){b=a},setClear:function(b){e!==b&&(a.clearDepth(b),e=b)},reset:function(){b=!1;e=d=c=null}}},u=new function(){var b=!1,c=null,d=null,e=null,f=null,k=null,m=null,n=null,q=null;return{setTest:function(a){a?g(2960):h(2960)},setMask:function(d){c===d||b||(a.stencilMask(d),c=d)},setFunc:function(b,c,g){if(d!==b||e!==c||f!==g)a.stencilFunc(b,c,g),d=b,e=c,f=g},setOp:function(b,
+c,d){if(k!==b||m!==c||n!==d)a.stencilOp(b,c,d),k=b,m=c,n=d},setLocked:function(a){b=a},setClear:function(b){q!==b&&(a.clearStencil(b),q=b)},reset:function(){b=!1;q=n=m=k=f=e=d=c=null}}},w=a.getParameter(34921),p=new Uint8Array(w),v=new Uint8Array(w),H=new Uint8Array(w),y={},N=null,X=null,B=null,Lb=null,z=null,Zd=null,Y=null,C=null,D=null,E=null,J=!1,G=null,Q=null,P=null,I=null,L=null,R=a.getParameter(35661),F=!1;w=0;w=a.getParameter(7938);-1!==w.indexOf("WebGL")?(w=parseFloat(/^WebGL ([0-9])/.exec(w)[1]),
+F=1<=w):-1!==w.indexOf("OpenGL ES")&&(w=parseFloat(/^OpenGL ES ([0-9])/.exec(w)[1]),F=2<=w);var K=null,T={},W=new Z,M=new Z,U={};U[3553]=e(3553,3553,1);U[34067]=e(34067,34069,6);x.setClear(0,0,0,1);l.setClear(1);u.setClear(0);g(2929);l.setFunc(3);m(!1);q(1);g(2884);k(0);return{buffers:{color:x,depth:l,stencil:u},initAttributes:function(){for(var a=0,b=p.length;a<b;a++)p[a]=0},enableAttribute:function(a){f(a,0)},enableAttributeAndDivisor:f,disableUnusedAttributes:function(){for(var b=0,c=v.length;b!==
+c;++b)v[b]!==p[b]&&(a.disableVertexAttribArray(b),v[b]=0)},enable:g,disable:h,getCompressedTextureFormats:function(){if(null===N&&(N=[],b.get("WEBGL_compressed_texture_pvrtc")||b.get("WEBGL_compressed_texture_s3tc")||b.get("WEBGL_compressed_texture_etc1")||b.get("WEBGL_compressed_texture_astc")))for(var c=a.getParameter(34467),d=0;d<c.length;d++)N.push(c[d]);return N},useProgram:function(b){return X!==b?(a.useProgram(b),X=b,!0):!1},setBlending:k,setMaterial:function(a,b){2===a.side?h(2884):g(2884);
+var c=1===a.side;b&&(c=!c);m(c);1===a.blending&&!1===a.transparent?k(0):k(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha,a.premultipliedAlpha);l.setFunc(a.depthFunc);l.setTest(a.depthTest);l.setMask(a.depthWrite);x.setMask(a.colorWrite);n(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)},setFlipSided:m,setCullFace:q,setLineWidth:function(b){b!==P&&(F&&a.lineWidth(b),P=b)},setPolygonOffset:n,setScissorTest:function(a){a?g(3089):h(3089)},
+activeTexture:r,bindTexture:function(b,c){null===K&&r();var d=T[K];void 0===d&&(d={type:void 0,texture:void 0},T[K]=d);if(d.type!==b||d.texture!==c)a.bindTexture(b,c||U[b]),d.type=b,d.texture=c},compressedTexImage2D:function(){try{a.compressedTexImage2D.apply(a,arguments)}catch(fa){console.error("THREE.WebGLState:",fa)}},texImage2D:function(){try{a.texImage2D.apply(a,arguments)}catch(fa){console.error("THREE.WebGLState:",fa)}},texImage3D:function(){try{a.texImage3D.apply(a,arguments)}catch(fa){console.error("THREE.WebGLState:",
+fa)}},scissor:function(b){!1===W.equals(b)&&(a.scissor(b.x,b.y,b.z,b.w),W.copy(b))},viewport:function(b){!1===M.equals(b)&&(a.viewport(b.x,b.y,b.z,b.w),M.copy(b))},reset:function(){for(var b=0;b<v.length;b++)1===v[b]&&(a.disableVertexAttribArray(b),v[b]=0);y={};K=N=null;T={};Q=G=Lb=X=null;x.reset();l.reset();u.reset()}}}function Rg(a,b,c,d,e,f,g){function h(a,b){if(a.width>b||a.height>b){if("data"in a){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+a.width+"x"+a.height+").");
+return}b/=Math.max(a.width,a.height);var c=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");c.width=Math.floor(a.width*b);c.height=Math.floor(a.height*b);c.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,c.width,c.height);console.warn("THREE.WebGLRenderer: image is too big ("+a.width+"x"+a.height+"). Resized to "+c.width+"x"+c.height);return c}return a}function k(a){return R.isPowerOfTwo(a.width)&&R.isPowerOfTwo(a.height)}function m(a,b){return a.generateMipmaps&&b&&1003!==
+a.minFilter&&1006!==a.minFilter}function q(b,c,e,f){a.generateMipmap(b);d.get(c).__maxMipLevel=Math.log(Math.max(e,f))*Math.LOG2E}function n(a,b){if(!e.isWebGL2)return a;if(6403===a){if(5126===b)return 33326;if(5131===b)return 33325;if(5121===b)return 33321}if(6407===a){if(5126===b)return 34837;if(5131===b)return 34843;if(5121===b)return 32849}if(6408===a){if(5126===b)return 34836;if(5131===b)return 34842;if(5121===b)return 32856}return a}function r(a){return 1003===a||1004===a||1005===a?9728:9729}
+function x(b){b=b.target;b.removeEventListener("dispose",x);a:{var c=d.get(b);if(b.image&&c.__image__webglTextureCube)a.deleteTexture(c.__image__webglTextureCube);else{if(void 0===c.__webglInit)break a;a.deleteTexture(c.__webglTexture)}d.remove(b)}b.isVideoTexture&&delete y[b.id];g.memory.textures--}function l(b){b=b.target;b.removeEventListener("dispose",l);var c=d.get(b),e=d.get(b.texture);if(b){void 0!==e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();
+if(b.isWebGLRenderTargetCube)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);d.remove(b.texture);d.remove(b)}g.memory.textures--}function u(a,b){var e=d.get(a);if(a.isVideoTexture){var f=a.id,h=g.render.frame;y[f]!==h&&(y[f]=h,a.update())}if(0<a.version&&e.__version!==a.version)if(f=a.image,void 0===f)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");
+else if(!1===f.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{A(e,a,b);return}c.activeTexture(33984+b);c.bindTexture(3553,e.__webglTexture)}function p(c,g,h){h?(a.texParameteri(c,10242,f.convert(g.wrapS)),a.texParameteri(c,10243,f.convert(g.wrapT)),a.texParameteri(c,10240,f.convert(g.magFilter)),a.texParameteri(c,10241,f.convert(g.minFilter))):(a.texParameteri(c,10242,33071),a.texParameteri(c,10243,33071),1001===g.wrapS&&1001===g.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),
+a.texParameteri(c,10240,r(g.magFilter)),a.texParameteri(c,10241,r(g.minFilter)),1003!==g.minFilter&&1006!==g.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter."));!(h=b.get("EXT_texture_filter_anisotropic"))||1015===g.type&&null===b.get("OES_texture_float_linear")||1016===g.type&&null===(e.isWebGL2||b.get("OES_texture_half_float_linear"))||!(1<g.anisotropy||d.get(g).__currentAnisotropy)||(a.texParameterf(c,
+h.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(g.anisotropy,e.getMaxAnisotropy())),d.get(g).__currentAnisotropy=g.anisotropy)}function A(b,d,r){var l=d.isDataTexture3D?32879:3553;void 0===b.__webglInit&&(b.__webglInit=!0,d.addEventListener("dispose",x),b.__webglTexture=a.createTexture(),g.memory.textures++);c.activeTexture(33984+r);c.bindTexture(l,b.__webglTexture);a.pixelStorei(37440,d.flipY);a.pixelStorei(37441,d.premultiplyAlpha);a.pixelStorei(3317,d.unpackAlignment);r=h(d.image,e.maxTextureSize);var t=
+e.isWebGL2?!1:1001!==d.wrapS||1001!==d.wrapT||1003!==d.minFilter&&1006!==d.minFilter;t&&!1===k(r)&&(r instanceof HTMLImageElement||r instanceof HTMLCanvasElement||r instanceof ImageBitmap)&&(void 0===N&&(N=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),N.width=R.floorPowerOfTwo(r.width),N.height=R.floorPowerOfTwo(r.height),N.getContext("2d").drawImage(r,0,0,N.width,N.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+r.width+"x"+r.height+"). Resized to "+N.width+
+"x"+N.height),r=N);t=k(r);var u=f.convert(d.format),w=f.convert(d.type),v=n(u,w);p(l,d,t);var X=d.mipmaps;if(d.isDepthTexture){v=6402;if(1015===d.type){if(!e.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");v=36012}else e.isWebGL2&&(v=33189);1026===d.format&&6402===v&&1012!==d.type&&1014!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),d.type=1012,w=f.convert(d.type));1027===d.format&&(v=34041,1020!==d.type&&
+(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),d.type=1020,w=f.convert(d.type)));c.texImage2D(3553,0,v,r.width,r.height,0,u,w,null)}else if(d.isDataTexture)if(0<X.length&&t){for(var B=0,y=X.length;B<y;B++)l=X[B],c.texImage2D(3553,B,v,l.width,l.height,0,u,w,l.data);d.generateMipmaps=!1;b.__maxMipLevel=X.length-1}else c.texImage2D(3553,0,v,r.width,r.height,0,u,w,r.data),b.__maxMipLevel=0;else if(d.isCompressedTexture){B=0;for(y=X.length;B<y;B++)l=X[B],
+1023!==d.format&&1022!==d.format?-1<c.getCompressedTextureFormats().indexOf(u)?c.compressedTexImage2D(3553,B,v,l.width,l.height,0,l.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):c.texImage2D(3553,B,v,l.width,l.height,0,u,w,l.data);b.__maxMipLevel=X.length-1}else if(d.isDataTexture3D)c.texImage3D(32879,0,v,r.width,r.height,r.depth,0,u,w,r.data),b.__maxMipLevel=0;else if(0<X.length&&t){B=0;for(y=X.length;B<y;B++)l=X[B],c.texImage2D(3553,
+B,v,u,w,l);d.generateMipmaps=!1;b.__maxMipLevel=X.length-1}else c.texImage2D(3553,0,v,u,w,r),b.__maxMipLevel=0;m(d,t)&&q(3553,d,r.width,r.height);b.__version=d.version;if(d.onUpdate)d.onUpdate(d)}function v(b,e,g,h){var k=f.convert(e.texture.format),m=f.convert(e.texture.type),q=n(k,m);c.texImage2D(h,0,q,e.width,e.height,0,k,m,null);a.bindFramebuffer(36160,b);a.framebufferTexture2D(36160,g,h,d.get(e.texture).__webglTexture,0);a.bindFramebuffer(36160,null)}function H(b,c){a.bindRenderbuffer(36161,
+b);c.depthBuffer&&!c.stencilBuffer?(a.renderbufferStorage(36161,33189,c.width,c.height),a.framebufferRenderbuffer(36160,36096,36161,b)):c.depthBuffer&&c.stencilBuffer?(a.renderbufferStorage(36161,34041,c.width,c.height),a.framebufferRenderbuffer(36160,33306,36161,b)):a.renderbufferStorage(36161,32854,c.width,c.height);a.bindRenderbuffer(36161,null)}var y={},N;this.setTexture2D=u;this.setTexture3D=function(a,b){var e=d.get(a);0<a.version&&e.__version!==a.version?A(e,a,b):(c.activeTexture(33984+b),
+c.bindTexture(32879,e.__webglTexture))};this.setTextureCube=function(b,r){var l=d.get(b);if(6===b.image.length)if(0<b.version&&l.__version!==b.version){l.__image__webglTextureCube||(b.addEventListener("dispose",x),l.__image__webglTextureCube=a.createTexture(),g.memory.textures++);c.activeTexture(33984+r);c.bindTexture(34067,l.__image__webglTextureCube);a.pixelStorei(37440,b.flipY);r=b&&b.isCompressedTexture;for(var t=b.image[0]&&b.image[0].isDataTexture,u=[],w=0;6>w;w++)u[w]=r||t?t?b.image[w].image:
+b.image[w]:h(b.image[w],e.maxCubemapSize);var v=u[0],X=k(v),B=f.convert(b.format),y=f.convert(b.type),H=n(B,y);p(34067,b,X);for(w=0;6>w;w++)if(r)for(var A,N=u[w].mipmaps,z=0,C=N.length;z<C;z++)A=N[z],1023!==b.format&&1022!==b.format?-1<c.getCompressedTextureFormats().indexOf(B)?c.compressedTexImage2D(34069+w,z,H,A.width,A.height,0,A.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):c.texImage2D(34069+w,z,H,A.width,A.height,0,B,y,
+A.data);else t?c.texImage2D(34069+w,0,H,u[w].width,u[w].height,0,B,y,u[w].data):c.texImage2D(34069+w,0,H,B,y,u[w]);l.__maxMipLevel=r?N.length-1:0;m(b,X)&&q(34067,b,v.width,v.height);l.__version=b.version;if(b.onUpdate)b.onUpdate(b)}else c.activeTexture(33984+r),c.bindTexture(34067,l.__image__webglTextureCube)};this.setTextureCubeDynamic=function(a,b){c.activeTexture(33984+b);c.bindTexture(34067,d.get(a).__webglTexture)};this.setupRenderTarget=function(b){var e=d.get(b),f=d.get(b.texture);b.addEventListener("dispose",
+l);f.__webglTexture=a.createTexture();g.memory.textures++;var h=!0===b.isWebGLRenderTargetCube,n=k(b);if(h){e.__webglFramebuffer=[];for(var r=0;6>r;r++)e.__webglFramebuffer[r]=a.createFramebuffer()}else e.__webglFramebuffer=a.createFramebuffer();if(h){c.bindTexture(34067,f.__webglTexture);p(34067,b.texture,n);for(r=0;6>r;r++)v(e.__webglFramebuffer[r],b,36064,34069+r);m(b.texture,n)&&q(34067,b.texture,b.width,b.height);c.bindTexture(34067,null)}else c.bindTexture(3553,f.__webglTexture),p(3553,b.texture,
+n),v(e.__webglFramebuffer,b,36064,3553),m(b.texture,n)&&q(3553,b.texture,b.width,b.height),c.bindTexture(3553,null);if(b.depthBuffer){e=d.get(b);f=!0===b.isWebGLRenderTargetCube;if(b.depthTexture){if(f)throw Error("target.depthTexture not supported in Cube render targets");if(b&&b.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");a.bindFramebuffer(36160,e.__webglFramebuffer);if(!b.depthTexture||!b.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");
+d.get(b.depthTexture).__webglTexture&&b.depthTexture.image.width===b.width&&b.depthTexture.image.height===b.height||(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0);u(b.depthTexture,0);e=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(36160,36096,3553,e,0);else if(1027===b.depthTexture.format)a.framebufferTexture2D(36160,33306,3553,e,0);else throw Error("Unknown depthTexture format");}else if(f)for(e.__webglDepthbuffer=
+[],f=0;6>f;f++)a.bindFramebuffer(36160,e.__webglFramebuffer[f]),e.__webglDepthbuffer[f]=a.createRenderbuffer(),H(e.__webglDepthbuffer[f],b);else a.bindFramebuffer(36160,e.__webglFramebuffer),e.__webglDepthbuffer=a.createRenderbuffer(),H(e.__webglDepthbuffer,b);a.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var b=a.texture,e=k(a);if(m(b,e)){e=a.isWebGLRenderTargetCube?34067:3553;var f=d.get(b).__webglTexture;c.bindTexture(e,f);q(e,b,a.width,a.height);c.bindTexture(e,null)}}}
+function df(a,b,c){return{convert:function(a){if(1E3===a)return 10497;if(1001===a)return 33071;if(1002===a)return 33648;if(1003===a)return 9728;if(1004===a)return 9984;if(1005===a)return 9986;if(1006===a)return 9729;if(1007===a)return 9985;if(1008===a)return 9987;if(1009===a)return 5121;if(1017===a)return 32819;if(1018===a)return 32820;if(1019===a)return 33635;if(1010===a)return 5120;if(1011===a)return 5122;if(1012===a)return 5123;if(1013===a)return 5124;if(1014===a)return 5125;if(1015===a)return 5126;
+if(1016===a){if(c.isWebGL2)return 5131;var d=b.get("OES_texture_half_float");if(null!==d)return d.HALF_FLOAT_OES}if(1021===a)return 6406;if(1022===a)return 6407;if(1023===a)return 6408;if(1024===a)return 6409;if(1025===a)return 6410;if(1026===a)return 6402;if(1027===a)return 34041;if(1028===a)return 6403;if(100===a)return 32774;if(101===a)return 32778;if(102===a)return 32779;if(200===a)return 0;if(201===a)return 1;if(202===a)return 768;if(203===a)return 769;if(204===a)return 770;if(205===a)return 771;
+if(206===a)return 772;if(207===a)return 773;if(208===a)return 774;if(209===a)return 775;if(210===a)return 776;if(33776===a||33777===a||33778===a||33779===a)if(d=b.get("WEBGL_compressed_texture_s3tc"),null!==d){if(33776===a)return d.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return d.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return d.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return d.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===a||35841===a||35842===a||35843===a)if(d=b.get("WEBGL_compressed_texture_pvrtc"),
+null!==d){if(35840===a)return d.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return d.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return d.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return d.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===a&&(d=b.get("WEBGL_compressed_texture_etc1"),null!==d))return d.COMPRESSED_RGB_ETC1_WEBGL;if(37808===a||37809===a||37810===a||37811===a||37812===a||37813===a||37814===a||37815===a||37816===a||37817===a||37818===a||37819===a||37820===a||37821===a)if(d=b.get("WEBGL_compressed_texture_astc"),
+null!==d)return a;if(103===a||104===a){if(c.isWebGL2){if(103===a)return 32775;if(104===a)return 32776}d=b.get("EXT_blend_minmax");if(null!==d){if(103===a)return d.MIN_EXT;if(104===a)return d.MAX_EXT}}if(1020===a){if(c.isWebGL2)return 34042;d=b.get("WEBGL_depth_texture");if(null!==d)return d.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Ob(){D.call(this);this.type="Group"}function Ra(){D.call(this);this.type="Camera";this.matrixWorldInverse=new P;this.projectionMatrix=new P;this.projectionMatrixInverse=
+new P}function V(a,b,c,d){Ra.call(this);this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==c?c:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==b?b:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function Cc(a){V.call(this);this.cameras=a||[]}function ef(a,b,c){ff.setFromMatrixPosition(b.matrixWorld);gf.setFromMatrixPosition(c.matrixWorld);var d=ff.distanceTo(gf),e=b.projectionMatrix.elements,f=c.projectionMatrix.elements,
+g=e[14]/(e[10]-1);c=e[14]/(e[10]+1);var h=(e[9]+1)/e[5],k=(e[9]-1)/e[5],m=(e[8]-1)/e[0],q=(f[8]+1)/f[0];e=g*m;f=g*q;q=d/(-m+q);m=q*-m;b.matrixWorld.decompose(a.position,a.quaternion,a.scale);a.translateX(m);a.translateZ(q);a.matrixWorld.compose(a.position,a.quaternion,a.scale);a.matrixWorldInverse.getInverse(a.matrixWorld);b=g+q;g=c+q;a.projectionMatrix.makePerspective(e-m,f+(d-m),h*c/g*b,k*c/g*b,b,g)}function hf(a){function b(){return null!==e&&!0===e.isPresenting}function c(){if(b()){var c=e.getEyeParameters("left"),
+f=c.renderWidth*q;c=c.renderHeight*q;H=a.getPixelRatio();v=a.getSize();a.setDrawingBufferSize(2*f,c,1);N.start()}else d.enabled&&a.setDrawingBufferSize(v.width,v.height,H),N.stop()}var d=this,e=null,f=null,g=null,h=[],k=new P,m=new P,q=1,n="stage";"undefined"!==typeof window&&"VRFrameData"in window&&(f=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",c,!1));var r=new P,l=new ja,t=new p,u=new V;u.bounds=new Z(0,0,.5,1);u.layers.enable(1);var w=new V;w.bounds=new Z(.5,0,.5,1);
+w.layers.enable(2);var A=new Cc([u,w]);A.layers.enable(1);A.layers.enable(2);var v,H,y=[];this.enabled=!1;this.getController=function(a){var b=h[a];void 0===b&&(b=new Ob,b.matrixAutoUpdate=!1,b.visible=!1,h[a]=b);return b};this.getDevice=function(){return e};this.setDevice=function(a){void 0!==a&&(e=a);N.setContext(a)};this.setFramebufferScaleFactor=function(a){q=a};this.setFrameOfReferenceType=function(a){n=a};this.setPoseTarget=function(a){void 0!==a&&(g=a)};this.getCamera=function(a){var b="stage"===
+n?1.6:0;if(null===e)return a.position.set(0,b,0),a;e.depthNear=a.near;e.depthFar=a.far;e.getFrameData(f);if("stage"===n){var c=e.stageParameters;c?k.fromArray(c.sittingToStandingTransform):k.makeTranslation(0,b,0)}b=f.pose;c=null!==g?g:a;c.matrix.copy(k);c.matrix.decompose(c.position,c.quaternion,c.scale);null!==b.orientation&&(l.fromArray(b.orientation),c.quaternion.multiply(l));null!==b.position&&(l.setFromRotationMatrix(k),t.fromArray(b.position),t.applyQuaternion(l),c.position.add(t));c.updateMatrixWorld();
+if(!1===e.isPresenting)return a;u.near=a.near;w.near=a.near;u.far=a.far;w.far=a.far;u.matrixWorldInverse.fromArray(f.leftViewMatrix);w.matrixWorldInverse.fromArray(f.rightViewMatrix);m.getInverse(k);"stage"===n&&(u.matrixWorldInverse.multiply(m),w.matrixWorldInverse.multiply(m));a=c.parent;null!==a&&(r.getInverse(a.matrixWorld),u.matrixWorldInverse.multiply(r),w.matrixWorldInverse.multiply(r));u.matrixWorld.getInverse(u.matrixWorldInverse);w.matrixWorld.getInverse(w.matrixWorldInverse);u.projectionMatrix.fromArray(f.leftProjectionMatrix);
+w.projectionMatrix.fromArray(f.rightProjectionMatrix);ef(A,u,w);a=e.getLayers();a.length&&(a=a[0],null!==a.leftBounds&&4===a.leftBounds.length&&u.bounds.fromArray(a.leftBounds),null!==a.rightBounds&&4===a.rightBounds.length&&w.bounds.fromArray(a.rightBounds));a:for(a=0;a<h.length;a++){b=h[a];b:{c=a;for(var d=navigator.getGamepads&&navigator.getGamepads(),q=0,x=0,p=d.length;q<p;q++){var v=d[q];if(v&&("Daydream Controller"===v.id||"Gear VR Controller"===v.id||"Oculus Go Controller"===v.id||"OpenVR Gamepad"===
+v.id||v.id.startsWith("Oculus Touch")||v.id.startsWith("Spatial Controller"))){if(x===c){c=v;break b}x++}}c=void 0}if(void 0!==c&&void 0!==c.pose){if(null===c.pose)break a;d=c.pose;!1===d.hasPosition&&b.position.set(.2,-.6,-.05);null!==d.position&&b.position.fromArray(d.position);null!==d.orientation&&b.quaternion.fromArray(d.orientation);b.matrix.compose(b.position,b.quaternion,b.scale);b.matrix.premultiply(k);b.matrix.decompose(b.position,b.quaternion,b.scale);b.matrixWorldNeedsUpdate=!0;b.visible=
+!0;d="Daydream Controller"===c.id?0:1;y[a]!==c.buttons[d].pressed&&(y[a]=c.buttons[d].pressed,!0===y[a]?b.dispatchEvent({type:"selectstart"}):(b.dispatchEvent({type:"selectend"}),b.dispatchEvent({type:"select"})))}else b.visible=!1}return A};this.getStandingMatrix=function(){return k};this.isPresenting=b;var N=new Xd;this.setAnimationLoop=function(a){N.setAnimationLoop(a)};this.submitFrame=function(){b()&&e.submitFrame()};this.dispose=function(){"undefined"!==typeof window&&window.removeEventListener("vrdisplaypresentchange",
+c)}}function Sg(a){function b(){return null!==h&&null!==m}function c(a){var b=r[l.indexOf(a.inputSource)];b&&b.dispatchEvent({type:a.type})}function d(){a.setFramebuffer(null);v.stop()}function e(a,b){null===b?a.matrixWorld.copy(a.matrix):a.matrixWorld.multiplyMatrices(b.matrixWorld,a.matrix);a.matrixWorldInverse.getInverse(a.matrixWorld)}var f=a.context,g=null,h=null,k=1,m=null,q="stage",n=null,r=[],l=[],t=new V;t.layers.enable(1);t.viewport=new Z;var u=new V;u.layers.enable(2);u.viewport=new Z;
+var w=new Cc([t,u]);w.layers.enable(1);w.layers.enable(2);this.enabled=!1;this.getController=function(a){var b=r[a];void 0===b&&(b=new Ob,b.matrixAutoUpdate=!1,b.visible=!1,r[a]=b);return b};this.getDevice=function(){return g};this.setDevice=function(a){void 0!==a&&(g=a);a instanceof XRDevice&&f.setCompatibleXRDevice(a)};this.setFramebufferScaleFactor=function(a){k=a};this.setFrameOfReferenceType=function(a){q=a};this.setSession=function(b){h=b;null!==h&&(h.addEventListener("select",c),h.addEventListener("selectstart",
+c),h.addEventListener("selectend",c),h.addEventListener("end",d),h.baseLayer=new XRWebGLLayer(h,f,{framebufferScaleFactor:k}),h.requestFrameOfReference(q).then(function(b){m=b;a.setFramebuffer(h.baseLayer.framebuffer);v.setContext(h);v.start()}),l=h.getInputSources(),h.addEventListener("inputsourceschange",function(){l=h.getInputSources();console.log(l);for(var a=0;a<r.length;a++)r[a].userData.inputSource=l[a]}))};this.getCamera=function(a){if(b()){var c=a.parent,d=w.cameras;e(w,c);for(var f=0;f<
+d.length;f++)e(d[f],c);a.matrixWorld.copy(w.matrixWorld);a=a.children;f=0;for(c=a.length;f<c;f++)a[f].updateMatrixWorld(!0);ef(w,t,u);return w}return a};this.isPresenting=b;var p=null,v=new Xd;v.setAnimationLoop(function(a,b){n=b.getDevicePose(m);if(null!==n)for(var c=h.baseLayer,d=b.views,e=0;e<d.length;e++){var f=d[e],g=c.getViewport(f),k=n.getViewMatrix(f),q=w.cameras[e];q.matrix.fromArray(k).getInverse(q.matrix);q.projectionMatrix.fromArray(f.projectionMatrix);q.viewport.set(g.x,g.y,g.width,g.height);
+0===e&&w.matrix.copy(q.matrix)}for(e=0;e<r.length;e++){c=r[e];if(d=l[e])if(d=b.getInputPose(d,m),null!==d){"targetRay"in d?c.matrix.elements=d.targetRay.transformMatrix:"pointerMatrix"in d&&(c.matrix.elements=d.pointerMatrix);c.matrix.decompose(c.position,c.rotation,c.scale);c.visible=!0;continue}c.visible=!1}p&&p(a)});this.setAnimationLoop=function(a){p=a};this.dispose=function(){};this.getStandingMatrix=function(){console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed.");return new THREE.Matrix4};
+this.submitFrame=function(){}}function ce(a){var b;function c(){la=new Uf(O);xa=new Sf(O,la,a);xa.isWebGL2||(la.get("WEBGL_depth_texture"),la.get("OES_texture_float"),la.get("OES_texture_half_float"),la.get("OES_texture_half_float_linear"),la.get("OES_standard_derivatives"),la.get("OES_element_index_uint"),la.get("ANGLE_instanced_arrays"));la.get("OES_texture_float_linear");ia=new df(O,la,xa);ba=new Qg(O,la,ia,xa);ba.scissor(Bc.copy(ja).multiplyScalar(U));ba.viewport(S.copy(fa).multiplyScalar(U));
+da=new Xf(O);Da=new Hg;ha=new Rg(O,la,ba,Da,xa,ia,da);ra=new Lf(O);ua=new Vf(O,ra,da);oa=new $f(ua,da);ya=new Zf(O);na=new Gg(Y,la,xa);ta=new Lg;pa=new Pg;ma=new Qf(Y,ba,oa,z);Aa=new Rf(O,la,da,xa);Ba=new Wf(O,la,da,xa);da.programs=na.programs;Y.context=O;Y.capabilities=xa;Y.extensions=la;Y.properties=Da;Y.renderLists=ta;Y.state=ba;Y.info=da}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");G=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");G=
+!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);Da.remove(a)}function g(a){var b=Da.get(a).program;a.program=void 0;void 0!==b&&na.releaseProgram(b)}function h(a,b){a.render(function(a){Y.renderBufferImmediate(a,b)})}function k(a,b,c){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isLight)E.pushLight(a),a.castShadow&&E.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||qa.intersectsSprite(a)){c&&gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Ac);var d=oa.update(a),
+e=a.material;D.push(a,d,e,gb.z,null)}}else if(a.isImmediateRenderObject)c&&gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Ac),D.push(a,null,a.material,gb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.update(),!a.frustumCulled||qa.intersectsObject(a))if(c&&gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Ac),d=oa.update(a),e=a.material,Array.isArray(e))for(var f=d.groups,g=0,h=f.length;g<h;g++){var m=f[g],n=e[m.materialIndex];n&&n.visible&&D.push(a,d,n,gb.z,
+m)}else e.visible&&D.push(a,d,e,gb.z,null);a=a.children;g=0;for(h=a.length;g<h;g++)k(a[g],b,c)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,k=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera){W=c;for(var n=c.cameras,r=0,l=n.length;r<l;r++){var x=n[r];if(h.layers.test(x.layers)){if("viewport"in x)ba.viewport(S.copy(x.viewport));else{var t=x.bounds;ba.viewport(S.set(t.x*V,t.y*M,t.z*V,t.w*M).multiplyScalar(U))}E.setupLights(x);q(h,b,x,k,m,g)}}}else W=null,
+q(h,b,c,k,m,g)}}function q(a,c,d,e,f,g){a.onBeforeRender(Y,c,d,e,f,g);E=pa.get(c,W||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){ba.setMaterial(f);var k=r(d,c.fog,f,a);K=b=null;sd=!1;h(a,k)}else Y.renderBufferDirect(d,c.fog,e,f,a,g);a.onAfterRender(Y,c,d,e,f,g);E=pa.get(c,W||d)}function n(a,b,c){var d=Da.get(a),e=E.state.lights,h=d.lightsHash,k=e.state.hash;c=na.getParameters(a,e.state,E.state.shadowsArray,
+b,aa.numPlanes,aa.numIntersection,c);var m=na.getProgramCode(a,c),n=d.program,q=!0;if(void 0===n)a.addEventListener("dispose",f);else if(n.code!==m)g(a);else{if(h.stateID!==k.stateID||h.directionalLength!==k.directionalLength||h.pointLength!==k.pointLength||h.spotLength!==k.spotLength||h.rectAreaLength!==k.rectAreaLength||h.hemiLength!==k.hemiLength||h.shadowsLength!==k.shadowsLength)h.stateID=k.stateID,h.directionalLength=k.directionalLength,h.pointLength=k.pointLength,h.spotLength=k.spotLength,
+h.rectAreaLength=k.rectAreaLength,h.hemiLength=k.hemiLength,h.shadowsLength=k.shadowsLength;else if(void 0!==c.shaderID)return;q=!1}q&&(c.shaderID?(m=Qa[c.shaderID],d.shader={name:a.type,uniforms:va.clone(m.uniforms),vertexShader:m.vertexShader,fragmentShader:m.fragmentShader}):d.shader={name:a.type,uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader},a.onBeforeCompile(d.shader,Y),m=na.getProgramCode(a,c),n=na.acquireProgram(a,d.shader,c,m),d.program=n,a.program=n);c=n.getAttributes();
+if(a.morphTargets)for(m=a.numSupportedMorphTargets=0;m<Y.maxMorphTargets;m++)0<=c["morphTarget"+m]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(m=a.numSupportedMorphNormals=0;m<Y.maxMorphNormals;m++)0<=c["morphNormal"+m]&&a.numSupportedMorphNormals++;c=d.shader.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=aa.numPlanes,d.numIntersection=aa.numIntersection,c.clippingPlanes=aa.uniform;d.fog=b;void 0===h&&(d.lightsHash=h={});h.stateID=k.stateID;h.directionalLength=
+k.directionalLength;h.pointLength=k.pointLength;h.spotLength=k.spotLength;h.rectAreaLength=k.rectAreaLength;h.hemiLength=k.hemiLength;h.shadowsLength=k.shadowsLength;a.lights&&(c.ambientLightColor.value=e.state.ambient,c.directionalLights.value=e.state.directional,c.spotLights.value=e.state.spot,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,c.hemisphereLights.value=e.state.hemi,c.directionalShadowMap.value=e.state.directionalShadowMap,c.directionalShadowMatrix.value=e.state.directionalShadowMatrix,
+c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=db.seqWithValue(a.seq,c);d.uniformsList=a}function r(a,b,c,d){ca=0;var e=Da.get(c),f=e.lightsHash,g=E.state.lights.state.hash;ud&&(be||a!==T)&&aa.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,e,a===T&&c.id===F);!1===c.needsUpdate&&(void 0===e.program?c.needsUpdate=
+!0:c.fog&&e.fog!==b?c.needsUpdate=!0:!c.lights||f.stateID===g.stateID&&f.directionalLength===g.directionalLength&&f.pointLength===g.pointLength&&f.spotLength===g.spotLength&&f.rectAreaLength===g.rectAreaLength&&f.hemiLength===g.hemiLength&&f.shadowsLength===g.shadowsLength?void 0===e.numClippingPlanes||e.numClippingPlanes===aa.numPlanes&&e.numIntersection===aa.numIntersection||(c.needsUpdate=!0):c.needsUpdate=!0);c.needsUpdate&&(n(c,b,d),c.needsUpdate=!1);var h=!1,k=!1,m=!1;f=e.program;g=f.getUniforms();
+var q=e.shader.uniforms;ba.useProgram(f.program)&&(m=k=h=!0);c.id!==F&&(F=c.id,k=!0);if(h||T!==a){g.setValue(O,"projectionMatrix",a.projectionMatrix);xa.logarithmicDepthBuffer&&g.setValue(O,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));T!==a&&(T=a,m=k=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshStandardMaterial||c.envMap)h=g.map.cameraPosition,void 0!==h&&h.setValue(O,gb.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||
+c.isShaderMaterial||c.skinning)&&g.setValue(O,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(g.setOptional(O,d,"bindMatrix"),g.setOptional(O,d,"bindMatrixInverse"),a=d.skeleton))if(h=a.bones,xa.floatVertexTextures){if(void 0===a.boneTexture){h=Math.sqrt(4*h.length);h=R.ceilPowerOfTwo(h);h=Math.max(h,4);var r=new Float32Array(h*h*4);r.set(a.boneMatrices);var x=new lb(r,h,h,1023,1015);x.needsUpdate=!0;a.boneMatrices=r;a.boneTexture=x;a.boneTextureSize=h}g.setValue(O,"boneTexture",a.boneTexture);
+g.setValue(O,"boneTextureSize",a.boneTextureSize)}else g.setOptional(O,a,"boneMatrices");k&&(g.setValue(O,"toneMappingExposure",Y.toneMappingExposure),g.setValue(O,"toneMappingWhitePoint",Y.toneMappingWhitePoint),c.lights&&(k=m,q.ambientLightColor.needsUpdate=k,q.directionalLights.needsUpdate=k,q.pointLights.needsUpdate=k,q.spotLights.needsUpdate=k,q.rectAreaLights.needsUpdate=k,q.hemisphereLights.needsUpdate=k),b&&c.fog&&(q.fogColor.value=b.color,b.isFog?(q.fogNear.value=b.near,q.fogFar.value=b.far):
+b.isFogExp2&&(q.fogDensity.value=b.density)),c.isMeshBasicMaterial?l(q,c):c.isMeshLambertMaterial?(l(q,c),c.emissiveMap&&(q.emissiveMap.value=c.emissiveMap)):c.isMeshPhongMaterial?(l(q,c),c.isMeshToonMaterial?(t(q,c),c.gradientMap&&(q.gradientMap.value=c.gradientMap)):t(q,c)):c.isMeshStandardMaterial?(l(q,c),c.isMeshPhysicalMaterial?(u(q,c),q.reflectivity.value=c.reflectivity,q.clearCoat.value=c.clearCoat,q.clearCoatRoughness.value=c.clearCoatRoughness):u(q,c)):c.isMeshMatcapMaterial?(l(q,c),c.matcap&&
+(q.matcap.value=c.matcap),c.bumpMap&&(q.bumpMap.value=c.bumpMap,q.bumpScale.value=c.bumpScale,1===c.side&&(q.bumpScale.value*=-1)),c.normalMap&&(q.normalMap.value=c.normalMap,q.normalScale.value.copy(c.normalScale),1===c.side&&q.normalScale.value.negate()),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias)):c.isMeshDepthMaterial?(l(q,c),c.displacementMap&&(q.displacementMap.value=c.displacementMap,
+q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias)):c.isMeshDistanceMaterial?(l(q,c),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias),q.referencePosition.value.copy(c.referencePosition),q.nearDistance.value=c.nearDistance,q.farDistance.value=c.farDistance):c.isMeshNormalMaterial?(l(q,c),c.bumpMap&&(q.bumpMap.value=c.bumpMap,q.bumpScale.value=c.bumpScale,1===
+c.side&&(q.bumpScale.value*=-1)),c.normalMap&&(q.normalMap.value=c.normalMap,q.normalScale.value.copy(c.normalScale),1===c.side&&q.normalScale.value.negate()),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias)):c.isLineBasicMaterial?(q.diffuse.value=c.color,q.opacity.value=c.opacity,c.isLineDashedMaterial&&(q.dashSize.value=c.dashSize,q.totalSize.value=c.dashSize+c.gapSize,q.scale.value=c.scale)):
+c.isPointsMaterial?(q.diffuse.value=c.color,q.opacity.value=c.opacity,q.size.value=c.size*U,q.scale.value=.5*M,q.map.value=c.map,null!==c.map&&(!0===c.map.matrixAutoUpdate&&c.map.updateMatrix(),q.uvTransform.value.copy(c.map.matrix))):c.isSpriteMaterial?(q.diffuse.value=c.color,q.opacity.value=c.opacity,q.rotation.value=c.rotation,q.map.value=c.map,null!==c.map&&(!0===c.map.matrixAutoUpdate&&c.map.updateMatrix(),q.uvTransform.value.copy(c.map.matrix))):c.isShadowMaterial&&(q.color.value=c.color,q.opacity.value=
+c.opacity),void 0!==q.ltc_1&&(q.ltc_1.value=J.LTC_1),void 0!==q.ltc_2&&(q.ltc_2.value=J.LTC_2),db.upload(O,e.uniformsList,q,Y));c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(db.upload(O,e.uniformsList,q,Y),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&g.setValue(O,"center",d.center);g.setValue(O,"modelViewMatrix",d.modelViewMatrix);g.setValue(O,"normalMatrix",d.normalMatrix);g.setValue(O,"modelMatrix",d.matrixWorld);return f}function l(a,b){a.opacity.value=b.opacity;b.color&&(a.diffuse.value=b.color);
+b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);b.map&&(a.map.value=b.map);b.alphaMap&&(a.alphaMap.value=b.alphaMap);b.specularMap&&(a.specularMap.value=b.specularMap);b.envMap&&(a.envMap.value=b.envMap,a.flipEnvMap.value=b.envMap&&b.envMap.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=Da.get(b.envMap).__maxMipLevel);b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);
+b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var c=b.map;else b.specularMap?c=b.specularMap:b.displacementMap?c=b.displacementMap:b.normalMap?c=b.normalMap:b.bumpMap?c=b.bumpMap:b.roughnessMap?c=b.roughnessMap:b.metalnessMap?c=b.metalnessMap:b.alphaMap?c=b.alphaMap:b.emissiveMap&&(c=b.emissiveMap);void 0!==c&&(c.isWebGLRenderTarget&&(c=c.texture),!0===c.matrixAutoUpdate&&c.updateMatrix(),a.uvTransform.value.copy(c.matrix))}function t(a,b){a.specular.value=b.specular;
+a.shininess.value=Math.max(b.shininess,1E-4);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias)}function u(a,b){a.roughness.value=
+b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=
+b.displacementScale,a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}console.log("THREE.WebGLRenderer","98");a=a||{};var w=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),A=void 0!==a.context?a.context:null,v=void 0!==a.alpha?a.alpha:!1,H=void 0!==a.depth?a.depth:!0,y=void 0!==a.stencil?a.stencil:!0,N=void 0!==a.antialias?a.antialias:!1,z=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,B=void 0!==
+a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,C=void 0!==a.powerPreference?a.powerPreference:"default",D=null,E=null;this.domElement=w;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=
+4;var Y=this,G=!1,Q=null,I=null,L=null,F=-1;var K=b=null;var sd=!1;var T=null,W=null,S=new Z,Bc=new Z,ea=null,ca=0,V=w.width,M=w.height,U=1,fa=new Z(0,0,V,M),ja=new Z(0,0,V,M),sa=!1,qa=new rd,aa=new Tf,ud=!1,be=!1,Ac=new P,gb=new p;try{v={alpha:v,depth:H,stencil:y,antialias:N,premultipliedAlpha:z,preserveDrawingBuffer:B,powerPreference:C};w.addEventListener("webglcontextlost",d,!1);w.addEventListener("webglcontextrestored",e,!1);var O=A||w.getContext("webgl",v)||w.getContext("experimental-webgl",
+v);if(null===O){if(null!==w.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===O.getShaderPrecisionFormat&&(O.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Tg){console.error("THREE.WebGLRenderer: "+Tg.message)}var la,xa,ba,da,Da,ha,ra,ua,oa,na,ta,pa,ma,ya,Aa,Ba,ia;c();var ka=null;"undefined"!==typeof navigator&&(ka="xr"in navigator?new Sg(Y):new hf(Y));this.vr=
+ka;var Ca=new cf(Y,oa,xa.maxTextureSize);this.shadowMap=Ca;this.getContext=function(){return O};this.getContextAttributes=function(){return O.getContextAttributes()};this.forceContextLoss=function(){var a=la.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=la.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return U};this.setPixelRatio=function(a){void 0!==a&&(U=a,this.setSize(V,M,!1))};this.getSize=function(){return{width:V,height:M}};
+this.setSize=function(a,b,c){ka.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(V=a,M=b,w.width=a*U,w.height=b*U,!1!==c&&(w.style.width=a+"px",w.style.height=b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=function(){return{width:V*U,height:M*U}};this.setDrawingBufferSize=function(a,b,c){V=a;M=b;U=c;w.width=a*c;w.height=b*c;this.setViewport(0,0,a,b)};this.getCurrentViewport=function(){return S};this.setViewport=function(a,b,c,d){fa.set(a,
+M-b-d,c,d);ba.viewport(S.copy(fa).multiplyScalar(U))};this.setScissor=function(a,b,c,d){ja.set(a,M-b-d,c,d);ba.scissor(Bc.copy(ja).multiplyScalar(U))};this.setScissorTest=function(a){ba.setScissorTest(sa=a)};this.getClearColor=function(){return ma.getClearColor()};this.setClearColor=function(){ma.setClearColor.apply(ma,arguments)};this.getClearAlpha=function(){return ma.getClearAlpha()};this.setClearAlpha=function(){ma.setClearAlpha.apply(ma,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===
+a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===c||c)d|=1024;O.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.dispose=function(){w.removeEventListener("webglcontextlost",d,!1);w.removeEventListener("webglcontextrestored",e,!1);ta.dispose();pa.dispose();Da.dispose();oa.dispose();ka.dispose();wa.stop()};this.renderBufferImmediate=function(a,b){ba.initAttributes();var c=Da.get(a);a.hasPositions&&
+!c.position&&(c.position=O.createBuffer());a.hasNormals&&!c.normal&&(c.normal=O.createBuffer());a.hasUvs&&!c.uv&&(c.uv=O.createBuffer());a.hasColors&&!c.color&&(c.color=O.createBuffer());b=b.getAttributes();a.hasPositions&&(O.bindBuffer(34962,c.position),O.bufferData(34962,a.positionArray,35048),ba.enableAttribute(b.position),O.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(O.bindBuffer(34962,c.normal),O.bufferData(34962,a.normalArray,35048),ba.enableAttribute(b.normal),O.vertexAttribPointer(b.normal,
+3,5126,!1,0,0));a.hasUvs&&(O.bindBuffer(34962,c.uv),O.bufferData(34962,a.uvArray,35048),ba.enableAttribute(b.uv),O.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(O.bindBuffer(34962,c.color),O.bufferData(34962,a.colorArray,35048),ba.enableAttribute(b.color),O.vertexAttribPointer(b.color,3,5126,!1,0,0));ba.disableUnusedAttributes();O.drawArrays(4,0,a.count);a.count=0};this.renderBufferDirect=function(a,c,d,e,f,g){var h=f.isMesh&&0>f.normalMatrix.determinant();ba.setMaterial(e,h);var k=r(a,c,
+e,f),m=!1;if(b!==d.id||K!==k.id||sd!==(!0===e.wireframe))b=d.id,K=k.id,sd=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(ya.update(f,d,e,k),m=!0);h=d.index;var q=d.attributes.position;c=1;!0===e.wireframe&&(h=ua.getWireframeAttribute(d),c=2);a=Aa;if(null!==h){var n=ra.get(h);a=Ba;a.setIndex(n)}if(m){if(d&&d.isInstancedBufferGeometry&!xa.isWebGL2&&null===la.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");
+else{ba.initAttributes();m=d.attributes;k=k.getAttributes();var l=e.defaultAttributeValues;for(B in k){var x=k[B];if(0<=x){var t=m[B];if(void 0!==t){var u=t.normalized,w=t.itemSize,p=ra.get(t);if(void 0!==p){var v=p.buffer,A=p.type;p=p.bytesPerElement;if(t.isInterleavedBufferAttribute){var y=t.data,H=y.stride;t=t.offset;y&&y.isInstancedInterleavedBuffer?(ba.enableAttributeAndDivisor(x,y.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=y.meshPerAttribute*y.count)):ba.enableAttribute(x);
+O.bindBuffer(34962,v);O.vertexAttribPointer(x,w,A,u,H*p,t*p)}else t.isInstancedBufferAttribute?(ba.enableAttributeAndDivisor(x,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):ba.enableAttribute(x),O.bindBuffer(34962,v),O.vertexAttribPointer(x,w,A,u,0,0)}}else if(void 0!==l&&(u=l[B],void 0!==u))switch(u.length){case 2:O.vertexAttrib2fv(x,u);break;case 3:O.vertexAttrib3fv(x,u);break;case 4:O.vertexAttrib4fv(x,u);break;default:O.vertexAttrib1fv(x,u)}}}ba.disableUnusedAttributes()}null!==
+h&&O.bindBuffer(34963,n.buffer)}n=Infinity;null!==h?n=h.count:void 0!==q&&(n=q.count);h=d.drawRange.start*c;q=null!==g?g.start*c:0;var B=Math.max(h,q);g=Math.max(0,Math.min(n,h+d.drawRange.count*c,q+(null!==g?g.count*c:Infinity))-1-B+1);if(0!==g){if(f.isMesh)if(!0===e.wireframe)ba.setLineWidth(e.wireframeLinewidth*(null===I?U:1)),a.setMode(1);else switch(f.drawMode){case 0:a.setMode(4);break;case 1:a.setMode(5);break;case 2:a.setMode(6)}else f.isLine?(e=e.linewidth,void 0===e&&(e=1),ba.setLineWidth(e*
+(null===I?U:1)),f.isLineSegments?a.setMode(1):f.isLineLoop?a.setMode(2):a.setMode(3)):f.isPoints?a.setMode(0):f.isSprite&&a.setMode(4);d&&d.isInstancedBufferGeometry?0<d.maxInstancedCount&&a.renderInstances(d,B,g):a.render(B,g)}};this.compile=function(a,b){E=pa.get(a,b);E.init();a.traverse(function(a){a.isLight&&(E.pushLight(a),a.castShadow&&E.pushShadow(a))});E.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)n(b.material[c],a.fog,
+b);else n(b.material,a.fog,b)})};var za=null,wa=new Xd;wa.setAnimationLoop(function(a){ka.isPresenting()||za&&za(a)});"undefined"!==typeof window&&wa.setContext(window);this.setAnimationLoop=function(a){za=a;ka.setAnimationLoop(a);wa.start()};this.render=function(a,c,d,e){if(!c||!c.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!G){K=b=null;sd=!1;F=-1;T=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===c.parent&&c.updateMatrixWorld();ka.enabled&&
+(c=ka.getCamera(c));E=pa.get(a,c);E.init();a.onBeforeRender(Y,a,c,d);Ac.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse);qa.setFromMatrix(Ac);be=this.localClippingEnabled;ud=aa.init(this.clippingPlanes,be,c);D=ta.get(a,c);D.init();k(a,c,Y.sortObjects);!0===Y.sortObjects&&D.sort();ud&&aa.beginShadows();Ca.render(E.state.shadowsArray,a,c);E.setupLights(c);ud&&aa.endShadows();this.info.autoReset&&this.info.reset();void 0===d&&(d=null);this.setRenderTarget(d);ma.render(D,a,c,e);e=D.opaque;var f=
+D.transparent;if(a.overrideMaterial){var g=a.overrideMaterial;e.length&&m(e,a,c,g);f.length&&m(f,a,c,g)}else e.length&&m(e,a,c),f.length&&m(f,a,c);d&&ha.updateRenderTargetMipmap(d);ba.buffers.depth.setTest(!0);ba.buffers.depth.setMask(!0);ba.buffers.color.setMask(!0);ba.setPolygonOffset(!1);a.onAfterRender(Y,a,c);ka.enabled&&ka.submitFrame();E=D=null}};this.allocTextureUnit=function(){var a=ca;a>=xa.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+a+" texture units while this GPU supports only "+
+xa.maxTextures);ca+=1;return a};this.setTexture2D=function(){var a=!1;return function(b,c){b&&b.isWebGLRenderTarget&&(a||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);ha.setTexture2D(b,c)}}();this.setTexture3D=function(){return function(a,b){ha.setTexture3D(a,b)}}();this.setTexture=function(){var a=!1;return function(b,c){a||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),
+a=!0);ha.setTexture2D(b,c)}}();this.setTextureCube=function(){var a=!1;return function(b,c){b&&b.isWebGLRenderTargetCube&&(a||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);b&&b.isCubeTexture||Array.isArray(b.image)&&6===b.image.length?ha.setTextureCube(b,c):ha.setTextureCubeDynamic(b,c)}}();this.setFramebuffer=function(a){Q=a};this.getRenderTarget=function(){return I};this.setRenderTarget=function(a){(I=
+a)&&void 0===Da.get(a).__webglFramebuffer&&ha.setupRenderTarget(a);var b=Q,c=!1;a?(b=Da.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube&&(b=b[a.activeCubeFace],c=!0),S.copy(a.viewport),Bc.copy(a.scissor),ea=a.scissorTest):(S.copy(fa).multiplyScalar(U),Bc.copy(ja).multiplyScalar(U),ea=sa);L!==b&&(O.bindFramebuffer(36160,b),L=b);ba.viewport(S);ba.scissor(Bc);ba.setScissorTest(ea);c&&(c=Da.get(a.texture),O.framebufferTexture2D(36160,36064,34069+a.activeCubeFace,c.__webglTexture,a.activeMipMapLevel))};
+this.readRenderTargetPixels=function(a,b,c,d,e,f){if(a&&a.isWebGLRenderTarget){var g=Da.get(a).__webglFramebuffer;if(g){var h=!1;g!==L&&(O.bindFramebuffer(36160,g),h=!0);try{var k=a.texture,m=k.format,q=k.type;1023!==m&&ia.convert(m)!==O.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===q||ia.convert(q)===O.getParameter(35738)||1015===q&&(xa.isWebGL2||la.get("OES_texture_float")||la.get("WEBGL_color_buffer_float"))||
+1016===q&&(xa.isWebGL2?la.get("EXT_color_buffer_float"):la.get("EXT_color_buffer_half_float"))?36053===O.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&O.readPixels(b,c,d,e,ia.convert(m),ia.convert(q),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&&O.bindFramebuffer(36160,
+L)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){var d=b.image.width,e=b.image.height,f=ia.convert(b.format);this.setTexture2D(b,0);O.copyTexImage2D(3553,c||0,f,a.x,a.y,d,e,0)};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=ia.convert(c.format),h=ia.convert(c.type);this.setTexture2D(c,0);b.isDataTexture?O.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,h,b.image.data):
+O.texSubImage2D(3553,d||0,a.x,a.y,g,h,b.image)}}function Pb(a,b){this.name="";this.color=new G(a);this.density=void 0!==b?b:2.5E-4}function Qb(a,b,c){this.name="";this.color=new G(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function vd(){D.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function sb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function Dc(a,
+b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function hb(a){L.call(this);this.type="SpriteMaterial";this.color=new G(16777215);this.map=null;this.rotation=0;this.sizeAttenuation=!0;this.lights=!1;this.transparent=!0;this.setValues(a)}function Ec(a){D.call(this);this.type="Sprite";if(void 0===Rb){Rb=new E;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new sb(b,5);Rb.setIndex([0,1,2,0,2,3]);Rb.addAttribute("position",new Dc(b,3,0,!1));Rb.addAttribute("uv",
+new Dc(b,2,3,!1))}this.geometry=Rb;this.material=void 0!==a?a:new hb;this.center=new z(.5,.5)}function Fc(){D.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Gc(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=
+[],a=0,b=this.bones.length;a<b;a++)this.boneInverses.push(new P)}function wd(){D.call(this);this.type="Bone"}function xd(a,b){pa.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new P;this.bindMatrixInverse=new P;a=this.initBones();a=new Gc(a);this.bind(a,this.matrixWorld);this.normalizeSkinWeights()}function T(a){L.call(this);this.type="LineBasicMaterial";this.color=new G(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.lights=!1;this.setValues(a)}
+function ma(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");D.call(this);this.type="Line";this.geometry=void 0!==a?a:new E;this.material=void 0!==b?b:new T({color:16777215*Math.random()})}function S(a,b){ma.call(this,a,b);this.type="LineSegments"}function yd(a,b){ma.call(this,a,b);this.type="LineLoop"}function Ha(a){L.call(this);this.type="PointsMaterial";this.color=new G(16777215);this.map=null;this.size=1;this.sizeAttenuation=
+!0;this.lights=this.morphTargets=!1;this.setValues(a)}function Sb(a,b){D.call(this);this.type="Points";this.geometry=void 0!==a?a:new E;this.material=void 0!==b?b:new Ha({color:16777215*Math.random()})}function de(a,b,c,d,e,f,g,h,k){W.call(this,a,b,c,d,e,f,g,h,k);this.generateMipmaps=!1}function Tb(a,b,c,d,e,f,g,h,k,m,q,n){W.call(this,null,f,g,h,k,m,d,e,q,n);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Hc(a,b,c,d,e,f,g,h,k){W.call(this,a,b,c,d,e,f,g,h,k);
+this.needsUpdate=!0}function Ic(a,b,c,d,e,f,g,h,k,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);W.call(this,null,d,e,f,g,h,m,c,k);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function Ub(a){E.call(this);this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g=
+{},h=["a","b","c"];if(a&&a.isGeometry){var k=a.faces;var m=0;for(d=k.length;m<d;m++){var q=k[m];for(c=0;3>c;c++){var n=q[h[c]];var r=q[h[(c+1)%3]];f[0]=Math.min(n,r);f[1]=Math.max(n,r);n=f[0]+","+f[1];void 0===g[n]&&(g[n]={index1:f[0],index2:f[1]})}}for(n in g)m=g[n],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new p,null!==a.index){k=a.attributes.position;q=a.index;var l=a.groups;0===l.length&&(l=[{start:0,count:q.count,
+materialIndex:0}]);a=0;for(e=l.length;a<e;++a)for(m=l[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)n=q.getX(m+c),r=q.getX(m+(c+1)%3),f[0]=Math.min(n,r),f[1]=Math.max(n,r),n=f[0]+","+f[1],void 0===g[n]&&(g[n]={index1:f[0],index2:f[1]});for(n in g)m=g[n],h.fromBufferAttribute(k,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(k,m.index2),b.push(h.x,h.y,h.z)}else for(k=a.attributes.position,m=0,d=k.count/3;m<d;m++)for(c=0;3>c;c++)g=3*m+c,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z),
+g=3*m+(c+1)%3,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z);this.addAttribute("position",new C(b,3))}function Jc(a,b,c){I.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Vb(a,b,c));this.mergeVertices()}function Vb(a,b,c){E.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new p,k=new p,m=new p,q=new p,n=new p,r,l;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");
+var t=b+1;for(r=0;r<=c;r++){var u=r/c;for(l=0;l<=b;l++){var w=l/b;a(w,u,k);e.push(k.x,k.y,k.z);0<=w-1E-5?(a(w-1E-5,u,m),q.subVectors(k,m)):(a(w+1E-5,u,m),q.subVectors(m,k));0<=u-1E-5?(a(w,u-1E-5,m),n.subVectors(k,m)):(a(w,u+1E-5,m),n.subVectors(m,k));h.crossVectors(q,n).normalize();f.push(h.x,h.y,h.z);g.push(w,u)}}for(r=0;r<c;r++)for(l=0;l<b;l++)a=r*t+l+1,h=(r+1)*t+l+1,k=(r+1)*t+l,d.push(r*t+l,a,k),d.push(a,h,k);this.setIndex(d);this.addAttribute("position",new C(e,3));this.addAttribute("normal",
+new C(f,3));this.addAttribute("uv",new C(g,2))}function Kc(a,b,c,d){I.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new ya(a,b,c,d));this.mergeVertices()}function ya(a,b,c,d){function e(a){h.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[b]=d/2/Math.PI+.5)}E.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,
+indices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],k=[];(function(a){for(var c=new p,d=new p,g=new p,h=0;h<b.length;h+=3){f(b[h+0],c);f(b[h+1],d);f(b[h+2],g);var k,m,l=c,A=d,v=g,H=Math.pow(2,a),y=[];for(m=0;m<=H;m++){y[m]=[];var N=l.clone().lerp(v,m/H),z=A.clone().lerp(v,m/H),B=H-m;for(k=0;k<=B;k++)y[m][k]=0===k&&m===H?N:N.clone().lerp(z,k/B)}for(m=0;m<H;m++)for(k=0;k<2*(H-m)-1;k++)l=Math.floor(k/2),0===k%2?(e(y[m][l+1]),e(y[m+1][l]),e(y[m][l])):(e(y[m][l+1]),e(y[m+1][l+1]),e(y[m+1][l]))}})(d);(function(a){for(var b=
+new p,c=0;c<h.length;c+=3)b.x=h[c+0],b.y=h[c+1],b.z=h[c+2],b.normalize().multiplyScalar(a),h[c+0]=b.x,h[c+1]=b.y,h[c+2]=b.z})(c);(function(){for(var a=new p,b=0;b<h.length;b+=3)a.x=h[b+0],a.y=h[b+1],a.z=h[b+2],k.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new p;b=new p;for(var c=new p,d=new p,e=new z,f=new z,l=new z,w=0,A=0;w<h.length;w+=9,A+=6){a.set(h[w+0],h[w+1],h[w+2]);b.set(h[w+3],h[w+4],h[w+5]);c.set(h[w+6],h[w+7],h[w+8]);e.set(k[A+0],
+k[A+1]);f.set(k[A+2],k[A+3]);l.set(k[A+4],k[A+5]);d.copy(a).add(b).add(c).divideScalar(3);var v=Math.atan2(d.z,-d.x);g(e,A+0,a,v);g(f,A+2,b,v);g(l,A+4,c,v)}for(a=0;a<k.length;a+=6)b=k[a+0],c=k[a+2],d=k[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.addAttribute("position",new C(h,3));this.addAttribute("normal",new C(h.slice(),3));this.addAttribute("uv",new C(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Lc(a,
+b){I.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Wb(a,b));this.mergeVertices()}function Wb(a,b){ya.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Mc(a,b){I.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new tb(a,b));this.mergeVertices()}function tb(a,b){ya.call(this,[1,0,0,
+-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Nc(a,b){I.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Xb(a,b));this.mergeVertices()}function Xb(a,b){var c=(1+Math.sqrt(5))/2;ya.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,
+11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Oc(a,b){I.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Yb(a,b));this.mergeVertices()}function Yb(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;ya.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,
+0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Pc(a,b,c,d,e,f){I.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,
+closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new Zb(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function Zb(a,b,c,d,e){function f(e){q=a.getPointAt(e/b,q);var f=g.normals[e];e=g.binormals[e];for(r=0;r<=d;r++){var m=r/d*Math.PI*2,n=Math.sin(m);m=-Math.cos(m);k.x=m*f.x+n*e.x;k.y=m*f.y+n*e.y;k.z=m*f.z+n*e.z;k.normalize();t.push(k.x,k.y,k.z);h.x=q.x+c*k.x;h.y=q.y+c*k.y;h.z=
+q.z+c*k.z;l.push(h.x,h.y,h.z)}}E.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new p,k=new p,m=new z,q=new p,n,r,l=[],t=[],u=[],w=[];for(n=0;n<b;n++)f(n);f(!1===e?b:0);for(n=0;n<=b;n++)for(r=0;r<=d;r++)m.x=n/b,m.y=r/d,u.push(m.x,m.y);(function(){for(r=1;r<=b;r++)for(n=1;n<=d;n++){var a=
+(d+1)*r+(n-1),c=(d+1)*r+n,e=(d+1)*(r-1)+n;w.push((d+1)*(r-1)+(n-1),a,e);w.push(a,c,e)}})();this.setIndex(w);this.addAttribute("position",new C(l,3));this.addAttribute("normal",new C(t,3));this.addAttribute("uv",new C(u,2))}function Qc(a,b,c,d,e,f,g){I.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");this.fromBufferGeometry(new $b(a,
+b,c,d,e,f));this.mergeVertices()}function $b(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}E.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var h=[],k=[],m=[],q=[],n,r=new p,l=new p,t=new p,u=new p,w=new p,A=new p,v=new p;for(n=0;n<=c;++n){var H=n/c*e*Math.PI*2;
+g(H,e,f,a,t);g(H+.01,e,f,a,u);A.subVectors(u,t);v.addVectors(u,t);w.crossVectors(A,v);v.crossVectors(w,A);w.normalize();v.normalize();for(H=0;H<=d;++H){var y=H/d*Math.PI*2,N=-b*Math.cos(y);y=b*Math.sin(y);r.x=t.x+(N*v.x+y*w.x);r.y=t.y+(N*v.y+y*w.y);r.z=t.z+(N*v.z+y*w.z);k.push(r.x,r.y,r.z);l.subVectors(r,t).normalize();m.push(l.x,l.y,l.z);q.push(n/c);q.push(H/d)}}for(H=1;H<=c;H++)for(n=1;n<=d;n++)a=(d+1)*H+(n-1),b=(d+1)*H+n,e=(d+1)*(H-1)+n,h.push((d+1)*(H-1)+(n-1),a,e),h.push(a,b,e);this.setIndex(h);
+this.addAttribute("position",new C(k,3));this.addAttribute("normal",new C(m,3));this.addAttribute("uv",new C(q,2))}function Rc(a,b,c,d,e){I.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new ac(a,b,c,d,e));this.mergeVertices()}function ac(a,b,c,d,e){E.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||1;b=b||.4;c=Math.floor(c)||8;d=Math.floor(d)||
+6;e=e||2*Math.PI;var f=[],g=[],h=[],k=[],m=new p,q=new p,n=new p,r,l;for(r=0;r<=c;r++)for(l=0;l<=d;l++){var t=l/d*e,u=r/c*Math.PI*2;q.x=(a+b*Math.cos(u))*Math.cos(t);q.y=(a+b*Math.cos(u))*Math.sin(t);q.z=b*Math.sin(u);g.push(q.x,q.y,q.z);m.x=a*Math.cos(t);m.y=a*Math.sin(t);n.subVectors(q,m).normalize();h.push(n.x,n.y,n.z);k.push(l/d);k.push(r/c)}for(r=1;r<=c;r++)for(l=1;l<=d;l++)a=(d+1)*(r-1)+l-1,b=(d+1)*(r-1)+l,e=(d+1)*r+l,f.push((d+1)*r+l-1,a,e),f.push(a,b,e);this.setIndex(f);this.addAttribute("position",
+new C(g,3));this.addAttribute("normal",new C(h,3));this.addAttribute("uv",new C(k,2))}function jf(a,b,c,d,e){for(var f,g=0,h=b,k=c-d;h<c;h+=d)g+=(a[k]-a[h])*(a[h+1]+a[k+1]),k=h;if(e===0<g)for(e=b;e<c;e+=d)f=kf(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=kf(e,a[e],a[e+1],f);f&&ub(f,f.next)&&(Sc(f),f=f.next);return f}function Tc(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!ub(a,a.next)&&0!==na(a.prev,a,a.next))a=a.next;else{Sc(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}
+function Uc(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,k=h;do null===k.z&&(k.z=ee(k.x,k.y,d,e,f)),k.prevZ=k.prev,k=k.nextZ=k.next;while(k!==h);k.prevZ.nextZ=null;k.prevZ=null;h=k;var m,q,n,r,l=1;do{k=h;var t=h=null;for(q=0;k;){q++;var u=k;for(m=n=0;m<l&&(n++,u=u.nextZ,u);m++);for(r=l;0<n||0<r&&u;)0!==n&&(0===r||!u||k.z<=u.z)?(m=k,k=k.nextZ,n--):(m=u,u=u.nextZ,r--),t?t.nextZ=m:h=m,m.prevZ=t,t=m;k=u}t.nextZ=null;l*=2}while(1<q)}for(h=a;a.prev!==a.next;){k=a.prev;u=a.next;if(f)a:{t=a;r=d;var p=e,A=f;q=t.prev;
+n=t;l=t.next;if(0<=na(q,n,l))t=!1;else{var v=q.x>n.x?q.x>l.x?q.x:l.x:n.x>l.x?n.x:l.x,H=q.y>n.y?q.y>l.y?q.y:l.y:n.y>l.y?n.y:l.y;m=ee(q.x<n.x?q.x<l.x?q.x:l.x:n.x<l.x?n.x:l.x,q.y<n.y?q.y<l.y?q.y:l.y:n.y<l.y?n.y:l.y,r,p,A);r=ee(v,H,r,p,A);for(p=t.nextZ;p&&p.z<=r;){if(p!==t.prev&&p!==t.next&&zd(q.x,q.y,n.x,n.y,l.x,l.y,p.x,p.y)&&0<=na(p.prev,p,p.next)){t=!1;break a}p=p.nextZ}for(p=t.prevZ;p&&p.z>=m;){if(p!==t.prev&&p!==t.next&&zd(q.x,q.y,n.x,n.y,l.x,l.y,p.x,p.y)&&0<=na(p.prev,p,p.next)){t=!1;break a}p=
+p.prevZ}t=!0}}else a:if(t=a,q=t.prev,n=t,l=t.next,0<=na(q,n,l))t=!1;else{for(m=t.next.next;m!==t.prev;){if(zd(q.x,q.y,n.x,n.y,l.x,l.y,m.x,m.y)&&0<=na(m.prev,m,m.next)){t=!1;break a}m=m.next}t=!0}if(t)b.push(k.i/c),b.push(a.i/c),b.push(u.i/c),Sc(a),h=a=u.next;else if(a=u,a===h){if(!g)Uc(Tc(a),b,c,d,e,f,1);else if(1===g){g=b;h=c;k=a;do u=k.prev,t=k.next.next,!ub(u,t)&&lf(u,k,k.next,t)&&Vc(u,t)&&Vc(t,u)&&(g.push(u.i/h),g.push(k.i/h),g.push(t.i/h),Sc(k),Sc(k.next),k=a=t),k=k.next;while(k!==a);a=k;Uc(a,
+b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(k=g.i!==h.i){k=g;u=h;if(t=k.next.i!==u.i&&k.prev.i!==u.i){b:{t=k;do{if(t.i!==k.i&&t.next.i!==k.i&&t.i!==u.i&&t.next.i!==u.i&&lf(t,t.next,k,u)){t=!0;break b}t=t.next}while(t!==k);t=!1}t=!t}if(t=t&&Vc(k,u)&&Vc(u,k)){t=k;q=!1;n=(k.x+u.x)/2;u=(k.y+u.y)/2;do t.y>u!==t.next.y>u&&t.next.y!==t.y&&n<(t.next.x-t.x)*(u-t.y)/(t.next.y-t.y)+t.x&&(q=!q),t=t.next;while(t!==k);t=q}k=t}if(k){a=mf(g,h);g=Tc(g,g.next);a=Tc(a,a.next);Uc(g,b,c,d,e,
+f);Uc(a,b,c,d,e,f);break a}h=h.next}g=g.next}while(g!==a)}break}}}}function Ug(a,b){return a.x-b.x}function Vg(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var h=c.x<c.next.x?c:c.next}}c=c.next}while(c!==b);if(!h)return null;if(d===f)return h.prev;b=h;g=h.x;var k=h.y,m=Infinity;for(c=h.next;c!==b;){if(d>=c.x&&c.x>=g&&d!==c.x&&zd(e<k?d:f,e,
+g,k,e<k?f:d,e,c.x,c.y)){var q=Math.abs(e-c.y)/(d-c.x);(q<m||q===m&&c.x>h.x)&&Vc(c,a)&&(h=c,m=q)}c=c.next}return h}function ee(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Wg(a){var b=a,c=a;do b.x<c.x&&(c=b),b=b.next;while(b!==a);return c}function zd(a,b,c,d,e,f,g,h){return 0<=(e-g)*(b-h)-(a-g)*(f-h)&&0<=(a-g)*(d-h)-(c-
+g)*(b-h)&&0<=(c-g)*(f-h)-(e-g)*(d-h)}function na(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function ub(a,b){return a.x===b.x&&a.y===b.y}function lf(a,b,c,d){return ub(a,b)&&ub(c,d)||ub(a,d)&&ub(c,b)?!0:0<na(a,b,c)!==0<na(a,b,d)&&0<na(c,d,a)!==0<na(c,d,b)}function Vc(a,b){return 0>na(a.prev,a,a.next)?0<=na(a,b,a.next)&&0<=na(a,a.prev,b):0>na(a,b,a.prev)||0>na(a,a.next,b)}function mf(a,b){var c=new fe(a.i,a.x,a.y),d=new fe(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=
+c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function kf(a,b,c,d){a=new fe(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function Sc(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function fe(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function nf(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function of(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),
+a.push(b[c].y)}function vb(a,b){I.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new Sa(a,b));this.mergeVertices()}function Sa(a,b){function c(a){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function g(a,b,c){var d=a.x-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/k;b=b.y+d/k;
+g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new z(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new z(f/e,d/e)}function h(a,b){for(M=a.length;0<=--M;){var c=M;var f=M-1;0>f&&(f=a.length-1);var g,h=v+2*B;for(g=0;g<h;g++){var k=W*g,m=W*(g+1),q=b+f+k,n=b+f+m;m=b+c+m;t(b+c+k);t(q);t(m);t(q);
+t(n);t(m);k=e.length/3;k=D.generateSideWallUV(d,e,k-6,k-3,k-2,k-1);u(k[0]);u(k[1]);u(k[3]);u(k[1]);u(k[2]);u(k[3])}}}function k(a,b,c){w.push(a);w.push(b);w.push(c)}function l(a,b,c){t(a);t(b);t(c);a=e.length/3;a=D.generateTopUV(d,e,a-3,a-2,a-1);u(a[0]);u(a[1]);u(a[2])}function t(a){e.push(w[3*a]);e.push(w[3*a+1]);e.push(w[3*a+2])}function u(a){f.push(a.x);f.push(a.y)}var w=[],A=void 0!==b.curveSegments?b.curveSegments:12,v=void 0!==b.steps?b.steps:1,H=void 0!==b.depth?b.depth:100,y=void 0!==b.bevelEnabled?
+b.bevelEnabled:!0,N=void 0!==b.bevelThickness?b.bevelThickness:6,X=void 0!==b.bevelSize?b.bevelSize:N-2,B=void 0!==b.bevelSegments?b.bevelSegments:3,C=b.extrudePath,D=void 0!==b.UVGenerator?b.UVGenerator:Xg;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),H=b.amount);var E=!1;if(C){var Y=C.getSpacedPoints(v);E=!0;y=!1;var G=C.computeFrenetFrames(v,!1);var J=new p;var Q=new p;var I=new p}y||(X=N=B=0);var P;A=a.extractPoints(A);a=A.shape;var L=A.holes;
+if(!Za.isClockWise(a)){a=a.reverse();var F=0;for(P=L.length;F<P;F++){var K=L[F];Za.isClockWise(K)&&(L[F]=K.reverse())}}var R=Za.triangulateShape(a,L),T=a;F=0;for(P=L.length;F<P;F++)K=L[F],a=a.concat(K);var S,W=a.length,V,Z=R.length;A=[];var M=0;var U=T.length;var fa=U-1;for(S=M+1;M<U;M++,fa++,S++)fa===U&&(fa=0),S===U&&(S=0),A[M]=g(T[M],T[fa],T[S]);C=[];var ea=A.concat();F=0;for(P=L.length;F<P;F++){K=L[F];var ca=[];M=0;U=K.length;fa=U-1;for(S=M+1;M<U;M++,fa++,S++)fa===U&&(fa=0),S===U&&(S=0),ca[M]=
+g(K[M],K[fa],K[S]);C.push(ca);ea=ea.concat(ca)}for(fa=0;fa<B;fa++){U=fa/B;var da=N*Math.cos(U*Math.PI/2);S=X*Math.sin(U*Math.PI/2);M=0;for(U=T.length;M<U;M++){var aa=c(T[M],A[M],S);k(aa.x,aa.y,-da)}F=0;for(P=L.length;F<P;F++)for(K=L[F],ca=C[F],M=0,U=K.length;M<U;M++)aa=c(K[M],ca[M],S),k(aa.x,aa.y,-da)}S=X;for(M=0;M<W;M++)aa=y?c(a[M],ea[M],S):a[M],E?(Q.copy(G.normals[0]).multiplyScalar(aa.x),J.copy(G.binormals[0]).multiplyScalar(aa.y),I.copy(Y[0]).add(Q).add(J),k(I.x,I.y,I.z)):k(aa.x,aa.y,0);for(U=
+1;U<=v;U++)for(M=0;M<W;M++)aa=y?c(a[M],ea[M],S):a[M],E?(Q.copy(G.normals[U]).multiplyScalar(aa.x),J.copy(G.binormals[U]).multiplyScalar(aa.y),I.copy(Y[U]).add(Q).add(J),k(I.x,I.y,I.z)):k(aa.x,aa.y,H/v*U);for(fa=B-1;0<=fa;fa--){U=fa/B;da=N*Math.cos(U*Math.PI/2);S=X*Math.sin(U*Math.PI/2);M=0;for(U=T.length;M<U;M++)aa=c(T[M],A[M],S),k(aa.x,aa.y,H+da);F=0;for(P=L.length;F<P;F++)for(K=L[F],ca=C[F],M=0,U=K.length;M<U;M++)aa=c(K[M],ca[M],S),E?k(aa.x,aa.y+Y[v-1].y,Y[v-1].x+da):k(aa.x,aa.y,H+da)}(function(){var a=
+e.length/3;if(y){var b=0*W;for(M=0;M<Z;M++)V=R[M],l(V[2]+b,V[1]+b,V[0]+b);b=W*(v+2*B);for(M=0;M<Z;M++)V=R[M],l(V[0]+b,V[1]+b,V[2]+b)}else{for(M=0;M<Z;M++)V=R[M],l(V[2],V[1],V[0]);for(M=0;M<Z;M++)V=R[M],l(V[0]+W*v,V[1]+W*v,V[2]+W*v)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=0;h(T,b);b+=T.length;F=0;for(P=L.length;F<P;F++)K=L[F],h(K,b),b+=K.length;d.addGroup(a,e.length/3-a,1)})()}E.call(this);this.type="ExtrudeBufferGeometry";this.parameters={shapes:a,options:b};a=Array.isArray(a)?
+a:[a];for(var d=this,e=[],f=[],g=0,h=a.length;g<h;g++)c(a[g]);this.addAttribute("position",new C(e,3));this.addAttribute("uv",new C(f,2));this.computeVertexNormals()}function pf(a,b,c){c.shapes=[];if(Array.isArray(a))for(var d=0,e=a.length;d<e;d++)c.shapes.push(a[d].uuid);else c.shapes.push(a.uuid);void 0!==b.extrudePath&&(c.options.extrudePath=b.extrudePath.toJSON());return c}function Wc(a,b){I.call(this);this.type="TextGeometry";this.parameters={text:a,parameters:b};this.fromBufferGeometry(new bc(a,
+b));this.mergeVertices()}function bc(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new I;a=c.generateShapes(a,b.size);b.depth=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);Sa.call(this,a,b);this.type="TextBufferGeometry"}function Xc(a,b,c,d,e,f,g){I.call(this);this.type="SphereGeometry";this.parameters=
+{radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new wb(a,b,c,d,e,f,g));this.mergeVertices()}function wb(a,b,c,d,e,f,g){E.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var h=
+f+g,k,m,q=0,n=[],l=new p,x=new p,t=[],u=[],w=[],A=[];for(m=0;m<=c;m++){var v=[],H=m/c;for(k=0;k<=b;k++){var y=k/b;l.x=-a*Math.cos(d+y*e)*Math.sin(f+H*g);l.y=a*Math.cos(f+H*g);l.z=a*Math.sin(d+y*e)*Math.sin(f+H*g);u.push(l.x,l.y,l.z);x.set(l.x,l.y,l.z).normalize();w.push(x.x,x.y,x.z);A.push(y,1-H);v.push(q++)}n.push(v)}for(m=0;m<c;m++)for(k=0;k<b;k++)a=n[m][k+1],d=n[m][k],e=n[m+1][k],g=n[m+1][k+1],(0!==m||0<f)&&t.push(a,d,g),(m!==c-1||h<Math.PI)&&t.push(d,e,g);this.setIndex(t);this.addAttribute("position",
+new C(u,3));this.addAttribute("normal",new C(w,3));this.addAttribute("uv",new C(A,2))}function Yc(a,b,c,d,e,f){I.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new cc(a,b,c,d,e,f));this.mergeVertices()}function cc(a,b,c,d,e,f){E.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||.5;b=b||
+1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=[],h=[],k=[],m=[],q=a,n=(b-a)/d,l=new p,x=new z,t,u;for(t=0;t<=d;t++){for(u=0;u<=c;u++)a=e+u/c*f,l.x=q*Math.cos(a),l.y=q*Math.sin(a),h.push(l.x,l.y,l.z),k.push(0,0,1),x.x=(l.x/b+1)/2,x.y=(l.y/b+1)/2,m.push(x.x,x.y);q+=n}for(t=0;t<d;t++)for(b=t*(c+1),u=0;u<c;u++)a=u+b,e=a+c+1,f=a+c+2,q=a+1,g.push(a,e,q),g.push(e,f,q);this.setIndex(g);this.addAttribute("position",new C(h,3));this.addAttribute("normal",
+new C(k,3));this.addAttribute("uv",new C(m,2))}function Zc(a,b,c,d){I.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new dc(a,b,c,d));this.mergeVertices()}function dc(a,b,c,d){E.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=R.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],h=1/b,k=new p,m=new z,q;for(q=0;q<=b;q++){var n=c+q*h*d;var l=
+Math.sin(n),x=Math.cos(n);for(n=0;n<=a.length-1;n++)k.x=a[n].x*l,k.y=a[n].y,k.z=a[n].x*x,f.push(k.x,k.y,k.z),m.x=q/b,m.y=n/(a.length-1),g.push(m.x,m.y)}for(q=0;q<b;q++)for(n=0;n<a.length-1;n++)c=n+q*a.length,h=c+a.length,k=c+a.length+1,m=c+1,e.push(c,h,m),e.push(h,k,m);this.setIndex(e);this.addAttribute("position",new C(f,3));this.addAttribute("uv",new C(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new p,f=new p,g=new p,c=b*a.length*3,n=q=0;q<a.length;q++,
+n+=3)e.x=d[n+0],e.y=d[n+1],e.z=d[n+2],f.x=d[c+n+0],f.y=d[c+n+1],f.z=d[c+n+2],g.addVectors(e,f).normalize(),d[n+0]=d[c+n+0]=g.x,d[n+1]=d[c+n+1]=g.y,d[n+2]=d[c+n+2]=g.z}function xb(a,b){I.call(this);this.type="ShapeGeometry";"object"===typeof b&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new yb(a,b));this.mergeVertices()}function yb(a,b){function c(a){var c,h=e.length/3;a=a.extractPoints(b);
+var m=a.shape,q=a.holes;if(!1===Za.isClockWise(m))for(m=m.reverse(),a=0,c=q.length;a<c;a++){var l=q[a];!0===Za.isClockWise(l)&&(q[a]=l.reverse())}var p=Za.triangulateShape(m,q);a=0;for(c=q.length;a<c;a++)l=q[a],m=m.concat(l);a=0;for(c=m.length;a<c;a++)l=m[a],e.push(l.x,l.y,0),f.push(0,0,1),g.push(l.x,l.y);a=0;for(c=p.length;a<c;a++)m=p[a],d.push(m[0]+h,m[1]+h,m[2]+h),k+=3}E.call(this);this.type="ShapeBufferGeometry";this.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],h=0,k=
+0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(h,k,m),h+=k,k=0;this.setIndex(d);this.addAttribute("position",new C(e,3));this.addAttribute("normal",new C(f,3));this.addAttribute("uv",new C(g,2))}function qf(a,b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function ec(a,b){E.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:b};var c=[];b=Math.cos(R.DEG2RAD*(void 0!==
+b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new I;g.fromBufferGeometry(a)}else g=a.clone();g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var h=0,k=g.length;h<k;h++)for(var m=g[h],q=0;3>q;q++){var n=m[f[q]];var l=m[f[(q+1)%3]];d[0]=Math.min(n,l);d[1]=Math.max(n,l);n=d[0]+","+d[1];void 0===e[n]?e[n]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[n].face2=h}for(n in e)if(d=e[n],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],
+c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.addAttribute("position",new C(c,3))}function zb(a,b,c,d,e,f,g,h){I.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new $a(a,b,c,d,e,f,g,h));this.mergeVertices()}function $a(a,b,c,d,e,f,g,h){function k(c){var e,f=new z,k=new p,r=0,u=!0===c?a:b,v=!0===c?1:-1;var C=t;for(e=1;e<=d;e++)n.push(0,w*v,0),l.push(0,
+v,0),x.push(.5,.5),t++;var D=t;for(e=0;e<=d;e++){var E=e/d*h+g,F=Math.cos(E);E=Math.sin(E);k.x=u*E;k.y=w*v;k.z=u*F;n.push(k.x,k.y,k.z);l.push(0,v,0);f.x=.5*F+.5;f.y=.5*E*v+.5;x.push(f.x,f.y);t++}for(e=0;e<d;e++)f=C+e,k=D+e,!0===c?q.push(k,k+1,f):q.push(k+1,k,f),r+=3;m.addGroup(A,r,!0===c?1:2);A+=r}E.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var m=this;a=void 0!==a?a:1;
+b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var q=[],n=[],l=[],x=[],t=0,u=[],w=c/2,A=0;(function(){var f,k,r=new p,N=new p,z=0,B=(b-a)/c;for(k=0;k<=e;k++){var C=[],E=k/e,D=E*(b-a)+a;for(f=0;f<=d;f++){var F=f/d,G=F*h+g,J=Math.sin(G);G=Math.cos(G);N.x=D*J;N.y=-E*c+w;N.z=D*G;n.push(N.x,N.y,N.z);r.set(J,B,G).normalize();l.push(r.x,r.y,r.z);x.push(F,1-E);C.push(t++)}u.push(C)}for(f=0;f<d;f++)for(k=0;k<e;k++)r=u[k+1][f],N=u[k+
+1][f+1],B=u[k][f+1],q.push(u[k][f],r,B),q.push(r,N,B),z+=6;m.addGroup(A,z,0);A+=z})();!1===f&&(0<a&&k(!0),0<b&&k(!1));this.setIndex(q);this.addAttribute("position",new C(n,3));this.addAttribute("normal",new C(l,3));this.addAttribute("uv",new C(x,2))}function $c(a,b,c,d,e,f,g){zb.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function ad(a,b,c,d,e,f,g){$a.call(this,0,a,b,c,d,e,f,g);this.type=
+"ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function bd(a,b,c,d){I.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new fc(a,b,c,d));this.mergeVertices()}function fc(a,b,c,d){E.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:
+0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],h=[],k,m=new p,q=new z;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);var n=0;for(k=3;n<=b;n++,k+=3){var l=c+n/b*d;m.x=a*Math.cos(l);m.y=a*Math.sin(l);f.push(m.x,m.y,m.z);g.push(0,0,1);q.x=(f[k]/a+1)/2;q.y=(f[k+1]/a+1)/2;h.push(q.x,q.y)}for(k=1;k<=b;k++)e.push(k,k+1,0);this.setIndex(e);this.addAttribute("position",new C(f,3));this.addAttribute("normal",new C(g,3));this.addAttribute("uv",new C(h,2))}function Ab(a){L.call(this);this.type="ShadowMaterial";this.color=
+new G(0);this.transparent=!0;this.setValues(a)}function gc(a){ka.call(this,a);this.type="RawShaderMaterial"}function Ta(a){L.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new G(16777215);this.metalness=this.roughness=.5;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new G(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=
+new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function Bb(a){Ta.call(this);this.defines={PHYSICAL:""};this.type="MeshPhysicalMaterial";this.reflectivity=.5;this.clearCoatRoughness=
+this.clearCoat=0;this.setValues(a)}function Ia(a){L.call(this);this.type="MeshPhongMaterial";this.color=new G(16777215);this.specular=new G(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new G(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;
+this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function Cb(a){Ia.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.gradientMap=null;this.setValues(a)}function Db(a){L.call(this);this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=
+null;this.normalMapType=0;this.normalScale=new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.lights=this.fog=!1;this.setValues(a)}function Eb(a){L.call(this);this.type="MeshLambertMaterial";this.color=new G(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new G(0);this.emissiveIntensity=1;this.envMap=
+this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function Fb(a){L.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new G(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=
+new z(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.lights=this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a);if(null===this.matcap){a=document.createElement("canvas");a.width=1;a.height=1;var b=a.getContext("2d");b.fillStyle="#fff";b.fillRect(0,0,1,1);this.matcap=new THREE.CanvasTexture(a)}}function Gb(a){T.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function Ca(a,
+b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c}function Ad(a,b,c,d){Ca.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function cd(a,b,c,d){Ca.call(this,a,b,c,d)}function Bd(a,b,c,d){Ca.call(this,a,b,c,d)}function qa(a,b,c,d){if(void 0===a)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===b||0===b.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+
+a);this.name=a;this.times=ra.convertArray(b,this.TimeBufferType);this.values=ra.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function Cd(a,b,c){qa.call(this,a,b,c)}function Dd(a,b,c,d){qa.call(this,a,b,c,d)}function hc(a,b,c,d){qa.call(this,a,b,c,d)}function Ed(a,b,c,d){Ca.call(this,a,b,c,d)}function dd(a,b,c,d){qa.call(this,a,b,c,d)}function Fd(a,b,c,d){qa.call(this,a,b,c,d)}function ic(a,b,c,d){qa.call(this,a,b,c,d)}function za(a,b,c){this.name=a;this.tracks=
+c;this.duration=void 0!==b?b:-1;this.uuid=R.generateUUID();0>this.duration&&this.resetDuration()}function Yg(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return hc;case "vector":case "vector2":case "vector3":case "vector4":return ic;case "color":return Dd;case "quaternion":return dd;case "bool":case "boolean":return Cd;case "string":return Fd}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Zg(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");
+var b=Yg(a.type);if(void 0===a.times){var c=[],d=[];ra.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function ge(a,b,c){var d=this,e=!1,f=0,g=0,h=void 0;this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};
+this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return h?h(a):a};this.setURLModifier=function(a){h=a;return this}}function Fa(a){this.manager=void 0!==a?a:ta}function rf(a){this.manager=void 0!==a?a:ta}function sf(a){this.manager=void 0!==a?a:ta;this._parser=null}function he(a){this.manager=void 0!==a?a:ta;this._parser=null}function ed(a){this.manager=void 0!==a?a:ta}function ie(a){this.manager=void 0!==a?a:ta}function Gd(a){this.manager=void 0!==a?a:ta}
+function Q(){this.type="Curve";this.arcLengthDivisions=200}function wa(a,b,c,d,e,f,g,h){Q.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function jc(a,b,c,d,e,f){wa.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function je(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,k){e=k*(g-e);h=k*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,
+f,g,h,k,m,q){e=((f-e)/k-(g-e)/(k+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+q)+(h-g)/q)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function ua(a,b,c,d){Q.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function tf(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function fd(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function gd(a,
+b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Ja(a,b,c,d){Q.call(this);this.type="CubicBezierCurve";this.v0=a||new z;this.v1=b||new z;this.v2=c||new z;this.v3=d||new z}function Ua(a,b,c,d){Q.call(this);this.type="CubicBezierCurve3";this.v0=a||new p;this.v1=b||new p;this.v2=c||new p;this.v3=d||new p}function Aa(a,b){Q.call(this);this.type="LineCurve";this.v1=a||new z;this.v2=b||new z}function Ka(a,b){Q.call(this);this.type="LineCurve3";this.v1=a||new p;this.v2=b||
+new p}function La(a,b,c){Q.call(this);this.type="QuadraticBezierCurve";this.v0=a||new z;this.v1=b||new z;this.v2=c||new z}function Va(a,b,c){Q.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new p;this.v1=b||new p;this.v2=c||new p}function Ma(a){Q.call(this);this.type="SplineCurve";this.points=a||[]}function ab(){Q.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Na(a){ab.call(this);this.type="Path";this.currentPoint=new z;a&&this.setFromPoints(a)}function ib(a){Na.call(this,
+a);this.uuid=R.generateUUID();this.type="Shape";this.holes=[]}function ca(a,b){D.call(this);this.type="Light";this.color=new G(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function Hd(a,b,c){ca.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(D.DefaultUp);this.updateMatrix();this.groundColor=new G(b)}function Hb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new z(512,512);this.map=null;this.matrix=new P}function Id(){Hb.call(this,new V(50,
+1,.5,500))}function Jd(a,b,c,d,e,f){ca.call(this,a,b);this.type="SpotLight";this.position.copy(D.DefaultUp);this.updateMatrix();this.target=new D;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new Id}function Kd(a,b,c,d){ca.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",
+{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Hb(new V(90,1,.5,500))}function hd(a,b,c,d,e,f){Ra.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function Ld(){Hb.call(this,
+new hd(-5,5,5,-5,.5,500))}function Md(a,b){ca.call(this,a,b);this.type="DirectionalLight";this.position.copy(D.DefaultUp);this.updateMatrix();this.target=new D;this.shadow=new Ld}function Nd(a,b){ca.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function Od(a,b,c,d){ca.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function Pd(a){this.manager=void 0!==a?a:ta;this.textures={}}function ke(a){this.manager=void 0!==a?a:ta}function kc(){}
+function Qd(a){"boolean"===typeof a&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),a=void 0);this.manager=void 0!==a?a:ta;this.withCredentials=!1}function le(a){this.manager=void 0!==a?a:ta;this.resourcePath=""}function me(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");this.manager=void 0!==
+a?a:ta;this.options=void 0}function ne(){this.type="ShapePath";this.color=new G;this.subPaths=[];this.currentPath=null}function oe(a){this.type="Font";this.data=a}function uf(a){this.manager=void 0!==a?a:ta}function pe(a){this.manager=void 0!==a?a:ta}function vf(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new V;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new V;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1}function id(a,b,
+c,d){D.call(this);this.type="CubeCamera";var e=new V(90,1,a,b);e.up.set(0,-1,0);e.lookAt(new p(1,0,0));this.add(e);var f=new V(90,1,a,b);f.up.set(0,-1,0);f.lookAt(new p(-1,0,0));this.add(f);var g=new V(90,1,a,b);g.up.set(0,0,1);g.lookAt(new p(0,1,0));this.add(g);var h=new V(90,1,a,b);h.up.set(0,0,-1);h.lookAt(new p(0,-1,0));this.add(h);var k=new V(90,1,a,b);k.up.set(0,-1,0);k.lookAt(new p(0,0,1));this.add(k);var m=new V(90,1,a,b);m.up.set(0,-1,0);m.lookAt(new p(0,0,-1));this.add(m);d=d||{format:1022,
+magFilter:1006,minFilter:1006};this.renderTarget=new Jb(c,c,d);this.renderTarget.texture.name="CubeCamera";this.update=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=this.renderTarget,d=c.texture.generateMipmaps;c.texture.generateMipmaps=!1;c.activeCubeFace=0;a.render(b,e,c);c.activeCubeFace=1;a.render(b,f,c);c.activeCubeFace=2;a.render(b,g,c);c.activeCubeFace=3;a.render(b,h,c);c.activeCubeFace=4;a.render(b,k,c);c.texture.generateMipmaps=d;c.activeCubeFace=5;a.render(b,m,c);a.setRenderTarget(null)};
+this.clear=function(a,b,c,d){for(var e=this.renderTarget,f=0;6>f;f++)e.activeCubeFace=f,a.setRenderTarget(e),a.clear(b,c,d);a.setRenderTarget(null)}}function qe(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function re(){D.call(this);this.type="AudioListener";this.context=se.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0}function lc(a){D.call(this);this.type="Audio";this.listener=
+a;this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.loop=!1;this.offset=this.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]}function te(a){lc.call(this,a);this.panner=this.context.createPanner();this.panner.connect(this.gain)}function ue(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);
+a.getOutput().connect(this.analyser)}function ve(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function wf(a,b,c){c=c||oa.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function oa(a,b,c){this.path=b;this.parsedPath=c||oa.parseTrackName(b);
+this.node=oa.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function xf(){this.uuid=R.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}
+function yf(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=
+this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function we(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function Rd(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function xe(){E.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function ye(a,b,c){sb.call(this,a,b);this.meshPerAttribute=
+c||1}function ze(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));F.call(this,a,b,c);this.meshPerAttribute=d||1}function zf(a,b,c,d){this.ray=new rb(a,b);this.near=c||0;this.far=d||Infinity;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");
+return this.Points}}})}function Af(a,b){return a.distance-b.distance}function Ae(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=a.length;d<e;d++)Ae(a[d],b,c,!0)}}function Bf(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function Cf(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Be(a,b){this.min=void 0!==a?a:new z(Infinity,Infinity);this.max=void 0!==b?b:new z(-Infinity,
+-Infinity)}function Ce(a,b){this.start=void 0!==a?a:new p;this.end=void 0!==b?b:new p}function jd(a){D.call(this);this.material=a;this.render=function(){}}function kd(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16711680;d=void 0!==d?d:1;b=0;(c=this.object.geometry)&&c.isGeometry?b=3*c.faces.length:c&&c.isBufferGeometry&&(b=c.attributes.normal.count);c=new E;b=new C(6*b,3);c.addAttribute("position",b);S.call(this,c,new T({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}
+function mc(a,b){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new E;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.addAttribute("position",new C(b,3));b=new T({fog:!1});this.cone=new S(a,b);this.add(this.cone);this.update()}function Df(a){var b=[];a&&a.isBone&&b.push(a);for(var c=
+0;c<a.children.length;c++)b.push.apply(b,Df(a.children[c]));return b}function nc(a){for(var b=Df(a),c=new E,d=[],e=[],f=new G(0,0,1),g=new G(0,1,0),h=0;h<b.length;h++){var k=b[h];k.parent&&k.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,g.g,g.b))}c.addAttribute("position",new C(d,3));c.addAttribute("color",new C(e,3));d=new T({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});S.call(this,c,d);this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=
+!1}function oc(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new wb(b,4,2);b=new Ea({wireframe:!0,fog:!1});pa.call(this,a,b);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function pc(a,b){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new T({fog:!1});b=new E;b.addAttribute("position",new F(new Float32Array(15),3));this.line=new ma(b,a);this.add(this.line);this.update()}function qc(a,
+b,c){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new tb(b);a.rotateY(.5*Math.PI);this.material=new Ea({wireframe:!0,fog:!1});void 0===this.color&&(this.material.vertexColors=2);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.addAttribute("color",new F(b,3));this.add(new pa(a,this.material));this.update()}function ld(a,b,c,d){a=a||10;b=b||10;c=new G(void 0!==c?c:4473924);d=new G(void 0!==d?d:8947848);var e=
+b/2,f=a/b,g=a/2;a=[];for(var h=[],k=0,m=0,q=-g;k<=b;k++,q+=f){a.push(-g,0,q,g,0,q);a.push(q,0,-g,q,0,g);var n=k===e?c:d;n.toArray(h,m);m+=3;n.toArray(h,m);m+=3;n.toArray(h,m);m+=3;n.toArray(h,m);m+=3}b=new E;b.addAttribute("position",new C(a,3));b.addAttribute("color",new C(h,3));c=new T({vertexColors:2});S.call(this,b,c)}function Sd(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new G(void 0!==e?e:4473924);f=new G(void 0!==f?f:8947848);var g=[],h=[],k;for(k=0;k<=b;k++){var m=k/b*2*Math.PI;var q=Math.sin(m)*
+a;m=Math.cos(m)*a;g.push(0,0,0);g.push(q,0,m);var n=k&1?e:f;h.push(n.r,n.g,n.b);h.push(n.r,n.g,n.b)}for(k=0;k<=c;k++){n=k&1?e:f;var l=a-a/c*k;for(b=0;b<d;b++)m=b/d*2*Math.PI,q=Math.sin(m)*l,m=Math.cos(m)*l,g.push(q,0,m),h.push(n.r,n.g,n.b),m=(b+1)/d*2*Math.PI,q=Math.sin(m)*l,m=Math.cos(m)*l,g.push(q,0,m),h.push(n.r,n.g,n.b)}a=new E;a.addAttribute("position",new C(g,3));a.addAttribute("color",new C(h,3));g=new T({vertexColors:2});S.call(this,a,g)}function md(a,b,c,d){this.object=a;this.size=void 0!==
+b?b:1;a=void 0!==c?c:16776960;d=void 0!==d?d:1;b=0;(c=this.object.geometry)&&c.isGeometry?b=c.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");c=new E;b=new C(6*b,3);c.addAttribute("position",b);S.call(this,c,new T({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}function rc(a,b,c){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===
+b&&(b=1);a=new E;a.addAttribute("position",new C([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new T({fog:!1});this.lightPlane=new ma(a,b);this.add(this.lightPlane);a=new E;a.addAttribute("position",new C([0,0,0,0,0,1],3));this.targetLine=new ma(a,b);this.add(this.targetLine);this.update()}function nd(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===h[a]&&(h[a]=[]);h[a].push(f.length/3-1)}var d=new E,e=new T({color:16777215,vertexColors:1}),f=[],g=[],h={},
+k=new G(16755200),m=new G(16711680),q=new G(43775),l=new G(16777215),r=new G(3355443);b("n1","n2",k);b("n2","n4",k);b("n4","n3",k);b("n3","n1",k);b("f1","f2",k);b("f2","f4",k);b("f4","f3",k);b("f3","f1",k);b("n1","f1",k);b("n2","f2",k);b("n3","f3",k);b("n4","f4",k);b("p","n1",m);b("p","n2",m);b("p","n3",m);b("p","n4",m);b("u1","u2",q);b("u2","u3",q);b("u3","u1",q);b("c","t",l);b("p","c",r);b("cn1","cn2",r);b("cn3","cn4",r);b("cf1","cf2",r);b("cf3","cf4",r);d.addAttribute("position",new C(f,3));d.addAttribute("color",
+new C(g,3));S.call(this,d,e);this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()}function bb(a,b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new E;d.setIndex(new F(a,1));d.addAttribute("position",new F(c,3));S.call(this,d,new T({color:b}));this.matrixAutoUpdate=!1;this.update()}function od(a,
+b){this.type="Box3Helper";this.box=a;a=void 0!==b?b:16776960;b=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new E;c.setIndex(new F(b,1));c.addAttribute("position",new C([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));S.call(this,c,new T({color:a}));this.geometry.computeBoundingSphere()}function pd(a,b,c){this.type="PlaneHelper";this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new E;b.addAttribute("position",new C([1,-1,1,-1,1,1,-1,-1,1,
+1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3));b.computeBoundingSphere();ma.call(this,b,new T({color:a}));b=new E;b.addAttribute("position",new C([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new pa(b,new Ea({color:a,opacity:.2,transparent:!0,depthWrite:!1})))}function cb(a,b,c,d,e,f){D.call(this);void 0===a&&(a=new THREE.Vector3(0,0,1));void 0===b&&(b=new THREE.Vector3(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=
+.2*e);void 0===Td&&(Td=new E,Td.addAttribute("position",new C([0,0,0,0,1,0],3)),De=new $a(0,.5,1,5,1),De.translate(0,-.5,0));this.position.copy(b);this.line=new ma(Td,new T({color:d}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new pa(De,new Ea({color:d}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function qd(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new E;a.addAttribute("position",new C(b,3));a.addAttribute("color",
+new C([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new T({vertexColors:2});S.call(this,a,b)}function Ef(a){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");ua.call(this,a);this.type="catmullrom";this.closed=!0}function Ff(a){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");ua.call(this,a);this.type="catmullrom"}function Ee(a){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.");
+ua.call(this,a);this.type="catmullrom"}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52));void 0===Number.isInteger&&(Number.isInteger=function(a){return"number"===typeof a&&isFinite(a)&&Math.floor(a)===a});void 0===Math.sign&&(Math.sign=function(a){return 0>a?-1:0<a?1:+a});!1==="name"in Function.prototype&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}});void 0===Object.assign&&function(){Object.assign=function(a){if(void 0===
+a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(b[e]=d[e])}return b}}();Object.assign(ia.prototype,{addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;
+var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)},removeEventListener:function(a,b){void 0!==this._listeners&&(a=this._listeners[a],void 0!==a&&(b=a.indexOf(b),-1!==b&&a.splice(b,1)))},dispatchEvent:function(a){if(void 0!==this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;b=b.slice(0);for(var c=0,d=b.length;c<d;c++)b[c].call(this,a)}}}});var R={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var a=[],b=0;256>b;b++)a[b]=(16>b?"0":"")+b.toString(16);
+return function(){var b=4294967295*Math.random()|0,d=4294967295*Math.random()|0,e=4294967295*Math.random()|0,f=4294967295*Math.random()|0;return(a[b&255]+a[b>>8&255]+a[b>>16&255]+a[b>>24&255]+"-"+a[d&255]+a[d>>8&255]+"-"+a[d>>16&15|64]+a[d>>24&255]+"-"+a[e&63|128]+a[e>>8&255]+"-"+a[e>>16&255]+a[e>>24&255]+a[f&255]+a[f>>8&255]+a[f>>16&255]+a[f>>24&255]).toUpperCase()}}(),clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a,b){return(a%b+b)%b},mapLinear:function(a,b,c,
+d,e){return d+(a-b)*(e-d)/(c-b)},lerp:function(a,b,c){return(1-c)*a+c*b},smoothstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))},randFloat:function(a,b){return a+Math.random()*(b-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(a){return a*R.DEG2RAD},radToDeg:function(a){return a*
+R.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},ceilPowerOfTwo:function(a){return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))},floorPowerOfTwo:function(a){return Math.pow(2,Math.floor(Math.log(a)/Math.LN2))}};Object.defineProperties(z.prototype,{width:{get:function(){return this.x},set:function(a){this.x=a}},height:{get:function(){return this.y},set:function(a){this.y=a}}});Object.assign(z.prototype,{isVector2:!0,set:function(a,b){this.x=a;this.y=b;return this},setScalar:function(a){this.y=
+this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a,
+b){if(void 0!==b)return console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),
+this.subVectors(a,b);this.x-=a.x;this.y-=a.y;return this},subScalar:function(a){this.x-=a;this.y-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiply:function(a){this.x*=a.x;this.y*=a.y;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;return this},divide:function(a){this.x/=a.x;this.y/=a.y;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},applyMatrix3:function(a){var b=this.x,c=this.y;a=a.elements;this.x=a[0]*b+a[3]*c+a[6];this.y=
+a[1]*b+a[4]*c+a[7];return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));return this},clampScalar:function(){var a=new z,b=new z;return function(c,d){a.set(c,c);b.set(d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||
+1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*
+a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var a=Math.atan2(this.y,this.x);0>a&&(a+=2*Math.PI);return a},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=
+this.x-a.x;a=this.y-a.y;return b*b+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];return this},toArray:function(a,
+b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);return this},rotateAround:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=this.x-a.x,e=this.y-a.y;this.x=d*c-e*b+a.x;this.y=d*b+e*c+a.y;return this}});Object.assign(P.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,k,m,q,l,r,p,t,u){var n=this.elements;
+n[0]=a;n[4]=b;n[8]=c;n[12]=d;n[1]=e;n[5]=f;n[9]=g;n[13]=h;n[2]=k;n[6]=m;n[10]=q;n[14]=l;n[3]=r;n[7]=p;n[11]=t;n[15]=u;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new P).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return this},copyPosition:function(a){var b=
+this.elements;a=a.elements;b[12]=a[12];b[13]=a[13];b[14]=a[14];return this},extractBasis:function(a,b,c){a.setFromMatrixColumn(this,0);b.setFromMatrixColumn(this,1);c.setFromMatrixColumn(this,2);return this},makeBasis:function(a,b,c){this.set(a.x,b.x,c.x,0,a.y,b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(){var a=new p;return function(b){var c=this.elements,d=b.elements,e=1/a.setFromMatrixColumn(b,0).length(),f=1/a.setFromMatrixColumn(b,1).length();b=1/a.setFromMatrixColumn(b,
+2).length();c[0]=d[0]*e;c[1]=d[1]*e;c[2]=d[2]*e;c[3]=0;c[4]=d[4]*f;c[5]=d[5]*f;c[6]=d[6]*f;c[7]=0;c[8]=d[8]*b;c[9]=d[9]*b;c[10]=d[10]*b;c[11]=0;c[12]=0;c[13]=0;c[14]=0;c[15]=1;return this}}(),makeRotationFromEuler:function(a){a&&a.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c);c=Math.sin(c);var g=Math.cos(d);d=Math.sin(d);var h=Math.cos(e);e=Math.sin(e);if("XYZ"===a.order){a=
+f*h;var k=f*e,m=c*h,q=c*e;b[0]=g*h;b[4]=-g*e;b[8]=d;b[1]=k+m*d;b[5]=a-q*d;b[9]=-c*g;b[2]=q-a*d;b[6]=m+k*d;b[10]=f*g}else"YXZ"===a.order?(a=g*h,k=g*e,m=d*h,q=d*e,b[0]=a+q*c,b[4]=m*c-k,b[8]=f*d,b[1]=f*e,b[5]=f*h,b[9]=-c,b[2]=k*c-m,b[6]=q+a*c,b[10]=f*g):"ZXY"===a.order?(a=g*h,k=g*e,m=d*h,q=d*e,b[0]=a-q*c,b[4]=-f*e,b[8]=m+k*c,b[1]=k+m*c,b[5]=f*h,b[9]=q-a*c,b[2]=-f*d,b[6]=c,b[10]=f*g):"ZYX"===a.order?(a=f*h,k=f*e,m=c*h,q=c*e,b[0]=g*h,b[4]=m*d-k,b[8]=a*d+q,b[1]=g*e,b[5]=q*d+a,b[9]=k*d-m,b[2]=-d,b[6]=c*
+g,b[10]=f*g):"YZX"===a.order?(a=f*g,k=f*d,m=c*g,q=c*d,b[0]=g*h,b[4]=q-a*e,b[8]=m*e+k,b[1]=e,b[5]=f*h,b[9]=-c*h,b[2]=-d*h,b[6]=k*e+m,b[10]=a-q*e):"XZY"===a.order&&(a=f*g,k=f*d,m=c*g,q=c*d,b[0]=g*h,b[4]=-e,b[8]=d*h,b[1]=a*e+q,b[5]=f*h,b[9]=k*e-m,b[2]=m*e-k,b[6]=c*h,b[10]=q*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(){var a=new p(0,0,0),b=new p(1,1,1);return function(c){return this.compose(a,c,b)}}(),lookAt:function(){var a=new p,b=new p,
+c=new p;return function(d,e,f){var g=this.elements;c.subVectors(d,e);0===c.lengthSq()&&(c.z=1);c.normalize();a.crossVectors(f,c);0===a.lengthSq()&&(1===Math.abs(f.z)?c.x+=1E-4:c.z+=1E-4,c.normalize(),a.crossVectors(f,c));a.normalize();b.crossVectors(c,a);g[0]=a.x;g[4]=b.x;g[8]=c.x;g[1]=a.y;g[5]=b.y;g[9]=c.y;g[2]=a.z;g[6]=b.z;g[10]=c.z;return this}}(),multiply:function(a,b){return void 0!==b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),
+this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[4],f=c[8],g=c[12],h=c[1],k=c[5],m=c[9],q=c[13],n=c[2],l=c[6],p=c[10],t=c[14],u=c[3],w=c[7],A=c[11];c=c[15];var v=d[0],H=d[4],y=d[8],N=d[12],z=d[1],B=d[5],C=d[9],E=d[13],D=d[2],F=d[6],G=d[10],J=d[14],L=d[3],I=d[7],K=d[11];d=d[15];b[0]=a*v+e*z+f*D+g*L;b[4]=a*H+e*B+f*F+g*I;b[8]=a*y+e*C+f*G+
+g*K;b[12]=a*N+e*E+f*J+g*d;b[1]=h*v+k*z+m*D+q*L;b[5]=h*H+k*B+m*F+q*I;b[9]=h*y+k*C+m*G+q*K;b[13]=h*N+k*E+m*J+q*d;b[2]=n*v+l*z+p*D+t*L;b[6]=n*H+l*B+p*F+t*I;b[10]=n*y+l*C+p*G+t*K;b[14]=n*N+l*E+p*J+t*d;b[3]=u*v+w*z+A*D+c*L;b[7]=u*H+w*B+A*F+c*I;b[11]=u*y+w*C+A*G+c*K;b[15]=u*N+w*E+A*J+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},applyToBufferAttribute:function(){var a=
+new p;return function(b){for(var c=0,d=b.count;c<d;c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),a.applyMatrix4(this),b.setXYZ(c,a.x,a.y,a.z);return b}}(),determinant:function(){var a=this.elements,b=a[0],c=a[4],d=a[8],e=a[12],f=a[1],g=a[5],h=a[9],k=a[13],m=a[2],q=a[6],l=a[10],r=a[14];return a[3]*(+e*h*q-d*k*q-e*g*l+c*k*l+d*g*r-c*h*r)+a[7]*(+b*h*r-b*k*l+e*f*l-d*f*r+d*k*m-e*h*m)+a[11]*(+b*k*q-b*g*r-e*f*q+c*f*r+e*g*m-c*k*m)+a[15]*(-d*g*m-b*h*q+b*g*l+d*f*q-c*f*l+c*h*m)},transpose:function(){var a=this.elements;
+var b=a[1];a[1]=a[4];a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b;return this},setPosition:function(a){var b=this.elements;b[12]=a.x;b[13]=a.y;b[14]=a.z;return this},getInverse:function(a,b){var c=this.elements,d=a.elements;a=d[0];var e=d[1],f=d[2],g=d[3],h=d[4],k=d[5],m=d[6],q=d[7],l=d[8],r=d[9],p=d[10],t=d[11],u=d[12],w=d[13],A=d[14];d=d[15];var v=r*A*q-w*p*q+w*m*t-k*A*t-r*m*d+k*p*d,z=u*p*q-l*A*q-u*m*t+h*A*
+t+l*m*d-h*p*d,y=l*w*q-u*r*q+u*k*t-h*w*t-l*k*d+h*r*d,N=u*r*m-l*w*m-u*k*p+h*w*p+l*k*A-h*r*A,C=a*v+e*z+f*y+g*N;if(0===C){if(!0===b)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return this.identity()}b=1/C;c[0]=v*b;c[1]=(w*p*g-r*A*g-w*f*t+e*A*t+r*f*d-e*p*d)*b;c[2]=(k*A*g-w*m*g+w*f*q-e*A*q-k*f*d+e*m*d)*b;c[3]=(r*m*g-k*p*g-r*f*q+e*p*q+k*f*t-e*m*t)*b;c[4]=z*b;c[5]=(l*A*g-u*p*g+u*f*t-a*
+A*t-l*f*d+a*p*d)*b;c[6]=(u*m*g-h*A*g-u*f*q+a*A*q+h*f*d-a*m*d)*b;c[7]=(h*p*g-l*m*g+l*f*q-a*p*q-h*f*t+a*m*t)*b;c[8]=y*b;c[9]=(u*r*g-l*w*g-u*e*t+a*w*t+l*e*d-a*r*d)*b;c[10]=(h*w*g-u*k*g+u*e*q-a*w*q-h*e*d+a*k*d)*b;c[11]=(l*k*g-h*r*g-l*e*q+a*r*q+h*e*t-a*k*t)*b;c[12]=N*b;c[13]=(l*w*f-u*r*f+u*e*p-a*w*p-l*e*A+a*r*A)*b;c[14]=(u*k*f-h*w*f-u*e*m+a*w*m+h*e*A-a*k*A)*b;c[15]=(h*r*f-l*k*f+l*e*m-a*r*m-h*e*p+a*k*p)*b;return this},scale:function(a){var b=this.elements,c=a.x,d=a.y;a=a.z;b[0]*=c;b[4]*=d;b[8]*=a;b[1]*=
+c;b[5]*=d;b[9]*=a;b[2]*=c;b[6]*=d;b[10]*=a;b[3]*=c;b[7]*=d;b[11]*=a;return this},getMaxScaleOnAxis:function(){var a=this.elements;return Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1]+a[2]*a[2],a[4]*a[4]+a[5]*a[5]+a[6]*a[6],a[8]*a[8]+a[9]*a[9]+a[10]*a[10]))},makeTranslation:function(a,b,c){this.set(1,0,0,a,0,1,0,b,0,0,1,c,0,0,0,1);return this},makeRotationX:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1);return this},makeRotationY:function(a){var b=Math.cos(a);a=Math.sin(a);
+this.set(b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1);return this},makeRotationZ:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1);return this},makeRotationAxis:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=1-c,e=a.x,f=a.y;a=a.z;var g=d*e,h=d*f;this.set(g*e+c,g*f-b*a,g*a+b*f,0,g*f+b*a,h*f+c,h*a-b*e,0,g*a-b*f,h*a+b*e,d*a*a+c,0,0,0,0,1);return this},makeScale:function(a,b,c){this.set(a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1);return this},makeShear:function(a,b,c){this.set(1,b,
+c,0,a,1,c,0,a,b,1,0,0,0,0,1);return this},compose:function(a,b,c){var d=this.elements,e=b._x,f=b._y,g=b._z,h=b._w,k=e+e,m=f+f,l=g+g;b=e*k;var n=e*m;e*=l;var r=f*m;f*=l;g*=l;k*=h;m*=h;h*=l;l=c.x;var p=c.y;c=c.z;d[0]=(1-(r+g))*l;d[1]=(n+h)*l;d[2]=(e-m)*l;d[3]=0;d[4]=(n-h)*p;d[5]=(1-(b+g))*p;d[6]=(f+k)*p;d[7]=0;d[8]=(e+m)*c;d[9]=(f-k)*c;d[10]=(1-(b+r))*c;d[11]=0;d[12]=a.x;d[13]=a.y;d[14]=a.z;d[15]=1;return this},decompose:function(){var a=new p,b=new P;return function(c,d,e){var f=this.elements,g=a.set(f[0],
+f[1],f[2]).length(),h=a.set(f[4],f[5],f[6]).length(),k=a.set(f[8],f[9],f[10]).length();0>this.determinant()&&(g=-g);c.x=f[12];c.y=f[13];c.z=f[14];b.copy(this);c=1/g;f=1/h;var m=1/k;b.elements[0]*=c;b.elements[1]*=c;b.elements[2]*=c;b.elements[4]*=f;b.elements[5]*=f;b.elements[6]*=f;b.elements[8]*=m;b.elements[9]*=m;b.elements[10]*=m;d.setFromRotationMatrix(b);e.x=g;e.y=h;e.z=k;return this}}(),makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");
+var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(c-d);g[9]=(c+d)/(c-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0;g[7]=0;g[11]=-1;g[15]=0;return this},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,h=1/(b-a),k=1/(c-d),m=1/(f-e);g[0]=2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*k;g[9]=0;g[13]=-((c+d)*k);g[2]=0;g[6]=0;g[10]=-2*m;g[14]=-((f+e)*m);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements;
+a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;16>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});Object.assign(ja,{slerp:function(a,b,c,d){return c.copy(a).slerp(b,
+d)},slerpFlat:function(a,b,c,d,e,f,g){var h=c[d+0],k=c[d+1],m=c[d+2];c=c[d+3];d=e[f+0];var l=e[f+1],n=e[f+2];e=e[f+3];if(c!==e||h!==d||k!==l||m!==n){f=1-g;var r=h*d+k*l+m*n+c*e,p=0<=r?1:-1,t=1-r*r;t>Number.EPSILON&&(t=Math.sqrt(t),r=Math.atan2(t,r*p),f=Math.sin(f*r)/t,g=Math.sin(g*r)/t);p*=g;h=h*f+d*p;k=k*f+l*p;m=m*f+n*p;c=c*f+e*p;f===1-g&&(g=1/Math.sqrt(h*h+k*k+m*m+c*c),h*=g,k*=g,m*=g,c*=g)}a[b]=h;a[b+1]=k;a[b+2]=m;a[b+3]=c}});Object.defineProperties(ja.prototype,{x:{get:function(){return this._x},
+set:function(a){this._x=a;this.onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this.onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this.onChangeCallback()}},w:{get:function(){return this._w},set:function(a){this._w=a;this.onChangeCallback()}}});Object.assign(ja.prototype,{isQuaternion:!0,set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._w=d;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,
+this._y,this._z,this._w)},copy:function(a){this._x=a.x;this._y=a.y;this._z=a.z;this._w=a.w;this.onChangeCallback();return this},setFromEuler:function(a,b){if(!a||!a.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var c=a._x,d=a._y,e=a._z;a=a.order;var f=Math.cos,g=Math.sin,h=f(c/2),k=f(d/2);f=f(e/2);c=g(c/2);d=g(d/2);e=g(e/2);"XYZ"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f-c*d*e):"YXZ"===a?
+(this._x=c*k*f+h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f+c*d*e):"ZXY"===a?(this._x=c*k*f-h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f-c*d*e):"ZYX"===a?(this._x=c*k*f-h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f+c*d*e):"YZX"===a?(this._x=c*k*f+h*d*e,this._y=h*d*f+c*k*e,this._z=h*k*e-c*d*f,this._w=h*k*f-c*d*e):"XZY"===a&&(this._x=c*k*f-h*d*e,this._y=h*d*f-c*k*e,this._z=h*k*e+c*d*f,this._w=h*k*f+c*d*e);if(!1!==b)this.onChangeCallback();return this},setFromAxisAngle:function(a,
+b){b/=2;var c=Math.sin(b);this._x=a.x*c;this._y=a.y*c;this._z=a.z*c;this._w=Math.cos(b);this.onChangeCallback();return this},setFromRotationMatrix:function(a){var b=a.elements,c=b[0];a=b[4];var d=b[8],e=b[1],f=b[5],g=b[9],h=b[2],k=b[6];b=b[10];var m=c+f+b;0<m?(c=.5/Math.sqrt(m+1),this._w=.25/c,this._x=(k-g)*c,this._y=(d-h)*c,this._z=(e-a)*c):c>f&&c>b?(c=2*Math.sqrt(1+c-f-b),this._w=(k-g)/c,this._x=.25*c,this._y=(a+e)/c,this._z=(d+h)/c):f>b?(c=2*Math.sqrt(1+f-c-b),this._w=(d-h)/c,this._x=(a+e)/c,this._y=
+.25*c,this._z=(g+k)/c):(c=2*Math.sqrt(1+b-c-f),this._w=(e-a)/c,this._x=(d+h)/c,this._y=(g+k)/c,this._z=.25*c);this.onChangeCallback();return this},setFromUnitVectors:function(){var a=new p,b;return function(c,d){void 0===a&&(a=new p);b=c.dot(d)+1;1E-6>b?(b=0,Math.abs(c.x)>Math.abs(c.z)?a.set(-c.y,c.x,0):a.set(0,-c.z,c.y)):a.crossVectors(c,d);this._x=a.x;this._y=a.y;this._z=a.z;this._w=b;return this.normalize()}}(),angleTo:function(a){return 2*Math.acos(Math.abs(R.clamp(this.dot(a),-1,1)))},rotateTowards:function(a,
+b){var c=this.angleTo(a);if(0===c)return this;this.slerp(a,Math.min(1,b/c));return this},inverse:function(){return this.conjugate()},conjugate:function(){this._x*=-1;this._y*=-1;this._z*=-1;this.onChangeCallback();return this},dot:function(a){return this._x*a._x+this._y*a._y+this._z*a._z+this._w*a._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var a=
+this.length();0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this.onChangeCallback();return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a,this)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z;a=a._w;
+var f=b._x,g=b._y,h=b._z;b=b._w;this._x=c*b+a*f+d*h-e*g;this._y=d*b+a*g+e*f-c*h;this._z=e*b+a*h+c*g-d*f;this._w=a*b-c*f-d*g-e*h;this.onChangeCallback();return this},slerp:function(a,b){if(0===b)return this;if(1===b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z;0>g?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;a=1-g*g;if(a<=Number.EPSILON)return g=1-b,this._w=g*
+f+b*this._w,this._x=g*c+b*this._x,this._y=g*d+b*this._y,this._z=g*e+b*this._z,this.normalize();a=Math.sqrt(a);var h=Math.atan2(a,g);g=Math.sin((1-b)*h)/a;b=Math.sin(b*h)/a;this._w=f*g+this._w*b;this._x=c*g+this._x*b;this._y=d*g+this._y*b;this._z=e*g+this._z*b;this.onChangeCallback();return this},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this.onChangeCallback();
+return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(p.prototype,{isVector3:!0,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},
+setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),
+this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;
+return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this},multiply:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;return this},multiplyVectors:function(a,b){this.x=a.x*
+b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this},applyEuler:function(){var a=new ja;return function(b){b&&b.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");return this.applyQuaternion(a.setFromEuler(b))}}(),applyAxisAngle:function(){var a=new ja;return function(b,c){return this.applyQuaternion(a.setFromAxisAngle(b,c))}}(),applyMatrix3:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[3]*c+a[6]*d;this.y=a[1]*
+b+a[4]*c+a[7]*d;this.z=a[2]*b+a[5]*c+a[8]*d;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;var e=1/(a[3]*b+a[7]*c+a[11]*d+a[15]);this.x=(a[0]*b+a[4]*c+a[8]*d+a[12])*e;this.y=(a[1]*b+a[5]*c+a[9]*d+a[13])*e;this.z=(a[2]*b+a[6]*c+a[10]*d+a[14])*e;return this},applyQuaternion:function(a){var b=this.x,c=this.y,d=this.z,e=a.x,f=a.y,g=a.z;a=a.w;var h=a*b+f*d-g*c,k=a*c+g*b-e*d,m=a*d+e*c-f*b;b=-e*b-f*c-g*d;this.x=h*a+b*-e+k*-g-m*-f;this.y=k*a+b*-f+m*-e-h*-g;this.z=m*a+b*
+-g+h*-f-k*-e;return this},project:function(a){return this.applyMatrix4(a.matrixWorldInverse).applyMatrix4(a.projectionMatrix)},unproject:function(){var a=new P;return function(b){return this.applyMatrix4(a.getInverse(b.projectionMatrix)).applyMatrix4(b.matrixWorld)}}(),transformDirection:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d;this.y=a[1]*b+a[5]*c+a[9]*d;this.z=a[2]*b+a[6]*c+a[10]*d;return this.normalize()},divide:function(a){this.x/=a.x;this.y/=a.y;this.z/=
+a.z;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));return this},clampScalar:function(){var a=new p,b=new p;
+return function(c,d){a.set(c,c,c);b.set(d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);
+return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+
+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},cross:function(a,b){return void 0!==b?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(a,
+b)):this.crossVectors(this,a)},crossVectors:function(a,b){var c=a.x,d=a.y;a=a.z;var e=b.x,f=b.y;b=b.z;this.x=d*b-a*f;this.y=a*e-c*b;this.z=c*f-d*e;return this},projectOnVector:function(a){var b=a.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(){var a=new p;return function(b){a.copy(this).projectOnVector(b);return this.sub(a)}}(),reflect:function(){var a=new p;return function(b){return this.sub(a.copy(b).multiplyScalar(2*this.dot(b)))}}(),angleTo:function(a){a=
+this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(R.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){return this.setFromSphericalCoords(a.radius,a.phi,a.theta)},setFromSphericalCoords:function(a,b,c){var d=Math.sin(b)*a;this.x=
+d*Math.sin(c);this.y=Math.cos(b)*a;this.z=d*Math.cos(c);return this},setFromCylindrical:function(a){return this.setFromCylindricalCoords(a.radius,a.theta,a.y)},setFromCylindricalCoords:function(a,b,c){this.x=a*Math.sin(b);this.y=c;this.z=a*Math.cos(b);return this},setFromMatrixPosition:function(a){a=a.elements;this.x=a[12];this.y=a[13];this.z=a[14];return this},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,
+2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute().");
+this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});Object.assign(da.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,k){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=k;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=
+a[8];return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},applyToBufferAttribute:function(){var a=new p;return function(b){for(var c=0,d=b.count;c<d;c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),a.applyMatrix3(this),b.setXYZ(c,a.x,a.y,a.z);return b}}(),multiply:function(a){return this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;
+b=this.elements;a=c[0];var e=c[3],f=c[6],g=c[1],h=c[4],k=c[7],m=c[2],l=c[5];c=c[8];var n=d[0],r=d[3],p=d[6],t=d[1],u=d[4],w=d[7],A=d[2],v=d[5];d=d[8];b[0]=a*n+e*t+f*A;b[3]=a*r+e*u+f*v;b[6]=a*p+e*w+f*d;b[1]=g*n+h*t+k*A;b[4]=g*r+h*u+k*v;b[7]=g*p+h*w+k*d;b[2]=m*n+l*t+c*A;b[5]=m*r+l*u+c*v;b[8]=m*p+l*w+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[3]*=a;b[6]*=a;b[1]*=a;b[4]*=a;b[7]*=a;b[2]*=a;b[5]*=a;b[8]*=a;return this},determinant:function(){var a=this.elements,b=a[0],c=a[1],
+d=a[2],e=a[3],f=a[4],g=a[5],h=a[6],k=a[7];a=a[8];return b*f*a-b*g*k-c*e*a+c*g*h+d*e*k-d*f*h},getInverse:function(a,b){a&&a.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var c=a.elements;a=this.elements;var d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],k=c[5],m=c[6],l=c[7];c=c[8];var n=c*h-k*l,r=k*m-c*g,p=l*g-h*m,t=d*n+e*r+f*p;if(0===t){if(!0===b)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");
+return this.identity()}b=1/t;a[0]=n*b;a[1]=(f*l-c*e)*b;a[2]=(k*e-f*h)*b;a[3]=r*b;a[4]=(c*d-f*m)*b;a[5]=(f*g-k*d)*b;a[6]=p*b;a[7]=(e*m-l*d)*b;a[8]=(h*d-e*g)*b;return this},transpose:function(){var a=this.elements;var b=a[1];a[1]=a[3];a[3]=b;b=a[2];a[2]=a[6];a[6]=b;b=a[5];a[5]=a[7];a[7]=b;return this},getNormalMatrix:function(a){return this.setFromMatrix4(a).getInverse(this).transpose()},transposeIntoArray:function(a){var b=this.elements;a[0]=b[0];a[1]=b[3];a[2]=b[6];a[3]=b[1];a[4]=b[4];a[5]=b[7];a[6]=
+b[2];a[7]=b[5];a[8]=b[8];return this},setUvTransform:function(a,b,c,d,e,f,g){var h=Math.cos(e);e=Math.sin(e);this.set(c*h,c*e,-c*(h*f+e*g)+f+a,-d*e,d*h,-d*(-e*f+h*g)+g+b,0,0,1)},scale:function(a,b){var c=this.elements;c[0]*=a;c[3]*=a;c[6]*=a;c[1]*=b;c[4]*=b;c[7]*=b;return this},rotate:function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.elements,d=c[0],e=c[3],f=c[6],g=c[1],h=c[4],k=c[7];c[0]=b*d+a*g;c[3]=b*e+a*h;c[6]=b*f+a*k;c[1]=-a*d+b*g;c[4]=-a*e+b*h;c[7]=-a*f+b*k;return this},translate:function(a,
+b){var c=this.elements;c[0]+=a*c[2];c[3]+=a*c[5];c[6]+=a*c[8];c[1]+=b*c[2];c[4]+=b*c[5];c[7]+=b*c[8];return this},equals:function(a){var b=this.elements;a=a.elements;for(var c=0;9>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;9>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];
+return a}});var jb={getDataURL:function(a){if("undefined"==typeof HTMLCanvasElement)return a.src;if(a instanceof HTMLCanvasElement)var b=a;else{b=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");b.width=a.width;b.height=a.height;var c=b.getContext("2d");a instanceof ImageData?c.putImageData(a,0,0):c.drawImage(a,0,0,a.width,a.height)}return 2048<b.width||2048<b.height?b.toDataURL("image/jpeg",.6):b.toDataURL("image/png")}},Kf=0;W.DEFAULT_IMAGE=void 0;W.DEFAULT_MAPPING=300;W.prototype=
+Object.assign(Object.create(ia.prototype),{constructor:W,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.name=a.name;this.image=a.image;this.mipmaps=a.mipmaps.slice(0);this.mapping=a.mapping;this.wrapS=a.wrapS;this.wrapT=a.wrapT;this.magFilter=a.magFilter;this.minFilter=a.minFilter;this.anisotropy=a.anisotropy;
+this.format=a.format;this.type=a.type;this.offset.copy(a.offset);this.repeat.copy(a.repeat);this.center.copy(a.center);this.rotation=a.rotation;this.matrixAutoUpdate=a.matrixAutoUpdate;this.matrix.copy(a.matrix);this.generateMipmaps=a.generateMipmaps;this.premultiplyAlpha=a.premultiplyAlpha;this.flipY=a.flipY;this.unpackAlignment=a.unpackAlignment;this.encoding=a.encoding;return this},toJSON:function(a){var b=void 0===a||"string"===typeof a;if(!b&&void 0!==a.textures[this.uuid])return a.textures[this.uuid];
+var c={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var d=this.image;void 0===d.uuid&&(d.uuid=R.generateUUID());if(!b&&void 0===a.images[d.uuid]){if(Array.isArray(d)){var e=
+[];for(var f=0,g=d.length;f<g;f++)e.push(jb.getDataURL(d[f]))}else e=jb.getDataURL(d);a.images[d.uuid]={uuid:d.uuid,url:e}}c.image=d.uuid}b||(a.textures[this.uuid]=c);return c},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(a){if(300!==this.mapping)return a;a.applyMatrix3(this.matrix);if(0>a.x||1<a.x)switch(this.wrapS){case 1E3:a.x-=Math.floor(a.x);break;case 1001:a.x=0>a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>
+a.y||1<a.y)switch(this.wrapT){case 1E3:a.y-=Math.floor(a.y);break;case 1001:a.y=0>a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y);return a}});Object.defineProperty(W.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(Z.prototype,{isVector4:!0,set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=
+a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,
+this.y,this.z,this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},
+addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;this.w-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){this.x*=
+a;this.y*=a;this.z*=a;this.w*=a;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z=a[2]*b+a[6]*c+a[10]*d+a[14]*e;this.w=a[3]*b+a[7]*c+a[11]*d+a[15]*e;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var b=Math.sqrt(1-a.w*a.w);1E-4>b?(this.x=1,this.z=this.y=0):(this.x=a.x/b,this.y=a.y/b,this.z=a.z/
+b);return this},setAxisAngleFromRotationMatrix:function(a){a=a.elements;var b=a[0];var c=a[4];var d=a[8],e=a[1],f=a[5],g=a[9];var h=a[2];var k=a[6];var m=a[10];if(.01>Math.abs(c-e)&&.01>Math.abs(d-h)&&.01>Math.abs(g-k)){if(.1>Math.abs(c+e)&&.1>Math.abs(d+h)&&.1>Math.abs(g+k)&&.1>Math.abs(b+f+m-3))return this.set(1,0,0,0),this;a=Math.PI;b=(b+1)/2;f=(f+1)/2;m=(m+1)/2;c=(c+e)/4;d=(d+h)/4;g=(g+k)/4;b>f&&b>m?.01>b?(k=0,c=h=.707106781):(k=Math.sqrt(b),h=c/k,c=d/k):f>m?.01>f?(k=.707106781,h=0,c=.707106781):
+(h=Math.sqrt(f),k=c/h,c=g/h):.01>m?(h=k=.707106781,c=0):(c=Math.sqrt(m),k=d/c,h=g/c);this.set(k,h,c,a);return this}a=Math.sqrt((k-g)*(k-g)+(d-h)*(d-h)+(e-c)*(e-c));.001>Math.abs(a)&&(a=1);this.x=(k-g)/a;this.y=(d-h)/a;this.z=(e-c)/a;this.w=Math.acos((b+f+m-1)/2);return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);this.w=Math.min(this.w,a.w);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,
+a.z);this.w=Math.max(this.w,a.w);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));this.w=Math.max(a.w,Math.min(b.w,this.w));return this},clampScalar:function(){var a,b;return function(c,d){void 0===a&&(a=new Z,b=new Z);a.set(c,c,c,c);b.set(d,d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},
+floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):
+Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+
+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===
+b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=this.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});kb.prototype=Object.assign(Object.create(ia.prototype),{constructor:kb,isWebGLRenderTarget:!0,
+setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});
+Jb.prototype=Object.create(kb.prototype);Jb.prototype.constructor=Jb;Jb.prototype.isWebGLRenderTargetCube=!0;lb.prototype=Object.create(W.prototype);lb.prototype.constructor=lb;lb.prototype.isDataTexture=!0;Object.assign(Wa.prototype,{isBox3:!0,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromArray:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.length;h<k;h+=3){var m=a[h],l=a[h+1],n=a[h+2];m<b&&(b=m);l<c&&(c=l);n<d&&(d=n);m>
+e&&(e=m);l>f&&(f=l);n>g&&(g=n)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromBufferAttribute:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.count;h<k;h++){var m=a.getX(h),l=a.getY(h),n=a.getZ(h);m<b&&(b=m);l<c&&(c=l);n<d&&(d=n);m>e&&(e=m);l>f&&(f=l);n>g&&(g=n)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(){var a=
+new p;return function(b,c){c=a.copy(c).multiplyScalar(.5);this.min.copy(b).sub(c);this.max.copy(b).add(c);return this}}(),setFromObject:function(a){this.makeEmpty();return this.expandByObject(a)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=this.min.z=Infinity;this.max.x=this.max.y=this.max.z=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<
+this.min.y||this.max.z<this.min.z},getCenter:function(a){void 0===a&&(console.warn("THREE.Box3: .getCenter() target is now required"),a=new p);return this.isEmpty()?a.set(0,0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){void 0===a&&(console.warn("THREE.Box3: .getSize() target is now required"),a=new p);return this.isEmpty()?a.set(0,0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);
+this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},expandByObject:function(){function a(a){var f=a.geometry;if(void 0!==f)if(f.isGeometry)for(f=f.vertices,c=0,d=f.length;c<d;c++)e.copy(f[c]),e.applyMatrix4(a.matrixWorld),b.expandByPoint(e);else if(f.isBufferGeometry&&(f=f.attributes.position,void 0!==f))for(c=0,d=f.count;c<d;c++)e.fromBufferAttribute(f,c).applyMatrix4(a.matrixWorld),b.expandByPoint(e)}var b,c,d,e=new p;return function(c){b=
+this;c.updateMatrixWorld(!0);c.traverse(a);return this}}(),containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y||a.z<this.min.z||a.z>this.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&&a.max.z<=this.max.z},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box3: .getParameter() target is now required"),b=new p);return b.set((a.x-this.min.x)/(this.max.x-
+this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y||a.max.z<this.min.z||a.min.z>this.max.z?!1:!0},intersectsSphere:function(){var a=new p;return function(b){this.clampPoint(b.center,a);return a.distanceToSquared(b.center)<=b.radius*b.radius}}(),intersectsPlane:function(a){if(0<a.normal.x){var b=a.normal.x*this.min.x;var c=a.normal.x*this.max.x}else b=
+a.normal.x*this.max.x,c=a.normal.x*this.min.x;0<a.normal.y?(b+=a.normal.y*this.min.y,c+=a.normal.y*this.max.y):(b+=a.normal.y*this.max.y,c+=a.normal.y*this.min.y);0<a.normal.z?(b+=a.normal.z*this.min.z,c+=a.normal.z*this.max.z):(b+=a.normal.z*this.max.z,c+=a.normal.z*this.min.z);return b<=-a.constant&&c>=-a.constant},intersectsTriangle:function(){function a(a){var e;var f=0;for(e=a.length-3;f<=e;f+=3){h.fromArray(a,f);var g=m.x*Math.abs(h.x)+m.y*Math.abs(h.y)+m.z*Math.abs(h.z),k=b.dot(h),l=c.dot(h),
+q=d.dot(h);if(Math.max(-Math.max(k,l,q),Math.min(k,l,q))>g)return!1}return!0}var b=new p,c=new p,d=new p,e=new p,f=new p,g=new p,h=new p,k=new p,m=new p,l=new p;return function(h){if(this.isEmpty())return!1;this.getCenter(k);m.subVectors(this.max,k);b.subVectors(h.a,k);c.subVectors(h.b,k);d.subVectors(h.c,k);e.subVectors(c,b);f.subVectors(d,c);g.subVectors(b,d);h=[0,-e.z,e.y,0,-f.z,f.y,0,-g.z,g.y,e.z,0,-e.x,f.z,0,-f.x,g.z,0,-g.x,-e.y,e.x,0,-f.y,f.x,0,-g.y,g.x,0];if(!a(h))return!1;h=[1,0,0,0,1,0,0,
+0,1];if(!a(h))return!1;l.crossVectors(e,f);h=[l.x,l.y,l.z];return a(h)}}(),clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box3: .clampPoint() target is now required"),b=new p);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new p;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),getBoundingSphere:function(){var a=new p;return function(b){void 0===b&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),b=new Ga);
+this.getCenter(b.center);b.radius=.5*this.getSize(a).length();return b}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);this.isEmpty()&&this.makeEmpty();return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(){var a=[new p,new p,new p,new p,new p,new p,new p,new p];return function(b){if(this.isEmpty())return this;a[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(b);a[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(b);
+a[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(b);a[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(b);a[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(b);a[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(b);a[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(b);a[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(b);this.setFromPoints(a);return this}}(),translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&
+a.max.equals(this.max)}});Object.assign(Ga.prototype,{set:function(a,b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(){var a=new Wa;return function(b,c){var d=this.center;void 0!==c?d.copy(c):a.setFromPoints(b).getCenter(d);for(var e=c=0,f=b.length;e<f;e++)c=Math.max(c,d.distanceToSquared(b[e]));this.radius=Math.sqrt(c);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.center.copy(a.center);this.radius=a.radius;return this},empty:function(){return 0>=
+this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)-this.radius},intersectsSphere:function(a){var b=this.radius+a.radius;return a.center.distanceToSquared(this.center)<=b*b},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(a.distanceToPoint(this.center))<=this.radius},clampPoint:function(a,b){var c=this.center.distanceToSquared(a);
+void 0===b&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),b=new p);b.copy(a);c>this.radius*this.radius&&(b.sub(this.center).normalize(),b.multiplyScalar(this.radius).add(this.center));return b},getBoundingBox:function(a){void 0===a&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),a=new Wa);a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a);this.radius*=a.getMaxScaleOnAxis();return this},
+translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&&a.radius===this.radius}});Object.assign(Pa.prototype,{set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(){var a=new p,b=new p;return function(c,d,e){d=
+a.subVectors(e,d).cross(b.subVectors(c,d)).normalize();this.setFromNormalAndCoplanarPoint(d,c);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-
+a.radius},projectPoint:function(a,b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new p);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)},intersectLine:function(){var a=new p;return function(b,c){void 0===c&&(console.warn("THREE.Plane: .intersectLine() target is now required"),c=new p);var d=b.delta(a),e=this.normal.dot(d);if(0===e){if(0===this.distanceToPoint(b.start))return c.copy(b.start)}else if(e=-(b.start.dot(this.normal)+this.constant)/
+e,!(0>e||1<e))return c.copy(d).multiplyScalar(e).add(b.start)}}(),intersectsLine:function(a){var b=this.distanceToPoint(a.start);a=this.distanceToPoint(a.end);return 0>b&&0<a||0>a&&0<b},intersectsBox:function(a){return a.intersectsPlane(this)},intersectsSphere:function(a){return a.intersectsPlane(this)},coplanarPoint:function(a){void 0===a&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),a=new p);return a.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var a=
+new p,b=new da;return function(c,d){d=d||b.getNormalMatrix(c);c=this.coplanarPoint(a).applyMatrix4(c);d=this.normal.applyMatrix3(d).normalize();this.constant=-c.dot(d);return this}}(),translate:function(a){this.constant-=a.dot(this.normal);return this},equals:function(a){return a.normal.equals(this.normal)&&a.constant===this.constant}});Object.assign(rd.prototype,{set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f);return this},
+clone:function(){return(new this.constructor).copy(this)},copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],h=c[5],k=c[6],m=c[7],l=c[8],n=c[9],r=c[10],p=c[11],t=c[12],u=c[13],w=c[14];c=c[15];b[0].setComponents(f-a,m-g,p-l,c-t).normalize();b[1].setComponents(f+a,m+g,p+l,c+t).normalize();b[2].setComponents(f+d,m+h,p+n,c+u).normalize();b[3].setComponents(f-d,m-h,p-n,c-
+u).normalize();b[4].setComponents(f-e,m-k,p-r,c-w).normalize();b[5].setComponents(f+e,m+k,p+r,c+w).normalize();return this},intersectsObject:function(){var a=new Ga;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere();a.copy(c.boundingSphere).applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSprite:function(){var a=new Ga;return function(b){a.center.set(0,0,0);a.radius=.7071067811865476;a.applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),
+intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)<a)return!1;return!0},intersectsBox:function(){var a=new p;return function(b){for(var c=this.planes,d=0;6>d;d++){var e=c[d];a.x=0<e.normal.x?b.max.x:b.min.x;a.y=0<e.normal.y?b.max.y:b.min.y;a.z=0<e.normal.z?b.max.z:b.min.z;if(0>e.distanceToPoint(a))return!1}return!0}}(),containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}});var K=
+{alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",
+aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n",
+bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",
+clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif\n",
+clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",
+color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\n",
+cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV( sampler2D envMap, vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",
+defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",
+emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}\n",
+envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n",
+envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",
+envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent ));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",
+envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n",
+fog_vertex:"#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif\n",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif\n",
+gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",
+lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",
+lights_pars_begin:"uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n",
+lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n",
+lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",
+lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n",
+lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif\n",
+lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n",
+lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n#endif\n",
+logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif\n",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",
+map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",
+metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",
+morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",
+normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t#ifdef FLIP_SIDED\n\t\t\tnormal = - normal;\n\t\t#endif\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\tnormal = normalize( normalMatrix * normal );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",
+normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tuniform mat3 normalMatrix;\n\t#else\n\t\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\t\tvec2 st0 = dFdx( vUv.st );\n\t\t\tvec2 st1 = dFdy( vUv.st );\n\t\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\t\tvec3 N = normalize( surf_norm );\n\t\t\tmat3 tsn = mat3( S, T, N );\n\t\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t\tmapN.xy *= normalScale;\n\t\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\treturn normalize( tsn * mapN );\n\t\t}\n\t#endif\n#endif\n",
+packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",
+premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif\n",
+roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n",
+shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",
+shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",
+shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",
+skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n",
+skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",
+specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n",
+uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\n",
+uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",
+uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tgl_FragColor = texture2D( t2D, vUv );\n}\n",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position, 1.0 );\n\tgl_Position.z = 1.0;\n}\n",
+cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\n",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",
+depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",
+distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}\n",
+distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}\n",
+equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n",
+linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",
+linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}\n",
+meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",
+meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}\n",
+meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",
+meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",
+meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\tvec4 matcapColor = texture2D( matcap, uv );\n\tmatcapColor = matcapTexelToLinear( matcapColor );\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",
+meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}\n",
+meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",
+meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",
+meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",
+meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",
+normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n",
+normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n",
+points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",
+points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}\n",
+shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}\n",shadow_vert:"#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",
+sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",
+sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}\n"},
+va={merge:function(a){for(var b={},c=0;c<a.length;c++){var d=this.clone(a[c]),e;for(e in d)b[e]=d[e]}return b},clone:function(a){var b={},c;for(c in a){b[c]={};for(var d in a[c]){var e=a[c][d];e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture)?b[c][d]=e.clone():Array.isArray(e)?b[c][d]=e.slice():b[c][d]=e}}return b}},$g={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,
+blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,
+darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,
+lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,
+mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,
+rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object.assign(G.prototype,
+{isColor:!0,r:1,g:1,b:1,set:function(a){a&&a.isColor?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this},setScalar:function(a){this.b=this.g=this.r=a;return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(){function a(a,c,d){0>d&&(d+=1);1<d&&--d;return d<1/6?a+6*(c-a)*d:.5>d?c:d<2/3?a+6*(c-a)*(2/3-d):a}return function(b,
+c,d){b=R.euclideanModulo(b,1);c=R.clamp(c,0,1);d=R.clamp(d,0,1);0===c?this.r=this.g=this.b=d:(c=.5>=d?d*(1+c):d+c-d*c,d=2*d-c,this.r=a(d,c,b+1/3),this.g=a(d,c,b),this.b=a(d,c,b-1/3));return this}}(),setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var c;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=c[2];switch(c[1]){case "rgb":case "rgba":if(c=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=
+Math.min(255,parseInt(c[1],10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case "hsl":case "hsla":if(c=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){d=parseFloat(c[1])/
+360;var e=parseInt(c[2],10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}a&&0<a.length&&(c=$g[a],
+void 0!==c?this.setHex(c):console.warn("THREE.Color: Unknown color "+a));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},copyGammaToLinear:function(a,b){void 0===b&&(b=2);this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this},copyLinearToGamma:function(a,b){void 0===b&&(b=2);b=0<b?1/b:1;this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this},convertGammaToLinear:function(a){this.copyGammaToLinear(this,
+a);return this},convertLinearToGamma:function(a){this.copyLinearToGamma(this,a);return this},copySRGBToLinear:function(){function a(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}return function(b){this.r=a(b.r);this.g=a(b.g);this.b=a(b.b);return this}}(),copyLinearToSRGB:function(){function a(a){return.0031308>a?12.92*a:1.055*Math.pow(a,.41666)-.055}return function(b){this.r=a(b.r);this.g=a(b.g);this.b=a(b.b);return this}}(),convertSRGBToLinear:function(){this.copySRGBToLinear(this);
+return this},convertLinearToSRGB:function(){this.copyLinearToSRGB(this);return this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(a){void 0===a&&(console.warn("THREE.Color: .getHSL() target is now required"),a={h:0,s:0,l:0});var b=this.r,c=this.g,d=this.b,e=Math.max(b,c,d),f=Math.min(b,c,d),g,h=(f+e)/2;if(f===e)f=g=0;else{var k=e-f;f=.5>=h?k/(e+f):k/(2-e-f);switch(e){case b:g=(c-
+d)/k+(c<d?6:0);break;case c:g=(d-b)/k+2;break;case d:g=(b-c)/k+4}g/=6}a.h=g;a.s=f;a.l=h;return a},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var a={};return function(b,c,d){this.getHSL(a);a.h+=b;a.s+=c;a.l+=d;this.setHSL(a.h,a.s,a.l);return this}}(),add:function(a){this.r+=a.r;this.g+=a.g;this.b+=a.b;return this},addColors:function(a,b){this.r=a.r+b.r;this.g=a.g+b.g;this.b=a.b+b.b;return this},addScalar:function(a){this.r+=a;this.g+=
+a;this.b+=a;return this},sub:function(a){this.r=Math.max(0,this.r-a.r);this.g=Math.max(0,this.g-a.g);this.b=Math.max(0,this.b-a.b);return this},multiply:function(a){this.r*=a.r;this.g*=a.g;this.b*=a.b;return this},multiplyScalar:function(a){this.r*=a;this.g*=a;this.b*=a;return this},lerp:function(a,b){this.r+=(a.r-this.r)*b;this.g+=(a.g-this.g)*b;this.b+=(a.b-this.b)*b;return this},lerpHSL:function(){var a={h:0,s:0,l:0},b={h:0,s:0,l:0};return function(c,d){this.getHSL(a);c.getHSL(b);c=R.lerp(a.h,
+b.h,d);var e=R.lerp(a.s,b.s,d);d=R.lerp(a.l,b.l,d);this.setHSL(c,e,d);return this}}(),equals:function(a){return a.r===this.r&&a.g===this.g&&a.b===this.b},fromArray:function(a,b){void 0===b&&(b=0);this.r=a[b];this.g=a[b+1];this.b=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.r;a[b+1]=this.g;a[b+2]=this.b;return a},toJSON:function(){return this.getHex()}});var J={common:{diffuse:{value:new G(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new da},
+alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new z(1,1)}},displacementmap:{displacementMap:{value:null},
+displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},fogFar:{value:2E3},fogColor:{value:new G(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},
+spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},
+skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new G(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new da}},sprite:{diffuse:{value:new G(15658734)},opacity:{value:1},center:{value:new z(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new da}}},Qa={basic:{uniforms:va.merge([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.fog]),vertexShader:K.meshbasic_vert,
+fragmentShader:K.meshbasic_frag},lambert:{uniforms:va.merge([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.fog,J.lights,{emissive:{value:new G(0)}}]),vertexShader:K.meshlambert_vert,fragmentShader:K.meshlambert_frag},phong:{uniforms:va.merge([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.gradientmap,J.fog,J.lights,{emissive:{value:new G(0)},specular:{value:new G(1118481)},shininess:{value:30}}]),vertexShader:K.meshphong_vert,
+fragmentShader:K.meshphong_frag},standard:{uniforms:va.merge([J.common,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.roughnessmap,J.metalnessmap,J.fog,J.lights,{emissive:{value:new G(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:K.meshphysical_vert,fragmentShader:K.meshphysical_frag},matcap:{uniforms:va.merge([J.common,J.bumpmap,J.normalmap,J.displacementmap,J.fog,{matcap:{value:null}}]),vertexShader:K.meshmatcap_vert,
+fragmentShader:K.meshmatcap_frag},points:{uniforms:va.merge([J.points,J.fog]),vertexShader:K.points_vert,fragmentShader:K.points_frag},dashed:{uniforms:va.merge([J.common,J.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:K.linedashed_vert,fragmentShader:K.linedashed_frag},depth:{uniforms:va.merge([J.common,J.displacementmap]),vertexShader:K.depth_vert,fragmentShader:K.depth_frag},normal:{uniforms:va.merge([J.common,J.bumpmap,J.normalmap,J.displacementmap,{opacity:{value:1}}]),
+vertexShader:K.normal_vert,fragmentShader:K.normal_frag},sprite:{uniforms:va.merge([J.sprite,J.fog]),vertexShader:K.sprite_vert,fragmentShader:K.sprite_frag},background:{uniforms:{uvTransform:{value:new da},t2D:{value:null}},vertexShader:K.background_vert,fragmentShader:K.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:K.cube_vert,fragmentShader:K.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:K.equirect_vert,fragmentShader:K.equirect_frag},
+distanceRGBA:{uniforms:va.merge([J.common,J.displacementmap,{referencePosition:{value:new p},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:K.distanceRGBA_vert,fragmentShader:K.distanceRGBA_frag},shadow:{uniforms:va.merge([J.lights,J.fog,{color:{value:new G(0)},opacity:{value:1}}]),vertexShader:K.shadow_vert,fragmentShader:K.shadow_frag}};Qa.physical={uniforms:va.merge([Qa.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:K.meshphysical_vert,fragmentShader:K.meshphysical_frag};
+Object.assign(Xa.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.normal.copy(a.normal);this.color.copy(a.color);this.materialIndex=a.materialIndex;for(var b=0,c=a.vertexNormals.length;b<c;b++)this.vertexNormals[b]=a.vertexNormals[b].clone();b=0;for(c=a.vertexColors.length;b<c;b++)this.vertexColors[b]=a.vertexColors[b].clone();return this}});mb.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" ");mb.DefaultOrder="XYZ";Object.defineProperties(mb.prototype,
+{x:{get:function(){return this._x},set:function(a){this._x=a;this.onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this.onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this.onChangeCallback()}},order:{get:function(){return this._order},set:function(a){this._order=a;this.onChangeCallback()}}});Object.assign(mb.prototype,{isEuler:!0,set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._order=d||this._order;this.onChangeCallback();
+return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(a){this._x=a._x;this._y=a._y;this._z=a._z;this._order=a._order;this.onChangeCallback();return this},setFromRotationMatrix:function(a,b,c){var d=R.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],h=e[1],k=e[5],m=e[9],l=e[2],n=e[6];e=e[10];b=b||this._order;"XYZ"===b?(this._y=Math.asin(d(g,-1,1)),.99999>Math.abs(g)?(this._x=Math.atan2(-m,e),this._z=Math.atan2(-f,a)):(this._x=Math.atan2(n,k),this._z=
+0)):"YXZ"===b?(this._x=Math.asin(-d(m,-1,1)),.99999>Math.abs(m)?(this._y=Math.atan2(g,e),this._z=Math.atan2(h,k)):(this._y=Math.atan2(-l,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(n,-1,1)),.99999>Math.abs(n)?(this._y=Math.atan2(-l,e),this._z=Math.atan2(-f,k)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(n,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f,k))):"YZX"===b?(this._z=Math.asin(d(h,-1,1)),.99999>Math.abs(h)?
+(this._x=Math.atan2(-m,k),this._y=Math.atan2(-l,a)):(this._x=0,this._y=Math.atan2(g,e))):"XZY"===b?(this._z=Math.asin(-d(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(n,k),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-m,e),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+b);this._order=b;if(!1!==c)this.onChangeCallback();return this},setFromQuaternion:function(){var a=new P;return function(b,c,d){a.makeRotationFromQuaternion(b);return this.setFromRotationMatrix(a,
+c,d)}}(),setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(){var a=new ja;return function(b){a.setFromEuler(this);return this.setFromQuaternion(a,b)}}(),equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x=a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=
+this._y;a[b+2]=this._z;a[b+3]=this._order;return a},toVector3:function(a){return a?a.set(this._x,this._y,this._z):new p(this._x,this._y,this._z)},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(Yd.prototype,{set:function(a){this.mask=1<<a|0},enable:function(a){this.mask=this.mask|1<<a|0},toggle:function(a){this.mask^=1<<a|0},disable:function(a){this.mask&=~(1<<a|0)},test:function(a){return 0!==(this.mask&a.mask)}});var Mf=0;D.DefaultUp=new p(0,
+1,0);D.DefaultMatrixAutoUpdate=!0;D.prototype=Object.assign(Object.create(ia.prototype),{constructor:D,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(a){this.matrix.multiplyMatrices(a,this.matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(a){this.quaternion.premultiply(a);return this},setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,
+!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},setRotationFromQuaternion:function(a){this.quaternion.copy(a)},rotateOnAxis:function(){var a=new ja;return function(b,c){a.setFromAxisAngle(b,c);this.quaternion.multiply(a);return this}}(),rotateOnWorldAxis:function(){var a=new ja;return function(b,c){a.setFromAxisAngle(b,c);this.quaternion.premultiply(a);return this}}(),rotateX:function(){var a=new p(1,0,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateY:function(){var a=
+new p(0,1,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateZ:function(){var a=new p(0,0,1);return function(b){return this.rotateOnAxis(a,b)}}(),translateOnAxis:function(){var a=new p;return function(b,c){a.copy(b).applyQuaternion(this.quaternion);this.position.add(a.multiplyScalar(c));return this}}(),translateX:function(){var a=new p(1,0,0);return function(b){return this.translateOnAxis(a,b)}}(),translateY:function(){var a=new p(0,1,0);return function(b){return this.translateOnAxis(a,
+b)}}(),translateZ:function(){var a=new p(0,0,1);return function(b){return this.translateOnAxis(a,b)}}(),localToWorld:function(a){return a.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var a=new P;return function(b){return b.applyMatrix4(a.getInverse(this.matrixWorld))}}(),lookAt:function(){var a=new ja,b=new P,c=new p,d=new p;return function(e,f,g){e.isVector3?c.copy(e):c.set(e,f,g);e=this.parent;this.updateWorldMatrix(!0,!1);d.setFromMatrixPosition(this.matrixWorld);this.isCamera?b.lookAt(d,
+c,this.up):b.lookAt(c,d,this.up);this.quaternion.setFromRotationMatrix(b);e&&(b.extractRotation(e.matrixWorld),a.setFromRotationMatrix(b),this.quaternion.premultiply(a.inverse()))}}(),add:function(a){if(1<arguments.length){for(var b=0;b<arguments.length;b++)this.add(arguments[b]);return this}if(a===this)return console.error("THREE.Object3D.add: object can't be added as a child of itself.",a),this;a&&a.isObject3D?(null!==a.parent&&a.parent.remove(a),a.parent=this,a.dispatchEvent({type:"added"}),this.children.push(a)):
+console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",a);return this},remove:function(a){if(1<arguments.length){for(var b=0;b<arguments.length;b++)this.remove(arguments[b]);return this}b=this.children.indexOf(a);-1!==b&&(a.parent=null,a.dispatchEvent({type:"removed"}),this.children.splice(b,1));return this},getObjectById:function(a){return this.getObjectByProperty("id",a)},getObjectByName:function(a){return this.getObjectByProperty("name",a)},getObjectByProperty:function(a,
+b){if(this[a]===b)return this;for(var c=0,d=this.children.length;c<d;c++){var e=this.children[c].getObjectByProperty(a,b);if(void 0!==e)return e}},getWorldPosition:function(a){void 0===a&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),a=new p);this.updateMatrixWorld(!0);return a.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var a=new p,b=new p;return function(c){void 0===c&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),
+c=new ja);this.updateMatrixWorld(!0);this.matrixWorld.decompose(a,c,b);return c}}(),getWorldScale:function(){var a=new p,b=new ja;return function(c){void 0===c&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),c=new p);this.updateMatrixWorld(!0);this.matrixWorld.decompose(a,b,c);return c}}(),getWorldDirection:function(a){void 0===a&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),a=new p);this.updateMatrixWorld(!0);var b=this.matrixWorld.elements;
+return a.set(b[8],b[9],b[10]).normalize()},raycast:function(){},traverse:function(a){a(this);for(var b=this.children,c=0,d=b.length;c<d;c++)b[c].traverse(a)},traverseVisible:function(a){if(!1!==this.visible){a(this);for(var b=this.children,c=0,d=b.length;c<d;c++)b[c].traverseVisible(a)}},traverseAncestors:function(a){var b=this.parent;null!==b&&(a(b),b.traverseAncestors(a))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(a){this.matrixAutoUpdate&&
+this.updateMatrix();if(this.matrixWorldNeedsUpdate||a)null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b=this.children,c=0,d=b.length;c<d;c++)b[c].updateMatrixWorld(a)},updateWorldMatrix:function(a,b){var c=this.parent;!0===a&&null!==c&&c.updateWorldMatrix(!0,!1);this.matrixAutoUpdate&&this.updateMatrix();null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,
+this.matrix);if(!0===b)for(a=this.children,b=0,c=a.length;b<c;b++)a[b].updateWorldMatrix(!1,!0)},toJSON:function(a){function b(b,c){void 0===b[c.uuid]&&(b[c.uuid]=c.toJSON(a));return c.uuid}function c(a){var b=[],c;for(c in a){var d=a[c];delete d.metadata;b.push(d)}return b}var d=void 0===a||"string"===typeof a,e={};d&&(a={geometries:{},materials:{},textures:{},images:{},shapes:{}},e.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var f={};f.uuid=this.uuid;f.type=this.type;""!==
+this.name&&(f.name=this.name);!0===this.castShadow&&(f.castShadow=!0);!0===this.receiveShadow&&(f.receiveShadow=!0);!1===this.visible&&(f.visible=!1);!1===this.frustumCulled&&(f.frustumCulled=!1);0!==this.renderOrder&&(f.renderOrder=this.renderOrder);"{}"!==JSON.stringify(this.userData)&&(f.userData=this.userData);f.layers=this.layers.mask;f.matrix=this.matrix.toArray();!1===this.matrixAutoUpdate&&(f.matrixAutoUpdate=!1);if(this.isMesh||this.isLine||this.isPoints){f.geometry=b(a.geometries,this.geometry);
+var g=this.geometry.parameters;if(void 0!==g&&void 0!==g.shapes)if(g=g.shapes,Array.isArray(g))for(var h=0,k=g.length;h<k;h++)b(a.shapes,g[h]);else b(a.shapes,g)}if(void 0!==this.material)if(Array.isArray(this.material)){g=[];h=0;for(k=this.material.length;h<k;h++)g.push(b(a.materials,this.material[h]));f.material=g}else f.material=b(a.materials,this.material);if(0<this.children.length)for(f.children=[],h=0;h<this.children.length;h++)f.children.push(this.children[h].toJSON(a).object);if(d){d=c(a.geometries);
+h=c(a.materials);k=c(a.textures);var m=c(a.images);g=c(a.shapes);0<d.length&&(e.geometries=d);0<h.length&&(e.materials=h);0<k.length&&(e.textures=k);0<m.length&&(e.images=m);0<g.length&&(e.shapes=g)}e.object=f;return e},clone:function(a){return(new this.constructor).copy(this,a)},copy:function(a,b){void 0===b&&(b=!0);this.name=a.name;this.up.copy(a.up);this.position.copy(a.position);this.quaternion.copy(a.quaternion);this.scale.copy(a.scale);this.matrix.copy(a.matrix);this.matrixWorld.copy(a.matrixWorld);
+this.matrixAutoUpdate=a.matrixAutoUpdate;this.matrixWorldNeedsUpdate=a.matrixWorldNeedsUpdate;this.layers.mask=a.layers.mask;this.visible=a.visible;this.castShadow=a.castShadow;this.receiveShadow=a.receiveShadow;this.frustumCulled=a.frustumCulled;this.renderOrder=a.renderOrder;this.userData=JSON.parse(JSON.stringify(a.userData));if(!0===b)for(b=0;b<a.children.length;b++)this.add(a.children[b].clone());return this}});var Nf=0;I.prototype=Object.assign(Object.create(ia.prototype),{constructor:I,isGeometry:!0,
+applyMatrix:function(a){for(var b=(new da).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},rotateX:function(){var a=
+new P;return function(b){a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a=new P;return function(b){a.makeRotationY(b);this.applyMatrix(a);return this}}(),rotateZ:function(){var a=new P;return function(b){a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a=new P;return function(b,c,d){a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a=new P;return function(b,c,d){a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),
+lookAt:function(){var a=new D;return function(b){a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),fromBufferGeometry:function(a){function b(a,b,d,e){var f=void 0===h?[]:[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()],l=void 0===g?[]:[(new p).fromArray(g,3*a),(new p).fromArray(g,3*b),(new p).fromArray(g,3*d)];e=new Xa(a,b,d,l,f,e);c.faces.push(e);void 0!==k&&c.faceVertexUvs[0].push([(new z).fromArray(k,2*a),(new z).fromArray(k,2*b),(new z).fromArray(k,2*d)]);void 0!==m&&c.faceVertexUvs[1].push([(new z).fromArray(m,
+2*a),(new z).fromArray(m,2*b),(new z).fromArray(m,2*d)])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes,f=e.position.array,g=void 0!==e.normal?e.normal.array:void 0,h=void 0!==e.color?e.color.array:void 0,k=void 0!==e.uv?e.uv.array:void 0,m=void 0!==e.uv2?e.uv2.array:void 0;void 0!==m&&(this.faceVertexUvs[1]=[]);for(var l=e=0;e<f.length;e+=3,l+=2)c.vertices.push((new p).fromArray(f,e)),void 0!==h&&c.colors.push((new G).fromArray(h,e));var n=a.groups;if(0<n.length)for(e=0;e<n.length;e++){f=
+n[e];var r=f.start,x=f.count;l=r;for(r+=x;l<r;l+=3)void 0!==d?b(d[l],d[l+1],d[l+2],f.materialIndex):b(l,l+1,l+2,f.materialIndex)}else if(void 0!==d)for(e=0;e<d.length;e+=3)b(d[e],d[e+1],d[e+2]);else for(e=0;e<f.length/3;e+=3)b(e,e+1,e+2);this.computeFaceNormals();null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());return this},center:function(){var a=new p;return function(){this.computeBoundingBox();this.boundingBox.getCenter(a).negate();
+this.translate(a.x,a.y,a.z);return this}}(),normalize:function(){this.computeBoundingSphere();var a=this.boundingSphere.center,b=this.boundingSphere.radius;b=0===b?1:1/b;var c=new P;c.set(b,0,0,-b*a.x,0,b,0,-b*a.y,0,0,b,-b*a.z,0,0,0,1);this.applyMatrix(c);return this},computeFaceNormals:function(){for(var a=new p,b=new p,c=0,d=this.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],g=this.vertices[e.b];a.subVectors(this.vertices[e.c],g);b.subVectors(f,g);a.cross(b);a.normalize();e.normal.copy(a)}},
+computeVertexNormals:function(a){void 0===a&&(a=!0);var b;var c=Array(this.vertices.length);var d=0;for(b=this.vertices.length;d<b;d++)c[d]=new p;if(a){var e=new p,f=new p;a=0;for(d=this.faces.length;a<d;a++){b=this.faces[a];var g=this.vertices[b.a];var h=this.vertices[b.b];var k=this.vertices[b.c];e.subVectors(k,h);f.subVectors(g,h);e.cross(f);c[b.a].add(e);c[b.b].add(e);c[b.c].add(e)}}else for(this.computeFaceNormals(),a=0,d=this.faces.length;a<d;a++)b=this.faces[a],c[b.a].add(b.normal),c[b.b].add(b.normal),
+c[b.c].add(b.normal);d=0;for(b=this.vertices.length;d<b;d++)c[d].normalize();a=0;for(d=this.faces.length;a<d;a++)b=this.faces[a],g=b.vertexNormals,3===g.length?(g[0].copy(c[b.a]),g[1].copy(c[b.b]),g[2].copy(c[b.c])):(g[0]=c[b.a].clone(),g[1]=c[b.b].clone(),g[2]=c[b.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var a;this.computeFaceNormals();var b=0;for(a=this.faces.length;b<a;b++){var c=this.faces[b];var d=c.vertexNormals;3===d.length?(d[0].copy(c.normal),
+d[1].copy(c.normal),d[2].copy(c.normal)):(d[0]=c.normal.clone(),d[1]=c.normal.clone(),d[2]=c.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var a,b;var c=0;for(b=this.faces.length;c<b;c++){var d=this.faces[c];d.__originalFaceNormal?d.__originalFaceNormal.copy(d.normal):d.__originalFaceNormal=d.normal.clone();d.__originalVertexNormals||(d.__originalVertexNormals=[]);var e=0;for(a=d.vertexNormals.length;e<a;e++)d.__originalVertexNormals[e]?d.__originalVertexNormals[e].copy(d.vertexNormals[e]):
+d.__originalVertexNormals[e]=d.vertexNormals[e].clone()}var f=new I;f.faces=this.faces;e=0;for(a=this.morphTargets.length;e<a;e++){if(!this.morphNormals[e]){this.morphNormals[e]={};this.morphNormals[e].faceNormals=[];this.morphNormals[e].vertexNormals=[];d=this.morphNormals[e].faceNormals;var g=this.morphNormals[e].vertexNormals;c=0;for(b=this.faces.length;c<b;c++){var h=new p;var k={a:new p,b:new p,c:new p};d.push(h);g.push(k)}}g=this.morphNormals[e];f.vertices=this.morphTargets[e].vertices;f.computeFaceNormals();
+f.computeVertexNormals();c=0;for(b=this.faces.length;c<b;c++)d=this.faces[c],h=g.faceNormals[c],k=g.vertexNormals[c],h.copy(d.normal),k.a.copy(d.vertexNormals[0]),k.b.copy(d.vertexNormals[1]),k.c.copy(d.vertexNormals[2])}c=0;for(b=this.faces.length;c<b;c++)d=this.faces[c],d.normal=d.__originalFaceNormal,d.vertexNormals=d.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Wa);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===
+this.boundingSphere&&(this.boundingSphere=new Ga);this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(a&&a.isGeometry){var d,e=this.vertices.length,f=this.vertices,g=a.vertices,h=this.faces,k=a.faces,m=this.faceVertexUvs[0],l=a.faceVertexUvs[0],n=this.colors,r=a.colors;void 0===c&&(c=0);void 0!==b&&(d=(new da).getNormalMatrix(b));a=0;for(var p=g.length;a<p;a++){var t=g[a].clone();void 0!==b&&t.applyMatrix4(b);f.push(t)}a=0;for(p=r.length;a<p;a++)n.push(r[a].clone());a=0;for(p=
+k.length;a<p;a++){g=k[a];var u=g.vertexNormals;r=g.vertexColors;n=new Xa(g.a+e,g.b+e,g.c+e);n.normal.copy(g.normal);void 0!==d&&n.normal.applyMatrix3(d).normalize();b=0;for(f=u.length;b<f;b++)t=u[b].clone(),void 0!==d&&t.applyMatrix3(d).normalize(),n.vertexNormals.push(t);n.color.copy(g.color);b=0;for(f=r.length;b<f;b++)t=r[b],n.vertexColors.push(t.clone());n.materialIndex=g.materialIndex+c;h.push(n)}a=0;for(p=l.length;a<p;a++)if(c=l[a],d=[],void 0!==c){b=0;for(f=c.length;b<f;b++)d.push(c[b].clone());
+m.push(d)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",a)},mergeMesh:function(a){a&&a.isMesh?(a.matrixAutoUpdate&&a.updateMatrix(),this.merge(a.geometry,a.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a)},mergeVertices:function(){var a={},b=[],c=[],d=Math.pow(10,4),e;var f=0;for(e=this.vertices.length;f<e;f++){var g=this.vertices[f];g=Math.round(g.x*d)+"_"+Math.round(g.y*d)+"_"+Math.round(g.z*d);void 0===a[g]?
+(a[g]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[g]]}a=[];f=0;for(e=this.faces.length;f<e;f++)for(d=this.faces[f],d.a=c[d.a],d.b=c[d.b],d.c=c[d.c],d=[d.a,d.b,d.c],g=0;3>g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=this.faceVertexUvs.length;c<e;c++)this.faceVertexUvs[c].splice(d,1);f=this.vertices.length-b.length;this.vertices=b;return f},setFromPoints:function(a){this.vertices=[];for(var b=0,c=a.length;b<c;b++){var d=a[b];
+this.vertices.push(new p(d.x,d.y,d.z||0))}return this},sortFacesByMaterialIndex:function(){for(var a=this.faces,b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,b){return a.materialIndex-b.materialIndex});var d=this.faceVertexUvs[0],e=this.faceVertexUvs[1],f,g;d&&d.length===b&&(f=[]);e&&e.length===b&&(g=[]);for(c=0;c<b;c++){var h=a[c]._id;f&&f.push(d[h]);g&&g.push(e[h])}f&&(this.faceVertexUvs[0]=f);g&&(this.faceVertexUvs[1]=g)},toJSON:function(){function a(a,b,c){return c?a|1<<b:a&~(1<<b)}function b(a){var b=
+a.x.toString()+a.y.toString()+a.z.toString();if(void 0!==m[b])return m[b];m[b]=k.length/3;k.push(a.x,a.y,a.z);return m[b]}function c(a){var b=a.r.toString()+a.g.toString()+a.b.toString();if(void 0!==n[b])return n[b];n[b]=l.length;l.push(a.getHex());return n[b]}function d(a){var b=a.x.toString()+a.y.toString();if(void 0!==p[b])return p[b];p[b]=r.length/2;r.push(a.x,a.y);return p[b]}var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};e.uuid=this.uuid;e.type=this.type;""!==this.name&&
+(e.name=this.name);if(void 0!==this.parameters){var f=this.parameters,g;for(g in f)void 0!==f[g]&&(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var h=this.vertices[g];f.push(h.x,h.y,h.z)}h=[];var k=[],m={},l=[],n={},r=[],p={};for(g=0;g<this.faces.length;g++){var t=this.faces[g],u=void 0!==this.faceVertexUvs[0][g],w=0<t.normal.length(),A=0<t.vertexNormals.length,v=1!==t.color.r||1!==t.color.g||1!==t.color.b,z=0<t.vertexColors.length,y=0;y=a(y,0,0);y=a(y,1,!0);y=a(y,2,!1);y=a(y,3,u);
+y=a(y,4,w);y=a(y,5,A);y=a(y,6,v);y=a(y,7,z);h.push(y);h.push(t.a,t.b,t.c);h.push(t.materialIndex);u&&(u=this.faceVertexUvs[0][g],h.push(d(u[0]),d(u[1]),d(u[2])));w&&h.push(b(t.normal));A&&(w=t.vertexNormals,h.push(b(w[0]),b(w[1]),b(w[2])));v&&h.push(c(t.color));z&&(t=t.vertexColors,h.push(c(t[0]),c(t[1]),c(t[2])))}e.data={};e.data.vertices=f;e.data.normals=k;0<l.length&&(e.data.colors=l);0<r.length&&(e.data.uvs=[r]);e.data.faces=h;return e},clone:function(){return(new I).copy(this)},copy:function(a){var b,
+c,d;this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;var e=a.vertices;var f=0;for(b=e.length;f<b;f++)this.vertices.push(e[f].clone());e=a.colors;f=0;for(b=e.length;f<b;f++)this.colors.push(e[f].clone());e=a.faces;f=0;for(b=e.length;f<b;f++)this.faces.push(e[f].clone());f=0;for(b=a.faceVertexUvs.length;f<b;f++){var g=
+a.faceVertexUvs[f];void 0===this.faceVertexUvs[f]&&(this.faceVertexUvs[f]=[]);e=0;for(c=g.length;e<c;e++){var h=g[e],k=[];var m=0;for(d=h.length;m<d;m++)k.push(h[m].clone());this.faceVertexUvs[f].push(k)}}m=a.morphTargets;f=0;for(b=m.length;f<b;f++){d={};d.name=m[f].name;if(void 0!==m[f].vertices)for(d.vertices=[],e=0,c=m[f].vertices.length;e<c;e++)d.vertices.push(m[f].vertices[e].clone());if(void 0!==m[f].normals)for(d.normals=[],e=0,c=m[f].normals.length;e<c;e++)d.normals.push(m[f].normals[e].clone());
+this.morphTargets.push(d)}m=a.morphNormals;f=0;for(b=m.length;f<b;f++){d={};if(void 0!==m[f].vertexNormals)for(d.vertexNormals=[],e=0,c=m[f].vertexNormals.length;e<c;e++)g=m[f].vertexNormals[e],h={},h.a=g.a.clone(),h.b=g.b.clone(),h.c=g.c.clone(),d.vertexNormals.push(h);if(void 0!==m[f].faceNormals)for(d.faceNormals=[],e=0,c=m[f].faceNormals.length;e<c;e++)d.faceNormals.push(m[f].faceNormals[e].clone());this.morphNormals.push(d)}e=a.skinWeights;f=0;for(b=e.length;f<b;f++)this.skinWeights.push(e[f].clone());
+e=a.skinIndices;f=0;for(b=e.length;f<b;f++)this.skinIndices.push(e[f].clone());e=a.lineDistances;f=0;for(b=e.length;f<b;f++)this.lineDistances.push(e[f]);f=a.boundingBox;null!==f&&(this.boundingBox=f.clone());f=a.boundingSphere;null!==f&&(this.boundingSphere=f.clone());this.elementsNeedUpdate=a.elementsNeedUpdate;this.verticesNeedUpdate=a.verticesNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.lineDistancesNeedUpdate=
+a.lineDistancesNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Object.defineProperty(F.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(F.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(a){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==a?a.length/this.itemSize:0;this.array=a;return this},setDynamic:function(a){this.dynamic=
+a;return this},copy:function(a){this.name=a.name;this.array=new a.array.constructor(a.array);this.itemSize=a.itemSize;this.count=a.count;this.normalized=a.normalized;this.dynamic=a.dynamic;return this},copyAt:function(a,b,c){a*=this.itemSize;c*=b.itemSize;for(var d=0,e=this.itemSize;d<e;d++)this.array[a+d]=b.array[c+d];return this},copyArray:function(a){this.array.set(a);return this},copyColorsArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",
+d),f=new G);b[c++]=f.r;b[c++]=f.g;b[c++]=f.b}return this},copyVector2sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",d),f=new z);b[c++]=f.x;b[c++]=f.y}return this},copyVector3sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",d),f=new p);b[c++]=f.x;b[c++]=f.y;
+b[c++]=f.z}return this},copyVector4sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",d),f=new Z);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z;b[c++]=f.w}return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},getX:function(a){return this.array[a*this.itemSize]},setX:function(a,b){this.array[a*this.itemSize]=b;return this},getY:function(a){return this.array[a*this.itemSize+
+1]},setY:function(a,b){this.array[a*this.itemSize+1]=b;return this},getZ:function(a){return this.array[a*this.itemSize+2]},setZ:function(a,b){this.array[a*this.itemSize+2]=b;return this},getW:function(a){return this.array[a*this.itemSize+3]},setW:function(a,b){this.array[a*this.itemSize+3]=b;return this},setXY:function(a,b,c){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;return this},setXYZ:function(a,b,c,d){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;return this},
+setXYZW:function(a,b,c,d,e){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;this.array[a+3]=e;return this},onUpload:function(a){this.onUploadCallback=a;return this},clone:function(){return(new this.constructor(this.array,this.itemSize)).copy(this)}});sc.prototype=Object.create(F.prototype);sc.prototype.constructor=sc;tc.prototype=Object.create(F.prototype);tc.prototype.constructor=tc;uc.prototype=Object.create(F.prototype);uc.prototype.constructor=uc;vc.prototype=Object.create(F.prototype);
+vc.prototype.constructor=vc;nb.prototype=Object.create(F.prototype);nb.prototype.constructor=nb;wc.prototype=Object.create(F.prototype);wc.prototype.constructor=wc;ob.prototype=Object.create(F.prototype);ob.prototype.constructor=ob;C.prototype=Object.create(F.prototype);C.prototype.constructor=C;xc.prototype=Object.create(F.prototype);xc.prototype.constructor=xc;Object.assign(Ie.prototype,{computeGroups:function(a){var b=[],c=void 0;a=a.faces;for(var d=0;d<a.length;d++){var e=a[d];if(e.materialIndex!==
+c){c=e.materialIndex;void 0!==f&&(f.count=3*d-f.start,b.push(f));var f={start:3*d,materialIndex:c}}}void 0!==f&&(f.count=3*d-f.start,b.push(f));this.groups=b},fromGeometry:function(a){var b=a.faces,c=a.vertices,d=a.faceVertexUvs,e=d[0]&&0<d[0].length,f=d[1]&&0<d[1].length,g=a.morphTargets,h=g.length;if(0<h){var k=[];for(var m=0;m<h;m++)k[m]={name:g[m].name,data:[]};this.morphTargets.position=k}var l=a.morphNormals,n=l.length;if(0<n){var r=[];for(m=0;m<n;m++)r[m]={name:l[m].name,data:[]};this.morphTargets.normal=
+r}var p=a.skinIndices,t=a.skinWeights,u=p.length===c.length,w=t.length===c.length;0<c.length&&0===b.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(m=0;m<b.length;m++){var A=b[m];this.vertices.push(c[A.a],c[A.b],c[A.c]);var v=A.vertexNormals;3===v.length?this.normals.push(v[0],v[1],v[2]):(v=A.normal,this.normals.push(v,v,v));v=A.vertexColors;3===v.length?this.colors.push(v[0],v[1],v[2]):(v=A.color,this.colors.push(v,v,v));!0===e&&(v=d[0][m],void 0!==v?this.uvs.push(v[0],
+v[1],v[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",m),this.uvs.push(new z,new z,new z)));!0===f&&(v=d[1][m],void 0!==v?this.uvs2.push(v[0],v[1],v[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",m),this.uvs2.push(new z,new z,new z)));for(v=0;v<h;v++){var H=g[v].vertices;k[v].data.push(H[A.a],H[A.b],H[A.c])}for(v=0;v<n;v++)H=l[v].vertexNormals[m],r[v].data.push(H.a,H.b,H.c);u&&this.skinIndices.push(p[A.a],p[A.b],p[A.c]);w&&this.skinWeights.push(t[A.a],
+t[A.b],t[A.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this}});var Of=1;E.prototype=Object.assign(Object.create(ia.prototype),{constructor:E,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(a){Array.isArray(a)?this.index=new (65535<Je(a)?ob:nb)(a,1):this.index=a},addAttribute:function(a,
+b,c){if(!(b&&b.isBufferAttribute||b&&b.isInterleavedBufferAttribute))return console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(a,new F(b,c));if("index"===a)return console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(b),this;this.attributes[a]=b;return this},getAttribute:function(a){return this.attributes[a]},removeAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,
+c){this.groups.push({start:a,count:b,materialIndex:void 0!==c?c:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=b},applyMatrix:function(a){var b=this.attributes.position;void 0!==b&&(a.applyToBufferAttribute(b),b.needsUpdate=!0);b=this.attributes.normal;void 0!==b&&((new da).getNormalMatrix(a).applyToBufferAttribute(b),b.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();
+return this},rotateX:function(){var a=new P;return function(b){a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a=new P;return function(b){a.makeRotationY(b);this.applyMatrix(a);return this}}(),rotateZ:function(){var a=new P;return function(b){a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a=new P;return function(b,c,d){a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a=new P;return function(b,c,d){a.makeScale(b,
+c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a=new D;return function(b){a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),center:function(){var a=new p;return function(){this.computeBoundingBox();this.boundingBox.getCenter(a).negate();this.translate(a.x,a.y,a.z);return this}}(),setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new C(3*b.vertices.length,3);var c=new C(3*b.colors.length,3);this.addAttribute("position",a.copyVector3sArray(b.vertices));
+this.addAttribute("color",c.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new C(b.lineDistances.length,1),this.addAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},setFromPoints:function(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c];b.push(e.x,
+e.y,e.z||0)}this.addAttribute("position",new C(b,3));return this},updateFromObject:function(a){var b=a.geometry;if(a.isMesh){var c=b.__directGeometry;!0===b.elementsNeedUpdate&&(c=void 0,b.elementsNeedUpdate=!1);if(void 0===c)return this.fromGeometry(b);c.verticesNeedUpdate=b.verticesNeedUpdate;c.normalsNeedUpdate=b.normalsNeedUpdate;c.colorsNeedUpdate=b.colorsNeedUpdate;c.uvsNeedUpdate=b.uvsNeedUpdate;c.groupsNeedUpdate=b.groupsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=
+!1;b.uvsNeedUpdate=!1;b.groupsNeedUpdate=!1;b=c}!0===b.verticesNeedUpdate&&(c=this.attributes.position,void 0!==c&&(c.copyVector3sArray(b.vertices),c.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(c=this.attributes.normal,void 0!==c&&(c.copyVector3sArray(b.normals),c.needsUpdate=!0),b.normalsNeedUpdate=!1);!0===b.colorsNeedUpdate&&(c=this.attributes.color,void 0!==c&&(c.copyColorsArray(b.colors),c.needsUpdate=!0),b.colorsNeedUpdate=!1);b.uvsNeedUpdate&&(c=this.attributes.uv,void 0!==
+c&&(c.copyVector2sArray(b.uvs),c.needsUpdate=!0),b.uvsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(c=this.attributes.lineDistance,void 0!==c&&(c.copyArray(b.lineDistances),c.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);b.groupsNeedUpdate&&(b.computeGroups(a.geometry),this.groups=b.groups,b.groupsNeedUpdate=!1);return this},fromGeometry:function(a){a.__directGeometry=(new Ie).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var b=new Float32Array(3*
+a.vertices.length);this.addAttribute("position",(new F(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),this.addAttribute("normal",(new F(b,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(b=new Float32Array(3*a.colors.length),this.addAttribute("color",(new F(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.addAttribute("uv",(new F(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*
+a.uvs2.length),this.addAttribute("uv2",(new F(b,2)).copyVector2sArray(a.uvs2)));this.groups=a.groups;for(var c in a.morphTargets){b=[];for(var d=a.morphTargets[c],e=0,f=d.length;e<f;e++){var g=d[e],h=new C(3*g.data.length,3);h.name=g.name;b.push(h.copyVector3sArray(g.data))}this.morphAttributes[c]=b}0<a.skinIndices.length&&(c=new C(4*a.skinIndices.length,4),this.addAttribute("skinIndex",c.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(c=new C(4*a.skinWeights.length,4),this.addAttribute("skinWeight",
+c.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Wa);var a=this.attributes.position;void 0!==a?this.boundingBox.setFromBufferAttribute(a):this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',
+this)},computeBoundingSphere:function(){var a=new Wa,b=new p;return function(){null===this.boundingSphere&&(this.boundingSphere=new Ga);var c=this.attributes.position;if(c){var d=this.boundingSphere.center;a.setFromBufferAttribute(c);a.getCenter(d);for(var e=0,f=0,g=c.count;f<g;f++)b.x=c.getX(f),b.y=c.getY(f),b.z=c.getZ(f),e=Math.max(e,d.distanceToSquared(b));this.boundingSphere.radius=Math.sqrt(e);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',
+this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.index,b=this.attributes;if(b.position){var c=b.position.array;if(void 0===b.normal)this.addAttribute("normal",new F(new Float32Array(c.length),3));else for(var d=b.normal.array,e=0,f=d.length;e<f;e++)d[e]=0;d=b.normal.array;var g=new p,h=new p,k=new p,m=new p,l=new p;if(a){var n=a.array;e=0;for(f=a.count;e<f;e+=3){a=3*n[e+0];var r=3*n[e+1];var x=3*n[e+2];g.fromArray(c,a);h.fromArray(c,r);k.fromArray(c,x);m.subVectors(k,
+h);l.subVectors(g,h);m.cross(l);d[a]+=m.x;d[a+1]+=m.y;d[a+2]+=m.z;d[r]+=m.x;d[r+1]+=m.y;d[r+2]+=m.z;d[x]+=m.x;d[x+1]+=m.y;d[x+2]+=m.z}}else for(e=0,f=c.length;e<f;e+=9)g.fromArray(c,e),h.fromArray(c,e+3),k.fromArray(c,e+6),m.subVectors(k,h),l.subVectors(g,h),m.cross(l),d[e]=m.x,d[e+1]=m.y,d[e+2]=m.z,d[e+3]=m.x,d[e+4]=m.y,d[e+5]=m.z,d[e+6]=m.x,d[e+7]=m.y,d[e+8]=m.z;this.normalizeNormals();b.normal.needsUpdate=!0}},merge:function(a,b){if(a&&a.isBufferGeometry){void 0===b&&(b=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));
+var c=this.attributes,d;for(d in c)if(void 0!==a.attributes[d]){var e=c[d].array,f=a.attributes[d],g=f.array,h=0;for(f=f.itemSize*b;h<g.length;h++,f++)e[f]=g[h]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",a)},normalizeNormals:function(){var a=new p;return function(){for(var b=this.attributes.normal,c=0,d=b.count;c<d;c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),a.normalize(),b.setXYZ(c,a.x,a.y,a.z)}}(),toNonIndexed:function(){if(null===
+this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var a=new E,b=this.index.array,c=this.attributes,d;for(d in c){var e=c[d],f=e.array,g=e.itemSize,h=new f.constructor(b.length*g),k=0;e=0;for(var m=b.length;e<m;e++){var l=b[e]*g;for(var n=0;n<g;n++)h[k++]=f[l++]}a.addAttribute(d,new F(h,g))}b=this.groups;e=0;for(m=b.length;e<m;e++)c=b[e],a.addGroup(c.start,c.count,c.materialIndex);return a},toJSON:function(){var a={metadata:{version:4.5,type:"BufferGeometry",
+generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;a.type=this.type;""!==this.name&&(a.name=this.name);0<Object.keys(this.userData).length&&(a.userData=this.userData);if(void 0!==this.parameters){var b=this.parameters;for(e in b)void 0!==b[e]&&(a[e]=b[e]);return a}a.data={attributes:{}};var c=this.index;null!==c&&(b=Array.prototype.slice.call(c.array),a.data.index={type:c.array.constructor.name,array:b});c=this.attributes;for(e in c){var d=c[e];b=Array.prototype.slice.call(d.array);a.data.attributes[e]=
+{itemSize:d.itemSize,type:d.array.constructor.name,array:b,normalized:d.normalized}}var e=this.groups;0<e.length&&(a.data.groups=JSON.parse(JSON.stringify(e)));e=this.boundingSphere;null!==e&&(a.data.boundingSphere={center:e.center.toArray(),radius:e.radius});return a},clone:function(){return(new E).copy(this)},copy:function(a){var b;this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;var c=a.index;null!==c&&this.setIndex(c.clone());
+c=a.attributes;for(g in c)this.addAttribute(g,c[g].clone());var d=a.morphAttributes;for(g in d){var e=[],f=d[g];c=0;for(b=f.length;c<b;c++)e.push(f[c].clone());this.morphAttributes[g]=e}var g=a.groups;c=0;for(b=g.length;c<b;c++)d=g[c],this.addGroup(d.start,d.count,d.materialIndex);g=a.boundingBox;null!==g&&(this.boundingBox=g.clone());g=a.boundingSphere;null!==g&&(this.boundingSphere=g.clone());this.drawRange.start=a.drawRange.start;this.drawRange.count=a.drawRange.count;this.userData=a.userData;
+return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Kb.prototype=Object.create(I.prototype);Kb.prototype.constructor=Kb;pb.prototype=Object.create(E.prototype);pb.prototype.constructor=pb;yc.prototype=Object.create(I.prototype);yc.prototype.constructor=yc;qb.prototype=Object.create(E.prototype);qb.prototype.constructor=qb;var Pf=0;L.prototype=Object.assign(Object.create(ia.prototype),{constructor:L,isMaterial:!0,onBeforeCompile:function(){},setValues:function(a){if(void 0!==a)for(var b in a){var c=
+a[b];if(void 0===c)console.warn("THREE.Material: '"+b+"' parameter is undefined.");else if("shading"===b)console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===c?!0:!1;else{var d=this[b];void 0===d?console.warn("THREE."+this.type+": '"+b+"' is not a property of this material."):d&&d.isColor?d.set(c):d&&d.isVector3&&c&&c.isVector3?d.copy(c):this[b]=c}}},toJSON:function(a){function b(a){var b=[],c;for(c in a){var d=a[c];delete d.metadata;
+b.push(d)}return b}var c=void 0===a||"string"===typeof a;c&&(a={textures:{},images:{}});var d={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};d.uuid=this.uuid;d.type=this.type;""!==this.name&&(d.name=this.name);this.color&&this.color.isColor&&(d.color=this.color.getHex());void 0!==this.roughness&&(d.roughness=this.roughness);void 0!==this.metalness&&(d.metalness=this.metalness);this.emissive&&this.emissive.isColor&&(d.emissive=this.emissive.getHex());1!==this.emissiveIntensity&&
+(d.emissiveIntensity=this.emissiveIntensity);this.specular&&this.specular.isColor&&(d.specular=this.specular.getHex());void 0!==this.shininess&&(d.shininess=this.shininess);void 0!==this.clearCoat&&(d.clearCoat=this.clearCoat);void 0!==this.clearCoatRoughness&&(d.clearCoatRoughness=this.clearCoatRoughness);this.map&&this.map.isTexture&&(d.map=this.map.toJSON(a).uuid);this.alphaMap&&this.alphaMap.isTexture&&(d.alphaMap=this.alphaMap.toJSON(a).uuid);this.lightMap&&this.lightMap.isTexture&&(d.lightMap=
+this.lightMap.toJSON(a).uuid);this.aoMap&&this.aoMap.isTexture&&(d.aoMap=this.aoMap.toJSON(a).uuid,d.aoMapIntensity=this.aoMapIntensity);this.bumpMap&&this.bumpMap.isTexture&&(d.bumpMap=this.bumpMap.toJSON(a).uuid,d.bumpScale=this.bumpScale);this.normalMap&&this.normalMap.isTexture&&(d.normalMap=this.normalMap.toJSON(a).uuid,d.normalMapType=this.normalMapType,d.normalScale=this.normalScale.toArray());this.displacementMap&&this.displacementMap.isTexture&&(d.displacementMap=this.displacementMap.toJSON(a).uuid,
+d.displacementScale=this.displacementScale,d.displacementBias=this.displacementBias);this.roughnessMap&&this.roughnessMap.isTexture&&(d.roughnessMap=this.roughnessMap.toJSON(a).uuid);this.metalnessMap&&this.metalnessMap.isTexture&&(d.metalnessMap=this.metalnessMap.toJSON(a).uuid);this.emissiveMap&&this.emissiveMap.isTexture&&(d.emissiveMap=this.emissiveMap.toJSON(a).uuid);this.specularMap&&this.specularMap.isTexture&&(d.specularMap=this.specularMap.toJSON(a).uuid);this.envMap&&this.envMap.isTexture&&
+(d.envMap=this.envMap.toJSON(a).uuid,d.reflectivity=this.reflectivity,void 0!==this.combine&&(d.combine=this.combine),void 0!==this.envMapIntensity&&(d.envMapIntensity=this.envMapIntensity));this.gradientMap&&this.gradientMap.isTexture&&(d.gradientMap=this.gradientMap.toJSON(a).uuid);void 0!==this.size&&(d.size=this.size);void 0!==this.sizeAttenuation&&(d.sizeAttenuation=this.sizeAttenuation);1!==this.blending&&(d.blending=this.blending);!0===this.flatShading&&(d.flatShading=this.flatShading);0!==
+this.side&&(d.side=this.side);0!==this.vertexColors&&(d.vertexColors=this.vertexColors);1>this.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent=this.transparent);d.depthFunc=this.depthFunc;d.depthTest=this.depthTest;d.depthWrite=this.depthWrite;0!==this.rotation&&(d.rotation=this.rotation);!0===this.polygonOffset&&(d.polygonOffset=!0);0!==this.polygonOffsetFactor&&(d.polygonOffsetFactor=this.polygonOffsetFactor);0!==this.polygonOffsetUnits&&(d.polygonOffsetUnits=this.polygonOffsetUnits);
+1!==this.linewidth&&(d.linewidth=this.linewidth);void 0!==this.dashSize&&(d.dashSize=this.dashSize);void 0!==this.gapSize&&(d.gapSize=this.gapSize);void 0!==this.scale&&(d.scale=this.scale);!0===this.dithering&&(d.dithering=!0);0<this.alphaTest&&(d.alphaTest=this.alphaTest);!0===this.premultipliedAlpha&&(d.premultipliedAlpha=this.premultipliedAlpha);!0===this.wireframe&&(d.wireframe=this.wireframe);1<this.wireframeLinewidth&&(d.wireframeLinewidth=this.wireframeLinewidth);"round"!==this.wireframeLinecap&&
+(d.wireframeLinecap=this.wireframeLinecap);"round"!==this.wireframeLinejoin&&(d.wireframeLinejoin=this.wireframeLinejoin);!0===this.morphTargets&&(d.morphTargets=!0);!0===this.skinning&&(d.skinning=!0);!1===this.visible&&(d.visible=!1);"{}"!==JSON.stringify(this.userData)&&(d.userData=this.userData);c&&(c=b(a.textures),a=b(a.images),0<c.length&&(d.textures=c),0<a.length&&(d.images=a));return d},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.name=a.name;this.fog=a.fog;
+this.lights=a.lights;this.blending=a.blending;this.side=a.side;this.flatShading=a.flatShading;this.vertexColors=a.vertexColors;this.opacity=a.opacity;this.transparent=a.transparent;this.blendSrc=a.blendSrc;this.blendDst=a.blendDst;this.blendEquation=a.blendEquation;this.blendSrcAlpha=a.blendSrcAlpha;this.blendDstAlpha=a.blendDstAlpha;this.blendEquationAlpha=a.blendEquationAlpha;this.depthFunc=a.depthFunc;this.depthTest=a.depthTest;this.depthWrite=a.depthWrite;this.colorWrite=a.colorWrite;this.precision=
+a.precision;this.polygonOffset=a.polygonOffset;this.polygonOffsetFactor=a.polygonOffsetFactor;this.polygonOffsetUnits=a.polygonOffsetUnits;this.dithering=a.dithering;this.alphaTest=a.alphaTest;this.premultipliedAlpha=a.premultipliedAlpha;this.visible=a.visible;this.userData=JSON.parse(JSON.stringify(a.userData));this.clipShadows=a.clipShadows;this.clipIntersection=a.clipIntersection;var b=a.clippingPlanes,c=null;if(null!==b){var d=b.length;c=Array(d);for(var e=0;e!==d;++e)c[e]=b[e].clone()}this.clippingPlanes=
+c;this.shadowSide=a.shadowSide;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});ka.prototype=Object.create(L.prototype);ka.prototype.constructor=ka;ka.prototype.isShaderMaterial=!0;ka.prototype.copy=function(a){L.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=va.clone(a.uniforms);this.defines=Object.assign({},a.defines);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.lights=a.lights;
+this.clipping=a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions=a.extensions;return this};ka.prototype.toJSON=function(a){var b=L.prototype.toJSON.call(this,a);b.uniforms={};for(var c in this.uniforms){var d=this.uniforms[c].value;b.uniforms[c]=d.isTexture?{type:"t",value:d.toJSON(a).uuid}:d.isColor?{type:"c",value:d.getHex()}:d.isVector2?{type:"v2",value:d.toArray()}:d.isVector3?{type:"v3",value:d.toArray()}:d.isVector4?{type:"v4",
+value:d.toArray()}:d.isMatrix4?{type:"m4",value:d.toArray()}:{value:d}}0<Object.keys(this.defines).length&&(b.defines=this.defines);b.vertexShader=this.vertexShader;b.fragmentShader=this.fragmentShader;return b};Object.assign(rb.prototype,{set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,b){void 0===b&&(console.warn("THREE.Ray: .at() target is now required"),
+b=new p);return b.copy(this.direction).multiplyScalar(a).add(this.origin)},lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize();return this},recast:function(){var a=new p;return function(b){this.origin.copy(this.at(b,a));return this}}(),closestPointToPoint:function(a,b){void 0===b&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),b=new p);b.subVectors(a,this.origin);a=b.dot(this.direction);return 0>a?b.copy(this.origin):b.copy(this.direction).multiplyScalar(a).add(this.origin)},
+distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(){var a=new p;return function(b){var c=a.subVectors(b,this.origin).dot(this.direction);if(0>c)return this.origin.distanceToSquared(b);a.copy(this.direction).multiplyScalar(c).add(this.origin);return a.distanceToSquared(b)}}(),distanceSqToSegment:function(){var a=new p,b=new p,c=new p;return function(d,e,f,g){a.copy(d).add(e).multiplyScalar(.5);b.copy(e).sub(d).normalize();c.copy(this.origin).sub(a);
+var h=.5*d.distanceTo(e),k=-this.direction.dot(b),m=c.dot(this.direction),l=-c.dot(b),n=c.lengthSq(),r=Math.abs(1-k*k);if(0<r){d=k*l-m;e=k*m-l;var p=h*r;0<=d?e>=-p?e<=p?(h=1/r,d*=h,e*=h,k=d*(d+k*e+2*m)+e*(k*d+e+2*l)+n):(e=h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+n):(e=-h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+n):e<=-p?(d=Math.max(0,-(-k*h+m)),e=0<d?-h:Math.min(Math.max(-h,-l),h),k=-d*d+e*(e+2*l)+n):e<=p?(d=0,e=Math.min(Math.max(-h,-l),h),k=e*(e+2*l)+n):(d=Math.max(0,-(k*h+m)),e=0<d?h:Math.min(Math.max(-h,
+-l),h),k=-d*d+e*(e+2*l)+n)}else e=0<k?-h:h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+n;f&&f.copy(this.direction).multiplyScalar(d).add(this.origin);g&&g.copy(b).multiplyScalar(e).add(a);return k}}(),intersectSphere:function(){var a=new p;return function(b,c){a.subVectors(b.center,this.origin);var d=a.dot(this.direction),e=a.dot(a)-d*d;b=b.radius*b.radius;if(e>b)return null;b=Math.sqrt(b-e);e=d-b;d+=b;return 0>e&&0>d?null:0>e?this.at(d,c):this.at(e,c)}}(),intersectsSphere:function(a){return this.distanceSqToPoint(a.center)<=
+a.radius*a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){a=this.distanceToPlane(a);return null===a?null:this.at(a,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,b){var c=1/this.direction.x;var d=1/this.direction.y;var e=1/this.direction.z,
+f=this.origin;if(0<=c){var g=(a.min.x-f.x)*c;c*=a.max.x-f.x}else g=(a.max.x-f.x)*c,c*=a.min.x-f.x;if(0<=d){var h=(a.min.y-f.y)*d;d*=a.max.y-f.y}else h=(a.max.y-f.y)*d,d*=a.min.y-f.y;if(g>d||h>c)return null;if(h>g||g!==g)g=h;if(d<c||c!==c)c=d;0<=e?(h=(a.min.z-f.z)*e,a=(a.max.z-f.z)*e):(h=(a.max.z-f.z)*e,a=(a.min.z-f.z)*e);if(g>a||h>c)return null;if(h>g||g!==g)g=h;if(a<c||c!==c)c=a;return 0>c?null:this.at(0<=g?g:c,b)},intersectsBox:function(){var a=new p;return function(b){return null!==this.intersectBox(b,
+a)}}(),intersectTriangle:function(){var a=new p,b=new p,c=new p,d=new p;return function(e,f,g,h,k){b.subVectors(f,e);c.subVectors(g,e);d.crossVectors(b,c);f=this.direction.dot(d);if(0<f){if(h)return null;h=1}else if(0>f)h=-1,f=-f;else return null;a.subVectors(this.origin,e);e=h*this.direction.dot(c.crossVectors(a,c));if(0>e)return null;g=h*this.direction.dot(b.cross(a));if(0>g||e+g>f)return null;e=-h*a.dot(d);return 0>e?null:this.at(e/f,k)}}(),applyMatrix4:function(a){this.origin.applyMatrix4(a);
+this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});Object.assign(ha,{getNormal:function(){var a=new p;return function(b,c,d,e){void 0===e&&(console.warn("THREE.Triangle: .getNormal() target is now required"),e=new p);e.subVectors(d,c);a.subVectors(b,c);e.cross(a);b=e.lengthSq();return 0<b?e.multiplyScalar(1/Math.sqrt(b)):e.set(0,0,0)}}(),getBarycoord:function(){var a=new p,b=new p,c=new p;return function(d,
+e,f,g,h){a.subVectors(g,e);b.subVectors(f,e);c.subVectors(d,e);d=a.dot(a);e=a.dot(b);f=a.dot(c);var k=b.dot(b);g=b.dot(c);var m=d*k-e*e;void 0===h&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),h=new p);if(0===m)return h.set(-2,-1,-1);m=1/m;k=(k*f-e*g)*m;d=(d*g-e*f)*m;return h.set(1-k-d,d,k)}}(),containsPoint:function(){var a=new p;return function(b,c,d,e){ha.getBarycoord(b,c,d,e,a);return 0<=a.x&&0<=a.y&&1>=a.x+a.y}}(),getUV:function(){var a=new p;return function(b,c,d,
+e,f,g,h,k){this.getBarycoord(b,c,d,e,a);k.set(0,0);k.addScaledVector(f,a.x);k.addScaledVector(g,a.y);k.addScaledVector(h,a.z);return k}}()});Object.assign(ha.prototype,{set:function(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},getArea:function(){var a=
+new p,b=new p;return function(){a.subVectors(this.c,this.b);b.subVectors(this.a,this.b);return.5*a.cross(b).length()}}(),getMidpoint:function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),a=new p);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(a){return ha.getNormal(this.a,this.b,this.c,a)},getPlane:function(a){void 0===a&&(console.warn("THREE.Triangle: .getPlane() target is now required"),a=new p);return a.setFromCoplanarPoints(this.a,
+this.b,this.c)},getBarycoord:function(a,b){return ha.getBarycoord(a,this.a,this.b,this.c,b)},containsPoint:function(a){return ha.containsPoint(a,this.a,this.b,this.c)},getUV:function(a,b,c,d,e){return ha.getUV(a,this.a,this.b,this.c,b,c,d,e)},intersectsBox:function(a){return a.intersectsTriangle(this)},closestPointToPoint:function(){var a=new p,b=new p,c=new p,d=new p,e=new p,f=new p;return function(g,h){void 0===h&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),h=
+new p);var k=this.a,m=this.b,l=this.c;a.subVectors(m,k);b.subVectors(l,k);d.subVectors(g,k);var n=a.dot(d),r=b.dot(d);if(0>=n&&0>=r)return h.copy(k);e.subVectors(g,m);var x=a.dot(e),t=b.dot(e);if(0<=x&&t<=x)return h.copy(m);var u=n*t-x*r;if(0>=u&&0<=n&&0>=x)return m=n/(n-x),h.copy(k).addScaledVector(a,m);f.subVectors(g,l);g=a.dot(f);var w=b.dot(f);if(0<=w&&g<=w)return h.copy(l);n=g*r-n*w;if(0>=n&&0<=r&&0>=w)return u=r/(r-w),h.copy(k).addScaledVector(b,u);r=x*w-g*t;if(0>=r&&0<=t-x&&0<=g-w)return c.subVectors(l,
+m),u=(t-x)/(t-x+(g-w)),h.copy(m).addScaledVector(c,u);l=1/(r+n+u);m=n*l;u*=l;return h.copy(k).addScaledVector(a,m).addScaledVector(b,u)}}(),equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});Ea.prototype=Object.create(L.prototype);Ea.prototype.constructor=Ea;Ea.prototype.isMeshBasicMaterial=!0;Ea.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=
+a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;return this};pa.prototype=Object.assign(Object.create(D.prototype),{constructor:pa,
+isMesh:!0,setDrawMode:function(a){this.drawMode=a},copy:function(a){D.prototype.copy.call(this,a);this.drawMode=a.drawMode;void 0!==a.morphTargetInfluences&&(this.morphTargetInfluences=a.morphTargetInfluences.slice());void 0!==a.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},a.morphTargetDictionary));return this},updateMorphTargets:function(){var a=this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length){var c=a[b[0]];if(void 0!==c)for(this.morphTargetInfluences=
+[],this.morphTargetDictionary={},a=0,b=c.length;a<b;a++){var d=c[a].name||String(a);this.morphTargetInfluences.push(0);this.morphTargetDictionary[d]=a}}}else if(c=a.morphTargets,void 0!==c&&0<c.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=c.length;a<b;a++)d=c[a].name||String(a),this.morphTargetInfluences.push(0),this.morphTargetDictionary[d]=a},raycast:function(){function a(a,b,c,d,e,f,g,h){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,h):d.intersectTriangle(e,
+f,g,2!==b.side,h)))return null;u.copy(h);u.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(u);return b<c.near||b>c.far?null:{distance:b,point:u.clone(),object:a}}function b(b,c,d,e,k,m,l,q,p){f.fromBufferAttribute(k,l);g.fromBufferAttribute(k,q);h.fromBufferAttribute(k,p);if(b=a(b,c,d,e,f,g,h,t))m&&(n.fromBufferAttribute(m,l),r.fromBufferAttribute(m,q),x.fromBufferAttribute(m,p),b.uv=ha.getUV(t,f,g,h,n,r,x,new z)),m=new Xa(l,q,p),ha.getNormal(f,g,h,m.normal),b.face=m;return b}var c=new P,d=
+new rb,e=new Ga,f=new p,g=new p,h=new p,k=new p,m=new p,l=new p,n=new z,r=new z,x=new z,t=new p,u=new p;return function(q,p){var u=this.geometry,w=this.material,y=this.matrixWorld;if(void 0!==w&&(null===u.boundingSphere&&u.computeBoundingSphere(),e.copy(u.boundingSphere),e.applyMatrix4(y),!1!==q.ray.intersectsSphere(e)&&(c.getInverse(y),d.copy(q.ray).applyMatrix4(c),null===u.boundingBox||!1!==d.intersectsBox(u.boundingBox))))if(u.isBufferGeometry){var A=u.index,C=u.attributes.position,B=u.attributes.uv,
+E=u.groups;u=u.drawRange;var D;if(null!==A)if(Array.isArray(w)){var F=0;for(D=E.length;F<D;F++){var G=E[F];var J=w[G.materialIndex];y=Math.max(G.start,u.start);var L=Math.min(G.start+G.count,u.start+u.count);for(G=y;G<L;G+=3){y=A.getX(G);var I=A.getX(G+1);var K=A.getX(G+2);if(y=b(this,J,q,d,C,B,y,I,K))y.faceIndex=Math.floor(G/3),p.push(y)}}}else for(y=Math.max(0,u.start),L=Math.min(A.count,u.start+u.count),F=y,D=L;F<D;F+=3){if(y=A.getX(F),I=A.getX(F+1),K=A.getX(F+2),y=b(this,w,q,d,C,B,y,I,K))y.faceIndex=
+Math.floor(F/3),p.push(y)}else if(void 0!==C)if(Array.isArray(w))for(F=0,D=E.length;F<D;F++)for(G=E[F],J=w[G.materialIndex],y=Math.max(G.start,u.start),L=Math.min(G.start+G.count,u.start+u.count),G=y;G<L;G+=3){if(y=G,I=G+1,K=G+2,y=b(this,J,q,d,C,B,y,I,K))y.faceIndex=Math.floor(G/3),p.push(y)}else for(y=Math.max(0,u.start),L=Math.min(C.count,u.start+u.count),F=y,D=L;F<D;F+=3)if(y=F,I=F+1,K=F+2,y=b(this,w,q,d,C,B,y,I,K))y.faceIndex=Math.floor(F/3),p.push(y)}else if(u.isGeometry)for(C=Array.isArray(w),
+B=u.vertices,E=u.faces,y=u.faceVertexUvs[0],0<y.length&&(A=y),G=0,L=E.length;G<L;G++)if(I=E[G],y=C?w[I.materialIndex]:w,void 0!==y){F=B[I.a];D=B[I.b];J=B[I.c];if(!0===y.morphTargets){K=u.morphTargets;var Q=this.morphTargetInfluences;f.set(0,0,0);g.set(0,0,0);h.set(0,0,0);for(var P=0,S=K.length;P<S;P++){var R=Q[P];if(0!==R){var T=K[P].vertices;f.addScaledVector(k.subVectors(T[I.a],F),R);g.addScaledVector(m.subVectors(T[I.b],D),R);h.addScaledVector(l.subVectors(T[I.c],J),R)}}f.add(F);g.add(D);h.add(J);
+F=f;D=g;J=h}if(y=a(this,y,q,d,F,D,J,t))A&&A[G]&&(K=A[G],n.copy(K[0]),r.copy(K[1]),x.copy(K[2]),y.uv=ha.getUV(t,F,D,J,n,r,x,new z)),y.face=I,y.faceIndex=G,p.push(y)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});Ya.prototype=Object.create(W.prototype);Ya.prototype.constructor=Ya;Ya.prototype.isCubeTexture=!0;Object.defineProperty(Ya.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Mb.prototype=Object.create(W.prototype);
+Mb.prototype.constructor=Mb;Mb.prototype.isDataTexture3D=!0;var Qe=new W,kg=new Mb,Re=new Ya,Ke=[],Me=[],Pe=new Float32Array(16),Oe=new Float32Array(9),Ne=new Float32Array(4);Ve.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));sa(b,a)};We.prototype.setValue=function(a,b,c){for(var d=this.seq,e=0,f=d.length;e!==f;++e){var g=d[e];g.setValue(a,b[g.id],c)}};var $d=/([\w\d_]+)(\])?(\[|\.)?/g;db.prototype.setValue=
+function(a,b,c){b=this.map[b];void 0!==b&&b.setValue(a,c,this.renderer)};db.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};db.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],h=c[g.id];!1!==h.needsUpdate&&g.setValue(a,h.value,d)}};db.seqWithValue=function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var f=a[d];f.id in b&&c.push(f)}return c};var Fg=0,Og=0;eb.prototype=Object.create(L.prototype);eb.prototype.constructor=eb;eb.prototype.isMeshDepthMaterial=
+!0;eb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};fb.prototype=Object.create(L.prototype);fb.prototype.constructor=fb;fb.prototype.isMeshDistanceMaterial=
+!0;fb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.referencePosition.copy(a.referencePosition);this.nearDistance=a.nearDistance;this.farDistance=a.farDistance;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;return this};Ob.prototype=Object.assign(Object.create(D.prototype),{constructor:Ob,isGroup:!0});Ra.prototype=
+Object.assign(Object.create(D.prototype),{constructor:Ra,isCamera:!0,copy:function(a,b){D.prototype.copy.call(this,a,b);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);this.projectionMatrixInverse.copy(a.projectionMatrixInverse);return this},getWorldDirection:function(a){void 0===a&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),a=new p);this.updateMatrixWorld(!0);var b=this.matrixWorld.elements;return a.set(-b[8],-b[9],
+-b[10]).normalize()},updateMatrixWorld:function(a){D.prototype.updateMatrixWorld.call(this,a);this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}});V.prototype=Object.assign(Object.create(Ra.prototype),{constructor:V,isPerspectiveCamera:!0,copy:function(a,b){Ra.prototype.copy.call(this,a,b);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=null===a.view?null:Object.assign({},
+a.view);this.filmGauge=a.filmGauge;this.filmOffset=a.filmOffset;return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/a;this.fov=2*R.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*R.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*R.RAD2DEG*Math.atan(Math.tan(.5*R.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/
+Math.max(this.aspect,1)},setViewOffset:function(a,b,c,d,e,f){this.aspect=a/b;null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=c;this.view.offsetY=d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,
+b=a*Math.tan(.5*R.DEG2RAD*this.fov)/this.zoom,c=2*b,d=this.aspect*c,e=-.5*d,f=this.view;if(null!==this.view&&this.view.enabled){var g=f.fullWidth,h=f.fullHeight;e+=f.offsetX*d/g;b-=f.offsetY*c/h;d*=f.width/g;c*=f.height/h}f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;
+a.object.near=this.near;a.object.far=this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});Cc.prototype=Object.assign(Object.create(V.prototype),{constructor:Cc,isArrayCamera:!0});var ff=new p,gf=new p;Pb.prototype.isFogExp2=!0;Pb.prototype.clone=function(){return new Pb(this.color,this.density)};Pb.prototype.toJSON=function(){return{type:"FogExp2",
+color:this.color.getHex(),density:this.density}};Qb.prototype.isFog=!0;Qb.prototype.clone=function(){return new Qb(this.color,this.near,this.far)};Qb.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}};vd.prototype=Object.assign(Object.create(D.prototype),{constructor:vd,copy:function(a,b){D.prototype.copy.call(this,a,b);null!==a.background&&(this.background=a.background.clone());null!==a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=
+a.overrideMaterial.clone());this.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this},toJSON:function(a){var b=D.prototype.toJSON.call(this,a);null!==this.background&&(b.object.background=this.background.toJSON(a));null!==this.fog&&(b.object.fog=this.fog.toJSON());return b}});Object.defineProperty(sb.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(sb.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(a){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
+this.count=void 0!==a?a.length/this.stride:0;this.array=a;return this},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.count=a.count;this.stride=a.stride;this.dynamic=a.dynamic;return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride;for(var d=0,e=this.stride;d<e;d++)this.array[a+d]=b.array[c+d];return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},clone:function(){return(new this.constructor).copy(this)},
+onUpload:function(a){this.onUploadCallback=a;return this}});Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}});Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(a,b){this.data.array[a*this.data.stride+this.offset]=b;return this},setY:function(a,b){this.data.array[a*this.data.stride+this.offset+1]=b;return this},setZ:function(a,b){this.data.array[a*this.data.stride+this.offset+2]=b;return this},
+setW:function(a,b){this.data.array[a*this.data.stride+this.offset+3]=b;return this},getX:function(a){return this.data.array[a*this.data.stride+this.offset]},getY:function(a){return this.data.array[a*this.data.stride+this.offset+1]},getZ:function(a){return this.data.array[a*this.data.stride+this.offset+2]},getW:function(a){return this.data.array[a*this.data.stride+this.offset+3]},setXY:function(a,b,c){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;return this},setXYZ:function(a,
+b,c,d){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;this.data.array[a+2]=d;return this},setXYZW:function(a,b,c,d,e){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;this.data.array[a+2]=d;this.data.array[a+3]=e;return this}});hb.prototype=Object.create(L.prototype);hb.prototype.constructor=hb;hb.prototype.isSpriteMaterial=!0;hb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.rotation=
+a.rotation;this.sizeAttenuation=a.sizeAttenuation;return this};var Rb;Ec.prototype=Object.assign(Object.create(D.prototype),{constructor:Ec,isSprite:!0,raycast:function(){function a(a,b,c,d,h,k){e.subVectors(a,c).addScalar(.5).multiply(d);void 0!==h?(f.x=k*e.x-h*e.y,f.y=h*e.x+k*e.y):f.copy(e);a.copy(b);a.x+=f.x;a.y+=f.y;a.applyMatrix4(g)}var b=new p,c=new p,d=new p,e=new z,f=new z,g=new P,h=new p,k=new p,m=new p,l=new z,n=new z,r=new z;return function(e,f){c.setFromMatrixScale(this.matrixWorld);g.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld);
+d.setFromMatrixPosition(this.modelViewMatrix);var q=this.material.rotation;if(0!==q){var p=Math.cos(q);var t=Math.sin(q)}q=this.center;a(h.set(-.5,-.5,0),d,q,c,t,p);a(k.set(.5,-.5,0),d,q,c,t,p);a(m.set(.5,.5,0),d,q,c,t,p);l.set(0,0);n.set(1,0);r.set(1,1);var x=e.ray.intersectTriangle(h,k,m,!1,b);if(null===x&&(a(k.set(-.5,.5,0),d,q,c,t,p),n.set(0,1),x=e.ray.intersectTriangle(h,m,k,!1,b),null===x))return;t=e.ray.origin.distanceTo(b);t<e.near||t>e.far||f.push({distance:t,point:b.clone(),uv:ha.getUV(b,
+h,k,m,l,n,r,new z),face:null,object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){D.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});Fc.prototype=Object.assign(Object.create(D.prototype),{constructor:Fc,copy:function(a){D.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b<c;b++){var d=a[b];this.addLevel(d.object.clone(),d.distance)}return this},addLevel:function(a,b){void 0===b&&(b=0);b=
+Math.abs(b);for(var c=this.levels,d=0;d<c.length&&!(b<c[d].distance);d++);c.splice(d,0,{distance:b,object:a});this.add(a)},getObjectForDistance:function(a){for(var b=this.levels,c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object},raycast:function(){var a=new p;return function(b,c){a.setFromMatrixPosition(this.matrixWorld);var d=b.ray.origin.distanceTo(a);this.getObjectForDistance(d).raycast(b,c)}}(),update:function(){var a=new p,b=new p;return function(c){var d=this.levels;if(1<d.length){a.setFromMatrixPosition(c.matrixWorld);
+b.setFromMatrixPosition(this.matrixWorld);c=a.distanceTo(b);d[0].object.visible=!0;for(var e=1,f=d.length;e<f;e++)if(c>=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;e<f;e++)d[e].object.visible=!1}}}(),toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.levels=[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,distance:e.distance})}return a}});Object.assign(Gc.prototype,{calculateInverses:function(){this.boneInverses=
+[];for(var a=0,b=this.bones.length;a<b;a++){var c=new P;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},pose:function(){var a,b;var c=0;for(b=this.bones.length;c<b;c++)(a=this.bones[c])&&a.matrixWorld.getInverse(this.boneInverses[c]);c=0;for(b=this.bones.length;c<b;c++)if(a=this.bones[c])a.parent&&a.parent.isBone?(a.matrix.getInverse(a.parent.matrixWorld),a.matrix.multiply(a.matrixWorld)):a.matrix.copy(a.matrixWorld),a.matrix.decompose(a.position,a.quaternion,a.scale)},
+update:function(){var a=new P,b=new P;return function(){for(var c=this.bones,d=this.boneInverses,e=this.boneMatrices,f=this.boneTexture,g=0,h=c.length;g<h;g++)a.multiplyMatrices(c[g]?c[g].matrixWorld:b,d[g]),a.toArray(e,16*g);void 0!==f&&(f.needsUpdate=!0)}}(),clone:function(){return new Gc(this.bones,this.boneInverses)},getBoneByName:function(a){for(var b=0,c=this.bones.length;b<c;b++){var d=this.bones[b];if(d.name===a)return d}}});wd.prototype=Object.assign(Object.create(D.prototype),{constructor:wd,
+isBone:!0});xd.prototype=Object.assign(Object.create(pa.prototype),{constructor:xd,isSkinnedMesh:!0,initBones:function(){var a=[],b;if(this.geometry&&void 0!==this.geometry.bones){var c=0;for(b=this.geometry.bones.length;c<b;c++){var d=this.geometry.bones[c];var e=new wd;a.push(e);e.name=d.name;e.position.fromArray(d.pos);e.quaternion.fromArray(d.rotq);void 0!==d.scl&&e.scale.fromArray(d.scl)}c=0;for(b=this.geometry.bones.length;c<b;c++)d=this.geometry.bones[c],-1!==d.parent&&null!==d.parent&&void 0!==
+a[d.parent]?a[d.parent].add(a[c]):this.add(a[c])}this.updateMatrixWorld(!0);return a},bind:function(a,b){this.skeleton=a;void 0===b&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),b=this.matrixWorld);this.bindMatrix.copy(b);this.bindMatrixInverse.getInverse(b)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var a;if(this.geometry&&this.geometry.isGeometry)for(a=0;a<this.geometry.skinWeights.length;a++){var b=this.geometry.skinWeights[a];var c=1/b.manhattanLength();
+Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){b=new Z;var d=this.geometry.attributes.skinWeight;for(a=0;a<d.count;a++)b.x=d.getX(a),b.y=d.getY(a),b.z=d.getZ(a),b.w=d.getW(a),c=1/b.manhattanLength(),Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0),d.setXYZW(a,b.x,b.y,b.z,b.w)}},updateMatrixWorld:function(a){pa.prototype.updateMatrixWorld.call(this,a);"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?
+this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});T.prototype=Object.create(L.prototype);T.prototype.constructor=T;T.prototype.isLineBasicMaterial=!0;T.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};ma.prototype=Object.assign(Object.create(D.prototype),
+{constructor:ma,isLine:!0,computeLineDistances:function(){var a=new p,b=new p;return function(){var c=this.geometry;if(c.isBufferGeometry)if(null===c.index){for(var d=c.attributes.position,e=[0],f=1,g=d.count;f<g;f++)a.fromBufferAttribute(d,f-1),b.fromBufferAttribute(d,f),e[f]=e[f-1],e[f]+=a.distanceTo(b);c.addAttribute("lineDistance",new C(e,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(c.isGeometry)for(d=c.vertices,
+e=c.lineDistances,e[0]=0,f=1,g=d.length;f<g;f++)e[f]=e[f-1],e[f]+=d[f-1].distanceTo(d[f]);return this}}(),raycast:function(){var a=new P,b=new rb,c=new Ga;return function(d,e){var f=d.linePrecision,g=this.geometry,h=this.matrixWorld;null===g.boundingSphere&&g.computeBoundingSphere();c.copy(g.boundingSphere);c.applyMatrix4(h);c.radius+=f;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(h);b.copy(d.ray).applyMatrix4(a);f/=(this.scale.x+this.scale.y+this.scale.z)/3;f*=f;var k=new p,m=new p;h=new p;var l=
+new p,n=this&&this.isLineSegments?2:1;if(g.isBufferGeometry){var r=g.index,x=g.attributes.position.array;if(null!==r){r=r.array;g=0;for(var t=r.length-1;g<t;g+=n){var u=r[g+1];k.fromArray(x,3*r[g]);m.fromArray(x,3*u);u=b.distanceSqToSegment(k,m,l,h);u>f||(l.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(l),u<d.near||u>d.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}else for(g=0,t=x.length/3-1;g<t;g+=n)k.fromArray(x,
+3*g),m.fromArray(x,3*g+3),u=b.distanceSqToSegment(k,m,l,h),u>f||(l.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(l),u<d.near||u>d.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.vertices,m=k.length,g=0;g<m-1;g+=n)u=b.distanceSqToSegment(k[g],k[g+1],l,h),u>f||(l.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(l),u<d.near||u>d.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),
+index:g,face:null,faceIndex:null,object:this}))}}}(),copy:function(a){D.prototype.copy.call(this,a);this.geometry.copy(a.geometry);this.material.copy(a.material);return this},clone:function(){return(new this.constructor).copy(this)}});S.prototype=Object.assign(Object.create(ma.prototype),{constructor:S,isLineSegments:!0,computeLineDistances:function(){var a=new p,b=new p;return function(){var c=this.geometry;if(c.isBufferGeometry)if(null===c.index){for(var d=c.attributes.position,e=[],f=0,g=d.count;f<
+g;f+=2)a.fromBufferAttribute(d,f),b.fromBufferAttribute(d,f+1),e[f]=0===f?0:e[f-1],e[f+1]=e[f]+a.distanceTo(b);c.addAttribute("lineDistance",new C(e,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(c.isGeometry)for(d=c.vertices,e=c.lineDistances,f=0,g=d.length;f<g;f+=2)a.copy(d[f]),b.copy(d[f+1]),e[f]=0===f?0:e[f-1],e[f+1]=e[f]+a.distanceTo(b);return this}}()});yd.prototype=Object.assign(Object.create(ma.prototype),
+{constructor:yd,isLineLoop:!0});Ha.prototype=Object.create(L.prototype);Ha.prototype.constructor=Ha;Ha.prototype.isPointsMaterial=!0;Ha.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;this.morphTargets=a.morphTargets;return this};Sb.prototype=Object.assign(Object.create(D.prototype),{constructor:Sb,isPoints:!0,raycast:function(){var a=new P,b=new rb,c=new Ga;return function(d,e){function f(a,c){var f=
+b.distanceSqToPoint(a);f<l&&(b.closestPointToPoint(a,n),n.applyMatrix4(k),a=d.ray.origin.distanceTo(n),a<d.near||a>d.far||e.push({distance:a,distanceToRay:Math.sqrt(f),point:n.clone(),index:c,face:null,object:g}))}var g=this,h=this.geometry,k=this.matrixWorld,m=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);c.radius+=m;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);m/=(this.scale.x+this.scale.y+
+this.scale.z)/3;var l=m*m;m=new p;var n=new p;if(h.isBufferGeometry){var r=h.index;h=h.attributes.position.array;if(null!==r){var x=r.array;r=0;for(var t=x.length;r<t;r++){var u=x[r];m.fromArray(h,3*u);f(m,u)}}else for(r=0,x=h.length/3;r<x;r++)m.fromArray(h,3*r),f(m,r)}else for(m=h.vertices,r=0,x=m.length;r<x;r++)f(m[r],r)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});de.prototype=Object.assign(Object.create(W.prototype),{constructor:de,isVideoTexture:!0,
+update:function(){var a=this.image;a.readyState>=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Tb.prototype=Object.create(W.prototype);Tb.prototype.constructor=Tb;Tb.prototype.isCompressedTexture=!0;Hc.prototype=Object.create(W.prototype);Hc.prototype.constructor=Hc;Hc.prototype.isCanvasTexture=!0;Ic.prototype=Object.create(W.prototype);Ic.prototype.constructor=Ic;Ic.prototype.isDepthTexture=!0;Ub.prototype=Object.create(E.prototype);Ub.prototype.constructor=Ub;Jc.prototype=Object.create(I.prototype);
+Jc.prototype.constructor=Jc;Vb.prototype=Object.create(E.prototype);Vb.prototype.constructor=Vb;Kc.prototype=Object.create(I.prototype);Kc.prototype.constructor=Kc;ya.prototype=Object.create(E.prototype);ya.prototype.constructor=ya;Lc.prototype=Object.create(I.prototype);Lc.prototype.constructor=Lc;Wb.prototype=Object.create(ya.prototype);Wb.prototype.constructor=Wb;Mc.prototype=Object.create(I.prototype);Mc.prototype.constructor=Mc;tb.prototype=Object.create(ya.prototype);tb.prototype.constructor=
+tb;Nc.prototype=Object.create(I.prototype);Nc.prototype.constructor=Nc;Xb.prototype=Object.create(ya.prototype);Xb.prototype.constructor=Xb;Oc.prototype=Object.create(I.prototype);Oc.prototype.constructor=Oc;Yb.prototype=Object.create(ya.prototype);Yb.prototype.constructor=Yb;Pc.prototype=Object.create(I.prototype);Pc.prototype.constructor=Pc;Zb.prototype=Object.create(E.prototype);Zb.prototype.constructor=Zb;Qc.prototype=Object.create(I.prototype);Qc.prototype.constructor=Qc;$b.prototype=Object.create(E.prototype);
+$b.prototype.constructor=$b;Rc.prototype=Object.create(I.prototype);Rc.prototype.constructor=Rc;ac.prototype=Object.create(E.prototype);ac.prototype.constructor=ac;var ah={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=jf(a,0,e,c,!0),g=[];if(!f)return g;var h;if(d){var k=c;d=[];var m;var l=0;for(m=b.length;l<m;l++){var n=b[l]*k;var r=l<m-1?b[l+1]*k:a.length;n=jf(a,n,r,k,!1);n===n.next&&(n.steiner=!0);d.push(Wg(n))}d.sort(Ug);for(l=0;l<d.length;l++){b=d[l];k=f;if(k=Vg(b,
+k))b=mf(k,b),Tc(b,b.next);f=Tc(f,f.next)}}if(a.length>80*c){var p=h=a[0];var t=d=a[1];for(k=c;k<e;k+=c)l=a[k],b=a[k+1],l<p&&(p=l),b<t&&(t=b),l>h&&(h=l),b>d&&(d=b);h=Math.max(h-p,d-t);h=0!==h?1/h:0}Uc(f,g,c,p,t,h);return g}},Za={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-a[e].x*a[d].y;return.5*c},isClockWise:function(a){return 0>Za.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];nf(a);of(c,a);var f=a.length;b.forEach(nf);for(a=0;a<b.length;a++)d.push(f),
+f+=b[a].length,of(c,b[a]);b=ah.triangulate(c,d);for(a=0;a<b.length;a+=3)e.push(b.slice(a,a+3));return e}};vb.prototype=Object.create(I.prototype);vb.prototype.constructor=vb;vb.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);return pf(this.parameters.shapes,this.parameters.options,a)};Sa.prototype=Object.create(E.prototype);Sa.prototype.constructor=Sa;Sa.prototype.toJSON=function(){var a=E.prototype.toJSON.call(this);return pf(this.parameters.shapes,this.parameters.options,a)};var Xg=
+{generateTopUV:function(a,b,c,d,e){a=b[3*d];d=b[3*d+1];var f=b[3*e];e=b[3*e+1];return[new z(b[3*c],b[3*c+1]),new z(a,d),new z(f,e)]},generateSideWallUV:function(a,b,c,d,e,f){a=b[3*c];var g=b[3*c+1];c=b[3*c+2];var h=b[3*d],k=b[3*d+1];d=b[3*d+2];var m=b[3*e],l=b[3*e+1];e=b[3*e+2];var n=b[3*f],r=b[3*f+1];b=b[3*f+2];return.01>Math.abs(g-k)?[new z(a,1-c),new z(h,1-d),new z(m,1-e),new z(n,1-b)]:[new z(g,1-c),new z(k,1-d),new z(l,1-e),new z(r,1-b)]}};Wc.prototype=Object.create(I.prototype);Wc.prototype.constructor=
+Wc;bc.prototype=Object.create(Sa.prototype);bc.prototype.constructor=bc;Xc.prototype=Object.create(I.prototype);Xc.prototype.constructor=Xc;wb.prototype=Object.create(E.prototype);wb.prototype.constructor=wb;Yc.prototype=Object.create(I.prototype);Yc.prototype.constructor=Yc;cc.prototype=Object.create(E.prototype);cc.prototype.constructor=cc;Zc.prototype=Object.create(I.prototype);Zc.prototype.constructor=Zc;dc.prototype=Object.create(E.prototype);dc.prototype.constructor=dc;xb.prototype=Object.create(I.prototype);
+xb.prototype.constructor=xb;xb.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);return qf(this.parameters.shapes,a)};yb.prototype=Object.create(E.prototype);yb.prototype.constructor=yb;yb.prototype.toJSON=function(){var a=E.prototype.toJSON.call(this);return qf(this.parameters.shapes,a)};ec.prototype=Object.create(E.prototype);ec.prototype.constructor=ec;zb.prototype=Object.create(I.prototype);zb.prototype.constructor=zb;$a.prototype=Object.create(E.prototype);$a.prototype.constructor=
+$a;$c.prototype=Object.create(zb.prototype);$c.prototype.constructor=$c;ad.prototype=Object.create($a.prototype);ad.prototype.constructor=ad;bd.prototype=Object.create(I.prototype);bd.prototype.constructor=bd;fc.prototype=Object.create(E.prototype);fc.prototype.constructor=fc;var Ba=Object.freeze({WireframeGeometry:Ub,ParametricGeometry:Jc,ParametricBufferGeometry:Vb,TetrahedronGeometry:Lc,TetrahedronBufferGeometry:Wb,OctahedronGeometry:Mc,OctahedronBufferGeometry:tb,IcosahedronGeometry:Nc,IcosahedronBufferGeometry:Xb,
+DodecahedronGeometry:Oc,DodecahedronBufferGeometry:Yb,PolyhedronGeometry:Kc,PolyhedronBufferGeometry:ya,TubeGeometry:Pc,TubeBufferGeometry:Zb,TorusKnotGeometry:Qc,TorusKnotBufferGeometry:$b,TorusGeometry:Rc,TorusBufferGeometry:ac,TextGeometry:Wc,TextBufferGeometry:bc,SphereGeometry:Xc,SphereBufferGeometry:wb,RingGeometry:Yc,RingBufferGeometry:cc,PlaneGeometry:yc,PlaneBufferGeometry:qb,LatheGeometry:Zc,LatheBufferGeometry:dc,ShapeGeometry:xb,ShapeBufferGeometry:yb,ExtrudeGeometry:vb,ExtrudeBufferGeometry:Sa,
+EdgesGeometry:ec,ConeGeometry:$c,ConeBufferGeometry:ad,CylinderGeometry:zb,CylinderBufferGeometry:$a,CircleGeometry:bd,CircleBufferGeometry:fc,BoxGeometry:Kb,BoxBufferGeometry:pb});Ab.prototype=Object.create(L.prototype);Ab.prototype.constructor=Ab;Ab.prototype.isShadowMaterial=!0;Ab.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);return this};gc.prototype=Object.create(ka.prototype);gc.prototype.constructor=gc;gc.prototype.isRawShaderMaterial=!0;Ta.prototype=Object.create(L.prototype);
+Ta.prototype.constructor=Ta;Ta.prototype.isMeshStandardMaterial=!0;Ta.prototype.copy=function(a){L.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=
+a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=
+a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Bb.prototype=Object.create(Ta.prototype);Bb.prototype.constructor=Bb;Bb.prototype.isMeshPhysicalMaterial=!0;Bb.prototype.copy=function(a){Ta.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Ia.prototype=Object.create(L.prototype);
+Ia.prototype.constructor=Ia;Ia.prototype.isMeshPhongMaterial=!0;Ia.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;
+this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;
+this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Cb.prototype=Object.create(Ia.prototype);Cb.prototype.constructor=Cb;Cb.prototype.isMeshToonMaterial=!0;Cb.prototype.copy=function(a){Ia.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};Db.prototype=Object.create(L.prototype);Db.prototype.constructor=Db;Db.prototype.isMeshNormalMaterial=!0;Db.prototype.copy=function(a){L.prototype.copy.call(this,
+a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Eb.prototype=Object.create(L.prototype);Eb.prototype.constructor=
+Eb;Eb.prototype.isMeshLambertMaterial=!0;Eb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;
+this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Fb.prototype=Object.create(L.prototype);Fb.prototype.constructor=Fb;Fb.prototype.isMeshMatcapMaterial=!0;Fb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.defines={MATCAP:""};this.color.copy(a.color);
+this.matcap=a.matcap;this.map=a.map;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.alphaMap=a.alphaMap;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Gb.prototype=Object.create(T.prototype);Gb.prototype.constructor=
+Gb;Gb.prototype.isLineDashedMaterial=!0;Gb.prototype.copy=function(a){T.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var bh=Object.freeze({ShadowMaterial:Ab,SpriteMaterial:hb,RawShaderMaterial:gc,ShaderMaterial:ka,PointsMaterial:Ha,MeshPhysicalMaterial:Bb,MeshStandardMaterial:Ta,MeshPhongMaterial:Ia,MeshToonMaterial:Cb,MeshNormalMaterial:Db,MeshLambertMaterial:Eb,MeshDepthMaterial:eb,MeshDistanceMaterial:fb,MeshBasicMaterial:Ea,MeshMatcapMaterial:Fb,
+LineDashedMaterial:Gb,LineBasicMaterial:T,Material:L}),ra={arraySlice:function(a,b,c){return ra.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==c?c:a.length)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,
+c){return a[b]-a[c]});return c},sortedArray:function(a,b,c){for(var d=a.length,e=new a.constructor(d),f=0,g=0;g!==d;++f)for(var h=c[f]*b,k=0;k!==b;++k)e[g++]=a[h+k];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)),f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];
+while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),c.push(g)),f=a[e++];while(void 0!==f)}}}};Object.assign(Ca.prototype,{evaluate:function(a){var b=this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a<d)){for(var f=c+2;;){if(void 0===d){if(a<e)break d;this._cachedIndex=c=b.length;return this.afterEnd_(c-1,a,e)}if(c===f)break;e=d;d=b[++c];if(a<d)break b}d=b.length;break c}if(a>=e)break a;else{f=b[1];a<f&&(c=2,e=f);for(f=c-2;;){if(void 0===e)return this._cachedIndex=
+0,this.beforeStart_(0,a,d);if(c===f)break;d=e;e=b[--c-1];if(a>=e)break b}d=c;c=0}}for(;c<d;)e=c+d>>>1,a<b[e]?d=e:c=e+1;d=b[c];e=b[c-1];if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(void 0===d)return this._cachedIndex=c=b.length,this.afterEnd_(c-1,e,a)}this._cachedIndex=c;this.intervalChanged_(c,e,d)}return this.interpolate_(c,e,a,d)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(a){var b=this.resultBuffer,
+c=this.sampleValues,d=this.valueSize;a*=d;for(var e=0;e!==d;++e)b[e]=c[a+e];return b},interpolate_:function(){throw Error("call to abstract method");},intervalChanged_:function(){}});Object.assign(Ca.prototype,{beforeStart_:Ca.prototype.copySampleValue_,afterEnd_:Ca.prototype.copySampleValue_});Ad.prototype=Object.assign(Object.create(Ca.prototype),{constructor:Ad,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(a,b,c){var d=this.parameterPositions,e=a-2,f=a+1,g=d[e],h=
+d[f];if(void 0===g)switch(this.getSettings_().endingStart){case 2401:e=a;g=2*b-c;break;case 2402:e=d.length-2;g=b+d[e]-d[e+1];break;default:e=a,g=c}if(void 0===h)switch(this.getSettings_().endingEnd){case 2401:f=a;h=2*c-b;break;case 2402:f=1;h=c+d[1]-d[0];break;default:f=a-1,h=b}a=.5*(c-b);d=this.valueSize;this._weightPrev=a/(b-g);this._weightNext=a/(h-c);this._offsetPrev=e*d;this._offsetNext=f*d},interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=
+a-g,k=this._offsetPrev,m=this._offsetNext,l=this._weightPrev,n=this._weightNext,r=(c-b)/(d-b);c=r*r;d=c*r;b=-l*d+2*l*c-l*r;l=(1+l)*d+(-1.5-2*l)*c+(-.5+l)*r+1;r=(-1-n)*d+(1.5+n)*c+.5*r;n=n*d-n*c;for(c=0;c!==g;++c)e[c]=b*f[k+c]+l*f[h+c]+r*f[a+c]+n*f[m+c];return e}});cd.prototype=Object.assign(Object.create(Ca.prototype),{constructor:cd,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=a-g;b=(c-b)/(d-b);c=1-b;for(d=0;d!==g;++d)e[d]=f[h+d]*c+f[a+d]*
+b;return e}});Bd.prototype=Object.assign(Object.create(Ca.prototype),{constructor:Bd,interpolate_:function(a){return this.copySampleValue_(a-1)}});Object.assign(qa,{toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);else{b={name:a.name,times:ra.convertArray(a.times,Array),values:ra.convertArray(a.values,Array)};var c=a.getInterpolation();c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b}});Object.assign(qa.prototype,{constructor:qa,TimeBufferType:Float32Array,
+ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(a){return new Bd(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodLinear:function(a){return new cd(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:function(a){return new Ad(this.times,this.values,this.getValueSize(),a)},setInterpolation:function(a){switch(a){case 2300:var b=this.InterpolantFactoryMethodDiscrete;break;case 2301:b=this.InterpolantFactoryMethodLinear;
+break;case 2302:b=this.InterpolantFactoryMethodSmooth}if(void 0===b){b="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant)if(a!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(b);console.warn("THREE.KeyframeTrack:",b);return this}this.createInterpolant=b;return this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;
+case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(a){if(0!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]+=a;return this},scale:function(a){if(1!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]*=a;return this},trim:function(a,b){for(var c=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=ra.arraySlice(c,
+e,f),this.values=ra.arraySlice(this.values,e*a,f*a);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),a=!1);var c=this.times;b=this.values;var d=c.length;0===d&&(console.error("THREE.KeyframeTrack: Track is empty.",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,f,g);a=!1;break}if(null!==
+e&&e>g){console.error("THREE.KeyframeTrack: Out of order keys.",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&ra.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;g<f;++g){var h=!1,k=a[g];if(k!==a[g+1]&&(1!==g||k!==k[0]))if(d)h=!0;else{var m=g*c,l=m-c,n=m+c;for(k=
+0;k!==c;++k){var r=b[m+k];if(r!==b[l+k]||r!==b[n+k]){h=!0;break}}}if(h){if(g!==e)for(a[e]=a[g],h=g*c,m=e*c,k=0;k!==c;++k)b[m+k]=b[h+k];++e}}if(0<f){a[e]=a[f];h=f*c;m=e*c;for(k=0;k!==c;++k)b[m+k]=b[h+k];++e}e!==a.length&&(this.times=ra.arraySlice(a,0,e),this.values=ra.arraySlice(b,0,e*c));return this}});Cd.prototype=Object.assign(Object.create(qa.prototype),{constructor:Cd,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});
+Dd.prototype=Object.assign(Object.create(qa.prototype),{constructor:Dd,ValueTypeName:"color"});hc.prototype=Object.assign(Object.create(qa.prototype),{constructor:hc,ValueTypeName:"number"});Ed.prototype=Object.assign(Object.create(Ca.prototype),{constructor:Ed,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;b=(c-b)/(d-b);for(c=a+g;a!==c;a+=4)ja.slerpFlat(e,0,f,a-g,f,a,b);return e}});dd.prototype=Object.assign(Object.create(qa.prototype),{constructor:dd,
+ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(a){return new Ed(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:void 0});Fd.prototype=Object.assign(Object.create(qa.prototype),{constructor:Fd,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});ic.prototype=Object.assign(Object.create(qa.prototype),{constructor:ic,ValueTypeName:"vector"});
+Object.assign(za,{parse:function(a){for(var b=[],c=a.tracks,d=1/(a.fps||1),e=0,f=c.length;e!==f;++e)b.push(Zg(c[e]).scale(d));return new za(a.name,a.duration,b)},toJSON:function(a){var b=[],c=a.tracks;a={name:a.name,duration:a.duration,tracks:b,uuid:a.uuid};for(var d=0,e=c.length;d!==e;++d)b.push(qa.toJSON(c[d]));return a},CreateFromMorphTargetSequence:function(a,b,c,d){for(var e=b.length,f=[],g=0;g<e;g++){var h=[],k=[];h.push((g+e-1)%e,g,(g+1)%e);k.push(0,1,0);var m=ra.getKeyframeOrder(h);h=ra.sortedArray(h,
+1,m);k=ra.sortedArray(k,1,m);d||0!==h[0]||(h.push(e),k.push(k[0]));f.push((new hc(".morphTargetInfluences["+b[g].name+"]",h,k)).scale(1/c))}return new za(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(a=0;a<c.length;a++)if(c[a].name===b)return c[a];return null},CreateClipsFromMorphTargetSequences:function(a,b,c){for(var d={},e=/^([\w-]*?)([\d]+)$/,f=0,g=a.length;f<g;f++){var h=a[f],k=h.name.match(e);if(k&&1<k.length){var m=k[1];
+(k=d[m])||(d[m]=k=[]);k.push(h)}}a=[];for(m in d)a.push(za.CreateFromMorphTargetSequence(m,d[m],b,c));return a},parseAnimation:function(a,b){if(!a)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];ra.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}},d=[],e=a.name||"default",f=a.length||-1,g=a.fps||30;a=a.hierarchy||[];for(var h=0;h<a.length;h++){var k=a[h].keys;if(k&&0!==k.length)if(k[0].morphTargets){f=
+{};for(var m=0;m<k.length;m++)if(k[m].morphTargets)for(var l=0;l<k[m].morphTargets.length;l++)f[k[m].morphTargets[l]]=-1;for(var n in f){var r=[],p=[];for(l=0;l!==k[m].morphTargets.length;++l){var t=k[m];r.push(t.time);p.push(t.morphTarget===n?1:0)}d.push(new hc(".morphTargetInfluence["+n+"]",r,p))}f=f.length*(g||1)}else m=".bones["+b[h].name+"]",c(ic,m+".position",k,"pos",d),c(dd,m+".quaternion",k,"rot",d),c(ic,m+".scale",k,"scl",d)}return 0===d.length?null:new za(e,f,d)}});Object.assign(za.prototype,
+{resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==c;++b){var d=this.tracks[b];a=Math.max(a,d.times[d.times.length-1])}this.duration=a;return this},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},validate:function(){for(var a=!0,b=0;b<this.tracks.length;b++)a=a&&this.tracks[b].validate();return a},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();return this}});var Ib={enabled:!1,files:{},add:function(a,
+b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}},ta=new ge,Oa={};Object.assign(Fa.prototype,{load:function(a,b,c,d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var e=this,f=Ib.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;if(void 0!==Oa[a])Oa[a].push({onLoad:b,onProgress:c,
+onError:d});else{var g=a.match(/^data:(.*?)(;base64)?,(.*)$/);if(g){c=g[1];var h=!!g[2];g=g[3];g=decodeURIComponent(g);h&&(g=atob(g));try{var k=(this.responseType||"").toLowerCase();switch(k){case "arraybuffer":case "blob":var m=new Uint8Array(g.length);for(h=0;h<g.length;h++)m[h]=g.charCodeAt(h);var l="blob"===k?new Blob([m.buffer],{type:c}):m.buffer;break;case "document":l=(new DOMParser).parseFromString(g,c);break;case "json":l=JSON.parse(g);break;default:l=g}setTimeout(function(){b&&b(l);e.manager.itemEnd(a)},
+0)}catch(r){setTimeout(function(){d&&d(r);e.manager.itemError(a);e.manager.itemEnd(a)},0)}}else{Oa[a]=[];Oa[a].push({onLoad:b,onProgress:c,onError:d});var n=new XMLHttpRequest;n.open("GET",a,!0);n.addEventListener("load",function(b){var c=this.response;Ib.add(a,c);var d=Oa[a];delete Oa[a];if(200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var f=0,g=d.length;f<g;f++){var h=d[f];if(h.onLoad)h.onLoad(c)}}else{f=0;for(g=d.length;f<g;f++)if(h=
+d[f],h.onError)h.onError(b);e.manager.itemError(a)}e.manager.itemEnd(a)},!1);n.addEventListener("progress",function(b){for(var c=Oa[a],d=0,e=c.length;d<e;d++){var f=c[d];if(f.onProgress)f.onProgress(b)}},!1);n.addEventListener("error",function(b){var c=Oa[a];delete Oa[a];for(var d=0,f=c.length;d<f;d++){var g=c[d];if(g.onError)g.onError(b)}e.manager.itemError(a);e.manager.itemEnd(a)},!1);n.addEventListener("abort",function(b){var c=Oa[a];delete Oa[a];for(var d=0,f=c.length;d<f;d++){var g=c[d];if(g.onError)g.onError(b)}e.manager.itemError(a);
+e.manager.itemEnd(a)},!1);void 0!==this.responseType&&(n.responseType=this.responseType);void 0!==this.withCredentials&&(n.withCredentials=this.withCredentials);n.overrideMimeType&&n.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(h in this.requestHeader)n.setRequestHeader(h,this.requestHeader[h]);n.send(null)}e.manager.itemStart(a);return n}},setPath:function(a){this.path=a;return this},setResponseType:function(a){this.responseType=a;return this},setWithCredentials:function(a){this.withCredentials=
+a;return this},setMimeType:function(a){this.mimeType=a;return this},setRequestHeader:function(a){this.requestHeader=a;return this}});Object.assign(rf.prototype,{load:function(a,b,c,d){var e=this,f=new Fa(e.manager);f.setPath(e.path);f.load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a,b){for(var c=[],d=0;d<a.length;d++){var e=za.parse(a[d]);c.push(e)}b(c)},setPath:function(a){this.path=a;return this}});Object.assign(sf.prototype,{load:function(a,b,c,d){function e(e){k.load(a[e],
+function(a){a=f._parser(a,!0);g[e]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};m+=1;6===m&&(1===a.mipmapCount&&(h.minFilter=1006),h.format=a.format,h.needsUpdate=!0,b&&b(h))},c,d)}var f=this,g=[],h=new Tb;h.image=g;var k=new Fa(this.manager);k.setPath(this.path);k.setResponseType("arraybuffer");if(Array.isArray(a))for(var m=0,l=0,n=a.length;l<n;++l)e(l);else k.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,d=0;d<c;d++){g[d]={mipmaps:[]};
+for(var e=0;e<a.mipmapCount;e++)g[d].mipmaps.push(a.mipmaps[d*a.mipmapCount+e]),g[d].format=a.format,g[d].width=a.width,g[d].height=a.height}else h.image.width=a.width,h.image.height=a.height,h.mipmaps=a.mipmaps;1===a.mipmapCount&&(h.minFilter=1006);h.format=a.format;h.needsUpdate=!0;b&&b(h)},c,d);return h},setPath:function(a){this.path=a;return this}});Object.assign(he.prototype,{load:function(a,b,c,d){var e=this,f=new lb,g=new Fa(this.manager);g.setResponseType("arraybuffer");g.setPath(this.path);
+g.load(a,function(a){if(a=e._parser(a))void 0!==a.image?f.image=a.image:void 0!==a.data&&(f.image.width=a.width,f.image.height=a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:1001,f.wrapT=void 0!==a.wrapT?a.wrapT:1001,f.magFilter=void 0!==a.magFilter?a.magFilter:1006,f.minFilter=void 0!==a.minFilter?a.minFilter:1008,f.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps=a.mipmaps),1===
+a.mipmapCount&&(f.minFilter=1006),f.needsUpdate=!0,b&&b(f,a)},c,d);return f},setPath:function(a){this.path=a;return this}});Object.assign(ed.prototype,{crossOrigin:"anonymous",load:function(a,b,c,d){function e(){k.removeEventListener("load",e,!1);k.removeEventListener("error",f,!1);Ib.add(a,this);b&&b(this);g.manager.itemEnd(a)}function f(b){k.removeEventListener("load",e,!1);k.removeEventListener("error",f,!1);d&&d(b);g.manager.itemError(a);g.manager.itemEnd(a)}void 0===a&&(a="");void 0!==this.path&&
+(a=this.path+a);a=this.manager.resolveURL(a);var g=this,h=Ib.get(a);if(void 0!==h)return g.manager.itemStart(a),setTimeout(function(){b&&b(h);g.manager.itemEnd(a)},0),h;var k=document.createElementNS("http://www.w3.org/1999/xhtml","img");k.addEventListener("load",e,!1);k.addEventListener("error",f,!1);"data:"!==a.substr(0,5)&&void 0!==this.crossOrigin&&(k.crossOrigin=this.crossOrigin);g.manager.itemStart(a);k.src=a;return k},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=
+a;return this}});Object.assign(ie.prototype,{crossOrigin:"anonymous",load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=a;h++;6===h&&(f.needsUpdate=!0,b&&b(f))},void 0,d)}var f=new Ya,g=new ed(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var h=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(Gd.prototype,{crossOrigin:"anonymous",load:function(a,
+b,c,d){var e=new W,f=new ed(this.manager);f.setCrossOrigin(this.crossOrigin);f.setPath(this.path);f.load(a,function(c){e.image=c;c=0<a.search(/\.jpe?g$/i)||0===a.search(/^data:image\/jpeg/);e.format=c?1022:1023;e.needsUpdate=!0;void 0!==b&&b(e)},c,d);return e},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(Q.prototype,{getPoint:function(){console.warn("THREE.Curve: .getPoint() not implemented.");return null},getPointAt:function(a,
+b){a=this.getUtoTmapping(a);return this.getPoint(a,b)},getPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));return b},getSpacedPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPointAt(c/a));return b},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){void 0===a&&(a=this.arcLengthDivisions);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;
+this.needsUpdate=!1;var b=[],c=this.getPoint(0),d,e=0;b.push(0);for(d=1;d<=a;d++){var f=this.getPoint(d/a);e+=f.distanceTo(c);b.push(e);c=f}return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var c=this.getLengths(),d=c.length;b=b?b:a*c[d-1];for(var e=0,f=d-1,g;e<=f;)if(a=Math.floor(e+(f-e)/2),g=c[a]-b,0>g)e=a+1;else if(0<g)f=a-1;else{f=a;break}a=f;if(c[a]===b)return a/(d-1);e=c[a];return(a+(b-e)/(c[a+1]-e))/(d-1)},getTangent:function(a){var b=
+a-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},getTangentAt:function(a){a=this.getUtoTmapping(a);return this.getTangent(a)},computeFrenetFrames:function(a,b){var c=new p,d=[],e=[],f=[],g=new p,h=new P,k;for(k=0;k<=a;k++){var m=k/a;d[k]=this.getTangentAt(m);d[k].normalize()}e[0]=new p;f[0]=new p;k=Number.MAX_VALUE;m=Math.abs(d[0].x);var l=Math.abs(d[0].y),n=Math.abs(d[0].z);m<=k&&(k=m,c.set(1,0,0));l<=k&&(k=l,c.set(0,1,0));n<=k&&c.set(0,
+0,1);g.crossVectors(d[0],c).normalize();e[0].crossVectors(d[0],g);f[0].crossVectors(d[0],e[0]);for(k=1;k<=a;k++)e[k]=e[k-1].clone(),f[k]=f[k-1].clone(),g.crossVectors(d[k-1],d[k]),g.length()>Number.EPSILON&&(g.normalize(),c=Math.acos(R.clamp(d[k-1].dot(d[k]),-1,1)),e[k].applyMatrix4(h.makeRotationAxis(g,c))),f[k].crossVectors(d[k],e[k]);if(!0===b)for(c=Math.acos(R.clamp(e[0].dot(e[a]),-1,1)),c/=a,0<d[0].dot(g.crossVectors(e[0],e[a]))&&(c=-c),k=1;k<=a;k++)e[k].applyMatrix4(h.makeRotationAxis(d[k],
+c*k)),f[k].crossVectors(d[k],e[k]);return{tangents:d,normals:e,binormals:f}},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.arcLengthDivisions=a.arcLengthDivisions;return this},toJSON:function(){var a={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};a.arcLengthDivisions=this.arcLengthDivisions;a.type=this.type;return a},fromJSON:function(a){this.arcLengthDivisions=a.arcLengthDivisions;return this}});wa.prototype=Object.create(Q.prototype);wa.prototype.constructor=
+wa;wa.prototype.isEllipseCurve=!0;wa.prototype.getPoint=function(a,b){b=b||new z;for(var c=2*Math.PI,d=this.aEndAngle-this.aStartAngle,e=Math.abs(d)<Number.EPSILON;0>d;)d+=c;for(;d>c;)d-=c;d<Number.EPSILON&&(d=e?0:c);!0!==this.aClockwise||e||(d=d===c?-c:d-c);c=this.aStartAngle+a*d;a=this.aX+this.xRadius*Math.cos(c);var f=this.aY+this.yRadius*Math.sin(c);0!==this.aRotation&&(c=Math.cos(this.aRotation),d=Math.sin(this.aRotation),e=a-this.aX,f-=this.aY,a=e*c-f*d+this.aX,f=e*d+f*c+this.aY);return b.set(a,
+f)};wa.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.aX=a.aX;this.aY=a.aY;this.xRadius=a.xRadius;this.yRadius=a.yRadius;this.aStartAngle=a.aStartAngle;this.aEndAngle=a.aEndAngle;this.aClockwise=a.aClockwise;this.aRotation=a.aRotation;return this};wa.prototype.toJSON=function(){var a=Q.prototype.toJSON.call(this);a.aX=this.aX;a.aY=this.aY;a.xRadius=this.xRadius;a.yRadius=this.yRadius;a.aStartAngle=this.aStartAngle;a.aEndAngle=this.aEndAngle;a.aClockwise=this.aClockwise;a.aRotation=
+this.aRotation;return a};wa.prototype.fromJSON=function(a){Q.prototype.fromJSON.call(this,a);this.aX=a.aX;this.aY=a.aY;this.xRadius=a.xRadius;this.yRadius=a.yRadius;this.aStartAngle=a.aStartAngle;this.aEndAngle=a.aEndAngle;this.aClockwise=a.aClockwise;this.aRotation=a.aRotation;return this};jc.prototype=Object.create(wa.prototype);jc.prototype.constructor=jc;jc.prototype.isArcCurve=!0;var Ud=new p,Fe=new je,Ge=new je,He=new je;ua.prototype=Object.create(Q.prototype);ua.prototype.constructor=ua;ua.prototype.isCatmullRomCurve3=
+!0;ua.prototype.getPoint=function(a,b){b=b||new p;var c=this.points,d=c.length;a*=d-(this.closed?0:1);var e=Math.floor(a);a-=e;this.closed?e+=0<e?0:(Math.floor(Math.abs(e)/d)+1)*d:0===a&&e===d-1&&(e=d-2,a=1);if(this.closed||0<e)var f=c[(e-1)%d];else Ud.subVectors(c[0],c[1]).add(c[0]),f=Ud;var g=c[e%d];var h=c[(e+1)%d];this.closed||e+2<d?c=c[(e+2)%d]:(Ud.subVectors(c[d-1],c[d-2]).add(c[d-1]),c=Ud);if("centripetal"===this.curveType||"chordal"===this.curveType){var k="chordal"===this.curveType?.5:.25;
+d=Math.pow(f.distanceToSquared(g),k);e=Math.pow(g.distanceToSquared(h),k);k=Math.pow(h.distanceToSquared(c),k);1E-4>e&&(e=1);1E-4>d&&(d=e);1E-4>k&&(k=e);Fe.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,k);Ge.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,k);He.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,k)}else"catmullrom"===this.curveType&&(Fe.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),Ge.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),He.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set(Fe.calc(a),
+Ge.calc(a),He.calc(a));return b};ua.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++)this.points.push(a.points[b].clone());this.closed=a.closed;this.curveType=a.curveType;this.tension=a.tension;return this};ua.prototype.toJSON=function(){var a=Q.prototype.toJSON.call(this);a.points=[];for(var b=0,c=this.points.length;b<c;b++)a.points.push(this.points[b].toArray());a.closed=this.closed;a.curveType=this.curveType;a.tension=this.tension;return a};
+ua.prototype.fromJSON=function(a){Q.prototype.fromJSON.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++){var d=a.points[b];this.points.push((new p).fromArray(d))}this.closed=a.closed;this.curveType=a.curveType;this.tension=a.tension;return this};Ja.prototype=Object.create(Q.prototype);Ja.prototype.constructor=Ja;Ja.prototype.isCubicBezierCurve=!0;Ja.prototype.getPoint=function(a,b){b=b||new z;var c=this.v0,d=this.v1,e=this.v2,f=this.v3;b.set(gd(a,c.x,d.x,e.x,f.x),gd(a,c.y,d.y,e.y,
+f.y));return b};Ja.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);this.v3.copy(a.v3);return this};Ja.prototype.toJSON=function(){var a=Q.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();a.v3=this.v3.toArray();return a};Ja.prototype.fromJSON=function(a){Q.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);this.v3.fromArray(a.v3);return this};
+Ua.prototype=Object.create(Q.prototype);Ua.prototype.constructor=Ua;Ua.prototype.isCubicBezierCurve3=!0;Ua.prototype.getPoint=function(a,b){b=b||new p;var c=this.v0,d=this.v1,e=this.v2,f=this.v3;b.set(gd(a,c.x,d.x,e.x,f.x),gd(a,c.y,d.y,e.y,f.y),gd(a,c.z,d.z,e.z,f.z));return b};Ua.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);this.v3.copy(a.v3);return this};Ua.prototype.toJSON=function(){var a=Q.prototype.toJSON.call(this);a.v0=this.v0.toArray();
+a.v1=this.v1.toArray();a.v2=this.v2.toArray();a.v3=this.v3.toArray();return a};Ua.prototype.fromJSON=function(a){Q.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);this.v3.fromArray(a.v3);return this};Aa.prototype=Object.create(Q.prototype);Aa.prototype.constructor=Aa;Aa.prototype.isLineCurve=!0;Aa.prototype.getPoint=function(a,b){b=b||new z;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};Aa.prototype.getPointAt=
+function(a,b){return this.getPoint(a,b)};Aa.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()};Aa.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Aa.prototype.toJSON=function(){var a=Q.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Aa.prototype.fromJSON=function(a){Q.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Ka.prototype=
+Object.create(Q.prototype);Ka.prototype.constructor=Ka;Ka.prototype.isLineCurve3=!0;Ka.prototype.getPoint=function(a,b){b=b||new p;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};Ka.prototype.getPointAt=function(a,b){return this.getPoint(a,b)};Ka.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Ka.prototype.toJSON=function(){var a=Q.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray();
+return a};Ka.prototype.fromJSON=function(a){Q.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};La.prototype=Object.create(Q.prototype);La.prototype.constructor=La;La.prototype.isQuadraticBezierCurve=!0;La.prototype.getPoint=function(a,b){b=b||new z;var c=this.v0,d=this.v1,e=this.v2;b.set(fd(a,c.x,d.x,e.x),fd(a,c.y,d.y,e.y));return b};La.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};
+La.prototype.toJSON=function(){var a=Q.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};La.prototype.fromJSON=function(a){Q.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Va.prototype=Object.create(Q.prototype);Va.prototype.constructor=Va;Va.prototype.isQuadraticBezierCurve3=!0;Va.prototype.getPoint=function(a,b){b=b||new p;var c=this.v0,d=this.v1,e=this.v2;b.set(fd(a,c.x,
+d.x,e.x),fd(a,c.y,d.y,e.y),fd(a,c.z,d.z,e.z));return b};Va.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Va.prototype.toJSON=function(){var a=Q.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Va.prototype.fromJSON=function(a){Q.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Ma.prototype=Object.create(Q.prototype);
+Ma.prototype.constructor=Ma;Ma.prototype.isSplineCurve=!0;Ma.prototype.getPoint=function(a,b){b=b||new z;var c=this.points,d=(c.length-1)*a;a=Math.floor(d);d-=a;var e=c[0===a?a:a-1],f=c[a],g=c[a>c.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(tf(d,e.x,f.x,g.x,c.x),tf(d,e.y,f.y,g.y,c.y));return b};Ma.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++)this.points.push(a.points[b].clone());return this};Ma.prototype.toJSON=function(){var a=
+Q.prototype.toJSON.call(this);a.points=[];for(var b=0,c=this.points.length;b<c;b++)a.points.push(this.points[b].toArray());return a};Ma.prototype.fromJSON=function(a){Q.prototype.fromJSON.call(this,a);this.points=[];for(var b=0,c=a.points.length;b<c;b++){var d=a.points[b];this.points.push((new z).fromArray(d))}return this};var Gf=Object.freeze({ArcCurve:jc,CatmullRomCurve3:ua,CubicBezierCurve:Ja,CubicBezierCurve3:Ua,EllipseCurve:wa,LineCurve:Aa,LineCurve3:Ka,QuadraticBezierCurve:La,QuadraticBezierCurve3:Va,
+SplineCurve:Ma});ab.prototype=Object.assign(Object.create(Q.prototype),{constructor:ab,add:function(a){this.curves.push(a)},closePath:function(){var a=this.curves[0].getPoint(0),b=this.curves[this.curves.length-1].getPoint(1);a.equals(b)||this.curves.push(new Aa(b,a))},getPoint:function(a){var b=a*this.getLength(),c=this.getCurveLengths();for(a=0;a<c.length;){if(c[a]>=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths();
+return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],b=0,c=0,d=this.curves.length;c<d;c++)b+=this.curves[c].getLength(),a.push(b);return this.cacheLengths=a},getSpacedPoints:function(a){void 0===a&&(a=40);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));this.autoClose&&b.push(b[0]);return b},getPoints:function(a){a=
+a||12;for(var b=[],c,d=0,e=this.curves;d<e.length;d++){var f=e[d];f=f.getPoints(f&&f.isEllipseCurve?2*a:f&&(f.isLineCurve||f.isLineCurve3)?1:f&&f.isSplineCurve?a*f.points.length:a);for(var g=0;g<f.length;g++){var h=f[g];c&&c.equals(h)||(b.push(h),c=h)}}this.autoClose&&1<b.length&&!b[b.length-1].equals(b[0])&&b.push(b[0]);return b},copy:function(a){Q.prototype.copy.call(this,a);this.curves=[];for(var b=0,c=a.curves.length;b<c;b++)this.curves.push(a.curves[b].clone());this.autoClose=a.autoClose;return this},
+toJSON:function(){var a=Q.prototype.toJSON.call(this);a.autoClose=this.autoClose;a.curves=[];for(var b=0,c=this.curves.length;b<c;b++)a.curves.push(this.curves[b].toJSON());return a},fromJSON:function(a){Q.prototype.fromJSON.call(this,a);this.autoClose=a.autoClose;this.curves=[];for(var b=0,c=a.curves.length;b<c;b++){var d=a.curves[b];this.curves.push((new Gf[d.type]).fromJSON(d))}return this}});Na.prototype=Object.assign(Object.create(ab.prototype),{constructor:Na,setFromPoints:function(a){this.moveTo(a[0].x,
+a[0].y);for(var b=1,c=a.length;b<c;b++)this.lineTo(a[b].x,a[b].y)},moveTo:function(a,b){this.currentPoint.set(a,b)},lineTo:function(a,b){var c=new Aa(this.currentPoint.clone(),new z(a,b));this.curves.push(c);this.currentPoint.set(a,b)},quadraticCurveTo:function(a,b,c,d){a=new La(this.currentPoint.clone(),new z(a,b),new z(c,d));this.curves.push(a);this.currentPoint.set(c,d)},bezierCurveTo:function(a,b,c,d,e,f){a=new Ja(this.currentPoint.clone(),new z(a,b),new z(c,d),new z(e,f));this.curves.push(a);
+this.currentPoint.set(e,f)},splineThru:function(a){var b=[this.currentPoint.clone()].concat(a);b=new Ma(b);this.curves.push(b);this.currentPoint.copy(a[a.length-1])},arc:function(a,b,c,d,e,f){this.absarc(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f)},absarc:function(a,b,c,d,e,f){this.absellipse(a,b,c,c,d,e,f)},ellipse:function(a,b,c,d,e,f,g,h){this.absellipse(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f,g,h)},absellipse:function(a,b,c,d,e,f,g,h){a=new wa(a,b,c,d,e,f,g,h);0<this.curves.length&&
+(b=a.getPoint(0),b.equals(this.currentPoint)||this.lineTo(b.x,b.y));this.curves.push(a);a=a.getPoint(1);this.currentPoint.copy(a)},copy:function(a){ab.prototype.copy.call(this,a);this.currentPoint.copy(a.currentPoint);return this},toJSON:function(){var a=ab.prototype.toJSON.call(this);a.currentPoint=this.currentPoint.toArray();return a},fromJSON:function(a){ab.prototype.fromJSON.call(this,a);this.currentPoint.fromArray(a.currentPoint);return this}});ib.prototype=Object.assign(Object.create(Na.prototype),
+{constructor:ib,getPointsHoles:function(a){for(var b=[],c=0,d=this.holes.length;c<d;c++)b[c]=this.holes[c].getPoints(a);return b},extractPoints:function(a){return{shape:this.getPoints(a),holes:this.getPointsHoles(a)}},copy:function(a){Na.prototype.copy.call(this,a);this.holes=[];for(var b=0,c=a.holes.length;b<c;b++)this.holes.push(a.holes[b].clone());return this},toJSON:function(){var a=Na.prototype.toJSON.call(this);a.uuid=this.uuid;a.holes=[];for(var b=0,c=this.holes.length;b<c;b++)a.holes.push(this.holes[b].toJSON());
+return a},fromJSON:function(a){Na.prototype.fromJSON.call(this,a);this.uuid=a.uuid;this.holes=[];for(var b=0,c=a.holes.length;b<c;b++){var d=a.holes[b];this.holes.push((new Na).fromJSON(d))}return this}});ca.prototype=Object.assign(Object.create(D.prototype),{constructor:ca,isLight:!0,copy:function(a){D.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=
+this.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&(a.object.penumbra=this.penumbra);void 0!==this.shadow&&(a.object.shadow=this.shadow.toJSON());return a}});Hd.prototype=Object.assign(Object.create(ca.prototype),{constructor:Hd,isHemisphereLight:!0,copy:function(a){ca.prototype.copy.call(this,
+a);this.groundColor.copy(a.groundColor);return this}});Object.assign(Hb.prototype,{copy:function(a){this.camera=a.camera.clone();this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);return this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var a={};0!==this.bias&&(a.bias=this.bias);1!==this.radius&&(a.radius=this.radius);if(512!==this.mapSize.x||512!==this.mapSize.y)a.mapSize=this.mapSize.toArray();a.camera=this.camera.toJSON(!1).object;delete a.camera.matrix;
+return a}});Id.prototype=Object.assign(Object.create(Hb.prototype),{constructor:Id,isSpotLightShadow:!0,update:function(a){var b=this.camera,c=2*R.RAD2DEG*a.angle,d=this.mapSize.width/this.mapSize.height;a=a.distance||b.far;if(c!==b.fov||d!==b.aspect||a!==b.far)b.fov=c,b.aspect=d,b.far=a,b.updateProjectionMatrix()}});Jd.prototype=Object.assign(Object.create(ca.prototype),{constructor:Jd,isSpotLight:!0,copy:function(a){ca.prototype.copy.call(this,a);this.distance=a.distance;this.angle=a.angle;this.penumbra=
+a.penumbra;this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});Kd.prototype=Object.assign(Object.create(ca.prototype),{constructor:Kd,isPointLight:!0,copy:function(a){ca.prototype.copy.call(this,a);this.distance=a.distance;this.decay=a.decay;this.shadow=a.shadow.clone();return this}});hd.prototype=Object.assign(Object.create(Ra.prototype),{constructor:hd,isOrthographicCamera:!0,copy:function(a,b){Ra.prototype.copy.call(this,a,b);this.left=a.left;this.right=
+a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;this.view=null===a.view?null:Object.assign({},a.view);return this},setViewOffset:function(a,b,c,d,e,f){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=c;this.view.offsetY=d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewOffset:function(){null!==
+this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=(this.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),c=(this.right+this.left)/2,d=(this.top+this.bottom)/2,e=c-a;c+=a;a=d+b;b=d-b;if(null!==this.view&&this.view.enabled){c=this.zoom/(this.view.width/this.view.fullWidth);b=this.zoom/(this.view.height/this.view.fullHeight);var f=(this.right-this.left)/this.view.width;d=(this.top-this.bottom)/this.view.height;e+=this.view.offsetX/
+c*f;c=e+this.view.width/c*f;a-=this.view.offsetY/b*d;b=a-this.view.height/b*d}this.projectionMatrix.makeOrthographic(e,c,a,b,this.near,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});
+Ld.prototype=Object.assign(Object.create(Hb.prototype),{constructor:Ld});Md.prototype=Object.assign(Object.create(ca.prototype),{constructor:Md,isDirectionalLight:!0,copy:function(a){ca.prototype.copy.call(this,a);this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});Nd.prototype=Object.assign(Object.create(ca.prototype),{constructor:Nd,isAmbientLight:!0});Od.prototype=Object.assign(Object.create(ca.prototype),{constructor:Od,isRectAreaLight:!0,copy:function(a){ca.prototype.copy.call(this,
+a);this.width=a.width;this.height=a.height;return this},toJSON:function(a){a=ca.prototype.toJSON.call(this,a);a.object.width=this.width;a.object.height=this.height;return a}});Object.assign(Pd.prototype,{load:function(a,b,c,d){var e=this,f=new Fa(e.manager);f.setPath(e.path);f.load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){function b(a){void 0===c[a]&&console.warn("THREE.MaterialLoader: Undefined texture",a);return c[a]}var c=this.textures,d=new bh[a.type];void 0!==a.uuid&&
+(d.uuid=a.uuid);void 0!==a.name&&(d.name=a.name);void 0!==a.color&&d.color.setHex(a.color);void 0!==a.roughness&&(d.roughness=a.roughness);void 0!==a.metalness&&(d.metalness=a.metalness);void 0!==a.emissive&&d.emissive.setHex(a.emissive);void 0!==a.specular&&d.specular.setHex(a.specular);void 0!==a.shininess&&(d.shininess=a.shininess);void 0!==a.clearCoat&&(d.clearCoat=a.clearCoat);void 0!==a.clearCoatRoughness&&(d.clearCoatRoughness=a.clearCoatRoughness);void 0!==a.vertexColors&&(d.vertexColors=
+a.vertexColors);void 0!==a.fog&&(d.fog=a.fog);void 0!==a.flatShading&&(d.flatShading=a.flatShading);void 0!==a.blending&&(d.blending=a.blending);void 0!==a.combine&&(d.combine=a.combine);void 0!==a.side&&(d.side=a.side);void 0!==a.opacity&&(d.opacity=a.opacity);void 0!==a.transparent&&(d.transparent=a.transparent);void 0!==a.alphaTest&&(d.alphaTest=a.alphaTest);void 0!==a.depthTest&&(d.depthTest=a.depthTest);void 0!==a.depthWrite&&(d.depthWrite=a.depthWrite);void 0!==a.colorWrite&&(d.colorWrite=a.colorWrite);
+void 0!==a.wireframe&&(d.wireframe=a.wireframe);void 0!==a.wireframeLinewidth&&(d.wireframeLinewidth=a.wireframeLinewidth);void 0!==a.wireframeLinecap&&(d.wireframeLinecap=a.wireframeLinecap);void 0!==a.wireframeLinejoin&&(d.wireframeLinejoin=a.wireframeLinejoin);void 0!==a.rotation&&(d.rotation=a.rotation);1!==a.linewidth&&(d.linewidth=a.linewidth);void 0!==a.dashSize&&(d.dashSize=a.dashSize);void 0!==a.gapSize&&(d.gapSize=a.gapSize);void 0!==a.scale&&(d.scale=a.scale);void 0!==a.polygonOffset&&
+(d.polygonOffset=a.polygonOffset);void 0!==a.polygonOffsetFactor&&(d.polygonOffsetFactor=a.polygonOffsetFactor);void 0!==a.polygonOffsetUnits&&(d.polygonOffsetUnits=a.polygonOffsetUnits);void 0!==a.skinning&&(d.skinning=a.skinning);void 0!==a.morphTargets&&(d.morphTargets=a.morphTargets);void 0!==a.dithering&&(d.dithering=a.dithering);void 0!==a.visible&&(d.visible=a.visible);void 0!==a.userData&&(d.userData=a.userData);if(void 0!==a.uniforms)for(var e in a.uniforms){var f=a.uniforms[e];d.uniforms[e]=
+{};switch(f.type){case "t":d.uniforms[e].value=b(f.value);break;case "c":d.uniforms[e].value=(new G).setHex(f.value);break;case "v2":d.uniforms[e].value=(new z).fromArray(f.value);break;case "v3":d.uniforms[e].value=(new p).fromArray(f.value);break;case "v4":d.uniforms[e].value=(new Z).fromArray(f.value);break;case "m4":d.uniforms[e].value=(new P).fromArray(f.value);break;default:d.uniforms[e].value=f.value}}void 0!==a.defines&&(d.defines=a.defines);void 0!==a.vertexShader&&(d.vertexShader=a.vertexShader);
+void 0!==a.fragmentShader&&(d.fragmentShader=a.fragmentShader);void 0!==a.shading&&(d.flatShading=1===a.shading);void 0!==a.size&&(d.size=a.size);void 0!==a.sizeAttenuation&&(d.sizeAttenuation=a.sizeAttenuation);void 0!==a.map&&(d.map=b(a.map));void 0!==a.alphaMap&&(d.alphaMap=b(a.alphaMap),d.transparent=!0);void 0!==a.bumpMap&&(d.bumpMap=b(a.bumpMap));void 0!==a.bumpScale&&(d.bumpScale=a.bumpScale);void 0!==a.normalMap&&(d.normalMap=b(a.normalMap));void 0!==a.normalMapType&&(d.normalMapType=a.normalMapType);
+void 0!==a.normalScale&&(e=a.normalScale,!1===Array.isArray(e)&&(e=[e,e]),d.normalScale=(new z).fromArray(e));void 0!==a.displacementMap&&(d.displacementMap=b(a.displacementMap));void 0!==a.displacementScale&&(d.displacementScale=a.displacementScale);void 0!==a.displacementBias&&(d.displacementBias=a.displacementBias);void 0!==a.roughnessMap&&(d.roughnessMap=b(a.roughnessMap));void 0!==a.metalnessMap&&(d.metalnessMap=b(a.metalnessMap));void 0!==a.emissiveMap&&(d.emissiveMap=b(a.emissiveMap));void 0!==
+a.emissiveIntensity&&(d.emissiveIntensity=a.emissiveIntensity);void 0!==a.specularMap&&(d.specularMap=b(a.specularMap));void 0!==a.envMap&&(d.envMap=b(a.envMap));void 0!==a.envMapIntensity&&(d.envMapIntensity=a.envMapIntensity);void 0!==a.reflectivity&&(d.reflectivity=a.reflectivity);void 0!==a.lightMap&&(d.lightMap=b(a.lightMap));void 0!==a.lightMapIntensity&&(d.lightMapIntensity=a.lightMapIntensity);void 0!==a.aoMap&&(d.aoMap=b(a.aoMap));void 0!==a.aoMapIntensity&&(d.aoMapIntensity=a.aoMapIntensity);
+void 0!==a.gradientMap&&(d.gradientMap=b(a.gradientMap));return d},setPath:function(a){this.path=a;return this},setTextures:function(a){this.textures=a;return this}});var Vd={decodeText:function(a){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(a);for(var b="",c=0,d=a.length;c<d;c++)b+=String.fromCharCode(a[c]);return decodeURIComponent(escape(b))},extractUrlBase:function(a){var b=a.lastIndexOf("/");return-1===b?"./":a.substr(0,b+1)}};Object.assign(ke.prototype,{load:function(a,
+b,c,d){var e=this,f=new Fa(e.manager);f.setPath(e.path);f.load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){var b=new E,c=a.data.index;void 0!==c&&(c=new Hf[c.type](c.array),b.setIndex(new F(c,1)));var d=a.data.attributes;for(f in d){var e=d[f];c=new Hf[e.type](e.array);b.addAttribute(f,new F(c,e.itemSize,e.normalized))}var f=a.data.groups||a.data.drawcalls||a.data.offsets;if(void 0!==f)for(c=0,d=f.length;c!==d;++c)e=f[c],b.addGroup(e.start,e.count,e.materialIndex);a=a.data.boundingSphere;
+void 0!==a&&(f=new p,void 0!==a.center&&f.fromArray(a.center),b.boundingSphere=new Ga(f,a.radius));return b},setPath:function(a){this.path=a;return this}});var Hf={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!==typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};kc.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,
+b)},get:function(a){for(var b=this.handlers,c=0,d=b.length;c<d;c+=2){var e=b[c+1];if(b[c].test(a))return e}return null}};Object.assign(kc.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(a,b,c){for(var d=[],e=0;e<a.length;++e)d[e]=this.createMaterial(a[e],b,c);return d},createMaterial:function(){var a={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},
+b=new G,c=new Gd,d=new Pd;return function(e,f,g){function h(a,b,d,e,h){a=f+a;var m=kc.Handlers.get(a);null!==m?a=m.load(a):(c.setCrossOrigin(g),a=c.load(a));void 0!==b&&(a.repeat.fromArray(b),1!==b[0]&&(a.wrapS=1E3),1!==b[1]&&(a.wrapT=1E3));void 0!==d&&a.offset.fromArray(d);void 0!==e&&("repeat"===e[0]&&(a.wrapS=1E3),"mirror"===e[0]&&(a.wrapS=1002),"repeat"===e[1]&&(a.wrapT=1E3),"mirror"===e[1]&&(a.wrapT=1002));void 0!==h&&(a.anisotropy=h);b=R.generateUUID();k[b]=a;return b}var k={},m={uuid:R.generateUUID(),
+type:"MeshLambertMaterial"},l;for(l in e){var n=e[l];switch(l){case "DbgColor":case "DbgIndex":case "opticalDensity":case "illumination":break;case "DbgName":m.name=n;break;case "blending":m.blending=a[n];break;case "colorAmbient":case "mapAmbient":console.warn("THREE.Loader.createMaterial:",l,"is no longer supported.");break;case "colorDiffuse":m.color=b.fromArray(n).getHex();break;case "colorSpecular":m.specular=b.fromArray(n).getHex();break;case "colorEmissive":m.emissive=b.fromArray(n).getHex();
+break;case "specularCoef":m.shininess=n;break;case "shading":"basic"===n.toLowerCase()&&(m.type="MeshBasicMaterial");"phong"===n.toLowerCase()&&(m.type="MeshPhongMaterial");"standard"===n.toLowerCase()&&(m.type="MeshStandardMaterial");break;case "mapDiffuse":m.map=h(n,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy);break;case "mapDiffuseRepeat":case "mapDiffuseOffset":case "mapDiffuseWrap":case "mapDiffuseAnisotropy":break;case "mapEmissive":m.emissiveMap=h(n,e.mapEmissiveRepeat,
+e.mapEmissiveOffset,e.mapEmissiveWrap,e.mapEmissiveAnisotropy);break;case "mapEmissiveRepeat":case "mapEmissiveOffset":case "mapEmissiveWrap":case "mapEmissiveAnisotropy":break;case "mapLight":m.lightMap=h(n,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy);break;case "mapLightRepeat":case "mapLightOffset":case "mapLightWrap":case "mapLightAnisotropy":break;case "mapAO":m.aoMap=h(n,e.mapAORepeat,e.mapAOOffset,e.mapAOWrap,e.mapAOAnisotropy);break;case "mapAORepeat":case "mapAOOffset":case "mapAOWrap":case "mapAOAnisotropy":break;
+case "mapBump":m.bumpMap=h(n,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy);break;case "mapBumpScale":m.bumpScale=n;break;case "mapBumpRepeat":case "mapBumpOffset":case "mapBumpWrap":case "mapBumpAnisotropy":break;case "mapNormal":m.normalMap=h(n,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy);break;case "mapNormalFactor":m.normalScale=n;break;case "mapNormalRepeat":case "mapNormalOffset":case "mapNormalWrap":case "mapNormalAnisotropy":break;case "mapSpecular":m.specularMap=
+h(n,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy);break;case "mapSpecularRepeat":case "mapSpecularOffset":case "mapSpecularWrap":case "mapSpecularAnisotropy":break;case "mapMetalness":m.metalnessMap=h(n,e.mapMetalnessRepeat,e.mapMetalnessOffset,e.mapMetalnessWrap,e.mapMetalnessAnisotropy);break;case "mapMetalnessRepeat":case "mapMetalnessOffset":case "mapMetalnessWrap":case "mapMetalnessAnisotropy":break;case "mapRoughness":m.roughnessMap=h(n,e.mapRoughnessRepeat,
+e.mapRoughnessOffset,e.mapRoughnessWrap,e.mapRoughnessAnisotropy);break;case "mapRoughnessRepeat":case "mapRoughnessOffset":case "mapRoughnessWrap":case "mapRoughnessAnisotropy":break;case "mapAlpha":m.alphaMap=h(n,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy);break;case "mapAlphaRepeat":case "mapAlphaOffset":case "mapAlphaWrap":case "mapAlphaAnisotropy":break;case "flipSided":m.side=1;break;case "doubleSided":m.side=2;break;case "transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity");
+m.opacity=n;break;case "depthTest":case "depthWrite":case "colorWrite":case "opacity":case "reflectivity":case "transparent":case "visible":case "wireframe":m[l]=n;break;case "vertexColors":!0===n&&(m.vertexColors=2);"face"===n&&(m.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",l,n)}}"MeshBasicMaterial"===m.type&&delete m.emissive;"MeshPhongMaterial"!==m.type&&delete m.specular;1>m.opacity&&(m.transparent=!0);d.setTextures(k);return d.parse(m)}}()});Object.assign(Qd.prototype,
+{crossOrigin:"anonymous",load:function(a,b,c,d){var e=this,f=void 0===this.path?Vd.extractUrlBase(a):this.path,g=new Fa(this.manager);g.setPath(this.path);g.setWithCredentials(this.withCredentials);g.load(a,function(c){c=JSON.parse(c);var d=c.metadata;if(void 0!==d&&(d=d.type,void 0!==d&&"object"===d.toLowerCase())){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.ObjectLoader instead.");return}c=e.parse(c,f);b(c.geometry,c.materials)},c,d)},setPath:function(a){this.path=a;return this},
+setResourcePath:function(a){this.resourcePath=a;return this},setCrossOrigin:function(a){this.crossOrigin=a;return this},parse:function(){return function(a,b){void 0!==a.data&&(a=a.data);a.scale=void 0!==a.scale?1/a.scale:1;var c=new I,d=a,e,f,g,h=d.faces;var k=d.vertices;var m=d.normals,l=d.colors;var n=d.scale;var r=0;if(void 0!==d.uvs){for(e=0;e<d.uvs.length;e++)d.uvs[e].length&&r++;for(e=0;e<r;e++)c.faceVertexUvs[e]=[]}var x=0;for(g=k.length;x<g;)e=new p,e.x=k[x++]*n,e.y=k[x++]*n,e.z=k[x++]*n,
+c.vertices.push(e);x=0;for(g=h.length;x<g;){k=h[x++];var t=k&1;var u=k&2;e=k&8;var w=k&16;var A=k&32;n=k&64;k&=128;if(t){t=new Xa;t.a=h[x];t.b=h[x+1];t.c=h[x+3];var v=new Xa;v.a=h[x+1];v.b=h[x+2];v.c=h[x+3];x+=4;u&&(u=h[x++],t.materialIndex=u,v.materialIndex=u);u=c.faces.length;if(e)for(e=0;e<r;e++){var C=d.uvs[e];c.faceVertexUvs[e][u]=[];c.faceVertexUvs[e][u+1]=[];for(f=0;4>f;f++){var y=h[x++];var D=C[2*y];y=C[2*y+1];D=new z(D,y);2!==f&&c.faceVertexUvs[e][u].push(D);0!==f&&c.faceVertexUvs[e][u+1].push(D)}}w&&
+(w=3*h[x++],t.normal.set(m[w++],m[w++],m[w]),v.normal.copy(t.normal));if(A)for(e=0;4>e;e++)w=3*h[x++],A=new p(m[w++],m[w++],m[w]),2!==e&&t.vertexNormals.push(A),0!==e&&v.vertexNormals.push(A);n&&(n=h[x++],n=l[n],t.color.setHex(n),v.color.setHex(n));if(k)for(e=0;4>e;e++)n=h[x++],n=l[n],2!==e&&t.vertexColors.push(new G(n)),0!==e&&v.vertexColors.push(new G(n));c.faces.push(t);c.faces.push(v)}else{t=new Xa;t.a=h[x++];t.b=h[x++];t.c=h[x++];u&&(u=h[x++],t.materialIndex=u);u=c.faces.length;if(e)for(e=0;e<
+r;e++)for(C=d.uvs[e],c.faceVertexUvs[e][u]=[],f=0;3>f;f++)y=h[x++],D=C[2*y],y=C[2*y+1],D=new z(D,y),c.faceVertexUvs[e][u].push(D);w&&(w=3*h[x++],t.normal.set(m[w++],m[w++],m[w]));if(A)for(e=0;3>e;e++)w=3*h[x++],A=new p(m[w++],m[w++],m[w]),t.vertexNormals.push(A);n&&(n=h[x++],t.color.setHex(l[n]));if(k)for(e=0;3>e;e++)n=h[x++],t.vertexColors.push(new G(l[n]));c.faces.push(t)}}d=a;x=void 0!==d.influencesPerVertex?d.influencesPerVertex:2;if(d.skinWeights)for(g=0,h=d.skinWeights.length;g<h;g+=x)c.skinWeights.push(new Z(d.skinWeights[g],
+1<x?d.skinWeights[g+1]:0,2<x?d.skinWeights[g+2]:0,3<x?d.skinWeights[g+3]:0));if(d.skinIndices)for(g=0,h=d.skinIndices.length;g<h;g+=x)c.skinIndices.push(new Z(d.skinIndices[g],1<x?d.skinIndices[g+1]:0,2<x?d.skinIndices[g+2]:0,3<x?d.skinIndices[g+3]:0));c.bones=d.bones;c.bones&&0<c.bones.length&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn("When skinning, number of vertices ("+c.vertices.length+"), skinIndices ("+c.skinIndices.length+"), and skinWeights ("+
+c.skinWeights.length+") should match.");g=a;h=g.scale;if(void 0!==g.morphTargets)for(d=0,x=g.morphTargets.length;d<x;d++)for(c.morphTargets[d]={},c.morphTargets[d].name=g.morphTargets[d].name,c.morphTargets[d].vertices=[],m=c.morphTargets[d].vertices,l=g.morphTargets[d].vertices,r=0,k=l.length;r<k;r+=3)n=new p,n.x=l[r]*h,n.y=l[r+1]*h,n.z=l[r+2]*h,m.push(n);if(void 0!==g.morphColors&&0<g.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),
+h=c.faces,g=g.morphColors[0].colors,d=0,x=h.length;d<x;d++)h[d].color.fromArray(g,3*d);g=a;d=[];x=[];void 0!==g.animation&&x.push(g.animation);void 0!==g.animations&&(g.animations.length?x=x.concat(g.animations):x.push(g.animations));for(g=0;g<x.length;g++)(h=za.parseAnimation(x[g],c.bones))&&d.push(h);c.morphTargets&&(x=za.CreateClipsFromMorphTargetSequences(c.morphTargets,10),d=d.concat(x));0<d.length&&(c.animations=d);c.computeFaceNormals();c.computeBoundingSphere();if(void 0===a.materials||0===
+a.materials.length)return{geometry:c};a=kc.prototype.initMaterials(a.materials,this.resourcePath||b,this.crossOrigin);return{geometry:c,materials:a}}}()});Object.assign(le.prototype,{crossOrigin:"anonymous",load:function(a,b,c,d){var e=this,f=void 0===this.path?Vd.extractUrlBase(a):this.path;this.resourcePath=this.resourcePath||f;f=new Fa(e.manager);f.setPath(this.path);f.load(a,function(c){var f=null;try{f=JSON.parse(c)}catch(k){void 0!==d&&d(k);console.error("THREE:ObjectLoader: Can't parse "+a+
+".",k.message);return}c=f.metadata;void 0===c||void 0===c.type||"geometry"===c.type.toLowerCase()?console.error("THREE.ObjectLoader: Can't load "+a+". Use THREE.JSONLoader instead."):e.parse(f,b)},c,d)},setPath:function(a){this.path=a;return this},setResourcePath:function(a){this.resourcePath=a;return this},setCrossOrigin:function(a){this.crossOrigin=a;return this},parse:function(a,b){var c=this.parseShape(a.shapes);c=this.parseGeometries(a.geometries,c);var d=this.parseImages(a.images,function(){void 0!==
+b&&b(e)});d=this.parseTextures(a.textures,d);d=this.parseMaterials(a.materials,d);var e=this.parseObject(a.object,c,d);a.animations&&(e.animations=this.parseAnimations(a.animations));void 0!==a.images&&0!==a.images.length||void 0===b||b(e);return e},parseShape:function(a){var b={};if(void 0!==a)for(var c=0,d=a.length;c<d;c++){var e=(new ib).fromJSON(a[c]);b[e.uuid]=e}return b},parseGeometries:function(a,b){var c={};if(void 0!==a)for(var d=new Qd,e=new ke,f=0,g=a.length;f<g;f++){var h=a[f];switch(h.type){case "PlaneGeometry":case "PlaneBufferGeometry":var k=
+new Ba[h.type](h.width,h.height,h.widthSegments,h.heightSegments);break;case "BoxGeometry":case "BoxBufferGeometry":case "CubeGeometry":k=new Ba[h.type](h.width,h.height,h.depth,h.widthSegments,h.heightSegments,h.depthSegments);break;case "CircleGeometry":case "CircleBufferGeometry":k=new Ba[h.type](h.radius,h.segments,h.thetaStart,h.thetaLength);break;case "CylinderGeometry":case "CylinderBufferGeometry":k=new Ba[h.type](h.radiusTop,h.radiusBottom,h.height,h.radialSegments,h.heightSegments,h.openEnded,
+h.thetaStart,h.thetaLength);break;case "ConeGeometry":case "ConeBufferGeometry":k=new Ba[h.type](h.radius,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case "SphereGeometry":case "SphereBufferGeometry":k=new Ba[h.type](h.radius,h.widthSegments,h.heightSegments,h.phiStart,h.phiLength,h.thetaStart,h.thetaLength);break;case "DodecahedronGeometry":case "DodecahedronBufferGeometry":case "IcosahedronGeometry":case "IcosahedronBufferGeometry":case "OctahedronGeometry":case "OctahedronBufferGeometry":case "TetrahedronGeometry":case "TetrahedronBufferGeometry":k=
+new Ba[h.type](h.radius,h.detail);break;case "RingGeometry":case "RingBufferGeometry":k=new Ba[h.type](h.innerRadius,h.outerRadius,h.thetaSegments,h.phiSegments,h.thetaStart,h.thetaLength);break;case "TorusGeometry":case "TorusBufferGeometry":k=new Ba[h.type](h.radius,h.tube,h.radialSegments,h.tubularSegments,h.arc);break;case "TorusKnotGeometry":case "TorusKnotBufferGeometry":k=new Ba[h.type](h.radius,h.tube,h.tubularSegments,h.radialSegments,h.p,h.q);break;case "LatheGeometry":case "LatheBufferGeometry":k=
+new Ba[h.type](h.points,h.segments,h.phiStart,h.phiLength);break;case "PolyhedronGeometry":case "PolyhedronBufferGeometry":k=new Ba[h.type](h.vertices,h.indices,h.radius,h.details);break;case "ShapeGeometry":case "ShapeBufferGeometry":k=[];for(var m=0,l=h.shapes.length;m<l;m++){var n=b[h.shapes[m]];k.push(n)}k=new Ba[h.type](k,h.curveSegments);break;case "ExtrudeGeometry":case "ExtrudeBufferGeometry":k=[];m=0;for(l=h.shapes.length;m<l;m++)n=b[h.shapes[m]],k.push(n);m=h.options.extrudePath;void 0!==
+m&&(h.options.extrudePath=(new Gf[m.type]).fromJSON(m));k=new Ba[h.type](k,h.options);break;case "BufferGeometry":k=e.parse(h);break;case "Geometry":k=d.parse(h,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+h.type+'"');continue}k.uuid=h.uuid;void 0!==h.name&&(k.name=h.name);!0===k.isBufferGeometry&&void 0!==h.userData&&(k.userData=h.userData);c[h.uuid]=k}return c},parseMaterials:function(a,b){var c={},d={};if(void 0!==a){var e=new Pd;e.setTextures(b);
+b=0;for(var f=a.length;b<f;b++){var g=a[b];if("MultiMaterial"===g.type){for(var h=[],k=0;k<g.materials.length;k++){var m=g.materials[k];void 0===c[m.uuid]&&(c[m.uuid]=e.parse(m));h.push(c[m.uuid])}d[g.uuid]=h}else d[g.uuid]=e.parse(g),c[g.uuid]=d[g.uuid]}}return d},parseAnimations:function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=za.parse(d);void 0!==d.uuid&&(e.uuid=d.uuid);b.push(e)}return b},parseImages:function(a,b){function c(a){d.manager.itemStart(a);return f.load(a,function(){d.manager.itemEnd(a)},
+void 0,function(){d.manager.itemError(a);d.manager.itemEnd(a)})}var d=this,e={};if(void 0!==a&&0<a.length){b=new ge(b);var f=new ed(b);f.setCrossOrigin(this.crossOrigin);b=0;for(var g=a.length;b<g;b++){var h=a[b],k=h.url;if(Array.isArray(k)){e[h.uuid]=[];for(var m=0,l=k.length;m<l;m++){var n=k[m];n=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(n)?n:d.resourcePath+n;e[h.uuid].push(c(n))}}else n=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h.url)?h.url:d.resourcePath+h.url,e[h.uuid]=c(n)}}return e},parseTextures:function(a,
+b){function c(a,b){if("number"===typeof a)return a;console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",a);return b[a]}var d={};if(void 0!==a)for(var e=0,f=a.length;e<f;e++){var g=a[e];void 0===g.image&&console.warn('THREE.ObjectLoader: No "image" specified for',g.uuid);void 0===b[g.image]&&console.warn("THREE.ObjectLoader: Undefined image",g.image);var h=Array.isArray(b[g.image])?new Ya(b[g.image]):new W(b[g.image]);h.needsUpdate=!0;h.uuid=g.uuid;void 0!==g.name&&(h.name=
+g.name);void 0!==g.mapping&&(h.mapping=c(g.mapping,ch));void 0!==g.offset&&h.offset.fromArray(g.offset);void 0!==g.repeat&&h.repeat.fromArray(g.repeat);void 0!==g.center&&h.center.fromArray(g.center);void 0!==g.rotation&&(h.rotation=g.rotation);void 0!==g.wrap&&(h.wrapS=c(g.wrap[0],If),h.wrapT=c(g.wrap[1],If));void 0!==g.format&&(h.format=g.format);void 0!==g.minFilter&&(h.minFilter=c(g.minFilter,Jf));void 0!==g.magFilter&&(h.magFilter=c(g.magFilter,Jf));void 0!==g.anisotropy&&(h.anisotropy=g.anisotropy);
+void 0!==g.flipY&&(h.flipY=g.flipY);d[g.uuid]=h}return d},parseObject:function(a,b,c){function d(a){void 0===b[a]&&console.warn("THREE.ObjectLoader: Undefined geometry",a);return b[a]}function e(a){if(void 0!==a){if(Array.isArray(a)){for(var b=[],d=0,e=a.length;d<e;d++){var f=a[d];void 0===c[f]&&console.warn("THREE.ObjectLoader: Undefined material",f);b.push(c[f])}return b}void 0===c[a]&&console.warn("THREE.ObjectLoader: Undefined material",a);return c[a]}}switch(a.type){case "Scene":var f=new vd;
+void 0!==a.background&&Number.isInteger(a.background)&&(f.background=new G(a.background));void 0!==a.fog&&("Fog"===a.fog.type?f.fog=new Qb(a.fog.color,a.fog.near,a.fog.far):"FogExp2"===a.fog.type&&(f.fog=new Pb(a.fog.color,a.fog.density)));break;case "PerspectiveCamera":f=new V(a.fov,a.aspect,a.near,a.far);void 0!==a.focus&&(f.focus=a.focus);void 0!==a.zoom&&(f.zoom=a.zoom);void 0!==a.filmGauge&&(f.filmGauge=a.filmGauge);void 0!==a.filmOffset&&(f.filmOffset=a.filmOffset);void 0!==a.view&&(f.view=
+Object.assign({},a.view));break;case "OrthographicCamera":f=new hd(a.left,a.right,a.top,a.bottom,a.near,a.far);void 0!==a.zoom&&(f.zoom=a.zoom);void 0!==a.view&&(f.view=Object.assign({},a.view));break;case "AmbientLight":f=new Nd(a.color,a.intensity);break;case "DirectionalLight":f=new Md(a.color,a.intensity);break;case "PointLight":f=new Kd(a.color,a.intensity,a.distance,a.decay);break;case "RectAreaLight":f=new Od(a.color,a.intensity,a.width,a.height);break;case "SpotLight":f=new Jd(a.color,a.intensity,
+a.distance,a.angle,a.penumbra,a.decay);break;case "HemisphereLight":f=new Hd(a.color,a.groundColor,a.intensity);break;case "SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case "Mesh":f=d(a.geometry);var g=e(a.material);f=f.bones&&0<f.bones.length?new xd(f,g):new pa(f,g);break;case "LOD":f=new Fc;break;case "Line":f=new ma(d(a.geometry),e(a.material),a.mode);break;case "LineLoop":f=new yd(d(a.geometry),e(a.material));break;case "LineSegments":f=new S(d(a.geometry),
+e(a.material));break;case "PointCloud":case "Points":f=new Sb(d(a.geometry),e(a.material));break;case "Sprite":f=new Ec(e(a.material));break;case "Group":f=new Ob;break;default:f=new D}f.uuid=a.uuid;void 0!==a.name&&(f.name=a.name);void 0!==a.matrix?(f.matrix.fromArray(a.matrix),void 0!==a.matrixAutoUpdate&&(f.matrixAutoUpdate=a.matrixAutoUpdate),f.matrixAutoUpdate&&f.matrix.decompose(f.position,f.quaternion,f.scale)):(void 0!==a.position&&f.position.fromArray(a.position),void 0!==a.rotation&&f.rotation.fromArray(a.rotation),
+void 0!==a.quaternion&&f.quaternion.fromArray(a.quaternion),void 0!==a.scale&&f.scale.fromArray(a.scale));void 0!==a.castShadow&&(f.castShadow=a.castShadow);void 0!==a.receiveShadow&&(f.receiveShadow=a.receiveShadow);a.shadow&&(void 0!==a.shadow.bias&&(f.shadow.bias=a.shadow.bias),void 0!==a.shadow.radius&&(f.shadow.radius=a.shadow.radius),void 0!==a.shadow.mapSize&&f.shadow.mapSize.fromArray(a.shadow.mapSize),void 0!==a.shadow.camera&&(f.shadow.camera=this.parseObject(a.shadow.camera)));void 0!==
+a.visible&&(f.visible=a.visible);void 0!==a.frustumCulled&&(f.frustumCulled=a.frustumCulled);void 0!==a.renderOrder&&(f.renderOrder=a.renderOrder);void 0!==a.userData&&(f.userData=a.userData);void 0!==a.layers&&(f.layers.mask=a.layers);if(void 0!==a.children){g=a.children;for(var h=0;h<g.length;h++)f.add(this.parseObject(g[h],b,c))}if("LOD"===a.type)for(a=a.levels,g=0;g<a.length;g++){h=a[g];var k=f.getObjectByProperty("uuid",h.object);void 0!==k&&f.addLevel(k,h.distance)}return f}});var ch={UVMapping:300,
+CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},If={RepeatWrapping:1E3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Jf={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};me.prototype={constructor:me,setOptions:function(a){this.options=
+a;return this},load:function(a,b,c,d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var e=this,f=Ib.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;fetch(a).then(function(a){return a.blob()}).then(function(a){return createImageBitmap(a,e.options)}).then(function(c){Ib.add(a,c);b&&b(c);e.manager.itemEnd(a)}).catch(function(b){d&&d(b);e.manager.itemError(a);e.manager.itemEnd(a)})},setCrossOrigin:function(){return this},
+setPath:function(a){this.path=a;return this}};Object.assign(ne.prototype,{moveTo:function(a,b){this.currentPath=new Na;this.subPaths.push(this.currentPath);this.currentPath.moveTo(a,b)},lineTo:function(a,b){this.currentPath.lineTo(a,b)},quadraticCurveTo:function(a,b,c,d){this.currentPath.quadraticCurveTo(a,b,c,d)},bezierCurveTo:function(a,b,c,d,e,f){this.currentPath.bezierCurveTo(a,b,c,d,e,f)},splineThru:function(a){this.currentPath.splineThru(a)},toShapes:function(a,b){function c(a){for(var b=[],
+c=0,d=a.length;c<d;c++){var e=a[c],f=new ib;f.curves=e.curves;b.push(f)}return b}function d(a,b){for(var c=b.length,d=!1,e=c-1,f=0;f<c;e=f++){var g=b[e],h=b[f],k=h.x-g.x,m=h.y-g.y;if(Math.abs(m)>Number.EPSILON){if(0>m&&(g=b[f],k=-k,h=b[e],m=-m),!(a.y<g.y||a.y>h.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=m*(a.x-g.x)-k*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=Za.isClockWise,f=this.subPaths;if(0===f.length)return[];
+if(!0===b)return c(f);b=[];if(1===f.length){var g=f[0];var h=new ib;h.curves=g.curves;b.push(h);return b}var k=!e(f[0].getPoints());k=a?!k:k;h=[];var m=[],l=[],n=0;m[n]=void 0;l[n]=[];for(var p=0,x=f.length;p<x;p++){g=f[p];var t=g.getPoints();var u=e(t);(u=a?!u:u)?(!k&&m[n]&&n++,m[n]={s:new ib,p:t},m[n].s.curves=g.curves,k&&n++,l[n]=[]):l[n].push({h:g,p:t[0]})}if(!m[0])return c(f);if(1<m.length){p=!1;a=[];e=0;for(f=m.length;e<f;e++)h[e]=[];e=0;for(f=m.length;e<f;e++)for(g=l[e],u=0;u<g.length;u++){k=
+g[u];n=!0;for(t=0;t<m.length;t++)d(k.p,m[t].p)&&(e!==t&&a.push({froms:e,tos:t,hole:u}),n?(n=!1,h[t].push(k)):p=!0);n&&h[e].push(k)}0<a.length&&(p||(l=h))}p=0;for(e=m.length;p<e;p++)for(h=m[p].s,b.push(h),a=l[p],f=0,g=a.length;f<g;f++)h.holes.push(a[f].h);return b}});Object.assign(oe.prototype,{isFont:!0,generateShapes:function(a,b){void 0===b&&(b=100);var c=[],d=b;b=this.data;var e=Array.from?Array.from(a):String(a).split("");d/=b.resolution;var f=(b.boundingBox.yMax-b.boundingBox.yMin+b.underlineThickness)*
+d;a=[];for(var g=0,h=0,k=0;k<e.length;k++){var m=e[k];if("\n"===m)g=0,h-=f;else{var l=d;var n=g,p=h;if(m=b.glyphs[m]||b.glyphs["?"]){var x=new ne;if(m.o)for(var t=m._cachedOutline||(m._cachedOutline=m.o.split(" ")),u=0,w=t.length;u<w;)switch(t[u++]){case "m":var A=t[u++]*l+n;var v=t[u++]*l+p;x.moveTo(A,v);break;case "l":A=t[u++]*l+n;v=t[u++]*l+p;x.lineTo(A,v);break;case "q":var z=t[u++]*l+n;var y=t[u++]*l+p;var C=t[u++]*l+n;var D=t[u++]*l+p;x.quadraticCurveTo(C,D,z,y);break;case "b":z=t[u++]*l+n,
+y=t[u++]*l+p,C=t[u++]*l+n,D=t[u++]*l+p,A=t[u++]*l+n,v=t[u++]*l+p,x.bezierCurveTo(C,D,A,v,z,y)}l={offsetX:m.ha*l,path:x}}else l=void 0;g+=l.offsetX;a.push(l.path)}}b=0;for(e=a.length;b<e;b++)Array.prototype.push.apply(c,a[b].toShapes());return c}});Object.assign(uf.prototype,{load:function(a,b,c,d){var e=this,f=new Fa(this.manager);f.setPath(this.path);f.load(a,function(a){try{var c=JSON.parse(a)}catch(k){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),
+c=JSON.parse(a.substring(65,a.length-2))}a=e.parse(c);b&&b(a)},c,d)},parse:function(a){return new oe(a)},setPath:function(a){this.path=a;return this}});var Wd,se={getContext:function(){void 0===Wd&&(Wd=new (window.AudioContext||window.webkitAudioContext));return Wd},setContext:function(a){Wd=a}};Object.assign(pe.prototype,{load:function(a,b,c,d){var e=new Fa(this.manager);e.setResponseType("arraybuffer");e.setPath(this.path);e.load(a,function(a){a=a.slice(0);se.getContext().decodeAudioData(a,function(a){b(a)})},
+c,d)},setPath:function(a){this.path=a;return this}});Object.assign(vf.prototype,{update:function(){var a,b,c,d,e,f,g,h,k=new P,m=new P;return function(l){if(a!==this||b!==l.focus||c!==l.fov||d!==l.aspect*this.aspect||e!==l.near||f!==l.far||g!==l.zoom||h!==this.eyeSep){a=this;b=l.focus;c=l.fov;d=l.aspect*this.aspect;e=l.near;f=l.far;g=l.zoom;var n=l.projectionMatrix.clone();h=this.eyeSep/2;var p=h*e/b,q=e*Math.tan(R.DEG2RAD*c*.5)/g;m.elements[12]=-h;k.elements[12]=h;var t=-q*d+p;var u=q*d+p;n.elements[0]=
+2*e/(u-t);n.elements[8]=(u+t)/(u-t);this.cameraL.projectionMatrix.copy(n);t=-q*d-p;u=q*d-p;n.elements[0]=2*e/(u-t);n.elements[8]=(u+t)/(u-t);this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(l.matrixWorld).multiply(m);this.cameraR.matrixWorld.copy(l.matrixWorld).multiply(k)}}()});id.prototype=Object.create(D.prototype);id.prototype.constructor=id;Object.assign(qe.prototype,{start:function(){this.oldTime=this.startTime=("undefined"===typeof performance?Date:performance).now();this.elapsedTime=
+0;this.running=!0},stop:function(){this.getElapsedTime();this.autoStart=this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var b=("undefined"===typeof performance?Date:performance).now();a=(b-this.oldTime)/1E3;this.oldTime=b;this.elapsedTime+=a}return a}});re.prototype=Object.assign(Object.create(D.prototype),{constructor:re,getInput:function(){return this.gain},removeFilter:function(){null!==
+this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null);return this},getFilter:function(){return this.filter},setFilter:function(a){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination);this.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination);return this},getMasterVolume:function(){return this.gain.gain.value},
+setMasterVolume:function(a){this.gain.gain.setTargetAtTime(a,this.context.currentTime,.01);return this},updateMatrixWorld:function(){var a=new p,b=new ja,c=new p,d=new p,e=new qe;return function(f){D.prototype.updateMatrixWorld.call(this,f);f=this.context.listener;var g=this.up;this.timeDelta=e.getDelta();this.matrixWorld.decompose(a,b,c);d.set(0,0,-1).applyQuaternion(b);if(f.positionX){var h=this.context.currentTime+this.timeDelta;f.positionX.linearRampToValueAtTime(a.x,h);f.positionY.linearRampToValueAtTime(a.y,
+h);f.positionZ.linearRampToValueAtTime(a.z,h);f.forwardX.linearRampToValueAtTime(d.x,h);f.forwardY.linearRampToValueAtTime(d.y,h);f.forwardZ.linearRampToValueAtTime(d.z,h);f.upX.linearRampToValueAtTime(g.x,h);f.upY.linearRampToValueAtTime(g.y,h);f.upZ.linearRampToValueAtTime(g.z,h)}else f.setPosition(a.x,a.y,a.z),f.setOrientation(d.x,d.y,d.z,g.x,g.y,g.z)}}()});lc.prototype=Object.assign(Object.create(D.prototype),{constructor:lc,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=
+!1;this.sourceType="audioNode";this.source=a;this.connect();return this},setMediaElementSource:function(a){this.hasPlaybackControl=!1;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(a);this.connect();return this},setBuffer:function(a){this.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(){if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");
+else{var a=this.context.createBufferSource();a.buffer=this.buffer;a.loop=this.loop;a.onended=this.onEnded.bind(this);a.playbackRate.setValueAtTime(this.playbackRate,this.startTime);this.startTime=this.context.currentTime;a.start(this.startTime,this.offset);this.isPlaying=!0;this.source=a;return this.connect()}},pause:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return!0===this.isPlaying&&(this.source.stop(),this.source.onended=null,
+this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var a=1,b=this.filters.length;a<b;a++)this.filters[a-1].connect(this.filters[a]);this.filters[this.filters.length-
+1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var a=1,b=this.filters.length;a<b;a++)this.filters[a-1].disconnect(this.filters[a]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(a){a||(a=[]);!0===this.isPlaying?(this.disconnect(),this.filters=
+a,this.connect()):this.filters=a;return this},getFilter:function(){return this.getFilters()[0]},setFilter:function(a){return this.setFilters(a?[a]:[])},setPlaybackRate:function(a){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this.playbackRate=a,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=
+!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(a){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this.loop=a,!0===this.isPlaying&&(this.source.loop=this.loop),this},getVolume:function(){return this.gain.gain.value},setVolume:function(a){this.gain.gain.setTargetAtTime(a,this.context.currentTime,.01);return this}});te.prototype=Object.assign(Object.create(lc.prototype),
+{constructor:te,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(a){this.panner.refDistance=a;return this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(a){this.panner.rolloffFactor=a;return this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(a){this.panner.distanceModel=a;return this},getMaxDistance:function(){return this.panner.maxDistance},
+setMaxDistance:function(a){this.panner.maxDistance=a;return this},setDirectionalCone:function(a,b,c){this.panner.coneInnerAngle=a;this.panner.coneOuterAngle=b;this.panner.coneOuterGain=c;return this},updateMatrixWorld:function(){var a=new p,b=new ja,c=new p,d=new p;return function(e){D.prototype.updateMatrixWorld.call(this,e);e=this.panner;this.matrixWorld.decompose(a,b,c);d.set(0,0,1).applyQuaternion(b);if(e.positionX){var f=this.context.currentTime+this.listener.timeDelta;e.positionX.linearRampToValueAtTime(a.x,
+f);e.positionY.linearRampToValueAtTime(a.y,f);e.positionZ.linearRampToValueAtTime(a.z,f);e.orientationX.linearRampToValueAtTime(d.x,f);e.orientationY.linearRampToValueAtTime(d.y,f);e.orientationZ.linearRampToValueAtTime(d.z,f)}else e.setPosition(a.x,a.y,a.z),e.setOrientation(d.x,d.y,d.z)}}()});Object.assign(ue.prototype,{getFrequencyData:function(){this.analyser.getByteFrequencyData(this.data);return this.data},getAverageFrequency:function(){for(var a=0,b=this.getFrequencyData(),c=0;c<b.length;c++)a+=
+b[c];return a/b.length}});Object.assign(ve.prototype,{accumulate:function(a,b){var c=this.buffer,d=this.valueSize;a=a*d+d;var e=this.cumulativeWeight;if(0===e){for(e=0;e!==d;++e)c[a+e]=c[e];e=b}else e+=b,this._mixBufferRegion(c,a,0,b/e,d);this.cumulativeWeight=e},apply:function(a){var b=this.valueSize,c=this.buffer;a=a*b+b;var d=this.cumulativeWeight,e=this.binding;this.cumulativeWeight=0;1>d&&this._mixBufferRegion(c,a,3*b,1-d,b);d=b;for(var f=b+b;d!==f;++d)if(c[d]!==c[d+b]){e.setValue(c,a);break}},
+saveOriginalState:function(){var a=this.buffer,b=this.valueSize,c=3*b;this.binding.getValue(a,c);for(var d=b;d!==c;++d)a[d]=a[c+d%b];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a,b,c,d,e){if(.5<=d)for(d=0;d!==e;++d)a[b+d]=a[c+d]},_slerp:function(a,b,c,d){ja.slerpFlat(a,b,a,b,a,c,d)},_lerp:function(a,b,c,d,e){for(var f=1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}});Object.assign(wf.prototype,{getValue:function(a,
+b){this.bind();var c=this._bindings[this._targetGroup.nCachedObjects_];void 0!==c&&c.getValue(a,b)},setValue:function(a,b){for(var c=this._bindings,d=this._targetGroup.nCachedObjects_,e=c.length;d!==e;++d)c[d].setValue(a,b)},bind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].bind()},unbind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].unbind()}});Object.assign(oa,{Composite:wf,create:function(a,
+b,c){return a&&a.isAnimationObjectGroup?new oa.Composite(a,b,c):new oa(a,b,c)},sanitizeNodeName:function(){var a=/[\[\]\.:\/]/g;return function(b){return b.replace(/\s/g,"_").replace(a,"")}}(),parseTrackName:function(){var a="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",b=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");a=/(WCOD+)?/.source.replace("WCOD",a);var c=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),d=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),
+e=new RegExp("^"+b+a+c+d+"$"),f=["material","materials","bones"];return function(a){var b=e.exec(a);if(!b)throw Error("PropertyBinding: Cannot parse trackName: "+a);b={nodeName:b[2],objectName:b[3],objectIndex:b[4],propertyName:b[5],propertyIndex:b[6]};var c=b.nodeName&&b.nodeName.lastIndexOf(".");if(void 0!==c&&-1!==c){var d=b.nodeName.substring(c+1);-1!==f.indexOf(d)&&(b.nodeName=b.nodeName.substring(0,c),b.objectName=d)}if(null===b.propertyName||0===b.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+
+a);return b}}(),findNode:function(a,b){if(!b||""===b||"root"===b||"."===b||-1===b||b===a.name||b===a.uuid)return a;if(a.skeleton){var c=a.skeleton.getBoneByName(b);if(void 0!==c)return c}if(a.children){var d=function(a){for(var c=0;c<a.length;c++){var e=a[c];if(e.name===b||e.uuid===b||(e=d(e.children)))return e}return null};if(a=d(a.children))return a}return null}});Object.assign(oa.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,
+ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(a,b){a[b]=this.node[this.propertyName]},function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)a[b++]=c[d]},function(a,b){a[b]=this.resolvedProperty[this.propertyIndex]},function(a,b){this.resolvedProperty.toArray(a,b)}],SetterByBindingTypeAndVersioning:[[function(a,b){this.targetObject[this.propertyName]=a[b]},function(a,b){this.targetObject[this.propertyName]=
+a[b];this.targetObject.needsUpdate=!0},function(a,b){this.targetObject[this.propertyName]=a[b];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)c[d]=a[b++]},function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)c[d]=a[b++];this.targetObject.needsUpdate=!0},function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)c[d]=a[b++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,b){this.resolvedProperty[this.propertyIndex]=
+a[b]},function(a,b){this.resolvedProperty[this.propertyIndex]=a[b];this.targetObject.needsUpdate=!0},function(a,b){this.resolvedProperty[this.propertyIndex]=a[b];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,b){this.resolvedProperty.fromArray(a,b)},function(a,b){this.resolvedProperty.fromArray(a,b);this.targetObject.needsUpdate=!0},function(a,b){this.resolvedProperty.fromArray(a,b);this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(a,b){this.bind();this.getValue(a,b)},setValue:function(a,
+b){this.bind();this.setValue(a,b)},bind:function(){var a=this.node,b=this.parsedPath,c=b.objectName,d=b.propertyName,e=b.propertyIndex;a||(this.node=a=oa.findNode(this.rootNode,b.nodeName)||this.rootNode);this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(a){if(c){var f=b.objectIndex;switch(c){case "materials":if(!a.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!a.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",
+this);return}a=a.material.materials;break;case "bones":if(!a.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}a=a.skeleton.bones;for(c=0;c<a.length;c++)if(a[c].name===f){f=c;break}break;default:if(void 0===a[c]){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}a=a[c]}if(void 0!==f){if(void 0===a[f]){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",
+this,a);return}a=a[f]}}f=a[d];if(void 0===f)console.error("THREE.PropertyBinding: Trying to update property for track: "+b.nodeName+"."+d+" but it wasn't found.",a);else{b=this.Versioning.None;this.targetObject=a;void 0!==a.needsUpdate?b=this.Versioning.NeedsUpdate:void 0!==a.matrixWorldNeedsUpdate&&(b=this.Versioning.MatrixWorldNeedsUpdate);c=this.BindingType.Direct;if(void 0!==e){if("morphTargetInfluences"===d){if(!a.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",
+this);return}if(a.geometry.isBufferGeometry){if(!a.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}for(c=0;c<this.node.geometry.morphAttributes.position.length;c++)if(a.geometry.morphAttributes.position[c].name===e){e=c;break}}else{if(!a.geometry.morphTargets){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",
+this);return}for(c=0;c<this.node.geometry.morphTargets.length;c++)if(a.geometry.morphTargets[c].name===e){e=c;break}}}c=this.BindingType.ArrayElement;this.resolvedProperty=f;this.propertyIndex=e}else void 0!==f.fromArray&&void 0!==f.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=f):Array.isArray(f)?(c=this.BindingType.EntireArray,this.resolvedProperty=f):this.propertyName=d;this.getValue=this.GetterByBindingType[c];this.setValue=this.SetterByBindingTypeAndVersioning[c][b]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+
+this.path+" but it wasn't found.")},unbind:function(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}});Object.assign(oa.prototype,{_getValue_unbound:oa.prototype.getValue,_setValue_unbound:oa.prototype.setValue});Object.assign(xf.prototype,{isAnimationObjectGroup:!0,add:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._paths,f=this._parsedPaths,g=this._bindings,h=g.length,k=void 0,l=0,p=arguments.length;l!==
+p;++l){var n=arguments[l],r=n.uuid,x=d[r];if(void 0===x){x=b++;d[r]=x;a.push(n);r=0;for(var t=h;r!==t;++r)g[r].push(new oa(n,e[r],f[r]))}else if(x<c){k=a[x];var u=--c;t=a[u];d[t.uuid]=x;a[x]=t;d[r]=u;a[u]=n;r=0;for(t=h;r!==t;++r){var w=g[r],z=w[x];w[x]=w[u];void 0===z&&(z=new oa(n,e[r],f[r]));w[u]=z}}else a[x]!==k&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=
+c},remove:function(){for(var a=this._objects,b=this.nCachedObjects_,c=this._indicesByUUID,d=this._bindings,e=d.length,f=0,g=arguments.length;f!==g;++f){var h=arguments[f],k=h.uuid,l=c[k];if(void 0!==l&&l>=b){var p=b++,n=a[p];c[n.uuid]=l;a[l]=n;c[k]=p;a[p]=h;h=0;for(k=e;h!==k;++h){n=d[h];var r=n[l];n[l]=n[p];n[p]=r}}}this.nCachedObjects_=b},uncache:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var k=
+arguments[g].uuid,l=d[k];if(void 0!==l)if(delete d[k],l<c){k=--c;var p=a[k],n=--b,r=a[n];d[p.uuid]=l;a[l]=p;d[r.uuid]=k;a[k]=r;a.pop();p=0;for(r=f;p!==r;++p){var x=e[p],t=x[n];x[l]=x[k];x[k]=t;x.pop()}}else for(n=--b,r=a[n],d[r.uuid]=l,a[l]=r,a.pop(),p=0,r=f;p!==r;++p)x=e[p],x[l]=x[n],x.pop()}this.nCachedObjects_=c},subscribe_:function(a,b){var c=this._bindingsIndicesByPath,d=c[a],e=this._bindings;if(void 0!==d)return e[d];var f=this._paths,g=this._parsedPaths,h=this._objects,k=this.nCachedObjects_,
+l=Array(h.length);d=e.length;c[a]=d;f.push(a);g.push(b);e.push(l);c=k;for(d=h.length;c!==d;++c)l[c]=new oa(h[c],a,b);return l},unsubscribe_:function(a){var b=this._bindingsIndicesByPath,c=b[a];if(void 0!==c){var d=this._paths,e=this._parsedPaths,f=this._bindings,g=f.length-1,h=f[g];b[a[g]]=c;f[c]=h;f.pop();e[c]=e[g];e.pop();d[c]=d[g];d.pop()}}});Object.assign(yf.prototype,{play:function(){this._mixer._activateAction(this);return this},stop:function(){this._mixer._deactivateAction(this);return this.reset()},
+reset:function(){this.paused=!1;this.enabled=!0;this.time=0;this._loopCount=-1;this._startTime=null;return this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(a){this._startTime=a;return this},setLoop:function(a,b){this.loop=a;this.repetitions=b;return this},setEffectiveWeight:function(a){this.weight=a;
+this._effectiveWeight=this.enabled?a:0;return this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(a){return this._scheduleFading(a,0,1)},fadeOut:function(a){return this._scheduleFading(a,1,0)},crossFadeFrom:function(a,b,c){a.fadeOut(b);this.fadeIn(b);if(c){c=this._clip.duration;var d=a._clip.duration,e=c/d;a.warp(1,d/c,b);this.warp(e,1,b)}return this},crossFadeTo:function(a,b,c){return a.crossFadeFrom(this,b,c)},stopFading:function(){var a=this._weightInterpolant;
+null!==a&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(a));return this},setEffectiveTimeScale:function(a){this.timeScale=a;this._effectiveTimeScale=this.paused?0:a;return this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(a){this.timeScale=this._clip.duration/a;return this.stopWarping()},syncWith:function(a){this.time=a.time;this.timeScale=a.timeScale;return this.stopWarping()},halt:function(a){return this.warp(this._effectiveTimeScale,
+0,a)},warp:function(a,b,c){var d=this._mixer,e=d.time,f=this._timeScaleInterpolant,g=this.timeScale;null===f&&(this._timeScaleInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;d[1]=e+c;f[0]=a/g;f[1]=b/g;return this},stopWarping:function(){var a=this._timeScaleInterpolant;null!==a&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(a));return this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||
+this._mixer._root},_update:function(a,b,c,d){if(this.enabled){var e=this._startTime;if(null!==e){b=(a-e)*c;if(0>b||0===c)return;this._startTime=null;b*=c}b*=this._updateTimeScale(a);c=this._updateTime(b);a=this._updateWeight(a);if(0<a){b=this._interpolants;e=this._propertyBindings;for(var f=0,g=b.length;f!==g;++f)b[f].evaluate(c),e[f].accumulate(d,a)}}else this._updateWeight(a)},_updateWeight:function(a){var b=0;if(this.enabled){b=this.weight;var c=this._weightInterpolant;if(null!==c){var d=c.evaluate(a)[0];
+b*=d;a>c.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=b},_updateTimeScale:function(a){var b=0;if(!this.paused){b=this.timeScale;var c=this._timeScaleInterpolant;if(null!==c){var d=c.evaluate(a)[0];b*=d;a>c.parameterPositions[1]&&(this.stopWarping(),0===b?this.paused=!0:this.timeScale=b)}}return this._effectiveTimeScale=b},_updateTime:function(a){var b=this.time+a,c=this._clip.duration,d=this.loop,e=this._loopCount,f=2202===d;if(0===a)return-1===
+e?b:f&&1===(e&1)?c-b:b;if(2200===d)a:{if(-1===e&&(this._loopCount=0,this._setEndings(!0,!0,!1)),b>=c)b=c;else if(0>b)b=0;else break a;this.clampWhenFinished?this.paused=!0:this.enabled=!1;this._mixer.dispatchEvent({type:"finished",action:this,direction:0>a?-1:1})}else{-1===e&&(0<=a?(e=0,this._setEndings(!0,0===this.repetitions,f)):this._setEndings(0===this.repetitions,!0,f));if(b>=c||0>b){d=Math.floor(b/c);b-=c*d;e+=Math.abs(d);var g=this.repetitions-e;0>=g?(this.clampWhenFinished?this.paused=!0:
+this.enabled=!1,b=0<a?c:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<a?1:-1})):(1===g?(a=0>a,this._setEndings(a,!a,f)):this._setEndings(!1,!1,f),this._loopCount=e,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:d}))}if(f&&1===(e&1))return this.time=b,c-b}return this.time=b},_setEndings:function(a,b,c){var d=this._interpolantSettings;c?(d.endingStart=2401,d.endingEnd=2401):(d.endingStart=a?this.zeroSlopeAtStart?2401:2400:2402,d.endingEnd=b?this.zeroSlopeAtEnd?2401:
+2400:2402)},_scheduleFading:function(a,b,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]=c;return this}});we.prototype=Object.assign(Object.create(ia.prototype),{constructor:we,_bindAction:function(a,b){var c=a._localRoot||this._root,d=a._clip.tracks,e=d.length,f=a._propertyBindings;a=a._interpolants;var g=c.uuid,h=this._bindingsByRootAndName,k=h[g];void 0===
+k&&(k={},h[g]=k);for(h=0;h!==e;++h){var l=d[h],p=l.name,n=k[p];if(void 0===n){n=f[h];if(void 0!==n){null===n._cacheIndex&&(++n.referenceCount,this._addInactiveBinding(n,g,p));continue}n=new ve(oa.create(c,p,b&&b._propertyBindings[h].binding.parsedPath),l.ValueTypeName,l.getValueSize());++n.referenceCount;this._addInactiveBinding(n,g,p)}f[h]=n;a[h].resultBuffer=n.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var b=(a._localRoot||this._root).uuid,c=a._clip.uuid,
+d=this._actionsByClip[c];this._bindAction(a,d&&d.knownActions[0]);this._addInactiveAction(a,c,b)}b=a._propertyBindings;c=0;for(d=b.length;c!==d;++c){var e=b[c];0===e.useCount++&&(this._lendBinding(e),e.saveOriginalState())}this._lendAction(a)}},_deactivateAction:function(a){if(this._isActiveAction(a)){for(var b=a._propertyBindings,c=0,d=b.length;c!==d;++c){var e=b[c];0===--e.useCount&&(e.restoreOriginalState(),this._takeBackBinding(e))}this._takeBackAction(a)}},_initMemoryManager:function(){this._actions=
+[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;var a=this;this.stats={actions:{get total(){return a._actions.length},get inUse(){return a._nActiveActions}},bindings:{get total(){return a._bindings.length},get inUse(){return a._nActiveBindings}},controlInterpolants:{get total(){return a._controlInterpolants.length},get inUse(){return a._nActiveControlInterpolants}}}},
+_isActiveAction:function(a){a=a._cacheIndex;return null!==a&&a<this._nActiveActions},_addInactiveAction:function(a,b,c){var d=this._actions,e=this._actionsByClip,f=e[b];void 0===f?(f={knownActions:[a],actionByRoot:{}},a._byClipCacheIndex=0,e[b]=f):(b=f.knownActions,a._byClipCacheIndex=b.length,b.push(a));a._cacheIndex=d.length;d.push(a);f.actionByRoot[c]=a},_removeInactiveAction:function(a){var b=this._actions,c=b[b.length-1],d=a._cacheIndex;c._cacheIndex=d;b[d]=c;b.pop();a._cacheIndex=null;b=a._clip.uuid;
+c=this._actionsByClip;d=c[b];var e=d.knownActions,f=e[e.length-1],g=a._byClipCacheIndex;f._byClipCacheIndex=g;e[g]=f;e.pop();a._byClipCacheIndex=null;delete d.actionByRoot[(a._localRoot||this._root).uuid];0===e.length&&delete c[b];this._removeInactiveBindingsForAction(a)},_removeInactiveBindingsForAction:function(a){a=a._propertyBindings;for(var b=0,c=a.length;b!==c;++b){var d=a[b];0===--d.referenceCount&&this._removeInactiveBinding(d)}},_lendAction:function(a){var b=this._actions,c=a._cacheIndex,
+d=this._nActiveActions++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_takeBackAction:function(a){var b=this._actions,c=a._cacheIndex,d=--this._nActiveActions,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_addInactiveBinding:function(a,b,c){var d=this._bindingsByRootAndName,e=d[b],f=this._bindings;void 0===e&&(e={},d[b]=e);e[c]=a;a._cacheIndex=f.length;f.push(a)},_removeInactiveBinding:function(a){var b=this._bindings,c=a.binding,d=c.rootNode.uuid;c=c.path;var e=this._bindingsByRootAndName,
+f=e[d],g=b[b.length-1];a=a._cacheIndex;g._cacheIndex=a;b[a]=g;b.pop();delete f[c];a:{for(var h in f)break a;delete e[d]}},_lendBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=this._nActiveBindings++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_takeBackBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=--this._nActiveBindings,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_lendControlInterpolant:function(){var a=this._controlInterpolants,b=this._nActiveControlInterpolants++,
+c=a[b];void 0===c&&(c=new cd(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),c.__cacheIndex=b,a[b]=c);return c},_takeBackControlInterpolant:function(a){var b=this._controlInterpolants,c=a.__cacheIndex,d=--this._nActiveControlInterpolants,e=b[d];a.__cacheIndex=d;b[d]=a;e.__cacheIndex=c;b[c]=e},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(a,b){var c=b||this._root,d=c.uuid;c="string"===typeof a?za.findByName(c,a):a;a=null!==c?c.uuid:a;var e=
+this._actionsByClip[a],f=null;if(void 0!==e){f=e.actionByRoot[d];if(void 0!==f)return f;f=e.knownActions[0];null===c&&(c=f._clip)}if(null===c)return null;b=new yf(this,c,b);this._bindAction(b,f);this._addInactiveAction(b,a,d);return b},existingAction:function(a,b){var c=b||this._root;b=c.uuid;c="string"===typeof a?za.findByName(c,a):a;a=this._actionsByClip[c?c.uuid:a];return void 0!==a?a.actionByRoot[b]||null:null},stopAllAction:function(){for(var a=this._actions,b=this._nActiveActions,c=this._bindings,
+d=this._nActiveBindings,e=this._nActiveBindings=this._nActiveActions=0;e!==b;++e)a[e].reset();for(e=0;e!==d;++e)c[e].useCount=0;return this},update:function(a){a*=this.timeScale;for(var b=this._actions,c=this._nActiveActions,d=this.time+=a,e=Math.sign(a),f=this._accuIndex^=1,g=0;g!==c;++g)b[g]._update(d,a,e,f);a=this._bindings;b=this._nActiveBindings;for(g=0;g!==b;++g)a[g].apply(f);return this},getRoot:function(){return this._root},uncacheClip:function(a){var b=this._actions;a=a.uuid;var c=this._actionsByClip,
+d=c[a];if(void 0!==d){d=d.knownActions;for(var e=0,f=d.length;e!==f;++e){var g=d[e];this._deactivateAction(g);var h=g._cacheIndex,k=b[b.length-1];g._cacheIndex=null;g._byClipCacheIndex=null;k._cacheIndex=h;b[h]=k;b.pop();this._removeInactiveBindingsForAction(g)}delete c[a]}},uncacheRoot:function(a){a=a.uuid;var b=this._actionsByClip;for(d in b){var c=b[d].actionByRoot[a];void 0!==c&&(this._deactivateAction(c),this._removeInactiveAction(c))}var d=this._bindingsByRootAndName[a];if(void 0!==d)for(var e in d)a=
+d[e],a.restoreOriginalState(),this._removeInactiveBinding(a)},uncacheAction:function(a,b){a=this.existingAction(a,b);null!==a&&(this._deactivateAction(a),this._removeInactiveAction(a))}});Rd.prototype.clone=function(){return new Rd(void 0===this.value.clone?this.value:this.value.clone())};xe.prototype=Object.assign(Object.create(E.prototype),{constructor:xe,isInstancedBufferGeometry:!0,copy:function(a){E.prototype.copy.call(this,a);this.maxInstancedCount=a.maxInstancedCount;return this},clone:function(){return(new this.constructor).copy(this)}});
+ye.prototype=Object.assign(Object.create(sb.prototype),{constructor:ye,isInstancedInterleavedBuffer:!0,copy:function(a){sb.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this}});ze.prototype=Object.assign(Object.create(F.prototype),{constructor:ze,isInstancedBufferAttribute:!0,copy:function(a){F.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this}});Object.assign(zf.prototype,{linePrecision:1,set:function(a,b){this.ray.set(a,b)},setFromCamera:function(a,
+b){b&&b.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(b.matrixWorld),this.ray.direction.set(a.x,a.y,.5).unproject(b).sub(this.ray.origin).normalize()):b&&b.isOrthographicCamera?(this.ray.origin.set(a.x,a.y,(b.near+b.far)/(b.near-b.far)).unproject(b),this.ray.direction.set(0,0,-1).transformDirection(b.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(a,b,c){c=c||[];Ae(a,this,c,b);c.sort(Af);return c},intersectObjects:function(a,b,c){c=c||
+[];if(!1===Array.isArray(a))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),c;for(var d=0,e=a.length;d<e;d++)Ae(a[d],this,c,b);c.sort(Af);return c}});Object.assign(Bf.prototype,{set:function(a,b,c){this.radius=a;this.phi=b;this.theta=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.phi=a.phi;this.theta=a.theta;return this},makeSafe:function(){this.phi=Math.max(1E-6,Math.min(Math.PI-1E-6,this.phi));
+return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,b,c){this.radius=Math.sqrt(a*a+b*b+c*c);0===this.radius?this.phi=this.theta=0:(this.theta=Math.atan2(a,c),this.phi=Math.acos(R.clamp(b/this.radius,-1,1)));return this}});Object.assign(Cf.prototype,{set:function(a,b,c){this.radius=a;this.theta=b;this.y=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.theta=a.theta;
+this.y=a.y;return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,b,c){this.radius=Math.sqrt(a*a+c*c);this.theta=Math.atan2(a,c);this.y=b;return this}});Object.assign(Be.prototype,{set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(){var a=new z;return function(b,c){c=a.copy(c).multiplyScalar(.5);
+this.min.copy(b).sub(c);this.max.copy(b).add(c);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(a){void 0===a&&(console.warn("THREE.Box2: .getCenter() target is now required"),a=new z);return this.isEmpty()?a.set(0,
+0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){void 0===a&&(console.warn("THREE.Box2: .getSize() target is now required"),a=new z);return this.isEmpty()?a.set(0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<this.min.x||
+a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new z);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y?!1:!0},
+clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new z);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new z;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&
+a.max.equals(this.max)}});Object.assign(Ce.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0===a&&(console.warn("THREE.Line3: .getCenter() target is now required"),a=new p);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),
+a=new p);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b=new p);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(){var a=new p,b=new p;return function(c,d){a.subVectors(c,this.start);b.subVectors(this.end,this.start);c=b.dot(b);c=b.dot(a)/c;d&&
+(c=R.clamp(c,0,1));return c}}(),closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new p);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});jd.prototype=Object.create(D.prototype);jd.prototype.constructor=jd;jd.prototype.isImmediateRenderObject=
+!0;kd.prototype=Object.create(S.prototype);kd.prototype.constructor=kd;kd.prototype.update=function(){var a=new p,b=new p,c=new da;return function(){var d=["a","b","c"];this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,f=this.geometry.attributes.position,g=this.object.geometry;if(g&&g.isGeometry)for(var h=g.vertices,k=g.faces,l=g=0,p=k.length;l<p;l++)for(var n=k[l],r=0,x=n.vertexNormals.length;r<x;r++){var t=n.vertexNormals[r];a.copy(h[n[d[r]]]).applyMatrix4(e);
+b.copy(t).applyMatrix3(c).normalize().multiplyScalar(this.size).add(a);f.setXYZ(g,a.x,a.y,a.z);g+=1;f.setXYZ(g,b.x,b.y,b.z);g+=1}else if(g&&g.isBufferGeometry)for(d=g.attributes.position,h=g.attributes.normal,r=g=0,x=d.count;r<x;r++)a.set(d.getX(r),d.getY(r),d.getZ(r)).applyMatrix4(e),b.set(h.getX(r),h.getY(r),h.getZ(r)),b.applyMatrix3(c).normalize().multiplyScalar(this.size).add(a),f.setXYZ(g,a.x,a.y,a.z),g+=1,f.setXYZ(g,b.x,b.y,b.z),g+=1;f.needsUpdate=!0}}();mc.prototype=Object.create(D.prototype);
+mc.prototype.constructor=mc;mc.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};mc.prototype.update=function(){var a=new p,b=new p;return function(){this.light.updateMatrixWorld();var c=this.light.distance?this.light.distance:1E3,d=c*Math.tan(this.light.angle);this.cone.scale.set(d,d,c);a.setFromMatrixPosition(this.light.matrixWorld);b.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(b.sub(a));void 0!==this.color?this.cone.material.color.set(this.color):
+this.cone.material.color.copy(this.light.color)}}();nc.prototype=Object.create(S.prototype);nc.prototype.constructor=nc;nc.prototype.updateMatrixWorld=function(){var a=new p,b=new P,c=new P;return function(d){var e=this.bones,f=this.geometry,g=f.getAttribute("position");c.getInverse(this.root.matrixWorld);for(var h=0,k=0;h<e.length;h++){var l=e[h];l.parent&&l.parent.isBone&&(b.multiplyMatrices(c,l.matrixWorld),a.setFromMatrixPosition(b),g.setXYZ(k,a.x,a.y,a.z),b.multiplyMatrices(c,l.parent.matrixWorld),
+a.setFromMatrixPosition(b),g.setXYZ(k+1,a.x,a.y,a.z),k+=2)}f.getAttribute("position").needsUpdate=!0;D.prototype.updateMatrixWorld.call(this,d)}}();oc.prototype=Object.create(pa.prototype);oc.prototype.constructor=oc;oc.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};oc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};pc.prototype=Object.create(D.prototype);pc.prototype.constructor=pc;pc.prototype.dispose=
+function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};pc.prototype.update=function(){var a=.5*this.light.width,b=.5*this.light.height,c=this.line.geometry.attributes.position,d=c.array;d[0]=a;d[1]=-b;d[2]=0;d[3]=a;d[4]=b;d[5]=0;d[6]=-a;d[7]=b;d[8]=0;d[9]=-a;d[10]=-b;d[11]=0;d[12]=a;d[13]=-b;d[14]=0;c.needsUpdate=!0;void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)};qc.prototype=Object.create(D.prototype);qc.prototype.constructor=
+qc;qc.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};qc.prototype.update=function(){var a=new p,b=new G,c=new G;return function(){var d=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var e=d.geometry.getAttribute("color");b.copy(this.light.color);c.copy(this.light.groundColor);for(var f=0,g=e.count;f<g;f++){var h=f<g/2?b:c;e.setXYZ(f,h.r,h.g,h.b)}e.needsUpdate=!0}d.lookAt(a.setFromMatrixPosition(this.light.matrixWorld).negate())}}();
+ld.prototype=Object.create(S.prototype);ld.prototype.constructor=ld;Sd.prototype=Object.create(S.prototype);Sd.prototype.constructor=Sd;md.prototype=Object.create(S.prototype);md.prototype.constructor=md;md.prototype.update=function(){var a=new p,b=new p,c=new da;return function(){this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);var d=this.object.matrixWorld,e=this.geometry.attributes.position,f=this.object.geometry,g=f.vertices;f=f.faces;for(var h=0,k=0,l=f.length;k<l;k++){var p=
+f[k],n=p.normal;a.copy(g[p.a]).add(g[p.b]).add(g[p.c]).divideScalar(3).applyMatrix4(d);b.copy(n).applyMatrix3(c).normalize().multiplyScalar(this.size).add(a);e.setXYZ(h,a.x,a.y,a.z);h+=1;e.setXYZ(h,b.x,b.y,b.z);h+=1}e.needsUpdate=!0}}();rc.prototype=Object.create(D.prototype);rc.prototype.constructor=rc;rc.prototype.dispose=function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};rc.prototype.update=function(){var a=
+new p,b=new p,c=new p;return function(){a.setFromMatrixPosition(this.light.matrixWorld);b.setFromMatrixPosition(this.light.target.matrixWorld);c.subVectors(b,a);this.lightPlane.lookAt(c);void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color));this.targetLine.lookAt(c);this.targetLine.scale.z=c.length()}}();nd.prototype=Object.create(S.prototype);
+nd.prototype.constructor=nd;nd.prototype.update=function(){function a(a,g,h,k){d.set(g,h,k).unproject(e);a=c[a];if(void 0!==a)for(g=b.getAttribute("position"),h=0,k=a.length;h<k;h++)g.setXYZ(a[h],d.x,d.y,d.z)}var b,c,d=new p,e=new Ra;return function(){b=this.geometry;c=this.pointMap;e.projectionMatrix.copy(this.camera.projectionMatrix);a("c",0,0,-1);a("t",0,0,1);a("n1",-1,-1,-1);a("n2",1,-1,-1);a("n3",-1,1,-1);a("n4",1,1,-1);a("f1",-1,-1,1);a("f2",1,-1,1);a("f3",-1,1,1);a("f4",1,1,1);a("u1",.7,1.1,
+-1);a("u2",-.7,1.1,-1);a("u3",0,2,-1);a("cf1",-1,0,1);a("cf2",1,0,1);a("cf3",0,-1,1);a("cf4",0,1,1);a("cn1",-1,0,-1);a("cn2",1,0,-1);a("cn3",0,-1,-1);a("cn4",0,1,-1);b.getAttribute("position").needsUpdate=!0}}();bb.prototype=Object.create(S.prototype);bb.prototype.constructor=bb;bb.prototype.update=function(){var a=new Wa;return function(b){void 0!==b&&console.warn("THREE.BoxHelper: .update() has no longer arguments.");void 0!==this.object&&a.setFromObject(this.object);if(!a.isEmpty()){b=a.min;var c=
+a.max,d=this.geometry.attributes.position,e=d.array;e[0]=c.x;e[1]=c.y;e[2]=c.z;e[3]=b.x;e[4]=c.y;e[5]=c.z;e[6]=b.x;e[7]=b.y;e[8]=c.z;e[9]=c.x;e[10]=b.y;e[11]=c.z;e[12]=c.x;e[13]=c.y;e[14]=b.z;e[15]=b.x;e[16]=c.y;e[17]=b.z;e[18]=b.x;e[19]=b.y;e[20]=b.z;e[21]=c.x;e[22]=b.y;e[23]=b.z;d.needsUpdate=!0;this.geometry.computeBoundingSphere()}}}();bb.prototype.setFromObject=function(a){this.object=a;this.update();return this};bb.prototype.copy=function(a){S.prototype.copy.call(this,a);this.object=a.object;
+return this};bb.prototype.clone=function(){return(new this.constructor).copy(this)};od.prototype=Object.create(S.prototype);od.prototype.constructor=od;od.prototype.updateMatrixWorld=function(a){var b=this.box;b.isEmpty()||(b.getCenter(this.position),b.getSize(this.scale),this.scale.multiplyScalar(.5),D.prototype.updateMatrixWorld.call(this,a))};pd.prototype=Object.create(ma.prototype);pd.prototype.constructor=pd;pd.prototype.updateMatrixWorld=function(a){var b=-this.plane.constant;1E-8>Math.abs(b)&&
+(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.children[0].material.side=0>b?1:0;this.lookAt(this.plane.normal);D.prototype.updateMatrixWorld.call(this,a)};var Td,De;cb.prototype=Object.create(D.prototype);cb.prototype.constructor=cb;cb.prototype.setDirection=function(){var a=new p,b;return function(c){.99999<c.y?this.quaternion.set(0,0,0,1):-.99999>c.y?this.quaternion.set(1,0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();cb.prototype.setLength=
+function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};cb.prototype.setColor=function(a){this.line.material.color.copy(a);this.cone.material.color.copy(a)};cb.prototype.copy=function(a){D.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone);return this};cb.prototype.clone=function(){return(new this.constructor).copy(this)};qd.prototype=
+Object.create(S.prototype);qd.prototype.constructor=qd;Q.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(Q.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(ab.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");
+a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var b=new I,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new p(e.x,e.y,e.z||0))}return b}});Object.assign(Na.prototype,{fromPoints:function(a){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints().");this.setFromPoints(a)}});Ef.prototype=Object.create(ua.prototype);
+Ff.prototype=Object.create(ua.prototype);Ee.prototype=Object.create(ua.prototype);Object.assign(Ee.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}});ld.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};
+nc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};Object.assign(kc.prototype,{extractUrlBase:function(a){console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.");return Vd.extractUrlBase(a)}});Object.assign(Qd.prototype,{setTexturePath:function(a){console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath().");return this.setResourcePath(a)}});Object.assign(le.prototype,
+{setTexturePath:function(a){console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().");return this.setResourcePath(a)}});Object.assign(Be.prototype,{center:function(a){console.warn("THREE.Box2: .center() has been renamed to .getCenter().");return this.getCenter(a)},empty:function(){console.warn("THREE.Box2: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().");
+return this.intersectsBox(a)},size:function(a){console.warn("THREE.Box2: .size() has been renamed to .getSize().");return this.getSize(a)}});Object.assign(Wa.prototype,{center:function(a){console.warn("THREE.Box3: .center() has been renamed to .getCenter().");return this.getCenter(a)},empty:function(){console.warn("THREE.Box3: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().");
+return this.intersectsBox(a)},isIntersectionSphere:function(a){console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)},size:function(a){console.warn("THREE.Box3: .size() has been renamed to .getSize().");return this.getSize(a)}});Ce.prototype.center=function(a){console.warn("THREE.Line3: .center() has been renamed to .getCenter().");return this.getCenter(a)};Object.assign(R,{random16:function(){console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead.");
+return Math.random()},nearestPowerOfTwo:function(a){console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().");return R.floorPowerOfTwo(a)},nextPowerOfTwo:function(a){console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().");return R.ceilPowerOfTwo(a)}});Object.assign(da.prototype,{flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.");return this.toArray(a,b)},
+multiplyVector3:function(a){console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.");return a.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(a){console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.");return this.applyToBufferAttribute(a)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}});
+Object.assign(P.prototype,{extractPosition:function(a){console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().");return this.copyPosition(a)},flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.");return this.toArray(a,b)},getPosition:function(){var a;return function(){void 0===a&&(a=new p);console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");
+return a.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(a){console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().");return this.makeRotationFromQuaternion(a)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(a){console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},multiplyVector4:function(a){console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.");
+return a.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(a){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.");a.transformDirection(this)},crossVector:function(a){console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},
+rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(a){console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.");return this.applyToBufferAttribute(a)},
+applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(a,b,c,d,e,f){console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.");return this.makePerspective(a,b,d,c,e,f)}});Pa.prototype.isIntersectionLine=function(a){console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().");return this.intersectsLine(a)};ja.prototype.multiplyVector3=
+function(a){console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.");return a.applyQuaternion(this)};Object.assign(rb.prototype,{isIntersectionBox:function(a){console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},isIntersectionPlane:function(a){console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().");return this.intersectsPlane(a)},isIntersectionSphere:function(a){console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().");
+return this.intersectsSphere(a)}});Object.assign(ha.prototype,{area:function(){console.warn("THREE.Triangle: .area() has been renamed to .getArea().");return this.getArea()},barycoordFromPoint:function(a,b){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return this.getBarycoord(a,b)},midpoint:function(a){console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint().");return this.getMidpoint(a)},normal:function(a){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");
+return this.getNormal(a)},plane:function(a){console.warn("THREE.Triangle: .plane() has been renamed to .getPlane().");return this.getPlane(a)}});Object.assign(ha,{barycoordFromPoint:function(a,b,c,d,e){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return ha.getBarycoord(a,b,c,d,e)},normal:function(a,b,c,d){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");return ha.getNormal(a,b,c,d)}});Object.assign(ib.prototype,{extractAllPoints:function(a){console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.");
+return this.extractPoints(a)},extrude:function(a){console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.");return new vb(this,a)},makeGeometry:function(a){console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.");return new xb(this,a)}});Object.assign(z.prototype,{fromAttribute:function(a,b,c){console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");
+return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(p.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},
+getPositionFromMatrix:function(a){console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().");return this.setFromMatrixPosition(a)},getScaleFromMatrix:function(a){console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().");return this.setFromMatrixScale(a)},getColumnFromMatrix:function(a,b){console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().");return this.setFromMatrixColumn(b,
+a)},applyProjection:function(a){console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.");return this.applyMatrix4(a)},fromAttribute:function(a,b,c){console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().");
+return this.manhattanLength()}});Object.assign(Z.prototype,{fromAttribute:function(a,b,c){console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},lengthManhattan:function(){console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(I.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}});
+Object.assign(D.prototype,{getChildByName:function(a){console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().");return this.getObjectByName(a)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(a,b){console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.");return this.translateOnAxis(b,a)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}});
+Object.defineProperties(D.prototype,{eulerOrder:{get:function(){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");return this.rotation.order},set:function(a){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");this.rotation.order=a}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});
+Object.defineProperties(Fc.prototype,{objects:{get:function(){console.warn("THREE.LOD: .objects has been renamed to .levels.");return this.levels}}});Object.defineProperty(Gc.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}});Object.defineProperty(Q.prototype,"__arcLengthDivisions",{get:function(){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");
+return this.arcLengthDivisions},set:function(a){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");this.arcLengthDivisions=a}});V.prototype.setLens=function(a,b){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup.");void 0!==b&&(this.filmGauge=b);this.setFocalLength(a)};Object.defineProperties(ca.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(a){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov.");
+this.shadow.camera.fov=a}},shadowCameraLeft:{set:function(a){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left.");this.shadow.camera.left=a}},shadowCameraRight:{set:function(a){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right.");this.shadow.camera.right=a}},shadowCameraTop:{set:function(a){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top.");this.shadow.camera.top=a}},shadowCameraBottom:{set:function(a){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.");
+this.shadow.camera.bottom=a}},shadowCameraNear:{set:function(a){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near.");this.shadow.camera.near=a}},shadowCameraFar:{set:function(a){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far.");this.shadow.camera.far=a}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(a){console.warn("THREE.Light: .shadowBias is now .shadow.bias.");
+this.shadow.bias=a}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(a){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.");this.shadow.mapSize.width=a}},shadowMapHeight:{set:function(a){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.");this.shadow.mapSize.height=a}}});Object.defineProperties(F.prototype,{length:{get:function(){console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead.");
+return this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}});Object.assign(E.prototype,{addIndex:function(a){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().");this.setIndex(a)},addDrawCall:function(a,b,c){void 0!==c&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.");console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup().");this.addGroup(a,b)},
+clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().");this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}});Object.defineProperties(E.prototype,{drawcalls:{get:function(){console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups.");return this.groups}},offsets:{get:function(){console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups.");
+return this.groups}}});Object.assign(Sa.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}});Object.defineProperties(Rd.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},
+onUpdate:{value:function(){console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.");return this}}});Object.defineProperties(L.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},
+wrapRGB:{get:function(){console.warn("THREE.Material: .wrapRGB has been removed.");return new G}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(a){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.");this.flatShading=1===a}}});Object.defineProperties(Ia.prototype,{metal:{get:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.");
+return!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}});Object.defineProperties(ka.prototype,{derivatives:{get:function(){console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");return this.extensions.derivatives},set:function(a){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");this.extensions.derivatives=a}}});Object.assign(ce.prototype,
+{clearTarget:function(a,b,c,d){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead.");this.setRenderTarget(a);this.clear(b,c,d)},animate:function(a){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop().");this.setAnimationLoop(a)},getCurrentRenderTarget:function(){console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().");return this.getRenderTarget()},getMaxAnisotropy:function(){console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().");
+return this.capabilities.getMaxAnisotropy()},getPrecision:function(){console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.");return this.capabilities.precision},resetGLState:function(){console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset().");return this.state.reset()},supportsFloatTextures:function(){console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' ).");return this.extensions.get("OES_texture_float")},
+supportsHalfFloatTextures:function(){console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' ).");return this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' ).");return this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' ).");
+return this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' ).");return this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' ).");return this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.");
+return this.capabilities.vertexTextures},supportsInstancedArrays:function(){console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' ).");return this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(a){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().");this.setScissorTest(a)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},
+addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}});Object.defineProperties(ce.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.");
+this.shadowMap.enabled=a}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.");this.shadowMap.type=a}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}});Object.defineProperties(cf.prototype,
+{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},
+renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});Object.defineProperties(kb.prototype,{wrapS:{get:function(){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");return this.texture.wrapS},set:function(a){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");
+this.texture.wrapS=a}},wrapT:{get:function(){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.");return this.texture.wrapT},set:function(a){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.");this.texture.wrapT=a}},magFilter:{get:function(){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");return this.texture.magFilter},set:function(a){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");this.texture.magFilter=
+a}},minFilter:{get:function(){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.");return this.texture.minFilter},set:function(a){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.");this.texture.minFilter=a}},anisotropy:{get:function(){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.");return this.texture.anisotropy},set:function(a){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.");this.texture.anisotropy=
+a}},offset:{get:function(){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset.");return this.texture.offset},set:function(a){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset.");this.texture.offset=a}},repeat:{get:function(){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat.");return this.texture.repeat},set:function(a){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat.");this.texture.repeat=a}},format:{get:function(){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format.");
+return this.texture.format},set:function(a){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format.");this.texture.format=a}},type:{get:function(){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type.");return this.texture.type},set:function(a){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type.");this.texture.type=a}},generateMipmaps:{get:function(){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.");return this.texture.generateMipmaps},
+set:function(a){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.");this.texture.generateMipmaps=a}}});Object.defineProperties(hf.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}});lc.prototype.load=function(a){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var b=this;(new pe).load(a,
+function(a){b.setBuffer(a)});return this};ue.prototype.getData=function(){console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData().");return this.getFrequencyData()};id.prototype.updateCubeMap=function(a,b){console.warn("THREE.CubeCamera: .updateCubeMap() is now .update().");return this.update(a,b)};jb.crossOrigin=void 0;jb.loadTexture=function(a,b,c,d){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var e=new Gd;e.setCrossOrigin(this.crossOrigin);
+a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a};jb.loadTextureCube=function(a,b,c,d){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var e=new ie;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a};jb.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};jb.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};
+l.WebGLRenderTargetCube=Jb;l.WebGLRenderTarget=kb;l.WebGLRenderer=ce;l.ShaderLib=Qa;l.UniformsLib=J;l.UniformsUtils=va;l.ShaderChunk=K;l.FogExp2=Pb;l.Fog=Qb;l.Scene=vd;l.Sprite=Ec;l.LOD=Fc;l.SkinnedMesh=xd;l.Skeleton=Gc;l.Bone=wd;l.Mesh=pa;l.LineSegments=S;l.LineLoop=yd;l.Line=ma;l.Points=Sb;l.Group=Ob;l.VideoTexture=de;l.DataTexture=lb;l.DataTexture3D=Mb;l.CompressedTexture=Tb;l.CubeTexture=Ya;l.CanvasTexture=Hc;l.DepthTexture=Ic;l.Texture=W;l.AnimationLoader=rf;l.CompressedTextureLoader=sf;l.DataTextureLoader=
+he;l.CubeTextureLoader=ie;l.TextureLoader=Gd;l.ObjectLoader=le;l.MaterialLoader=Pd;l.BufferGeometryLoader=ke;l.DefaultLoadingManager=ta;l.LoadingManager=ge;l.JSONLoader=Qd;l.ImageLoader=ed;l.ImageBitmapLoader=me;l.FontLoader=uf;l.FileLoader=Fa;l.Loader=kc;l.LoaderUtils=Vd;l.Cache=Ib;l.AudioLoader=pe;l.SpotLightShadow=Id;l.SpotLight=Jd;l.PointLight=Kd;l.RectAreaLight=Od;l.HemisphereLight=Hd;l.DirectionalLightShadow=Ld;l.DirectionalLight=Md;l.AmbientLight=Nd;l.LightShadow=Hb;l.Light=ca;l.StereoCamera=
+vf;l.PerspectiveCamera=V;l.OrthographicCamera=hd;l.CubeCamera=id;l.ArrayCamera=Cc;l.Camera=Ra;l.AudioListener=re;l.PositionalAudio=te;l.AudioContext=se;l.AudioAnalyser=ue;l.Audio=lc;l.VectorKeyframeTrack=ic;l.StringKeyframeTrack=Fd;l.QuaternionKeyframeTrack=dd;l.NumberKeyframeTrack=hc;l.ColorKeyframeTrack=Dd;l.BooleanKeyframeTrack=Cd;l.PropertyMixer=ve;l.PropertyBinding=oa;l.KeyframeTrack=qa;l.AnimationUtils=ra;l.AnimationObjectGroup=xf;l.AnimationMixer=we;l.AnimationClip=za;l.Uniform=Rd;l.InstancedBufferGeometry=
+xe;l.BufferGeometry=E;l.Geometry=I;l.InterleavedBufferAttribute=Dc;l.InstancedInterleavedBuffer=ye;l.InterleavedBuffer=sb;l.InstancedBufferAttribute=ze;l.Face3=Xa;l.Object3D=D;l.Raycaster=zf;l.Layers=Yd;l.EventDispatcher=ia;l.Clock=qe;l.QuaternionLinearInterpolant=Ed;l.LinearInterpolant=cd;l.DiscreteInterpolant=Bd;l.CubicInterpolant=Ad;l.Interpolant=Ca;l.Triangle=ha;l.Math=R;l.Spherical=Bf;l.Cylindrical=Cf;l.Plane=Pa;l.Frustum=rd;l.Sphere=Ga;l.Ray=rb;l.Matrix4=P;l.Matrix3=da;l.Box3=Wa;l.Box2=Be;l.Line3=
+Ce;l.Euler=mb;l.Vector4=Z;l.Vector3=p;l.Vector2=z;l.Quaternion=ja;l.Color=G;l.ImmediateRenderObject=jd;l.VertexNormalsHelper=kd;l.SpotLightHelper=mc;l.SkeletonHelper=nc;l.PointLightHelper=oc;l.RectAreaLightHelper=pc;l.HemisphereLightHelper=qc;l.GridHelper=ld;l.PolarGridHelper=Sd;l.FaceNormalsHelper=md;l.DirectionalLightHelper=rc;l.CameraHelper=nd;l.BoxHelper=bb;l.Box3Helper=od;l.PlaneHelper=pd;l.ArrowHelper=cb;l.AxesHelper=qd;l.Shape=ib;l.Path=Na;l.ShapePath=ne;l.Font=oe;l.CurvePath=ab;l.Curve=Q;
+l.ImageUtils=jb;l.ShapeUtils=Za;l.WebGLUtils=df;l.WireframeGeometry=Ub;l.ParametricGeometry=Jc;l.ParametricBufferGeometry=Vb;l.TetrahedronGeometry=Lc;l.TetrahedronBufferGeometry=Wb;l.OctahedronGeometry=Mc;l.OctahedronBufferGeometry=tb;l.IcosahedronGeometry=Nc;l.IcosahedronBufferGeometry=Xb;l.DodecahedronGeometry=Oc;l.DodecahedronBufferGeometry=Yb;l.PolyhedronGeometry=Kc;l.PolyhedronBufferGeometry=ya;l.TubeGeometry=Pc;l.TubeBufferGeometry=Zb;l.TorusKnotGeometry=Qc;l.TorusKnotBufferGeometry=$b;l.TorusGeometry=
+Rc;l.TorusBufferGeometry=ac;l.TextGeometry=Wc;l.TextBufferGeometry=bc;l.SphereGeometry=Xc;l.SphereBufferGeometry=wb;l.RingGeometry=Yc;l.RingBufferGeometry=cc;l.PlaneGeometry=yc;l.PlaneBufferGeometry=qb;l.LatheGeometry=Zc;l.LatheBufferGeometry=dc;l.ShapeGeometry=xb;l.ShapeBufferGeometry=yb;l.ExtrudeGeometry=vb;l.ExtrudeBufferGeometry=Sa;l.EdgesGeometry=ec;l.ConeGeometry=$c;l.ConeBufferGeometry=ad;l.CylinderGeometry=zb;l.CylinderBufferGeometry=$a;l.CircleGeometry=bd;l.CircleBufferGeometry=fc;l.BoxGeometry=
+Kb;l.BoxBufferGeometry=pb;l.ShadowMaterial=Ab;l.SpriteMaterial=hb;l.RawShaderMaterial=gc;l.ShaderMaterial=ka;l.PointsMaterial=Ha;l.MeshPhysicalMaterial=Bb;l.MeshStandardMaterial=Ta;l.MeshPhongMaterial=Ia;l.MeshToonMaterial=Cb;l.MeshNormalMaterial=Db;l.MeshLambertMaterial=Eb;l.MeshDepthMaterial=eb;l.MeshDistanceMaterial=fb;l.MeshBasicMaterial=Ea;l.MeshMatcapMaterial=Fb;l.LineDashedMaterial=Gb;l.LineBasicMaterial=T;l.Material=L;l.Float64BufferAttribute=xc;l.Float32BufferAttribute=C;l.Uint32BufferAttribute=
+ob;l.Int32BufferAttribute=wc;l.Uint16BufferAttribute=nb;l.Int16BufferAttribute=vc;l.Uint8ClampedBufferAttribute=uc;l.Uint8BufferAttribute=tc;l.Int8BufferAttribute=sc;l.BufferAttribute=F;l.ArcCurve=jc;l.CatmullRomCurve3=ua;l.CubicBezierCurve=Ja;l.CubicBezierCurve3=Ua;l.EllipseCurve=wa;l.LineCurve=Aa;l.LineCurve3=Ka;l.QuadraticBezierCurve=La;l.QuadraticBezierCurve3=Va;l.SplineCurve=Ma;l.REVISION="98";l.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};l.CullFaceNone=0;l.CullFaceBack=1;l.CullFaceFront=2;l.CullFaceFrontBack=
+3;l.FrontFaceDirectionCW=0;l.FrontFaceDirectionCCW=1;l.BasicShadowMap=0;l.PCFShadowMap=1;l.PCFSoftShadowMap=2;l.FrontSide=0;l.BackSide=1;l.DoubleSide=2;l.FlatShading=1;l.SmoothShading=2;l.NoColors=0;l.FaceColors=1;l.VertexColors=2;l.NoBlending=0;l.NormalBlending=1;l.AdditiveBlending=2;l.SubtractiveBlending=3;l.MultiplyBlending=4;l.CustomBlending=5;l.AddEquation=100;l.SubtractEquation=101;l.ReverseSubtractEquation=102;l.MinEquation=103;l.MaxEquation=104;l.ZeroFactor=200;l.OneFactor=201;l.SrcColorFactor=
+202;l.OneMinusSrcColorFactor=203;l.SrcAlphaFactor=204;l.OneMinusSrcAlphaFactor=205;l.DstAlphaFactor=206;l.OneMinusDstAlphaFactor=207;l.DstColorFactor=208;l.OneMinusDstColorFactor=209;l.SrcAlphaSaturateFactor=210;l.NeverDepth=0;l.AlwaysDepth=1;l.LessDepth=2;l.LessEqualDepth=3;l.EqualDepth=4;l.GreaterEqualDepth=5;l.GreaterDepth=6;l.NotEqualDepth=7;l.MultiplyOperation=0;l.MixOperation=1;l.AddOperation=2;l.NoToneMapping=0;l.LinearToneMapping=1;l.ReinhardToneMapping=2;l.Uncharted2ToneMapping=3;l.CineonToneMapping=
+4;l.UVMapping=300;l.CubeReflectionMapping=301;l.CubeRefractionMapping=302;l.EquirectangularReflectionMapping=303;l.EquirectangularRefractionMapping=304;l.SphericalReflectionMapping=305;l.CubeUVReflectionMapping=306;l.CubeUVRefractionMapping=307;l.RepeatWrapping=1E3;l.ClampToEdgeWrapping=1001;l.MirroredRepeatWrapping=1002;l.NearestFilter=1003;l.NearestMipMapNearestFilter=1004;l.NearestMipMapLinearFilter=1005;l.LinearFilter=1006;l.LinearMipMapNearestFilter=1007;l.LinearMipMapLinearFilter=1008;l.UnsignedByteType=
+1009;l.ByteType=1010;l.ShortType=1011;l.UnsignedShortType=1012;l.IntType=1013;l.UnsignedIntType=1014;l.FloatType=1015;l.HalfFloatType=1016;l.UnsignedShort4444Type=1017;l.UnsignedShort5551Type=1018;l.UnsignedShort565Type=1019;l.UnsignedInt248Type=1020;l.AlphaFormat=1021;l.RGBFormat=1022;l.RGBAFormat=1023;l.LuminanceFormat=1024;l.LuminanceAlphaFormat=1025;l.RGBEFormat=1023;l.DepthFormat=1026;l.DepthStencilFormat=1027;l.RedFormat=1028;l.RGB_S3TC_DXT1_Format=33776;l.RGBA_S3TC_DXT1_Format=33777;l.RGBA_S3TC_DXT3_Format=
+33778;l.RGBA_S3TC_DXT5_Format=33779;l.RGB_PVRTC_4BPPV1_Format=35840;l.RGB_PVRTC_2BPPV1_Format=35841;l.RGBA_PVRTC_4BPPV1_Format=35842;l.RGBA_PVRTC_2BPPV1_Format=35843;l.RGB_ETC1_Format=36196;l.RGBA_ASTC_4x4_Format=37808;l.RGBA_ASTC_5x4_Format=37809;l.RGBA_ASTC_5x5_Format=37810;l.RGBA_ASTC_6x5_Format=37811;l.RGBA_ASTC_6x6_Format=37812;l.RGBA_ASTC_8x5_Format=37813;l.RGBA_ASTC_8x6_Format=37814;l.RGBA_ASTC_8x8_Format=37815;l.RGBA_ASTC_10x5_Format=37816;l.RGBA_ASTC_10x6_Format=37817;l.RGBA_ASTC_10x8_Format=
+37818;l.RGBA_ASTC_10x10_Format=37819;l.RGBA_ASTC_12x10_Format=37820;l.RGBA_ASTC_12x12_Format=37821;l.LoopOnce=2200;l.LoopRepeat=2201;l.LoopPingPong=2202;l.InterpolateDiscrete=2300;l.InterpolateLinear=2301;l.InterpolateSmooth=2302;l.ZeroCurvatureEnding=2400;l.ZeroSlopeEnding=2401;l.WrapAroundEnding=2402;l.TrianglesDrawMode=0;l.TriangleStripDrawMode=1;l.TriangleFanDrawMode=2;l.LinearEncoding=3E3;l.sRGBEncoding=3001;l.GammaEncoding=3007;l.RGBEEncoding=3002;l.LogLuvEncoding=3003;l.RGBM7Encoding=3004;
+l.RGBM16Encoding=3005;l.RGBDEncoding=3006;l.BasicDepthPacking=3200;l.RGBADepthPacking=3201;l.TangentSpaceNormalMap=0;l.ObjectSpaceNormalMap=1;l.CubeGeometry=Kb;l.Face4=function(a,b,c,d,e,f,g){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");return new Xa(a,b,c,e,f,g)};l.LineStrip=0;l.LinePieces=1;l.MeshFaceMaterial=function(a){console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead.");return a};l.MultiMaterial=function(a){void 0===a&&(a=[]);
+console.warn("THREE.MultiMaterial has been removed. Use an Array instead.");a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};l.PointCloud=function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new Sb(a,b)};l.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new Ec(a)};l.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new Sb(a,b)};l.PointCloudMaterial=
+function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new Ha(a)};l.ParticleBasicMaterial=function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");return new Ha(a)};l.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new Ha(a)};l.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new p(a,
+b,c)};l.DynamicBufferAttribute=function(a,b){console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead.");return(new F(a,b)).setDynamic(!0)};l.Int8Attribute=function(a,b){console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.");return new sc(a,b)};l.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");return new tc(a,b)};
+l.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new uc(a,b)};l.Int16Attribute=function(a,b){console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.");return new vc(a,b)};l.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new nb(a,b)};l.Int32Attribute=function(a,
+b){console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.");return new wc(a,b)};l.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");return new ob(a,b)};l.Float32Attribute=function(a,b){console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.");return new C(a,b)};l.Float64Attribute=function(a,b){console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.");
+return new xc(a,b)};l.ClosedSplineCurve3=Ef;l.SplineCurve3=Ff;l.Spline=Ee;l.AxisHelper=function(a){console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper.");return new qd(a)};l.BoundingBoxHelper=function(a,b){console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.");return new bb(a,b)};l.EdgesHelper=function(a,b){console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.");return new S(new ec(a.geometry),new T({color:void 0!==
+b?b:16777215}))};l.WireframeHelper=function(a,b){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.");return new S(new Ub(a.geometry),new T({color:void 0!==b?b:16777215}))};l.XHRLoader=function(a){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader.");return new Fa(a)};l.BinaryTextureLoader=function(a){console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.");return new he(a)};l.GeometryUtils={merge:function(a,b,c){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");
+if(b.isMesh){b.matrixAutoUpdate&&b.updateMatrix();var d=b.matrix;b=b.geometry}a.merge(b,d,c)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};l.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js.");this.projectVector=function(a,b){console.warn("THREE.Projector: .projectVector() is now vector.project().");a.project(b)};this.unprojectVector=function(a,
+b){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject().");a.unproject(b)};this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}};l.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")};l.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},
+attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};l.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")};Object.defineProperty(l,"__esModule",{value:!0})});